Fatal error: Allowed memory size of X bytes exhausted Fatal error: Allowed memory size of X bytes exhausted
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Fatal error: Allowed memory size of X bytes exhausted

Started by allvip, July 05, 2013, 08:34:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allvip

I had the same problem on my shared host:

Fatal error: Allowed memory size of xxxxxxxx bytes exhausted (tried to allocate xxxxx bytes ) in /gallery/include/picmgmt.inc.php on line 439  - gallery is the name of my coppermine directory


I can not edit php.ini (my host did not allowed me access to php.ini) and in coppermine docs says but I can not do nothing if I don't have access to php.ini.

I FINALLY found the solution:

I edited the file include/picmgmt.inc.php ( because the error shows but I need to allocate more memory size in picmgmt.inc.php ) like this:

ad this code:

ini_set ('memory_limit', '150M');

at the begining of the file after <?php :


now I can upload 6000x4500 - 4mb - pixel image.before my limit was 1400px image. A big file needs more server memory.

Another method it to use ImageMagick: http://forum.coppermine-gallery.net/index.php/topic,77929.msg376673.html#msg376673

Config - File settings - Method for resizing images - choose ImageMagick.

DETAILED TOPIC ABOUT "memory size of X bytes exhausted :

No further photos can be added to an album - batch add and http upload fails:   
http://forum.coppermine-gallery.net/index.php/topic,77929.0.html


allvip

#1
If 150m is not ok for you then ad 200 or more.

Many shared host allows to edit php.ini, but the host I use to have, did not.

haters

I seem to have this error as well. What you've said to do hasn't helped. Just gives me an error and I can't even access to upload.php page.

phill104

Not all servers support the above method. It can be done via the above, via a .htaccess file or via a php.ini file. Best bet is to speak to your host and see what they suggest.
It is a mistake to think you can solve any major problems just with potatoes.

allvip

Quote from: haters on July 10, 2013, 06:10:23 PM
I seem to have this error as well. What you've said to do hasn't helped. Just gives me an error and I can't even access to upload.php page.

Can you please post the full error path like this:

Fatal error: Allowed memory size of xxxxxxxx bytes exhausted (tried to allocate xxxxx bytes ) in /gallery/include/picmgmt.inc.php on line 439

Does the error says memmory exhausted in picmgmt.inc.php or your error is diffrent?
If is not picmgmt.inc.php then ad the code in te file showed in the error.

If you have access to ftp upload on your server you can use filezilla https://filezilla-project.org/ to overwrite the uploded images with the real size images.

allvip

Always ask your host before you buy if you have can edit to php.ini, if you can have .htaccess for hotlinking etc.