Re: php_admin_value, virtual hosts, & upload_tmp_dir

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

 



Michael Hogsett wrote:
Why can I not set "upload_max_filesize" or "upload_tmp_dir" inside
my virtual host directive?  These are exactly the kinds of ini
directives that you would want to set per virtual host.

I can set "open_basedir" inside my virtual host using php_admin_value,
but neither of "upload_max_filesize" nor "upload_tmp_dir" take effect
unless I move those directives outside the virtual host configuration
and into Apache's global context.

Can anyone offer a suggestion as to how I would go about setting,
at the very least, "upload_tmp_dir" per virtual host?

I just tried it and it worked:

<IfModule mod_php4.c>
    php_admin_flag engine on
    php_admin_value upload_tmp_dir "/php_uploads"
</IfModule>

That was inside a virtual host...

Checking a phpinfo page did change it.

Did you remember to restart apache?

Maybe an unnecessary hint but I've seen plenty of problems with this - If you change the upload_tmp_dir value don't forget to adjust the open_basedir to allow access to the new upload_tmp_dir otherwise uploads will break.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
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