Running php4 or 5

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
julian_lp
Forum Contributor
Posts: 121
Joined: Sun Jul 09, 2006 1:00 am
Location: la plata - argentina

Running php4 or 5

Post by julian_lp »

Just a small snippet which I'm using to test code in both php4 and php5. I'd love hearing another options...

place inside C:\Apache2\conf two files named
PHP4httpd.conf
PHP5httpd.conf

each of them containing apache configuation stuff made to load the correct PHP version/extensions.

then, write two .bat files as following

run_php_4.bat
------------------------------------------------
del c:\apache2\conf\httpd.conf
copy c:\apache2\conf\PHP4httpd.conf c:\apache2\conf\httpd.conf
Start c:\apache2\bin\apache.exe


run_php_5.bat
------------------------------------------------
del c:\apache2\conf\httpd.conf
copy c:\apache2\conf\PHP5httpd.conf c:\apache2\conf\httpd.conf
Start c:\apache2\bin\apache.exe
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

  • Run one as module, the other as CGI. Both can exist in the same instance.
  • Run two instances of Apache at once on separate ports.
User avatar
julian_lp
Forum Contributor
Posts: 121
Joined: Sun Jul 09, 2006 1:00 am
Location: la plata - argentina

Post by julian_lp »

feyd wrote: Run two instances of Apache at once on separate ports
:wink:
Post Reply