General
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem uploading files to photo gallery

Robert Isaac_1
Occasional Contributor

Problem uploading files to photo gallery

We have a DL360 G4 with RHESL-4, Apache 2.0.52 and PHP 4.3.9, 3Ghz CPU and 1Gb RAM.

We have a photo gallery (written in PHP) where users can upload to. Since we moved to this new server no one can upload a file greater than around 107K. Anything above that returns a white screen.

In the server error_log I get:

PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7012 bytes).

In my php.ini:

memory_limit = 8M
upload_max_filesixe = 2M

In php.conf:

LimitRequestBody 307200

If I increase memory_limit to 16M the error still occurs but shows 16777216 bytes exhausted. No matter wht it is set to it gets exhausted, and still cannot upload files over 107K to our gallery.

Any ideas please, thanks

Bob
4 REPLIES
Robert Isaac_1
Occasional Contributor

Re: Problem uploading files to photo gallery

I did some experimenting and in php.ini changed

memory_limit = 8M

to

memory_limit = 24M

and the upload worked. Does this not increase server load? Are there any dangers with leaving this setting to 24M

Bob
Gopi Sekar
Honored Contributor

Re: Problem uploading files to photo gallery

I believe this setting is for maximum amount of memory a PHP script is allowed to consume on the server (for each execution). Check whether there is any modification done in your scripts which makes it to consume more memory while running.

check this website for more information

http://www.mcs.vuw.ac.nz/technical/software/PHP/configuration.html

Hope this helps,
Gopi
Never Never Never Giveup
Ivan Ferreira
Honored Contributor

Re: Problem uploading files to photo gallery

You should also check the option:

post_max_size

In the php.ini configuration file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Robert Isaac_1
Occasional Contributor

Re: Problem uploading files to photo gallery

I have

post_max_size = 8M

Bob