TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 for Debian & Ubuntu (and optionally directly nginx-PHP-FPM)
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
I followed this step-by-step on Ubuntu 18.04, and didn't get a single error. I only had to change the repository at the beginning of the tutorial.
Unfortunately, the switcher only works for PHP 7.2 all the other versions do not create the properly named socket. I believe that PHP 7.2 may have already been installed for VestaCP, but of course, the FPM templates are new with this tutorial
When I accesss my site while switched to PHP-FPM-56 I get the error:
[Wed Sep 26 03:55:44.698325 2018] [proxy:error] [pid 12486] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php5.6-fpm-mydomain.com.sock (*) failed
[Wed Sep 26 03:55:44.698424 2018] [proxy_fcgi:error] [pid 12486] [client 159.65.252.229:35342] AH01079: failed to make connection to backend: httpd-UDS
In /run/php/ I do see php7.2-fpm-mydomain.com.sock and php7.2-fpm-mydomain.com.sock and I see php5.6-fpm.sock but not one with mydomain.com for php5.6. I have no idea where this is failing so need some help!
Is there a chance that these new configs only work for new domains? Is there an additional step I must perform for existing domains? I tried v-rebuild-web-domain mydomain.com restart but nothing changed.
Thanks,
Mark
Unfortunately, the switcher only works for PHP 7.2 all the other versions do not create the properly named socket. I believe that PHP 7.2 may have already been installed for VestaCP, but of course, the FPM templates are new with this tutorial
When I accesss my site while switched to PHP-FPM-56 I get the error:
[Wed Sep 26 03:55:44.698325 2018] [proxy:error] [pid 12486] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php5.6-fpm-mydomain.com.sock (*) failed
[Wed Sep 26 03:55:44.698424 2018] [proxy_fcgi:error] [pid 12486] [client 159.65.252.229:35342] AH01079: failed to make connection to backend: httpd-UDS
In /run/php/ I do see php7.2-fpm-mydomain.com.sock and php7.2-fpm-mydomain.com.sock and I see php5.6-fpm.sock but not one with mydomain.com for php5.6. I have no idea where this is failing so need some help!
Is there a chance that these new configs only work for new domains? Is there an additional step I must perform for existing domains? I tried v-rebuild-web-domain mydomain.com restart but nothing changed.
Thanks,
Mark
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
Great Tutorial, this kind of selector should be implemented in VestaCP by default
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
I was able to solve this issue by repeating the step of the tutorial that configured PHP 5.6. After repeating that step, PHP 5.6 is available in my selector. I too appreciate this tutorial, and hope it or something similar can be part of the default installation!mericson wrote: ↑Wed Sep 26, 2018 4:21 amI followed this step-by-step on Ubuntu 18.04, and didn't get a single error. I only had to change the repository at the beginning of the tutorial.
Unfortunately, the switcher only works for PHP 7.2 all the other versions do not create the properly named socket. I believe that PHP 7.2 may have already been installed for VestaCP, but of course, the FPM templates are new with this tutorial
When I accesss my site while switched to PHP-FPM-56 I get the error:
[Wed Sep 26 03:55:44.698325 2018] [proxy:error] [pid 12486] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php5.6-fpm-mydomain.com.sock (*) failed
[Wed Sep 26 03:55:44.698424 2018] [proxy_fcgi:error] [pid 12486] [client 159.65.252.229:35342] AH01079: failed to make connection to backend: httpd-UDS
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
Works perfectly on Ubuntu 18.04, the only change is the first step.
The commands all expect root, so
The rest you do verbatim. I made a few adjustments, and added a default.sh to remove you from any pool.
Another modification I made was in the *.sh file, copy the default php/x.x/php.ini to the /home/user/web/domain - this way each domain can have it's own php.ini - and you have to let the pool know to load it :-)
I would really like to add the fpm services under the server tab, so I can restart from the UI. Is there any easy way to do this?
Chris
Code: Select all
add-apt-repository ppa:ondrej/php
a2enmod proxy_fcgi setenvif
Code: Select all
su root
Another modification I made was in the *.sh file, copy the default php/x.x/php.ini to the /home/user/web/domain - this way each domain can have it's own php.ini - and you have to let the pool know to load it :-)
I would really like to add the fpm services under the server tab, so I can restart from the UI. Is there any easy way to do this?
Chris
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
Chris,
you can comment for this on bugtracker or GIT
you can comment for this on bugtracker or GIT
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
mehargags, this is not a part of vestacp so he can not do anything on git or bugtracker :)
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
Who know's how I can on Debian 9 and newest VestaCP with PHP Selector change the default version of PHP?
PhpMyAdmin have a problem with PHP 7.2 so I want to change it to PHP 7.1. "php -v" says me I used PHP 7.2 on the server default.
PhpMyAdmin have a problem with PHP 7.2 so I want to change it to PHP 7.1. "php -v" says me I used PHP 7.2 on the server default.
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
rm /etc/alternatives/php
ln -s /usr/bin/php7.0 /etc/alternatives/php
but it will not affect apache php module at all..
you probably need to create some subdomain and leave it to default 'hosting' or 'default' template (so, because of it - it will use default php 7.0 version) and then point your browser to http://created-sub.domain.com/phpmyadmin/
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
Thank you dpeca - it work properly :)
I have another problem - on default PHP 7.0 the problem not show - on the all FPM PHP I have a problem with mod_rewrite detect. Script not see the mod_rewrite - when I switch to "default" template (PHP7.0) script see the mod_rewrite.
Anyone have a idea where is the problem?
I have another problem - on default PHP 7.0 the problem not show - on the all FPM PHP I have a problem with mod_rewrite detect. Script not see the mod_rewrite - when I switch to "default" template (PHP7.0) script see the mod_rewrite.
Anyone have a idea where is the problem?
Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 for Debian (and optionally make direct nginx <-> PHP-FPM stack)
You are not pointing nginx directly to php-fpm, as it is described in second post of this thread, right?maniek015 wrote: ↑Wed Nov 21, 2018 6:42 amI have another problem - on default PHP 7.0 the problem not show - on the all FPM PHP I have a problem with mod_rewrite detect. Script not see the mod_rewrite - when I switch to "default" template (PHP7.0) script see the mod_rewrite.
Anyone have a idea where is the problem?