Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Creating thumbnails from big images
Old 01-03-2006, 11:12 AM Creating thumbnails from big images
TyR
TyR's Avatar
Super Talker

Posts: 139
Location: Frei - Norway
Trades: 0
Hi, I made a little gallery script a while ago that automaticly created thumbnails from the images I uploaded. It worked great untill I tried to upload images that was over 1mb or something :/

Does anyone know how to do this? (I was using the newest GD lib btw)
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
TyR is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-06-2006, 05:45 PM
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
On most servers there is a maximum execution time of 30 seconds. Resizing big images takes a lot of time, so I wouldn't be surprised if your script wasn't ready when the server terminated it. To change this time, you have 2 possibilities:

through .htaccess for php:
Code:
AddType application/x-httpd-php .php
<IfModule mod_php4.c>
  php_value max_execution_time 600
  php_value max_input_time 600
</IfModule>
Possibly, you'll have to use a different name instead of "mod_php4.c".

In the script itself:
PHP Code:
<?php
  $sec
=600#max execution time in seconds, 10 minutes in this case
  
set_time_limit($sec);
?>
This doesn't work in Safe Mode however.

If that doesn't help, maybe you could try to use ImageMagick, which is probably installed on your server.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Reply     « Reply to Creating thumbnails from big images
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09670 seconds with 12 queries