php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38051 changing upload_max_filesize in php.ini has no effect
Submitted: 2006-07-10 01:08 UTC Modified: 2006-07-18 01:00 UTC
Votes:24
Avg. Score:4.0 ± 1.3
Reproduced:16 of 17 (94.1%)
Same Version:7 (43.8%)
Same OS:6 (37.5%)
From: saurabh_barjatiya at daiict dot ac dot in Assigned:
Status: No Feedback Package: *Configuration Issues
PHP Version: 5.1.4 OS: Fedora Core 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: saurabh_barjatiya at daiict dot ac dot in
New email:
PHP Version: OS:

 

 [2006-07-10 01:08 UTC] saurabh_barjatiya at daiict dot ac dot in
Description:
------------
I have changed following in php.ini, Still when I run phpinfo() I get upload_max_filesize as 2M while other two getchanged.

upload_max_filesize 2000M
post_max_size 2000M
memory_limit 2000M

I have also tried creating php.ini in same directory as script  with above settings. I have also tried creating .htaccess with 

php_value upload_max_filesize 2000M

Still all scrips return 2M even with ini_get.

Please check or tell how to change upload_max_filesize

Reproduce code:
---------------
<?php echo ini_get('upload_max_filesize'); ?>

Expected result:
----------------
2000M

Actual result:
--------------
2M

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-10 07:54 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Works just fine here.
 [2006-07-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-11-06 17:00 UTC] zavpublic at mac dot com
Same issue for me in 5.1.4
Using php 5.1.4 in MAMP on a Quad G5 under Mac OS X 10.4.8.
 [2006-12-21 18:02 UTC] marek dot zolkowski at gmail dot com
I've got the same problem:
any changes in section File Uploads has no effect
(upload_max_filesize and upload_tmp_dir)

I'm using php 5.2.0-8 in apache-ssl on Debian.

It happens after upgreading php from php4 to php5. Before this upgrade I could upload larger files and there was everything ok...

Can anyone help me?
 [2006-12-23 17:17 UTC] ZavPublic at mac dot com
I believe this is fixed in PHP 5.1.6
 [2006-12-26 00:33 UTC] marek dot zolkowski at gmail dot com
I found an error in my php.ini file... there were 1 not necessary " in file. Problem solved...
 [2007-02-10 22:25 UTC] ilyas at foxplan dot com
I had the same problem inn IIS 5.0. I noticed that IIS was picking php.ini from c:\program files\php folder instead of c:\php where I expected it to be.

When I changed php.ini in c:\program files\php folder, I had the desitred result.

just check your PC incase there is another installation of php.
 [2008-06-13 18:44 UTC] noone at nowhere dot com
I had similar problems, I'm using MAMP.  I changed the right config file but nothing was getting changed when I ran php.

Turned out I had a rogue copy of a php.ini file in my root (/Volumes/Leopard) on a mac.  when the server ran it found this copy and used IT as the config file (I guess over riding the specified config file).  As soon as I found (!) and deleted that root copy, the correct one was then being seen... problem solved.

Do a system wide search on php.ini and make sure there aren't any stray copies kicking around.
 [2011-08-10 16:09 UTC] noorsulayman at gmail dot com
I am running PHP 5.3.6 (cli) (built: Mar 19 2011 08:30:07)
Setting upload_max_filesize = 10485760 does nothing.
Setting upload_max_filesize = 10MB does nothing.

The filesize reported by the system is always 2M. 
I have also tried using an .htaccess file in the upload directory to no avail.
 [2011-08-10 19:14 UTC] noorsulayman at gmail dot com
In response to my last post, I discovered that simply running sudo /usr/sbin/apachectl —graceful was the problem. After running sudo /sbin/service httpd restart, everything is now working. Hope this helps somebody else.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 13:01:27 2025 UTC