NYCPHP Meetup

NYPHP.org

[nycphp-talk] <IfDefine> w/ PHP 4/5 ...

Hans Zaunere hans at nyphp.org
Wed Oct 22 08:47:10 EDT 2003



jon baer wrote:

> dumb question, but for a while i had been trying to setup virtual hosting w/
> php4 + php5 running and figured the easiest route was starting httpd
> with -DPHP4 or -DPHP5, how is everyone else setting it up?

Admittently I haven't played with php5 yet, but this is how I would have done it.

> i find apache pretty flexible this way + use it all the time like this +
> figured that one could elimate php.ini altogether if they wanted to (using
> php_value foo "bar") ... or is that incorrect?

Using the SetEnv, SetEnvIf, IfDefine and other tricks is great - I use them to setup application configuration in PHP (who needs a big application xml file any way :) and in combination with <Directory> and <VirtualHost> it's fantastic.

You can use many of the php.ini directives in this manner and it's hugely powerful, but not all, and you may run into some restrictions in regards to security.  That said, Jon, I think it'd make for a great article/demo on setting PHP through httpd.conf only (or as much as possible and what just can't bet set).

H





More information about the talk mailing list