I'm having errors, please help.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/runestra/public_html/chat/Sources/Subs-Post.php on line 1655
the subs-post.php is the main problem. Here's the code on line 1655
if (count(array_intersect($allowed, $row['additional_groups'])) == 0)
continue;
}
The problem isn't with your code it's with your server configuration. Do a quick google search of "Fatal error: Allowed memory size" or contact your host for assistance.
http://www.simplemachines.org/community/index.php?topic=502354.0
This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8MB limit. Don't fret, though, because this is an easy problem to overcome.
To change the memory limit for one specific script by including a line such as this at the top of the script:
ini_set("memory_limit","128M");
Another way how this could be fixed is by modifying .htaccess file and adding this line to it:
php_value memory_limit 128M
i got this response from one of the staff members on the webhost.
Do i actually follow that?
Now your host, if responsive, should increase the limit on their end. But, please follow the second method that they listed. In the root of SMF edit the .htaccess file and add the line. Save the file and reupload it.
I don't see any .htaccess file..
It'll be there, almost for certain. Do you have your FTP client set to show hidden files?
http://www.simplemachines.org/community/index.php?topic=502354.msg3531634#msg3531634
Your host is saying that their default is set at 8MB but thats not the case for you as your error message says:
QuoteFatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes)
...and 33554432 bytes equates to 32MB.
So your current setting is: memory_limit = 32M
Increase it as mentioned above to 64M or even 128M as Kindred mentioned in his provided link. I've only mentioned this as the info your host gave you isn't entirely accurate.
So i followed the phpinfo.php file > You can try and use a .htaccess file to overwrite the memory limit, but if the server controls it (which is probably the case, since SMF, I believe tries to set it high enough using ini_set when installing a mod package), than it probably won't work, and you are stuck with the server php memory limit. Creating a phpinfo.php file, will tell you your php memory limit.
Code: [Select]
<?php echo phpinfo(); ?>
Alternatively, you could try and up the ini_set value on the php memory_limit when installing packages in SMF (not sure what the current setting is for this), but that might also work, using the ini_set
Code: [Select]
ini_set('memory_limit','64M');
& it should like this?
<?php echo phpinfo(); ?>
ini_set('memory_limit','64M');
If anyone can help me over teamviewer or something because i don't know what to do really, sorry.
the phpinfo routine just shows you the information on how php is set up... it doesn't do anything or fix anything with regards to the memory limit.
and it is just the <?php echo phpinfo(); ?> line in the file.. that's it.
the other code line is something to try - but probably won't work anyway, since you will likely run into the memory limit on other pages as well...
you seem tohave missed the part below that where it talks about htaccess
Quote
In .htaccess, you can try to add the following:
php_value memory_limit 64M
If you add this and get a 500 Internal Server Error, than you are running PHP in CGI Mode, and should ask the server to up the memory_limit in the php.ini file, or perhaps you can do this yourself. But if you can't, ask the server to do this.
Ok, i can cancel my payment on hosting24 & move on to another host right now, so should i?
Quote from: Kindred on June 10, 2013, 01:35:27 PM
the phpinfo routine just shows you the information on how php is set up... it doesn't do anything or fix anything with regards to the memory limit.
and it is just the <?php echo phpinfo(); ?> line in the file.. that's it.
the other code line is something to try - but probably won't work anyway, since you will likely run into the memory limit on other pages as well...
you seem tohave missed the part below that where it talks about htaccess
Quote
In .htaccess, you can try to add the following:
php_value memory_limit 64M
If you add this and get a 500 Internal Server Error, than you are running PHP in CGI Mode, and should ask the server to up the memory_limit in the php.ini file, or perhaps you can do this yourself. But if you can't, ask the server to do this.
I do not see any .htacess file, if you want, you can teamviewer me please?
if you are on hosting24... then, since that is a host with known issues regarding overselling and incorrect reporting on the actual memory limits... it is my opinion that, yes, you shoudl move hosts. The actual decision is up to you...
I don't use teamview.
I am fairly certain that you do have an .htaccess file... however, if you did not, you could create it.
that being said... if you are on hosting24, it won't matter. they don't report the memory correctly (it lies with the memory it reports as available) and they don't respect the increase command either.
As Kindred says it's your call but might not be necessary.
Creating a .htaccess is pretty simple.
It's merely a text file, for example like
myfile.txt, only it's called .htaccess without the .txt ending.
You simply create that file, add the line that was mentioned:
Quotephp_value memory_limit 64M
or
Quotephp_value memory_limit 128M
........... and upload it to the root of your site. Done.
Maybe try that first ?
Quote from: Storman™ on June 10, 2013, 01:45:28 PM
As Kindred says it's your call but might not be necessary.
Creating a .htaccess is pretty simple.
It's merely a text file, for example like myfile.txt, only it's called .htaccess without the .txt ending.
You simply create that file, add the line that Kindred mentioned, and upload it to the root of your site. Done.
Maybe try that first ?
Ok, so i'm assuming that i upload the .htaccess file on the smf directory? (smf folder)
yep, same place as the index.php file ;)
(P.S. If you get stuck send me a ftp login (via pm) and I'll do it a few minutes for you)
Quote from: Storman™ on June 10, 2013, 01:52:42 PM
yep, same place as the index.php file ;)
(P.S. If you get stuck send me a ftp login (via pm) and I'll do it a few minutes for you)
still giving me this error whenever i try to install a mod.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /home/runestra/public_html/chat/Sources/Subs-Post.php on line 185
Doesn't look like it's doing anything.
Maybe post your .htaccess file as an attachment and we'll check it.
I've done it correctly i believe
Yes it's correct which makes me wonder if your host allows it !
You could send back a support ticket to them and say what they suggested didn't work..
Or leave and go elsewhere...
Quote from: Storman™ on June 10, 2013, 02:05:08 PM
Yes it's correct, try it again with:
Quotephp_value memory_limit 128M
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/runestra/public_html/chat/Sources/Subs-Post.php on line 531
Nope..
Sorry see my edited post above (128 was never going to work)... ;)
Quote from: Storman™ on June 10, 2013, 02:09:11 PM
Sorry see my edited post above (128 was never going to work)... ;)
will anything work? & i'm talking to the staff member again.
so they replied with this comment
Should be fixed now.
I hope that I have addressed all of your concerns, but please feel free to reply this ticket if you require further assistance.
but i'm still experiencing the problem..
Quote from: Kindred on June 10, 2013, 01:43:00 PM
that being said... if you are on hosting24, it won't matter. they don't report the memory correctly (it lies with the memory it reports as available) and they don't respect the increase command either.
Quote from: Kindred on June 10, 2013, 02:53:22 PM
Quote from: Kindred on June 10, 2013, 01:43:00 PM
that being said... if you are on hosting24, it won't matter. they don't report the memory correctly (it lies with the memory it reports as available) and they don't respect the increase command either.
I use to host smf on hosting24 before & now i'm having this problem, but i'll switch hosts, thanks!
btw, which host is good? I can do 10-15$ monthly.
we have a whole board filled with decent hosts. :)
personally, I use ICDsoft.
Quote from: Kindred on June 10, 2013, 02:57:49 PM
we have a whole board filled with decent hosts. :)
personally, I use ICDsoft.
looks good, so it can host smf + other things like minecraft connecting to the webserver?
not sure about that, since I only run websites, I don't play games :)
I'm sorry, but I am unable to locate any real advice from the SMF staff on how this issue can be resolved. They seem to be trying to convince You that our memory_limit is not set to 128M. You can find our PHPinfo file @ http://server53.hosting24.com/phpinfo.php which indicates that the memory_limit is in fact set to 128M.
We would suggest getting in touch with their support again explaining them that the memory_limit is in fact set to 128M or try using a different forum software which does not have such issues.
they're saying that the memory issue or w/e is fine..If so, what's causing this error?
Just a small hunch, this...
Can you confirm, with your host, that you have full CHOWN ownership of the files on your site?
K@, that would not have any effect on the memory limits...
tas...
http://www.simplemachines.org/community/index.php?topic=502354.msg3558991#msg3558991
No, it wouldn't. But, as his host claims he has 128 meg, I'm kinda fishing... :P