You are here: Re: [PHP] php ignores php_value from httpd.conf? « PHP « IT news, forums, messages
Re: [PHP] php ignores php_value from httpd.conf?

Posted by Jason Wong on 01/06/05 22:08

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация