Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multi PHP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Kurogane
n00b
n00b


Joined: 23 May 2010
Posts: 39

PostPosted: Thu Jun 01, 2017 7:22 pm    Post subject: Multi PHP Reply with quote

Hi,

How i can run multi FPM-PHP different version in the same time?

The only thing occurs to me is duplicate init.d but i not think is a simple as that.

I want to run FPM-PHP5.6 FPM-PH7 and FPM-PHP7.1simultaneously i going to use nginx.
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 427
Location: Gainesville, FL, USA

PostPosted: Fri Jun 02, 2017 3:58 am    Post subject: Reply with quote

You're on the right track. In the /etc/init.d/ directory you should find a php-fpm file. This is a generic one like the net file in the same directory. Just as you did in the Handbook for setting up network devices, you apply a similar trick with php-fpm:
Code:
ln -s php-fpm php-fpm-php5.6
ln -s php-fpm php-fpm-php7.0
ln -s php-fpm php-fpm-php7.1


Now you add those three new php-fpm-php* instances to the default runlevel. Just as in setting up network devices, you do not add the base php-fpm entry with rc-update.

As far as nginx goes, I'm not a lot of help. In Apache, the thing to do would be to set up three vhosts with this kind of setup as an example
Code:
FastCgiExternalServer /usr/lib/php5.6/bin/php-fpm -socket /var/run/php-fpm/php56.sock
<Location "/usr/lib/php5.6/bin/php-fpm">
   ...
</Location>

but for nginx you'd need to do something else to set up those vhosts. Whatever it is, though, the big takeaway is the path to the Unix socket where that FPM instance is listening: /var/run/php-fpm/php56.sock You'll need that regardless of what httpd you use.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum