Which php.ini is used and when
Posted by: msteudel (---.hsd1.wa.comcast.net)
Date: November 26, 2008 07:11PM

Hi there,

I was wondering I noticed that the context menu php.ini links to apache/bin/php.ini but there is a php.ini in the php folder. I've noticed that they are used at different times. When are they used? It seems so far that if I'm accessing php through apache then it uses the apache/bin one but if I am running php as cli then it uses the php/ one ...

TIA, Mark

Options: ReplyQuote
Re: Which php.ini is used and when
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: November 26, 2008 07:22PM

its a litle bit more compicated.

The php.ini for the web server is phpForApache.ini, not php.ini.

When you switch php versions, the php.ini in the bin/apachex.x.x directory is copied into the phpForApache.ini of the php version that you are switching FROM and the phpForApache.ini from the php version that you are switching TO is copied into the php.ini in the bin/apachex.x.x directory. This means that you should only edit the php.ini in the active apache directory, or possibly the inactive php versions, never the active php version.compilcated but makes sense

the php.iniin the php folder is only used for the php cli

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 11/26/2008 08:27PM by stevenmartin99.

Options: ReplyQuote
Re: Which php.ini is used and when
Posted by: msteudel (---.hsd1.wa.comcast.net)
Date: November 26, 2008 07:58PM

Oooh ... interesting. So if I wanted to make a change to the php.ini I should be making it in the phpForApache.ini file which then get's copied into the apache directory every time I start WAMP?

Options: ReplyQuote
Re: Which php.ini is used and when
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: November 26, 2008 08:15PM

EDIT :: THE OTHER WAY AROUND - READ ABOVE

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 11/26/2008 08:28PM by stevenmartin99.

Options: ReplyQuote
Re: Which php.ini is used and when
Posted by: toivo (---.nsw.bigpond.net.au)
Date: November 26, 2008 08:16PM

I have not noticed any copying across when I have only one version of PHP. Whichever changes I make to c:\wamp\bin\apache2.2.8\bin\php.ini stay active and do not get overwritten.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: Which php.ini is used and when
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: November 26, 2008 08:21PM

The php.ini for the web server is phpForApache.ini, not php.ini.

When you switch php versions, the php.ini in the bin/apachex.x.x directory is copied into the phpForApache.ini of the php version that you are switching FROM and the phpForApache.ini from the php version that you are switching TO is copied into the php.ini in the bin/apachex.x.x directory. This means that you should only edit the php.ini in the active apache directory, or possibly the inactive php versions, never the active php version.compilcated but makes sense

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 11/26/2008 08:27PM by stevenmartin99.

Options: ReplyQuote
Re: Which php.ini is used and when
Posted by: toivo (---.nsw.bigpond.net.au)
Date: November 26, 2008 09:18PM

That may well happen when switching php versions, but it does not change the fact that in a single version situation Apache loads C:\wamp\bin\apache\apache2.2.8\bin\php.ini as its PHP configuration file. This can be verified from phpinfo().

Regards,

toivo
Sydney, Australia

Options: ReplyQuote


Sorry, only registered users may post in this forum.