dcsimg

European Unix Platform (EUP): Running PHP3 and 4 as simultaneous modules within Apache

By ServerWatch Staff (Send Email)
Posted Oct 14, 2000


"If you are maintaining or writing PHP scripts for several sites then you might be in a situation where you will have to use PHP3 code for one site and php4 code for another site. You could go four ways to solve this problem.

  • Install mod_PHP4 and make sure that you will not use functions that are working only in PHP4.
  • Write a shell script to change the apache conf. This can only be used on a development machine.
  • Check the PHP version in every script.
  • Install both modules on Apache and make them run simultaneously."
"The first choice is the one you don't want. You're bound to make a mistake sooner or later. The second choice might be a solution when your working on a development machine but it's nasty, you will have to restart the httpd every time you want to change. The third choice might be a good one but makes the script somewhat bloated, therefor we choose to make a setup which enables you to run them both. You can configure Apache to use different extensions for either module."

"You will have to get both PHP source packages from http://www.php.net. If you have an older php3 source tree then check the documentation to see if the configure script accepts the --enable-versioning option. You may want to get the latest Apache while you are at it. You can find it at http://www.apache.org" If you are maintaining or writing PHP scripts for several sites then you might be in a situation where you will have to use PHP3 code for one site and php4 code for another site.

Page 1 of 1


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.