Hi,
Is PHP's max_execution_time = 3 enough for an average Drupal 5.1 site?
I have error messages like below often enough when processing images in nodes or saving some settings in Drupal's admin area:
"Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 640 bytes) in /includes/image.inc on line 238",
"Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 1024 bytes) in /sites/default/modules/views/views_cache.inc on line 114".
When trying to change Garland's themes color scheme I get error "There is not enough memory available to PHP to change this theme's color scheme. You need at least 357.92 KB more."
BTW, my hosting company is running PHP in safe mode, so I can't overwrite any php.ini settings. Hosting company advised me to optimize my scripts (Drupal) instead of rising time limit..
Other php.ini settings:
max_execution_time 3
max_input_time 30
memory_limit 24M
post_max_size 20M
upload_max_filesize 16M
Any advice is appriciated.
Thanks,
Tormi
Comments
no 3 seconds is not enough
no 3 seconds is not enough time your host is far too limiting with that kind of execution time. get your money back and get a new host.
Hi, I agree that is very
Hi,
I agree that is very very low, i have it set to 60 for my Drupal sites.
With the image processing you could try switching to imageMagick (if you have it installed), it doesn't rely on PHP memory so may help.
as for the other errors i'd ask your host to increase the max_execution_time to 60 and if they won't i'd move hosts.
cheers
Tom
______________________________________________
http://adrenalinehub.com/thomjjames - Action Sports Community
http://www.tomswebstuff.com
http://edgecreations.co.uk
______________________________________________
https://tomswebstuff.com
Thanks
I'll follow those suggestions, thank you;)
Tormi
how do i change: PHP's max_execution_time
i'm a complete beginner with drupal and i ran into the same problem when trying to change the garland theme color scheme. it gave me this error, but i don't know where to change the PHP setting:
>There is not enough memory available to PHP to change this theme's color scheme. You need at least 847.02 KB more. Check the PHP >documentation for more information.
can someone help a newcomer?
what should the number be?
thanks.
---
you wouldn't adjust a max_execution_time value for a not enough memory error, you would adjust memory_limit value for your problem.
I do it by copying my hosts php.ini file and changing the max_execuition_time string. this is called a custom php.ini file after the changes are made you drop it in your drupal root file.
whether your host allows you to use custom php.ini files is another issue. you may have to ask your host to increase you memory_limit.
also see: http://drupal.org/node/76156
php.ini on godaddy shared virtual hosting
While this is an old discussion thread, let me just chip in: if you are running php5 on godaddy, then the values in php.ini are NOT overwriting the system defaults.
The trick is to rename php.ini to php5.ini and change the values in that.
I had the problem that "max_execution_time 30" (the current godaddy default) was not enough, and the above trick helped to change it.
Peter