Page 22 of 24

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Tue Feb 26, 2019 10:39 pm
by yann
Hello
I need to use php 5.6.40 and 7.3.2 on different websites
My configuration is CentOS + Nginx + php-fpm
is there a solution to have the 2 php versions on VestaCP
Thank you in advance for your assistance

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Thu Feb 28, 2019 4:51 pm
by pivey
Great script, i hope there will be a core implementation from Vesta guys soon.
I installed with beta 0.4 .. only PHP 7.2 as additional version....works fine (after re-installing phpmyadmin & roundcube)

However, i have few questions, hopefully get your reply:

a) How does the installation behave on next Vesta Update? Will it break? Have to reinstall?
b) from what i see, default php 5.6.ini gets edited at /etc/php.ini (or within CP server > httpd > configuration > php.ini )
The additional PHP (in my case 7.2) gets installed at /etc/opt/remi/
so, any php.ini edits must be done directly at that location, right?
c) and most important: How do i uninstall PHP Selector for Centos ?
Because i did initial setup with old script.. then uninstalled php's and installed new script with ONE additional PHP version.
But the old setup left templates (scrap) at /usr/local/vesta/data/templates/web/httpd

Cheers!

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Fri Mar 15, 2019 11:10 pm
by pivey
Is the contributor of the script still active here? Would be nice to have his input

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Tue Mar 26, 2019 10:12 am
by pipoy
One of the best contribution in Vestacp. Thank you

But hopefully someone can maintain the work

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Sun Apr 14, 2019 2:49 pm
by skamasle
yann wrote:
Tue Feb 26, 2019 10:39 pm
Hello
I need to use php 5.6.40 and 7.3.2 on different websites
My configuration is CentOS + Nginx + php-fpm
is there a solution to have the 2 php versions on VestaCP
Thank you in advance for your assistance
This not run in nginx + php-fpm
pivey wrote:
Thu Feb 28, 2019 4:51 pm
Great script, i hope there will be a core implementation from Vesta guys soon.
I installed with beta 0.4 .. only PHP 7.2 as additional version....works fine (after re-installing phpmyadmin & roundcube)

However, i have few questions, hopefully get your reply:

a) How does the installation behave on next Vesta Update? Will it break? Have to reinstall?
b) from what i see, default php 5.6.ini gets edited at /etc/php.ini (or within CP server > httpd > configuration > php.ini )
The additional PHP (in my case 7.2) gets installed at /etc/opt/remi/
so, any php.ini edits must be done directly at that location, right?
c) and most important: How do i uninstall PHP Selector for Centos ?
Because i did initial setup with old script.. then uninstalled php's and installed new script with ONE additional PHP version.
But the old setup left templates (scrap) at /usr/local/vesta/data/templates/web/httpd

Cheers!
Hi

Vesta update not afect this script, but if vesta in update delete template dir, you may need install it again

If you whant uninstall any template you just need remove tpl, stpl and sh from templates/web/httpd

If you whant remove some php versión from server you cant just uninstall it as any orther remi php

Run yum searc php* and remove php version you want

Script not modify nothing in vesta, just add 3 files to httpd templates, so remove it and uninstall php version with yum

This is script is very simple and you can add and remove php version manually in easy way

PHP.ini yes, you can edit it when your phpinfo() mark it, but there is a symlink to /etc/php*.ini remi some times change php.ini location, not is same for old php to new ones, i recomend you than you always check phpinfo() to know correct php.ini location

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Wed Apr 17, 2019 12:38 pm
by pivey
Thank you @skamasle for your reply, i appreciate. will try as you suggested.
Again, thank you! Great, helpful script :)

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Sat Apr 20, 2019 2:48 pm
by krvam
I have many domains in my server/vestacp

In one domain i need the last version of php and in the other domain i have to left actual php version.
With this tutorial i can do it?

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Sat Apr 27, 2019 10:01 am
by skamasle
krvam wrote:
Sat Apr 20, 2019 2:48 pm
I have many domains in my server/vestacp

In one domain i need the last version of php and in the other domain i have to left actual php version.
With this tutorial i can do it?
Yes if you use supported centos 6/7

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Wed May 08, 2019 5:14 pm
by azzronulation
Hey! I installed this script and it seemed successful, however when switching template in Vesta nothing happens. 'php -v' shows "PHP 5.6.38" no matter which template I choose.

Any help would be appreciated.

Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.

Posted: Wed May 22, 2019 11:47 pm
by mlopez
gwolf2u wrote:
Wed Apr 27, 2016 7:12 pm
baijianpeng wrote:I followed above steps, inserted that line to that file, then switched Web Template to "sk-php56", then back to "sk-php70", but the same problem happened. The log file still shows (I tried twice to install the same Joomla extension as yestoday) :
[Wed Apr 13 17:36:54.383762 2016] [fcgid:warn] [pid 3981] [client 192.168.1.3:48591] mod_fcgid: HTTP request length 135148 (so far) exceeds MaxRequestLen (131072), referer: http://www.gate.com/administrator/index ... _installer

[Wed Apr 13 17:40:32.146088 2016] [fcgid:warn] [pid 4873] [client 192.168.1.3:48642] mod_fcgid: HTTP request length 135148 (so far) exceeds MaxRequestLen (131072), referer: http://www.gate.com/administrator/index ... _installer
I even tried to restart "httpd" and tried install it again, the same thing happened.

This is weired. Maybe I need to edit the file "php.ini" of PHP 7.0 ? Where is it?

I also made another test: if I switch back to "Default" web template (php 5.4), and tried to install the same Joomla extension, I got different error, shown on Joomla backend page:
Copy file failed
And no related error message in gate.com.error.log file.

Why?

Thank you.
Just wanted to share a fix for this
Add to /usr/local/vesta/data/templates/web/httpd/sk-php70.stpl and /usr/local/vesta/data/templates/web/httpd/sk-php70.tpl

Code: Select all

FcgidMaxRequestLen 5000000
You need to add this line just above </VirtualHost>
Next you need to issue the following command in terminal

Code: Select all

v-rebuild-user [user] restart
Ex: v-rebuild-user admin restart

You should be ok then
Thank you. It worked like a charm!