Page 1 of 1

Pb Memory Limit

PostPosted: 16. January 2009 10:21
by nicolas.poulain
Hi,

I have a script that manage images (via imagecreatetruecolor) in order to resize jpg.

I tri this script on my WebServer (MandrivaLinux - AMP, not XAMPP), and there is no problem.

I tri the same script on a Windows server with XAMPP and I have a "Allowed memory size of 33554432 bytes exhauted..." :(

The both php-conf are the same !!

What kind of problem could it be ? what kind of solution can I tri ?

I mind that I can get up the memory imit from 32 to more, but I'm afraid about the issue for management of the server...

Nicolas

Re: Pb Memory Limit

PostPosted: 16. January 2009 10:33
by Izzy
nicolas.poulain wrote:The both php-conf are the same !!
I don't know a php-conf in XAMPP only a php.ini file in the xampp\apache\bin folder.

Did you mean that and did you do your memory edits in that file, save the file and then restart Apache?

Re: Pb Memory Limit

PostPosted: 16. January 2009 10:38
by nicolas.poulain
Izzy wrote:
nicolas.poulain wrote:The both php-conf are the same !!
I don't know a php-conf in XAMPP only a php.ini file in the xampp\apache\bin folder.

Did you mean that and did you do your memory edits in that file, save the file and then restart Apache?


Yes, ok, php.ini and not php-conf... I mean it's a configuration file of php ;)

I tried editing php.ini, php5.ini and restart XAMPP (script bash).
But the phpinfo()->memory_limit don't change

I'm testing differents things...

Nico

Re: Pb Memory Limit

PostPosted: 16. January 2009 10:49
by Izzy
Izzy wrote:...php.ini file in the xampp\apache\bin folder.
Apache only uses the php.ini file in the apche\bin folder.

Check in phpinfo() for Loaded Configuration File

Re: Pb Memory Limit

PostPosted: 16. January 2009 11:05
by nicolas.poulain
Izzy wrote:
Izzy wrote:...php.ini file in the xampp\apache\bin folder.
Apache only uses the php.ini file in the apche\bin folder.

Check in phpinfo() for Loaded Configuration File


Ok thanks, i'm looking in the wrong place...

But it's a surprise that to resize a 3Mo image file, XAMP need more of 32M memory ?

Nico

Re: Pb Memory Limit

PostPosted: 16. January 2009 11:14
by nicolas.poulain
I tri to test memory size and i have this number :
Load the classes : 1 048 576 (memory_get_size(true))
Image 1 : 1310720
Image 2 : 1310720
Image 3 : 1310720
Fin de script : 1310720

So I don't understand why I need to modify the memory_limit ?

Nico

Re: Pb Memory Limit

PostPosted: 16. January 2009 11:18
by Izzy
Sorry, I don't know your script - perhaps the scripts author may be able to answer your questions.