php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47889 upload_max_filesize not taking effect but other variables are
Submitted: 2009-04-03 15:49 UTC Modified: 2009-04-03 17:20 UTC
From: kmcgrail at apache dot org Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.2.9 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kmcgrail at apache dot org
New email:
PHP Version: OS:

 

 [2009-04-03 15:49 UTC] kmcgrail at apache dot org
Description:
------------
I believe there is a bug, perhaps in phpinidir, where a specified php.ini file is not 100% parsed.  Specifically, I am able to override many of the items but not the upload_max_filesize.

Using this in httpd.conf:

PHPIniDir /htdocs/<specific dir>/php.ini

Changing variables in this ini file affects the phpinfo() command.

For example, I can enable the ZendOptimizer, I can change post_max_size, etc.

Changing variables in the default php.ini does NOT take effect.

In short, I firmly believe I am editing the correct ini file.

However, changing upload_max_filesize or upload_tmp_dir has NO effect on the phpinfo() / program functionality.

Using .htaccess or editing httpd.conf to add something like the following, DOES work:

php_value upload_max_filesize 5M


To Reproduce the problem:

copy default ini to an alternate location:

Specify an alternate ini in httpd.conf

PHPIniDir /htdocs/<specific dir>/php.ini

write a quite phpinfo() script

View the script and confirm Loaded Configuration File matches the specified ini file.

Modify specified php.ini to edit upload_max_filesize and upload_tmp_dir.

Restart server and view phpinfo() script.

No changes are reflected.

If the server does NOT use the command
PHPIniDir /htdocs/<specific dir>/php.ini
then editing the default php.ini in /usr/local/php-apache2/lib/php.ini DOES work



One final note:
Comparing the phpinfo() output from a specified ini install and a non-specified install show one more oddity.

The section of the phpinfo() on the specified and the default matches with this text:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

BUT the specified one is missing the Powered by Zend Engine 2 logo.  Perhaps this will help deduce where the issue lies.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-03 17:20 UTC] kmcgrail at apache dot org
Sorry for the false alarm.  I believe the issue has been found in a corrupt php.ini.

While the question of where the ini file change originated and the missing graphic remain, the fundamental problem is from line 467 of the php.ini that stated

enable_dl = Off ()

Changing it to enable_dl = Off allowed the parsing of the remaining lines in the php.ini, which coincidentally was the file upload settings.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 21:01:29 2024 UTC