Re: php ignores php_value from httpd.conf?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 07 January 2005 01:46, Richard Lynch wrote:

Just so that the OP has something to look forward to ...

> Note, however, that the particular setting you are using,
> upload_max_filesize is one of the "oddball" settings that can *NOT* be
> over-ridden in .htaccess nor in your PHP script with ini_set (nor in the
> ancient mechanism of adding a special HIDDEN INPUT to your FORM (see the
> File Upload Feature) of the PHP manual.
>
> The reason in this case is political/business:  An ISP/host who wants to
> avoid a DOS attack by monster files being uploaded most likely doesn't
> want their clients to *over-ride* their DOS protection.  Thus, PHP simply
> doesn't allow you to over-ride the setting.
>
> You can see which settings are valid in which place (php.ini, httpd.conf,
> .htaccess, ini_set) in the PHP manual.

Both upload_max_filesize and post_max_size can be set in .htaccess (and 
obviously php.ini)

> I'm also not sure that Apache/PHP can handle "20M" in httpd.conf
>
> I'm not real sure where/when the "20M" gets converted to 20000000 in the
> process.
>
> But if the PHP code that *reads* php.ini is doing the conversion, then
> putting "20M" in httpd.conf ain't gonna work.
>
> If the "20M" is interpreted at a later point in the process, then it
> should work in httpd.conf

Using "20M" in httpd.conf works just fine in httpd.conf.

> So perhaps the real trouble here is that you need 20000000 instead of 20M
> in httpd.conf
>
> Trying to change upload_max_filesize in .htaccess (or with ini_set) will
> be pointless.

No, they _can_ be set there. IIRC this wasn't always the case, so if you're 
using a old version of PHP then this may not be allowed.

So basically what the OP was trying to do should work, but for some reason it 
seems not to.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux