cant change the 2mb upload limit

jnylund

Joined: 2003-06-08
Posts: 22
Posted: Mon, 2006-01-02 02:47

ok, I edited the php.ini file and it seems to recognize that (I go to upgrade/systemcheck and it says memory is 128M (thats what I changed it to), but it says file upload size = 2M & all files bigger than 2M fail with upload failed message. (it also says max post size is 8M).

I tried the following:
- added to /etc/http.d/conf.d (just to be safe, there was nothing there)
- LimitRequestBody 0
- created a .htaccess file in /var/www/html/gallery2 with the following lines
php_value post_max_size 128M
php_value upload_max_size 128M

I also added these 2 vars (post_max_size and upload_max_size) to the php.ini file, I set them to differnt values (10M) to see which would win, but neither seem to.

Still no luck. I restarted apache,mysql and then eventually the whole OS, still no luck.

im grasping for ideas and its time to upload the christmas pics :)

thanks in advance!

Gallery version = 2.0.1 core 1.0.0.1
PHP version = 5.0.4 apache2handler
Webserver = Apache/2.0.54 (Fedora)
Database = mysql 4.1.15
Toolkits = Exif, NetPBM, Thumbnail
Operating system = Linux localhost.localdomain 2.6.14-1.1653_FC4 #1 Tue Dec 13 21:32:09 EST 2005 i686
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-01-02 04:10

see phpinfo and take a look at what php.ini file is actually used. maybe you've edited the wrong one.

 
jnylund

Joined: 2003-06-08
Posts: 22
Posted: Mon, 2006-01-02 16:17

looks like the right one, attached is phpinfo output, any other ideas?

AttachmentSize
phpinfo.html.txt57.14 KB
 
dcostelloe
dcostelloe's picture

Joined: 2005-11-04
Posts: 5
Posted: Mon, 2006-01-02 16:36

PHP4 sets limits on how large attached files can be.
To change this limit, you need to edit the php.ini
configuration file.
The values you will need to increase or decrease are:
http://www.php.net/manual/en/ini.core.php#ini.memory-limit%20memory_limit

[url]http://www.php.net/manual/en/ini.core.php#ini.post-max-size post_max_size[/url]

[url]http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize upload_max_filesize[/url]

The values can be set in bytes or in MB by appending the value with an 'M' (8M).

To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by configure script, memory_limit also affects file uploading. Memory_limit should be larger than post_max_size.
http://www.php.net/manual/en/configuration.php#ini.post-max-size

Hope this helps

 
jnylund

Joined: 2003-06-08
Posts: 22
Posted: Tue, 2006-01-03 03:07

yes thanks for the help, as described in my first post I believe to have those 3 vars set in the php.ini file, unfortunately for some reason the upload_max_filesize and post_max_size dont seem to be taking the settings I am putting in the php.ini file. The memory seems to take.
Is there anywhere else they could get overridden?

 
jnylund

Joined: 2003-06-08
Posts: 22
Posted: Tue, 2006-01-03 03:14

ok I get the duh of the century award, the vars were later in the php.ini file, I set them but they were overidden later in the file, sorry to waste everyones time, thanks for all the help!!!!

 
umayr

Joined: 2006-03-03
Posts: 9
Posted: Tue, 2006-03-14 18:59

im having the same issue and without any solution..

 
ajs279

Joined: 2002-09-01
Posts: 23
Posted: Wed, 2006-03-15 01:44

did you change all the mentions of the variables, or just the first one?

 
Ru4Real
Ru4Real's picture

Joined: 2006-03-02
Posts: 7
Posted: Wed, 2006-03-15 02:03

Hi

Although unlikely, if your host updates the php.ini file on your server you may lose your changes (most hosts wouldn't change it that often).

A way to avoid this is to use the script here to append your changes to the original php.ini file. This also takes the guess work out of making changes for us "php challenged" people. If you then set up a cron job to run the script every now and then you will always have the latest host php.ini file with your modifications.

There are a few handy tips there, from a guy that works at my host I must add, not me . . . sadly scripting is not my thing.

Hope this helps :)

 
egil85

Joined: 2007-01-05
Posts: 16
Posted: Wed, 2007-12-26 14:41