PHP Switch -c

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
wolvie
Forum Newbie
Posts: 4
Joined: Fri Jul 11, 2003 9:23 am
Contact:

PHP Switch -c

Post by wolvie »

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?
Post Reply