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

Section with additional software for Vesta
skamasle
Posts: 341
Joined: Mon Feb 29, 2016 6:36 pm

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

Postby skamasle » Fri Mar 04, 2016 9:08 pm

Hi.

First of all as I say always, sorry for my bad english, I try to improve every day :)

--------------------

SK PHP Selector:

- This script using vesta templates.
- This script using remi repo.
- I make this script to help people who whant run Multiple PHP versions on vestacp, is easy to do manually but this script makes it easier even
- Ubuntu PHP selector for vesta ?
-- Coming soon, but you need spend time on compilation of php 15 / 20 minutes for each versión.
- Not SUPPORT NGINX + PHP-FPM

Some caps:
Image
Image
Image
Image
Image


===========================================
Image

UPDATE

Code: Select all

Beta 0.2.3
- Remove some code and tests.
- Using simlinks for templates.


Code: Select all

Beta 0.2.2
- Fix bug on centos 6 paths thanks @tjebbeke  to reporting
-- Now check twice php path on centos 6
- Fix Include Optional on centos  6


Code: Select all

Beta 0.2.1
- Working on Centos 6.7 and Centos 7
- Detect PHP versión.
- Install php 5.4, php 5.5, php 5.6 and php 7.
- Support if php was upgraded, skip that version.


-- Requirements:
- Centos 6 or centos 7
- Default vetacp installed whit remi repo


Image

beta 0.2.3 installer:

Run at own risk ! still in beta, This it provided without any warranty !

Code: Select all

wget http://mirror.skamasle.com/vestacp/PHP/sk-phpinstaller_beta02_3.sh


Code: Select all

bash sk-phpinstaller_beta02_3.sh


Need PHP 5.2 ?

Check this -> viewtopic.php?f=19&t=13406

Multiple PHP on VestaCP - Adding Modules

You can install any modules to aditional php versión using remi repo:

Search module:

Code: Select all

yum search php70 --enablerepo=remi |grep opcache
#output:
php70-php-opcache.x86_64 : The Zend OPcache


Install:

Code: Select all

yum install php70-php-opcache --enablerepo=remi


Then search ini if need it:

Code: Select all

/usr/bin/php70 --ini |grep opcache
Additional .ini files parsed:      /etc/opt/remi/php70/php.d/10-opcache.ini,


Some problems whit big files on joomla, wordpress, plugins or modules fix -> http://forum.vestacp.com/viewtopic.php? ... 843#p43749
Last edited by skamasle on Sun Jan 15, 2017 10:24 pm, edited 18 times in total.

pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

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

Postby pandabb » Sat Mar 05, 2016 3:22 pm

looks good.

anyone have tried this?

skamasle
Posts: 341
Joined: Mon Feb 29, 2016 6:36 pm

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

Postby skamasle » Sat Mar 05, 2016 9:29 pm

Working on beta 0.2.1

Look like this:

Image

Not public yet

Code: Select all

- Features:
- Work on centos 6.7 and  centos 7
- Detect current php.
- Install php 5.4, php 5.5, php 5.6 and php 7, if there is a php installed skip that versión.


- Requisites:
- Centos 6 or 7
- Default vesta install whit remi.repo

tjebbeke
Collaborator
Posts: 732
Joined: Mon May 11, 2015 8:43 am
Contact:

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

Postby tjebbeke » Sun Mar 06, 2016 10:52 am

Good work!
On centos 6.7 I have this error:

Code: Select all

apachectl configtest
[Sun Mar 06 10:51:08 2016] [warn] module php5_module is already loaded, skipping
[Sun Mar 06 10:51:08 2016] [warn] module php5_module is already loaded, skipping
Syntax error on line 331 of /home/username/conf/web/httpd.conf:
Invalid command 'IncludeOptional', perhaps misspelled or defined by a module not included in the server configuration


Change IncludeOptional to Include works on your templates.

