Page 2 of 17

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 on Debian9 (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Sat Jul 07, 2018 5:02 pm
by dpeca
sacredwebsite wrote:
Sat Jul 07, 2018 3:05 pm
Dpeca, thank you for your support.
I launched a test server with Debian 9 as the base OS and installed Vesta on it and installed the scripts, I am getting the same issue still.
Any suggestions on where to look to help troubleshoot?

Also Are you installing your script on a bare Debian 9 Vesta install?
I tested on both baremetal and virtualized Debian 9.4... works as expected.
Do you install default Vesta, with Apache+nginx?

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 on Debian9 (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Sun Jul 08, 2018 3:17 pm
by sacredwebsite
Dpeca,
I just retested with a clean installation and copied line by line your instructions.
It is working for me now, so I must have an error in what I copied from you as I had placed everything in a shell script file originally.

Thank you for your help.

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 on Debian9 (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Sun Jul 08, 2018 3:51 pm
by dpeca
Glad to see it is working on your server now :)

Re: TUTORIAL: PHP selector for PHP 5.6, 7.0, 7.1 and 7.2 on Debian9 (and optionally make direct nginx <-> PHP-FPM stack)

Posted: Thu Jul 12, 2018 1:45 pm
by dpeca
Just tested on Debian8, works fine.

Maybe, only on Debian8, in some cases, Apache is not able to connect to FPM.
If that happen, then one additional step should be performed:
Please edit:
/usr/local/vesta/data/templates/web/apache2/PHP-FPM-7x.tpl
/usr/local/vesta/data/templates/web/apache2/PHP-FPM-7x.stpl
(where 7x is desired version)

and uncomment mod_ruid2 block:

Code: Select all

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid %user% %group%
        RGroups www-data
    </IfModule>
and then restart Apache:

Code: Select all

service apache2 restart
and change Apache template to default, and then set it again to PHP-FPM-7x.

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)

Posted: Tue Jul 24, 2018 5:25 pm
by sacredwebsite
Dpeca,
This is also commented out on Debian 9 from what I am seeing.
Should this also be enabled on Debian 9 or is it enabled elsewhere?

Also are these templates available in any repo I can fork or watch?

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)

Posted: Tue Jul 24, 2018 8:14 pm
by dpeca
sacredwebsite wrote:
Tue Jul 24, 2018 5:25 pm
Dpeca,
This is also commented out on Debian 9 from what I am seeing.
Should this also be enabled on Debian 9 or is it enabled elsewhere?

Also are these templates available in any repo I can fork or watch?
On Debian9 it should be commented.
No need to uncomment it.

For now templates are not included in any repo.

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)

Posted: Thu Sep 13, 2018 6:21 pm
by buracat
Very thanks :)

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)

Posted: Fri Sep 14, 2018 6:52 am
by layalhasan
I was trying to change my php.ini settings but its not changing at all. I have changed it from template directory. PHP-FPM-56.sh. What have I done wrong?

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)

Posted: Sat Sep 15, 2018 7:59 pm
by dpeca
layalhasan wrote:
Fri Sep 14, 2018 6:52 am
I was trying to change my php.ini settings but its not changing at all. I have changed it from template directory. PHP-FPM-56.sh. What have I done wrong?
Path to php.ini is /etc/php/5.6/fpm/php.ini
After you change it, you need to restart FPM:

Code: Select all

service php5.6-fpm restart

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)

Posted: Thu Sep 20, 2018 9:10 pm
by mehargags
Dpeca,
a few PHP modules are renamed and consolidated, plus mcrypt is deprecated. Please see my recommendation below and edit your post.

Code: Select all

apt install -y php7.2-apcu php7.2-fpm php7.2-memcache php7.2-memcached php7.2-xml php7.2-zip php7.2-mysqli php7.2-mysql php7.2-curl php7.2-mbstring php7.2-json php7.2-gd php7.2-intl php7.2-mcrypt php7.2-xsl php7.2-soap php7.2-common php7.2-readline php7.2-cli php7.2-opcache php7.2-bcmath php7.2-dom php7.2-PDO php7.2-SimpleXML php7.2-iconv php7.2-sqlite3

Code: Select all

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-apcu' instead of 'php7.2-apcu'
Note, selecting 'php7.2-memcached' for regex 'php7.2-memcache'
Note, selecting 'php-memcached' instead of 'php7.2-memcached'
Note, selecting 'php-memcached' instead of 'php7.2-memcached'
Note, selecting 'php7.2-mysql' instead of 'php7.2-mysqli'
Note, selecting 'php7.2-xml' instead of 'php7.2-dom'
Note, selecting 'php7.2-pdo' for glob 'php7.2-PDO'
Note, selecting 'php7.2-common' instead of 'php7.2-pdo'
Note, selecting 'php7.2-simplexml' for glob 'php7.2-SimpleXML'
Note, selecting 'php7.2-xml' instead of 'php7.2-simplexml'
Note, selecting 'php7.2-common' instead of 'php7.2-iconv'
E: Unable to locate package php7.2-mcrypt
E: Couldn't find any package by glob 'php7.2-mcrypt'
E: Couldn't find any package by regex 'php7.2-mcrypt'
The new command that works for me without notices is:

Code: Select all

apt install -y php7.2-fpm php7.2-common php7.2-memcached php7.2-xml php7.2-zip php7.2-mysql php7.2-curl php7.2-mbstring php7.2-json php7.2-gd php7.2-intl php7.2-xsl php7.2-soap php7.2-readline php7.2-cli php7.2-opcache php7.2-bcmath php7.2-dom php7.2-pdo php7.2-iconv php7.2-sqlite3