php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7342 Different config-op parsing in php.ini and http.conf
Submitted: 2000-10-19 11:20 UTC Modified: 2001-05-06 11:45 UTC
From: volker at oops dot mayn dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.3pl1 OS: RedHat 6.2/Linux 2.2
Private report: No CVE-ID: None
 [2000-10-19 11:20 UTC] volker at oops dot mayn dot de
In php.ini for setting the upload_max_filesize one can use abbrevations for certain amounts of bytes (e.g. M for 'Megabytes'). The line

upload_max_filesize = 15M

means 15 * 1024 * 1024 Bytes are allowed.

When using the

php_value upload_max_filesize 15M

directive in apache httpd.conf the 'M' modifyer is *NOT* used, leading to actually setting the max. file size for uploads to only 15 Bytes, not 15 MB.
One has to use 15728640 (i.e. 15 * 1024^2) to set the value to 15 MB.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-09 23:35 UTC] david@php.net
The same applies to the php function ini_set(). It looks like the onmodify entry is being not found/called from zend_alter_ini_entry and it's using the 'estrndup/value=duplicate' instead
 [2001-05-06 11:45 UTC] zeev@php.net
This is the intended behavior.  The special notations that are supported in php.ini are features of the php.ini parser, and thus, are not available in other configuration options, such as ini_set() or httpd.conf.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC