Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Fatal error: Allowed memory size of X bytes exhausted  (Read 61374 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Fatal error: Allowed memory size of X bytes exhausted
« on: July 05, 2013, 08:34:02 am »

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:

Code: [Select]
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

« Last Edit: July 27, 2015, 04:40:45 pm by allvip »
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Fatal error: Allowed memory size of X bytes exhausted
« Reply #1 on: July 05, 2013, 08:46:51 am »

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.
« Last Edit: December 06, 2014, 02:21:46 pm by allvip »
Logged

haters

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Fatal error: Allowed memory size of X bytes exhausted
« Reply #2 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.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Fatal error: Allowed memory size of X bytes exhausted
« Reply #3 on: July 10, 2013, 06:19:20 pm »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Fatal error: Allowed memory size of X bytes exhausted
« Reply #4 on: July 13, 2013, 10:25:18 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.
« Last Edit: March 01, 2014, 08:26:17 am by allvip »
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Fatal error: Allowed memory size of X bytes exhausted
« Reply #5 on: December 06, 2014, 02:23:46 pm »

Always ask your host before you buy if you have can edit to php.ini, if you can have .htaccess for hotlinking etc.
« Last Edit: December 09, 2014, 01:14:43 pm by allvip »
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.