Wednesday, December 3, 2014

linux: one apache two php versions. possible?



it seems that some of my php applications require php 5.2 and some require php 5.3.
is there a way to configure apache (v2.2.14) that one virtualhost will work with one php library and a different virtualhost will require a different one?



currently the only solution that i found is to install two apaches and two phps and each of the apache will reside in a different port.




thanks


Answer



If you would use PHP 4 and 5 it would be easy to manipulate what module you want to use with:



 



So there 3 ways to deal with this problem:





  1. Correct the problems in the PHP scripts (imho the best way)

  2. Modify the PHP source code so it reports itself as "mod_php52.c","mod_php53.c"

  3. Run it as CGI where needed Check it out here



You can also run 2 servers on different ports and use a proxy


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...