homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

php.ini on virtual host

 3:22 pm on Sep 28, 2002 (gmt 0)

I need to setup php.ini file just for my virtual hosting plan (or all of plans on the server). I need to change max_upload_filesize but not to afect other users on the server.

Or, is there any other way to do this, through .htaccess file?

I don't have root access, but server owner does - he just doesn't know how to do it.



 3:38 pm on Sep 28, 2002 (gmt 0)

Im assuming you are running an Apache server with PHP as a module:

The php.ini file is read once when the server starts up. Its configuration setting will be shared for all virtual hosts. If you want to change settings for individual virtual hosts use the PHP Apache directives [php.net] whereever you define your virtual hosts.


 4:56 pm on Sep 28, 2002 (gmt 0)

What if PHP is not installed as Apache module?


 5:21 pm on Sep 28, 2002 (gmt 0)

Then php.ini is read on every invocation of a php script. You cannot use the Apache directives. You might (The User Contributed Notes "nordkynNOSPAMPLZ at tin dot it" [php.net] seems to suggest it might not work, dont really know) be able to use something like this in your php script:

#!/usr/local/bin/php -c <path><file> //Look for php.ini here

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved