3 php.ini files - which one?
Posted by: dgitts (---.lightspeed.dllstx.sbcglobal.net)
Date: December 09, 2008 06:15AM

quick question?
whenever I make changes to php.ini file, I make to all three found in...

/wamp/bin/php (php.ini)
/wamp/bin/apache/Apache2.2.10/bin (php.ini)*
/wamp/bin/php (phpForApache.ini)

I think the one with in the apache bin folder is the one I should worry about but just wanted to find out before I get into more work and this get tedious...lol, i'm feeling lazy tonight to research it..... smiling smiley

Options: ReplyQuote
Re: 3 php.ini files - which one?
Posted by: toivo (---.belrs3.nsw.optusnet.com.au)
Date: December 09, 2008 12:35PM

You are right. The one in the /wamp/bin/php folder is used by PHP Command Line Interface or CLI scripts. The phpForApache.ini apparently has something to do with swapping version.

Regards,

toivo
nottingham, uk

Options: ReplyQuote
Re: 3 php.ini files - which one?
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: December 09, 2008 12:52PM

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 as these changes wont be seen until u switch versions of php again and back. if you edit in the active apache version these changes will go to the php folder once the php versoin is switched. and remember if the version of apache is changed then this will mean changes you made to the php.ini in the apache folder will not go to the php versoin you were using when you swtich apache.

compilcated but hope it makes sense

the php.ini in the php folder is only used for the php cli



TO CLARIFY WHAT TO DO....
close down wamp to be safe and edit the phpforapache.ini in the php folder you want to make the changes to.When wamp starts it will read this file.

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

Options: ReplyQuote
Re: 3 php.ini files - which one?
Posted by: dgitts (12.5.160.---)
Date: December 09, 2008 05:28PM

lol Steve, thanks for the response (and toivo too) and yes it is quite complicated now and maybe i should begin to worry haha but let me see if I get this right.

php/php.ini is for the php cli
php/phpforapache.ini is the one I should make all changes to in regard to wampserver setup right? haha name is rather self explanatory.
so whats apache/php.ini for? I did not quite get the version changes thing...wait I'm reading again and I think now I am even more terribly confused.
ok, i think i wont even try to understand the upgrade process, I will just backup the php/phpforapache.ini before upgrade then restore after and deal with the the bugs one at a time comparing the new config file to my
customized phpforapache.ini....lol this looks like it may go on and on and on. I might just have to read the manual afterall.

Thanks anyway for trying to clarify that, I will now only make config changes to php/phpforapache.ini



Edited 1 time(s). Last edit at 12/09/2008 05:28PM by dgitts.

Options: ReplyQuote
Re: 3 php.ini files - which one?
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: December 09, 2008 05:54PM

the php.ini in the apache folder IS the one that apache uses but this file is made from the phpforapache.ini depending on which version of php is started,


so while wamp is running .. the php.ini in the apache folder and the phpforapache.ini in the php folder being used are the same file..


if you make changes in the apache php.ini file these changes will occur immediatly after you restart wamp.

also if you make them in the phpforapache.ini in the php folder then these changes will also come into effect when you restart.


in the wamp conf file you will see

$c_phpConfFile = $c_apacheVersionDir.'/apache'.$wampConf['apacheVersion'].'/'.$wampConf['apacheExeDir'].'/'.$wampConf['phpConfFile'];

and

$phpConfFileForApache = 'phpForApache.ini';

and a file called switchphpext.php . these look after the copying of the file

if you prefer you could hardcode this so that 1php conf file is only ever used.

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

Options: ReplyQuote
Re: 3 php.ini files - which one?
Posted by: dgitts (12.5.160.---)
Date: December 09, 2008 06:08PM

lol now I see what happens, so I think I will restrain myself to apache folder and mess with that .ini file to keep from getting too confused early. thx that is much clearer now.

Options: ReplyQuote


Sorry, only registered users may post in this forum.