Re: php_admin_value, virtual hosts, & upload_tmp_dir
| From: | Chris | Date: | Wed, 18 Oct 2006 00:18:09 +0000 |
| Subject: | Re: php_admin_value, virtual hosts, & upload_tmp_dir | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243263@lists.php.net to get a copy of this message | ||
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/