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 134217728 bytes exhausted ...  (Read 1765 times)

0 Members and 1 Guest are viewing this topic.

nowordneeded

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 224

The gallery I'm inquiring about is at http://charliecox.org/gallery and is running the current stable version of 1.6.09.

The problem I'm having is with this error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) imageobject_gd.class.php on line 403

I've tried all remedies including upping the file size in the .htaccess and php.ini files. Didn't help. I then went into my PHP Version in the options and upped all values to a higher one. Result: Still no go. The issue is causing the attached image. Here's the headbanging thing, all the images that did upload are about 5.4. Two are 6,05. What should the difference be when all the other images were added successfully?

Screenshot attached.

NWN
Logged
Sometimes my musings are too confusing for someone not inside my head.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #1 on: December 28, 2020, 09:13:28 pm »

Assuming you can, in your php .ini file you need to change the memory_limit value from 128M to 256M (and probably restart your web server).
Logged

nowordneeded

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 224
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #2 on: December 28, 2020, 09:18:44 pm »

Ron4Mac:

Would that be in my php version screen? And how would I restart my webserver?

Thanks so much.

NWN
Logged
Sometimes my musings are too confusing for someone not inside my head.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #3 on: December 28, 2020, 09:45:24 pm »

Based on your response, I guess you must be on a commercial hosting account.

You have a few options:

1) You could try using ImageMagick (if available on your server) instead of GD to process the images. ImageMagick has less memory usage impact. You can switch to that in the CPG config.

2) You could ask your hosting provider for assistance in giving PHP more memory to work with.

3) You may be able to place an .htaccess or .user.ini file (depending on your server setup) in the CPG folder that will bump up the PHP memory there.
Logged

nowordneeded

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 224
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #4 on: December 28, 2020, 10:01:28 pm »

Ron:

I do have access via cpanel. Here is a screenshot of that screen.
Logged
Sometimes my musings are too confusing for someone not inside my head.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #5 on: December 28, 2020, 11:02:09 pm »

Good cPanel implementation!
That should do it for you, then.
Logged

nowordneeded

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 224
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #6 on: December 28, 2020, 11:10:45 pm »

Ron:

I'm still getting the error. What can I do about it? I'm still getting the stop image and the photos I want aren't loading to their galleries? What more could I do? Why is it an image that is 5.8mb will upload, but one that is 6.5 won't?

Thanks.

Logged
Sometimes my musings are too confusing for someone not inside my head.

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #7 on: December 28, 2020, 11:20:41 pm »

While the memory limit may say 128b in cPanel that with some hosts is a bit of a red herring. The cPanel will show a higher limit, but the server may not be giving you what the cPanel suggests. Probably best to speak to your host. Also worth checking PHP info

Create a file called phpinfo.php in the root of your gallery

I the file place the following code

Code: [Select]
<?php
phpinfo
();
?>


Browse to the file in your chosen browser and it will output what PHP is seeing. Check to see if the figures match your cPanel.

When finished delete that new file as it can be a security risk.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

nowordneeded

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 224
Re: Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
« Reply #8 on: December 28, 2020, 11:29:42 pm »

I had to up the memory limit and now I can upload larger images.

Thanks Phill.
Logged
Sometimes my musings are too confusing for someone not inside my head.
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.