Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section 3rd Party Software
  • Search

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

Section with additional software for Vesta
Post Reply
  • Print view
Advanced search
272 posts
  • Page 1 of 28
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 28
  • Next
skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

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

Post by skamasle » Fri Mar 04, 2016 9:08 pm

PHP SELECTOR IS NOT OFFICIALLY SUPPORTED BY VESTACP RUN AT YOUR OWN RISK - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY

This is a personal script

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 ?
-- There is some variables for ubuntu and debian release
- Not SUPPORT NGINX + PHP-FPM

Some caps:
Image
SpoilerShow
Image
Image
Image
Image
===========================================
Image

Need select php version you install ? read in github new options in beta 0.3 -> https://github.com/Skamasle/sk-php-selector
UPDATE

Code: Select all

Beta 0.2.4
- Added php 7.1 and php 7.2RC3
- Fix some issues with phpmyadmin
- This version is available from github -> https://github.com/Skamasle/sk-php-selector

Code: Select all

Latest:
-Support PHP 54 to php74
- Can install individual php versions as you need ! check info in github

Code: Select all

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

[code]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 !

Need select php version you install ? read in github new options in beta 0.3 -> https://github.com/Skamasle/sk-php-selector

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

Update main PHP version and get phpmyadmin broken
-> viewtopic.php?f=19&t=10854&p=67369#p67369 no script fail
Last edited by skamasle on Sun Jan 15, 2017 10:24 pm, edited 18 times in total.
Top

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

Post by pandabb » Sat Mar 05, 2016 3:22 pm

looks good.

anyone have tried this?
Top

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

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

Post by 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
Top

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

Os: CentOS 6x
Web: apache + nginx
Re: VestaCP PHP Selector for Centos add php 7, 5.6 and 5.5.
  • Quote

Post by 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
Top

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

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

Post by 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
Top

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

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

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

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

Post by pandabb » Mon Mar 07, 2016 1:18 am

this is great :D

waiting for final release.
Top

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

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

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

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

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

Post by 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
Top

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

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

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


Post Reply
  • Print view

272 posts
  • Page 1 of 28
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 28
  • Next

Return to “3rd Party Software”



  • 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
 

 

cron

Login  •  Register

I forgot my password