Welcome to WebmasterWorld Guest from 54.226.32.234

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php.ini on virtual host

     

avantis

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

10+ Year Member



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.

andreasfriedrich

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

WebmasterWorld Senior Member 10+ Year Member



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.

avantis

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

10+ Year Member



What if PHP is not installed as Apache module?

andreasfriedrich

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

WebmasterWorld Senior Member 10+ Year Member



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
<?php
SOMETHING
?>

 

Featured Threads

Hot Threads This Week

Hot Threads This Month