Does a lower php.ini replace an upper php.ini in the directory tree ? Activation in .htaccess necessary ?
5 Message(s) by 4 Author(s) originally posted in php programming
| From: LarsWill |
Date: Saturday, October 27, 2007
|
As far as I know I can override the php settings for a certain
branch of the whole
directory tree
by putting a additional, new php.ini in this directory.
Is this true ?
If I assign in this new php.ini only a new value to 1 (!) php
variable are then all the
other php
parameter values taken from the next php.ini when I go towards the
root of
the directory tree? Or - otherwise - are default
built-in values from PHP taken in this case ?
Do I have to do something else to activate this new php.ini (e.g. specify something in the
.htaccess
file ) ?
Lars
| From: AnrDaemon |
Date: Saturday, October 27, 2007
|
Greetings, Lars Willich.
In
reply to Your
message dated Saturday, October 27, 2007, 13:18:44,
LW> As far as I know I can override the php settings for a certain branch of the whole directory tree
LW> by putting a additional, new php.ini in this directory.
LW> Is this true ?
AFAIK, it was removed some builds ago to avoid unpredictable results.
LW> If I assign in this new php.ini only a new value to 1 (!) php variable are then all the
LW> other php parameter values taken from the next php.ini when I go towards the root of
LW> the directory tree? Or - otherwise - are default built-in values from PHP taken in this case ?
Default, because PHP read only single INI file.
LW> Do I have to do something else to activate this new php.ini (e.g. specify something in the
LW> .htaccess file) ?
Hm. Please tell me why You bothering with PHP.ini if You using PHP as web
scripting engine?
Install PHP as
Apache module and use httpd.conf/.htaccess to
control it's
behaviour.
Use php-apache2handler.ini or php-apache2filter.ini (depends on which
SAPI You
use) to create default environment.--
Sincerely Yours, AnrDaemon
<anrdaemon@xxxxxxxxxxx>
| From: Norman Peelman |
Date: Saturday, October 27, 2007
|
wrote in message:
As far as I know I can override the php settings for a certain branch of the whole directory tree
by putting a additional, new php.ini in this directory.
Is this true ?
If I assign in this new php.ini only a new value to 1 (!) php variable are then all the
other php parameter values taken from the next php.ini when I go towards the root of
the directory tree? Or - otherwise - are default built-in values from PHP taken in this case ?
Do I have to do something else to activate this new php.ini (e.g. specify something in the
.htaccess file) ?
Lars
DO not know about others but in addition to .htaccess you can
over-ride ini entries within Apache
virtual -
host entries.
See:
http://us3.php.net/manual/en/ini.php
scroll to
bottom for examples...
Norm
| From: Jerry Stuckle |
Date: Saturday, October 27, 2007
|
wrote in message:
Greetings, Lars Willich.
In reply to Your message dated Saturday, October 27, 2007, 13:18:44,
LW> As far as I know I can override the php settings for a certain branch of the whole directory tree
LW> by putting a additional, new php.ini in this directory.
LW> Is this true ?
AFAIK, it was removed some builds ago to avoid unpredictable results.
LW> If I assign in this new php.ini only a new value to 1 (!) php variable are then all the
LW> other php parameter values taken from the next php.ini when I go towards the root of
LW> the directory tree? Or - otherwise - are default built-in values from PHP taken in this case ?
Default, because PHP read only single INI file.
LW> Do I have to do something else to activate this new php.ini (e.g. specify something in the
LW> .htaccess file) ?
Hm. Please tell me why You bothering with PHP.ini if You using PHP as web
scripting engine?
Install PHP as Apache module and use httpd.conf/.htaccess to control it's
behaviour.
Use php-apache2handler.ini or php-apache2filter.ini (depends on which SAPI You
use) to create default environment.
I always use php.ini to set the basic commands. I will use the httpd.conf
to modify specific directories for specific commands, but that's all.
It's stupid to
load all of your configuration stuff in httpd.conf. And
even worse to put it in .htaccess!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS
Computer Training Corp.
jstucklex@xxxxxxxxxxx
==================
| From: Jerry Stuckle |
Date: Saturday, October 27, 2007
|
wrote in message:
Greetings, Jerry Stuckle.
In reply to Your message dated Saturday, October 27, 2007, 18:15:16,
I always use php.ini to set the basic commands. I will use the httpd.conf
to modify specific directories for specific commands, but that's all.
It's stupid to load all of your configuration stuff in httpd.conf. And
even worse to put it in .htaccess!
We're speaking about specific needs (say, handling dynamic signatures and file
downloads).
Why I said
Use php-apache2handler.ini or php-apache2filter.ini (depends on which SAPI You
use) to create default environment.
Try your full comment:
> Hm. Please tell me why You bothering with PHP.ini if You using PHP
> as web scripting engine?
>
> Install PHP as Apache module and use httpd.conf/.htaccess to control
> it's behaviour.
>
> Use php-apache2handler.ini or php-apache2filter.ini (depends on
> which SAPI You use) to create default environment.
I restate. It is stupid to place everything in your httpd.conf,
directly or indirectly by placing it in a file called in your
httpd.conf. PHP.INI is the initialization file for PHP, and should be
used as such.
Everything in the world doesn't belong in your httpd.conf, directly or
indirectly. It is the Apache configuration file, not the PHP, Perl,
MySQL and the rest-of-the-world configuration file. It should be used as
such - for configuring Apache and things which are specific to the
server, a virtual host or a directory.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxx
==================
Next Message: Need scroller that reads a php file