473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Does a lower php.ini replace an upper php.ini in the directory tree ? Activation in .htaccess necessary ?

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

Oct 27 '07 #1
13 1853
Greetings, Lars Willich.
In reply to Your message dated Saturday, October 27, 2007, 13:18:44,

LWAs far as I know I can override the php settings for a certain branch of the whole directory tree
LWby putting a additional, new php.ini in this directory.

LWIs this true ?

AFAIK, it was removed some builds ago to avoid unpredictable results.

LWIf I assign in this new php.ini only a new value to 1 (!) php variable are then all the
LWother php parameter values taken from the next php.ini when I go towards the root of
LWthe directory tree? Or - otherwise - are default built-in values from PHP taken in this case ?

Default, because PHP read only single INI file.

LWDo 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 <an*******@freemail.ru>

Oct 27 '07 #2
Lars Willich wrote:
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
DOn't 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
Oct 27 '07 #3
AnrDaemon wrote:
Greetings, Lars Willich.
In reply to Your message dated Saturday, October 27, 2007, 13:18:44,

LWAs far as I know I can override the php settings for a certain branch of the whole directory tree
LWby putting a additional, new php.ini in this directory.

LWIs this true ?

AFAIK, it was removed some builds ago to avoid unpredictable results.

LWIf I assign in this new php.ini only a new value to 1 (!) php variable are then all the
LWother php parameter values taken from the next php.ini when I go towards the root of
LWthe directory tree? Or - otherwise - are default built-in values from PHP taken in this case ?

Default, because PHP read only single INI file.

LWDo 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'll 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.
js*******@attglobal.net
==================

Oct 27 '07 #4
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'll 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.

--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Oct 27 '07 #5
AnrDaemon wrote:
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'll 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 does not 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.
js*******@attglobal.net
==================

Oct 27 '07 #6
Greetings, Jerry Stuckle.
In reply to Your message dated Saturday, October 27, 2007, 18:02:01,
AnrDaemon wrote:
>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'll 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,
You're indeed right. Any better comments?
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.
Well, please, how I can change PHP/Apache behaviour in single directory using
one PHP.ini?
Everything in the world does not 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.
Loading PHP as apache module making it in fact part of Apache, so I configure
Apache module from httpd.conf. What's wrong?
Or You just want a place to spread Your idealism? Sorry, I'm not a good
target for Your lessons.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Oct 29 '07 #7
On Oct 29, 11:05 am, AnrDaemon <anrdae...@freemail.ruwrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Saturday, October 27, 2007, 18:02:01,
AnrDaemon wrote:
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'll 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,

You're indeed right. Any better comments?
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.

Well, please, how I can change PHP/Apache behaviour in single directory using
one PHP.ini?
As he states:
It (httpd.conf) should be used as
such - for configuring Apache and things which are specific to the
server, a virtual host or a directory.
I suspect you actually agree...
--
Rik

Oct 29 '07 #8
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Saturday, October 27, 2007, 18:02:01,
>AnrDaemon wrote:
>>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'll 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,

You're indeed right. Any better comments?
>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.

Well, please, how I can change PHP/Apache behaviour in single directory using
one PHP.ini?
You should read EVERYTHING I said - and not take things out of context.
>Everything in the world does not 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.

Loading PHP as apache module making it in fact part of Apache, so I configure
Apache module from httpd.conf. What's wrong?
Or You just want a place to spread Your idealism? Sorry, I'm not a good
target for Your lessons.

No, loading PHP as an apache module makes it an EXTENSION of Apache.
You should configure Apache in httpd.conf and PHP in php.ini. That's
what they are there for.

Sorry, when I see someone post something this asinine, I'll call you on
it. Just because you're being an idiot doesn't mean the entire world
should be.

Let's see you show me where ZEND or Apache recommend you do it this way.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 29 '07 #9
lu************@hotmail.com wrote:
On Oct 29, 11:05 am, AnrDaemon <anrdae...@freemail.ruwrote:
>Greetings, Jerry Stuckle.
In reply to Your message dated Saturday, October 27, 2007, 18:02:01,
>>AnrDaemon wrote:
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'll 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,
You're indeed right. Any better comments?
>>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.
Well, please, how I can change PHP/Apache behaviour in single directory using
one PHP.ini?

As he states:
>>It (httpd.conf) should be used as
such - for configuring Apache and things which are specific to the
server, a virtual host or a directory.

I suspect you actually agree...
--
Rik

Hi, Rik,

