0

I wonder if I could have some feedback from some people that did the migration from php to PHP-FPM. The issue I have is that I have lots of scripts on the service. Some written by customers and I cant modify them all.

The reason I want to migrate to PHP-FPM is not particular about speed, but more because I was told that with PHP-FPM I can run 2 instances of PHP. So I am planing to run PHP5-FPM and PHP7-FPM and than slowly move and test the scripts on PHP7. But old scripts can still run on PHP5.

So this brings me to my 2 questions. 1. I run at the moment php56w 5.6.40-1.w6 package from Webtatic on a CentOS 6.10 server. When I install php5-fpm, do I have to make changes to all the scripts to work with the FPM version of PHP5? 2. Do you see any major complication to run 2 PHP-FPM instances on one server?

Thank you all for the feedback, this is a important decision for me and for me the dual install would be the perfect solution if I do not open the Pandora box by doing this.

Best wishes, Thomas

  • you don't need to modify your script, because the client ask the php page to the webserver and the this one route the request to php-fpm and this one run your script using the php intepreter – c4f4t0r Jan 30 at 10:33
  • Should read developers.redhat.com/blog/2017/10/25/php-configuration-tips which is about switching to FPM and using Software Collections to allow multiple versions – Remi Collet Jan 30 at 16:57
  • Thank you very much for the feedback, this makes me more confident that I can do what I need. – Thomas Jan 31 at 1:52
0

I'm not familiar with Webtatic, if its possible to install both PHP version from them at the same time.

I would switch to Remi's RPM repo ( https://rpms.remirepo.net/) . If you enable remi-php56 , and update install to php-fpm ( which will be php 5.6 ) . Same repo contains php70-php-fpm , php71-php-fpm or php72-php-fpm. So install which ever you want in addition to php-fpm . The config for the second php-fpm instance will be in /etc/opt/remi/php7.x/. Replicate the other php fpm pool config to this, but change the ports ( ex run all php7.x pools on 10000+ port ). Then one by one switch the domains/virtualhosts to the new PHP by changing the port on fastcgi_pass .

Should work without complications, as long you have enough memory.

  • Thank you Sandor, this is valuable info and helps me a lot. Thank you for taking the time to help me. – Thomas Jan 31 at 1:53

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.