For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > October 2007 > Re: Does a lower php.ini replace an upper php.ini in the directory









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Does a lower php.ini replace an upper php.ini in the directory
Jerry Stuckle

2007-10-27, 7:01 pm

AnrDaemon wrote:
> 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'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.
jstucklex@attglobal.net
==================

Jerry Stuckle

2007-10-27, 7:01 pm

AnrDaemon wrote:
> Greetings, Jerry Stuckle.
> In reply to Your message dated Saturday, October 27, 2007, 18:15:16,
>
>
>
> We're speaking about specific needs (say, handling dynamic signatures and file
> downloads).
>
> Why I said
>
>
>


Try your full comment:
[color=darkred]

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.
jstucklex@attglobal.net
==================

Jerry Stuckle

2007-10-29, 8:01 am

AnrDaemon wrote:
> Greetings, Jerry Stuckle.
> In reply to Your message dated Saturday, October 27, 2007, 18:02:01,
>
>
>
>
>
> You're indeed right. Any better comments?
>
>
> 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.

>
> 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.
jstucklex@attglobal.net
==================

Jerry Stuckle

2007-10-29, 8:01 am

luiheidsgoeroe@hotmail.com wrote:
> On Oct 29, 11:05 am, AnrDaemon <anrdae...@freemail.ru> wrote:
>
> As he states:
>
>
> 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.
jstucklex@attglobal.net
==================

Jerry Stuckle

2007-10-30, 10:01 pm

AnrDaemon wrote:
> Greetings, Jerry Stuckle.
> In reply to Your message dated Monday, October 29, 2007, 14:47:41,
>
>
> Please don't tell me what You think I said.
> And read *everything* I wrote. Not only what You want to read.
>
>
> You stupid. Sad but true.
>
>
> Again:
>
>
>
>


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.
jstucklex@attglobal.net
==================

Jerry Stuckle

2007-10-31, 7:02 pm

AnrDaemon wrote:
> Greetings, Jerry Stuckle.
> In reply to Your message dated Wednesday, October 31, 2007, 04:02:59,
>
>
>
> 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.
jstucklex@attglobal.net
==================

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com