Fatal Error: Allowed memory size of 134217728 bytes exhausted ... Fatal Error: Allowed memory size of 134217728 bytes exhausted ...
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Fatal Error: Allowed memory size of 134217728 bytes exhausted ...

Started by nowordneeded, December 28, 2020, 08:15:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nowordneeded

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
Sometimes my musings are too confusing for someone not inside my head.

ron4mac

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).

nowordneeded

Ron4Mac:

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

Thanks so much.

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

ron4mac

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.

nowordneeded

Ron:

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

ron4mac


nowordneeded

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.

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

phill104

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

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

nowordneeded

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

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