VPS
Main PagecPanel and DirectAdmin LicensingServer Management PlansVirtual Private ServersDedicated Servers
Control Panel Licensing
ServerTune ResellersResellersSpecial PromotionsServerTune SpecialsHomeAbout ServerTuneContact usTechnical SupportKB
ServerTune Main Page
Space
Space
Our most popular products:

SPECIAL PROMOTION: cPanel License $36 /month. more info

Issues, Tips, and Solutions

Protect your server with Mod Security rules written specifically for your system. more info ...

Space
Search:    Advanced search
Browse by category:
HowTo: Tweak php for maximum execution time for scripts
Printer Friendly
email to a friend
Add comment Add comment
Views: 2341
Votes: 1
Comments: 0
Posted: 09 Jun, 2007
by: Support T.
* * * * *
Updated: 27 Aug, 2008
by: Support T.
PHP by default places resource limits on all php scripts using 3 directives:
  • max_execution_time : Maximum execution time of each script, in seconds (default 30 sec)
  • max_input_time : Maximum amount of time each script may spend parsing request data (60 )
  • memory_limit : Maximum amount of memory a script may consume (default 8MB)

A php script might timed out because of resource limits. All you need to do is setup a new resource limits so that script will get executed.

Edit Php.ini file /etc/php.ini (or /usr/lib/php.ini) file and adjust the resource limits:

max_execution_time = 600
max_input_time = 120
memory_limit = 64M

Then restart Apache web server :
/sbin/services httpd restart

NOTE:
If you experience email problem of any kind, we suggest you sign up for the Xpress Plan to put your server in perfect working condition. Our Linux certified engineers are ready to fix any problem you might have with your server. If you have any questions, please don't hesitate to send a message to

Other articles in this Category
document HowTo :: FFmpeg and FFpeg-Php
document Call to unsupported or undefined function mysql_connect
document Php scripts returning errors when using: php_flag and php_value
document FFmpeg :: headers not found. Make sure you've built ffmpeg as shared libs
document Fatal error: Allowed memory size of 22468 bytes exhausted (tried to allocate 446810 bytes) in /path/file.php
document FFmpeg :: libamrnb.so.2: cannot open shared object file: No such file or directory
document HowTo secure your vBulletin Forum



RSS