Page 1 of 1

Can open_basedir be specified as an argument?

Posted: Sun Jun 01, 2008 6:43 pm
by toasty2
I am wanting to use 1 PHP installation for my server but I have several virtual hosts each with their own directories. I want each host to only be able to access inside it's directory...open_basedir is what I want to use. Can I specify open_basedir when launching the PHP interpreter for each virtual host? I would prefer that over creating a .ini file for each host and using -c "path/to/host.ini".

If anyone is curious, no I do not use Apache and PHP as a module. I use PHP in FastCGI with Abyss Web Server.

Re: Can open_basedir be specified as an argument?

Posted: Sun Jun 01, 2008 7:16 pm
by Weirdan
-d open_basedir=/path/to/vhost/dir

In this way you may specify (and override) any option from php.ini

Re: Can open_basedir be specified as an argument?

Posted: Sun Jun 01, 2008 11:05 pm
by toasty2
Thanks, it works.