coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: MelissaSusan on June 09, 2008, 06:32:36 PM

Title: [Solved]: Coppermine Ignores Custom php.ini settings
Post by: MelissaSusan on June 09, 2008, 06:32:36 PM
I've been using this script for years and never had many problems (that weren't easily solved due to user error). However, I recently created a HQ quality archive for a friend and I for some graphic projects we've been working on. It's much easier to share pictures and keep them together.

I received the dreaded error last Friday for the first time:

Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 19552 bytes) in **/include/picmgmt.inc.php on line 262

I did some googling, contacted my host who gave me a few options. Change scripts (I heart the Coppermine, so that's a last resort to me), resize the images (defeats the purpose of the site) or create a custom php.ini file to change the settings for the memory.

I chose to give the third option a try. With some help from my host to fix the errors I accidentally created, I was told the problem in theory should be fixed because I now have 90mbs  for processing.

I still received the error.

To ensure that it wasn't the server interferring in some way, my host dug into this (Dreamhost is really great for doing that, not many would go out of their way for third party software) and received this reply today:

QuoteSorry it took so long to get back to you - I've looked into this issue
fairly carefully, and still have no idea what the problem is - for some
reason the upload.php script is completely ignoring the memory limits set
by your php.ini (which is, in fact, active - i checked - if you saw all
sorts of weird text over your pages, thats why).


You might want to try asking the authors why this is happening. Tell them
that "the error message returned by php indicates that the available
memory has been exhausted, however the number returned for the total
amount of memory is far less than what is actually allowed." While there
are a number of threads on their forum talking about memory exhaustion
problems, all the ones I saw where cases where the amount of available
memory really was exhausted. You have 90MB available, so 94,371,840
bytes.


Failing this, I don't know what to say, other than try a different piece
of software.


I've searched these forums several times, but haven't found anything quite close to this problem. Any assistance or advice would be appreciated. I really don't want to have to change scripts.
Title: Re: Coppermine Ignores Custom php.ini settings
Post by: Nibbler on June 09, 2008, 06:48:16 PM
It's not Coppermine's job to read the php.ini settings. That's like saying your car radio ignores your new tyres. What does Coppermine's phpinfo.php page say the memory limit is?
Title: Re: Coppermine Ignores Custom php.ini settings
Post by: MelissaSusan on June 09, 2008, 06:56:13 PM
It says 90m. Which is why I don't understand what's going on here. I can't even upload a picture that's 500kb now.

And when I saw Coppermine is ignoring the settings, I just mean that for some reason, they're not agreeing. Because my host tells me I have 90MBS and there should be no problem and clearly, I can see that Coppermine's phpinfo says the same thing. Except I still can't upload *anything*
Title: Re: Coppermine Ignores Custom php.ini settings
Post by: Nibbler on June 09, 2008, 06:58:56 PM
Did you edit any of the Coppermine files and hardcode a limit of 256KB?
Title: Re: Coppermine Ignores Custom php.ini settings
Post by: MelissaSusan on June 09, 2008, 07:00:55 PM
I wouldn't even know how to do that. I downloaded it fresh from the site last Wednesday and uploaded straight to my file server.
Title: Re: Coppermine Ignores Custom php.ini settings
Post by: Nibbler on June 09, 2008, 07:01:38 PM
Can you PM me temporary FTP access to the gallery?
Title: Re: Coppermine Ignores Custom php.ini settings
Post by: MelissaSusan on June 09, 2008, 07:10:26 PM
Sent! Thanks!
Title: Re: [Solved]: Coppermine Ignores Custom php.ini settings
Post by: Nibbler on June 11, 2008, 09:55:02 PM
This was solved.

If you get this exact message (Allowed memory size of 262144 bytes exhausted) make sure you specified the memory_limit value correctly. Using "32MB" is not valid for example, but "32M" is.