PHP Switch -c
Posted: Thu Nov 20, 2003 8:58 am
Well...
I have a server running some old scripts on php that requires version 4.0.2 ou something. But I have some new scripts that works only version 4.3.x.
Well..the old scripts are argc,argv and register_globals based and it besides the security breach compromises some programming I have on sessions.
Well..its here that it gets tricky...I need to run my newer php as isapi module since I need to run it on ssl and the cgi bin causes some problem with the sessions.
The first alternative I though was using the -c switch of php cgi modulo so I could determine the location of the php.ini file. When you do a php -? on version 4.0.2 it says that it works.
Well..I've done it, but there is no way the thing starts using the custom ini file. First I though it was some problem with version 4.0.2 so I began trying later versions and it remain the same.
So i finally figure out whats the problem....if you have a version of php 4.0.x he always look in c:\winnt for php.ini ...in version 4.3.x and later (5.x) he always look on the directory where the php.exe is and if it do not find a php.ini, it looks on c:\winnt . the -c switch simply DON'T WORK.
Unfortunately for me the ISAPI modulo always look on c:\winnt for the php.ini file....
Any suggestions beside suicide?
I have a server running some old scripts on php that requires version 4.0.2 ou something. But I have some new scripts that works only version 4.3.x.
Well..the old scripts are argc,argv and register_globals based and it besides the security breach compromises some programming I have on sessions.
Well..its here that it gets tricky...I need to run my newer php as isapi module since I need to run it on ssl and the cgi bin causes some problem with the sessions.
The first alternative I though was using the -c switch of php cgi modulo so I could determine the location of the php.ini file. When you do a php -? on version 4.0.2 it says that it works.
Well..I've done it, but there is no way the thing starts using the custom ini file. First I though it was some problem with version 4.0.2 so I began trying later versions and it remain the same.
So i finally figure out whats the problem....if you have a version of php 4.0.x he always look in c:\winnt for php.ini ...in version 4.3.x and later (5.x) he always look on the directory where the php.exe is and if it do not find a php.ini, it looks on c:\winnt . the -c switch simply DON'T WORK.
Unfortunately for me the ISAPI modulo always look on c:\winnt for the php.ini file....
Any suggestions beside suicide?