Accessing my website with your php7 template also not working :(

Code: Select all

[Sun Mar 06 10:56:49 2016] [warn] [client 84.192.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun Mar 06 10:56:49 2016] [error] [client 84.192.xxx.xxx] Premature end of script headers: phpinfo.php
[Sun Mar 06 10:56:49 2016] [warn] [client 84.192.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.mydomain.com/phpinfo.php
[Sun Mar 06 10:56:49 2016] [error] [client 84.192.xxx.xxx] Premature end of script headers: index.php, referer: http://www.mydomain.com/phpinfo.php

skamasle
Posts: 341
Joined: Mon Feb 29, 2016 6:36 pm

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

Postby skamasle » Sun Mar 06, 2016 11:53 am

Hi

Let me try reproduce errores.

The include optional is fixed on beta 0.2.2

You can fixed it whit:

Code: Select all

cd /usr/local/vesta/data/templates/web/httpd/
replace -v "IncludeOptional %home%/%user%/conf/web/httpd.%domain%.conf*" "Include %home%/%user%/conf/web/httpd.%domain%.conf*" -- sk*.tpl > /dev/null
replace -v "IncludeOptional %home%/%user%/conf/web/shttpd.%domain%.conf*" "Include %home%/%user%/conf/web/shttpd.%domain%.conf*" -- sk*.stpl > /dev/null

skamasle
Posts: 341
Joined: Mon Feb 29, 2016 6:36 pm

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

Postby skamasle » Sun Mar 06, 2016 12:30 pm

tjebbeke wrote:Good work!
On centos 6.7 I have this error:

Code: Select all

apachectl configtest
[Sun Mar 06 10:51:08 2016] [warn] module php5_module is already loaded, skipping
[Sun Mar 06 10:51:08 2016] [warn] module php5_module is already loaded, skipping
Syntax error on line 331 of /home/username/conf/web/httpd.conf:
Invalid command 'IncludeOptional', perhaps misspelled or defined by a module not included in the server configuration


Change IncludeOptional to Include works on your templates.

Accessing my website with your php7 template also not working :(

Code: Select all

[Sun Mar 06 10:56:49 2016] [warn] [client 84.192.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun Mar 06 10:56:49 2016] [error] [client 84.192.xxx.xxx] Premature end of script headers: phpinfo.php
[Sun Mar 06 10:56:49 2016] [warn] [client 84.192.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.mydomain.com/phpinfo.php
[Sun Mar 06 10:56:49 2016] [error] [client 84.192.xxx.xxx] Premature end of script headers: index.php, referer: http://www.mydomain.com/phpinfo.php


I found the problem and is fixed :)

Just run new installer again and it fix.

pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

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

Postby pandabb » Mon Mar 07, 2016 1:18 am

this is great :D

waiting for final release.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

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

Postby baijianpeng » Mon Mar 07, 2016 1:32 am

Great idea!

Today I tested this script on a fresh installation of CentOS 7 64-bit minimal on VirtualBox with VestaCP latest version. The script runs smoothly and installed php55, php56 and php70 for me.

Now, the question is: where are those php.ini files respectively? I want to modify some PHP configuration such as max upload size.

Thank you.

skamasle
Posts: 341
Joined: Mon Feb 29, 2016 6:36 pm

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

Postby skamasle » Mon Mar 07, 2016 7:53 am

Hi,

You can check php ini path on info.php

But is in /opt/remi/root/phpversión/etc/php.ini

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

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

Postby baijianpeng » Mon Mar 07, 2016 8:50 am

A little different on my centos 7 server:

Code: Select all

/opt/remi/$PHPVERSION/root/etc/php.ini


PS: I have two suggestions for your multi-php installer script:

1. please add "progress bar" for installing process, to avoid users think "nothing happened, is it dead?"
2. please submit this script to VestaCP official team so that all VestaCP users will benefit from it.

Thank you.


Return to “3rd Party Software”



Who is online

Users browsing this forum: No registered users and 3 guests