News:

Join the Facebook Fan Page.

Main Menu

can't upload any mods

Started by tas562, June 09, 2013, 09:41:37 PM

Previous topic - Next topic

tas562

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;
}

shadow82x

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.
Colin B
Former Spammer, Customize, & Support Team Member

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tas562

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?

Colin

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.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tas562

I don't see any .htaccess file..

kat

It'll be there, almost for certain. Do you have your FTP client set to show hidden files?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Storman™

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.

tas562

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.

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tas562

Ok, i can cancel my payment on hosting24 & move on to another host right now, so should i?

tas562

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?

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Storman™

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 ?

tas562

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)

Storman™

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)

tas562

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

Storman™

Doesn't look like it's doing anything.

Maybe post your .htaccess file as an attachment and we'll check it.

tas562

I've done it correctly i believe

Advertisement: