Nginx – How to install different extensions when using multiple PHP versions

apache-2.2centosnginxphp5php53

I have the following setup : Centos 6.4, Apache set up to work with WHM/ cpanel with it's version of PHP (5.4) and nginx running a separate version of PHP to handle everything else.

How can I do a yum install for some php extensions ? If i just type the command it will install it for the apache php, right ?

Sorry if it's a noob question, but I'm new at this.

Thanks in advance!

Best Answer

Found the answer for this one :

I downloaded the PHP version that I had installed with cpxstack and built every module that i needed from that source. At first I had an issue with the .so being built against the newer version of PHP and after a little search I found that I had to run the config command with the correct PHP version

    .configure --with-php-config=/opt/pifpm/php-5.3.26/bin/php-config

and then make

Don't use make install because it will try to install it in a different folder. Just copy/paste the resulting .so in the php extensions folder and activate them through php ini. Some modules, like APC hava a different installation process, but you can find that on the cpxstack wiki page.

Related Topic