Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: ne.miguelito on July 06, 2008, 08:01:46 PM

Title: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes)
Post by: ne.miguelito on July 06, 2008, 08:01:46 PM
Hello,

In my forum there is a member that when he click to see the personal messages appears this error:

QuoteFatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /home/nemigue/public_html/Sources/Load.php on line 971


but it's strange because the error just appears to him, anyone know's how to resolve this?
Title: Re: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes)
Post by: Oldiesmann on July 06, 2008, 08:29:23 PM
There's a PHP setting that specifies how much memory a script is allowed to use. When this limit is exceeded, you get that error. In this case, the limit is 32MB, and the script tried to use 35 additional bytes.

It's hard to say why that would only be happening for him, but increasing the memory limit for SMF to 33MB should fix the issue.

Add this code to the beginning of index.php right after the opening PHP tag (on its own line of course):

ini_set('memory_limit', '33M');
Title: Re: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes)
Post by: ne.miguelito on July 06, 2008, 08:48:50 PM
is to change the index.php  of the public_html?

I change and appears the same error, in attachment is my index.php to see if i do the things right...

Title: Re: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes)
Post by: greyknight17 on July 06, 2008, 11:19:31 PM
Try increasing that number to like 40M to see if it helps.

Does your host allow you to edit your php.ini file? You might want to ask them to see if they can increase the memory_limit for you instead. They should be able to do this for you on their end :)
Title: Re: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes)
Post by: ne.miguelito on July 07, 2008, 03:35:21 AM
I already altered up to 50 M, and gives the same error...

I cannot alter php.ini, nor I know where he is...
Title: Re: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes)
Post by: greyknight17 on July 08, 2008, 11:29:17 AM
Contact your host.