Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion Debian/Ubuntu
  • Search

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)

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
166 posts
  • Page 3 of 17
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 17
  • Next
mericson
Posts: 44
Joined: Thu Apr 06, 2017 12:37 am

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)
  • Quote

Post by mericson » Wed Sep 26, 2018 4:21 am

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
Top

tom256
Posts: 24
Joined: Sun Sep 16, 2018 3:51 pm

Os: Ubuntu 15x
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)
  • Quote

Post by tom256 » Mon Oct 08, 2018 3:51 pm

Great Tutorial, this kind of selector should be implemented in VestaCP by default
Top

mericson
Posts: 44
Joined: Thu Apr 06, 2017 12:37 am

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)
  • Quote

Post by mericson » Mon Oct 08, 2018 7:58 pm

mericson wrote: ↑
Wed Sep 26, 2018 4:21 am
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
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!
Top

chrisf
Posts: 49
Joined: Sat Oct 13, 2018 6:25 pm

Os: Ubuntu 16x
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)
  • Quote

Post by chrisf » Sat Oct 20, 2018 8:38 am

Works perfectly on Ubuntu 18.04, the only change is the first step.

Code: Select all

add-apt-repository ppa:ondrej/php
a2enmod proxy_fcgi setenvif
The commands all expect root, so

Code: Select all

su root
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
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

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)
  • Quote

Post by mehargags » Sun Oct 21, 2018 5:39 am

Chris,
you can comment for this on bugtracker or GIT
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

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)
  • Quote

Post by dpeca » Mon Oct 22, 2018 10:57 am

mehargags, this is not a part of vestacp so he can not do anything on git or bugtracker :)
Top

maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

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)
  • Quote

Post by maniek015 » Tue Nov 20, 2018 2:51 pm

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.
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

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)
  • Quote

Post by dpeca » Tue Nov 20, 2018 3:22 pm

maniek015 wrote: ↑
Tue Nov 20, 2018 2:51 pm
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.

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/
Top

maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

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)
  • Quote

Post by maniek015 » Wed Nov 21, 2018 6:42 am

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?
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

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)
  • Quote

Post by dpeca » Wed Nov 21, 2018 8:54 am

maniek015 wrote: ↑
Wed Nov 21, 2018 6:42 am
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?
You are not pointing nginx directly to php-fpm, as it is described in second post of this thread, right?
Top


Post Reply
  • Print view

166 posts
  • Page 3 of 17
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 17
  • Next

Return to “Debian/Ubuntu”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password