The error message you are getting :
Allowed memory size of 33554432 bytes
exhausted (tried to allocate 19456
bytes)
Indicates that you are trying to allocate more than the 33554432 bytes you are allowed to use ; ie 32 MB :
; 33554432/1024/1024
32
It indicates that the allocation that failed was when PHP tryied to allocate 19 Kbytes ; but there had already been almost 32MB allocated -- those allocations did not fail, as their total was less than 32 MB.
The "19456 bytes" part of the error message is not what is really relevant : what is relevant is that your memory_limit
is set at 32 MB.
Considering the memory_limit
is some kind of security, it would be strange that your hosting provider allows you to change its value...
If you are on shared hosting, it would mean that anyone on the server could get any amount of memory they want... Which would not be that nice for the other users on the same server !
BTW : 32MB is actually a quite reasonable value -- I've never seen a server configured to allow more than 32 MB for a web application... And the default value for PHP 5.2 seems to be 16 MB, according to the manual.
(And I've been working with Drupal for a couple of months)
About the error 500, I don't have a lot of ideas... One possibility might be that the safe_mode
is activated, and that it doesn't allow setting the memory_limit at execution time.
The manual doesn't see to say much about that, but there is a bit of information under the max_execution_time
directive :
You can not change this setting with
ini_set()
when running in safe mode.
The only workaround is to turn off
safe mode or by changing the time
limit in the php.ini.
I suppose the same is true about memory_limit
; it would seem logical, anyway.