3

I have googled this and found lots of hits which appeared to be the same as I was asking but turned out not to be.

I have 2 different versions of PHP installed, and I would like to specify exactly which php binary apache uses when it starts up.

How could this be done?

1
  • The one with php.ini in the right directory. Commented Nov 25, 2012 at 8:23

2 Answers 2

1

Here is an example to indicate version 5.3 should be used and the route to php.ini. Add the following lines to .htaccess:

AddHandler application/x-httpd-php53 .php
SuPHP_ConfigPath /PathTo/DirWithPHP.ini
Sign up to request clarification or add additional context in comments.

Comments

0

Personally, I have a machine where php runs as a cgi. I just keep multiple separate installs. Apache looks in /ws/php for the binary

/ws/php
/ws/php5.3
/ws/php5.4
/ws/php5.5

switching versions is a simple folder rename.

There's other ways, but this works and is very simple.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.