Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache set specific PHP binary

Tags:

php

apache

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?

like image 513
crankshaft Avatar asked Mar 14 '26 12:03

crankshaft


1 Answers

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
like image 164
Felipe Alameda A Avatar answered Mar 16 '26 00:03

Felipe Alameda A



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!