php.ini for every vhost

ooops, by mistake "I replied to author", sorry Klepr.

I am also trying to use a seperate php.ini file for each vhost. Or, a
php parameter in vhost definition to override default value, but it is
not taking effect.
I am looking for a good resource that explains the procedure. Also,
could anyone tell me where to get the manual you are talking about?

Thanks.
usman.cs [ Di, 30 Januar 2007 21:36 ] [ ID #1613102 ]

Re: php.ini for every vhost

ok, I found the answer. By using 'SERVER_ADMIN' in vhost definition,
you can override a whole bunch of parameters.
But I am still trying to figure out if I can use a seperate php.ini
file for each v-host. Any ideas?

Thanks.



On Jan 30, 12:36 pm, "Ozz" <usman... [at] gmail.com> wrote:
> ooops, by mistake "I replied to author", sorry Klepr.
>
> I am also trying to use a seperate php.ini file for each vhost. Or, a
> php parameter in vhost definition to override default value, but it is
> not taking effect.
> I am looking for a good resource that explains the procedure. Also,
> could anyone tell me where to get the manual you are talking about?
>
> Thanks.
usman.cs [ Di, 30 Januar 2007 22:43 ] [ ID #1613104 ]

Re: php.ini for every vhost

On Jan 30, 11:43 pm, "Ozz" <usman... [at] gmail.com> wrote:
> ok, I found the answer. By using 'SERVER_ADMIN' in vhost definition,
> you can override a whole bunch of parameters.
> But I am still trying to figure out if I can use a seperate php.ini
> file for each v-host. Any ideas?
>
> Thanks.
>
> On Jan 30, 12:36 pm, "Ozz" <usman... [at] gmail.com> wrote:
>
> > ooops, by mistake "I replied to author", sorry Klepr.
>
> > I am also trying to use a seperate php.ini file for each vhost. Or, a
> > php parameter in vhost definition to override default value, but it is
> > not taking effect.
> > I am looking for a good resource that explains the procedure. Also,
> > could anyone tell me where to get the manual you are talking about?
>
> > Thanks.

AFAIK, this is only possible if you use PHP as CGI. For mod_php this
is not possible because there is only one loaded instance of PHP per
server.
AlexVN [ Mi, 31 Januar 2007 00:32 ] [ ID #1613106 ]

Re: php.ini for every vhost

Ozz wrote:
> ooops, by mistake "I replied to author", sorry Klepr.
>
> I am also trying to use a seperate php.ini file for each vhost. Or, a
> php parameter in vhost definition to override default value, but it is
> not taking effect.
> I am looking for a good resource that explains the procedure. Also,
> could anyone tell me where to get the manual you are talking about?
>
> Thanks.
>

Ozz,

To set php parameters in virtual hosts do:

php_value parameter-name value -> sets values
php_flag parameter-name value -> sets flags (on|off etc)

examples:

php_value session.name "xyz"
php_value session.cookie_domain "www.domain.com"
php_value upload_max_filesize "1M"

php_flag register_globals off

---

For a list of what can be changed and where - check here:
http://www.php.net/manual/en/ini.php

Norm
Norman Peelman [ Mi, 31 Januar 2007 01:05 ] [ ID #1613108 ]
PHP » alt.php » php.ini for every vhost

Vorheriges Thema: Question about a data structure
Nächstes Thema: Regular Expression question..simple!