tags:

views:

192

answers:

2

Is it possible to install two different versions of PHP in the same computer? I am using Mac OS X, and I need it because the PHP OpenId library does not work with PHP 5.3...

+1  A: 

First of all, see this question, which may make your needs moot.

The comments on this ticket over at openidenabled.com seem to suggest some workarounds as well.

Secondly, I'll try to answer answer the question you asked (even though it's hopefully not necessary to do what you ask). It sounds like you want to try to run two versions of PHP under the same apache server. This can be done, generally speaking, by installing and running one or both of the PHP versions under cgi (or fastcgi), and tweaking your apache configuration to use some non-standard extension for one of the versions. Googling around for tutorials on running php4 and php5 side-by-side for inspiration. The theory is the same.

timdev
Yes, I had already done that and it is true that it seems to work again. However, the authentication with Google does not work and Google is the only provider I want to support right now... The library says that http://www.google.com/accounts/o8/id is not a valid OpenId...With previous versions of PHP it works perfectly.
miguelSantirso
+2  A: 

I hope this answer isn't stupidly oversimple, but Yes. I run MAMP on my Mac and that can run either PHP 4 or PHP 5 -- switching is a button click and an Apache restart.

So you may just download MAMP and see how that's configured.