Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php.ini on virtual host

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

New User

10+ Year Member

joined:Sept 28, 2002
posts:2
votes: 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 Sept 28, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 22, 2002
posts:1782
votes: 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 Sept 28, 2002 (gmt 0)

New User

10+ Year Member

joined:Sept 28, 2002
posts:2
votes: 0


What if PHP is not installed as Apache module?
5:21 pm on Sept 28, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 22, 2002
posts:1782
votes: 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
<?php
SOMETHING
?>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members