No, he's saying he does ALL PHP configuration in his httpd.conf
(actually a file included in his httpd.conf). I'm saying PHP should be
configured in the php.ini file and only modified in httpd.conf as necessary.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 29 '07 #10
Greetings, Jerry Stuckle.
In reply to Your message dated Monday, October 29, 2007, 14:47:41,
No, he's saying he does ALL PHP configuration in his httpd.conf
Please don't tell me what You think I said.
And read *everything* I wrote. Not only what You want to read.
(actually a file included in his httpd.conf).
You stupid. Sad but true.
I'm saying PHP should be
configured in the php.ini file and only modified in httpd.conf as necessary.
Again:
Why I said
>>Use php-apache2handler.ini or php-apache2filter.ini (depends on which SAPI You
use) to create default environment.

--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Oct 30 '07 #11
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Monday, October 29, 2007, 14:47:41,
>No, he's saying he does ALL PHP configuration in his httpd.conf

Please don't tell me what You think I said.
And read *everything* I wrote. Not only what You want to read.
>(actually a file included in his httpd.conf).

You stupid. Sad but true.
>I'm saying PHP should be
configured in the php.ini file and only modified in httpd.conf as necessary.

Again:
>Why I said
>>>Use php-apache2handler.ini or php-apache2filter.ini (depends on which SAPI You
use) to create default environment.

Yes, I read everything you said. You are including them in your
httpd.conf file.

And I quote:
Install PHP as Apache module and use httpd.conf/.htaccess to control
it's behavior.
And it's still a stoopid way to do it. You should not use
httpd.conf/.htaccess to control PHP behavior except on a virtual machine
or lower (i.e. directory, file) level.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 31 '07 #12
Greetings, Jerry Stuckle.
In reply to Your message dated Wednesday, October 31, 2007, 04:02:59,
AnrDaemon wrote:
>Greetings, Jerry Stuckle.
In reply to Your message dated Monday, October 29, 2007, 14:47:41,
>>No, he's saying he does ALL PHP configuration in his httpd.conf

Please don't tell me what You think I said.
And read *everything* I wrote. Not only what You want to read.
>>(actually a file included in his httpd.conf).

You stupid. Sad but true.
>>I'm saying PHP should be
configured in the php.ini file and only modified in httpd.conf as necessary.

Again:
>>Why I said
>>>>Use php-apache2handler.ini or php-apache2filter.ini (depends on which SAPI You
use) to create default environment.
Yes, I read everything you said. You are including them in your
httpd.conf file.
Where you read it? Point please.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Oct 31 '07 #13
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Wednesday, October 31, 2007, 04:02:59,
>AnrDaemon wrote:
>>Greetings, Jerry Stuckle.
In reply to Your message dated Monday, October 29, 2007, 14:47:41,

No, he's saying he does ALL PHP configuration in his httpd.conf
Please don't tell me what You think I said.
And read *everything* I wrote. Not only what You want to read.

(actually a file included in his httpd.conf).
You stupid. Sad but true.

I'm saying PHP should be
configured in the php.ini file and only modified in httpd.conf as necessary.
Again:

Why I said
>Use php-apache2handler.ini or php-apache2filter.ini (depends on which SAPI You
>use) to create default environment.
>Yes, I read everything you said. You are including them in your
httpd.conf file.

Where you read it? Point please.

Read what I quoted - instead of trimming my posts to not include it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 31 '07 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lawrence | last post by:
I wanted to use the AddType directive in an .htaccess file. So I used phpinfo() to get the path info for PHP. I found this line: PATH /bin:/usr/bin So I tried this, but it did not work:...
23
by: Hallvard B Furuseth | last post by:
Has someone got a Python routine or module which converts Unicode strings to lowercase (or uppercase)? What I actually need to do is to compare a number of strings in a case-insensitive manner,...
3
by: Claude Schneegans | last post by:
Hi, I'trying to use a regExp in Javascript to replace any all upper case word in a string by the same word having only its first letter in upper case. This expression detects the words: /()(+)/g...
1
by: tony wong | last post by:
the page has upper frame (submit record) and lower frame (show records). i wish to refresh lower frame once submit record at upper frame. i try this, it works to refresh the lower frame...
19
by: Eric Lindsay | last post by:
Should HTML 4.01 Strict markup be done in upper case or in lower case? I understand that HTML allows either upper or lower case. I also notice that XHTML apparently requires lower case. However I...
8
by: gil | last post by:
Is it possible to prevent a browser from listing the entire contents of a folder? The site, is hosted on my ISP with the following layout- site/ "user name from ISP" pagefile (dir)...
1
by: Curious | last post by:
I'm working on a word replacement program in .NET. I have a list of words spelt in American English and need to replace them with translated British spelling while keeping the upper or lower cases...
2
by: jaanus | last post by:
Here we go... What I have been trying to do is to forward all http requests containing /cms/ to http://cms.mydomain.com/ example1: http://host1.mydomain.com/cms/init.php would be parsed from...
2
Thekid
by: Thekid | last post by:
I had made a post about making a loop using letters instead of numbers and dshimer gave me this solution: for i in range(65,70): for j in range(65,70): for k in range(65,70): ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.