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

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

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

Postby skamasle » Tue Jan 31, 2017 9:53 pm

xaritoshka2004 wrote:Hi, how to add php 5.3, thanks


As php 5.2 you need compile it.

emva
Posts: 77
Joined: Fri Nov 28, 2014 6:33 pm

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

Postby emva » Tue Feb 14, 2017 10:25 pm

skamasle wrote:Hi.
First of all as I say always, sorry for my bad english, I try to improve every day :)
SK PHP Selector:

Круто!!!!
Спасибо огромное!

morralletti
Posts: 1
Joined: Fri Mar 03, 2017 5:41 pm

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

Postby morralletti » Fri Mar 03, 2017 5:55 pm

I have installed php 71 on Centos 6.8 with

Code: Select all

yum install php71-php-imap php71-php-process php71-php-pspell php71-php-xml php71-php-xmlrpc php71-php-pdo php71-php-ldap php71-php-pecl-zip php71-php-common php71-php php71-php-mcrypt php71-php-gmp php71-php-mysqlnd php71-php-mbstring php71-php-gd php71-php-tidy php71-php-pecl-memcache --enablerepo=remi


I have created /usr/local/vesta/data/templates/web/httpd/sk-php71.sh with code:

Code: Select all

#!/bin/bash
# Adding php wrapper
user="$1"
domain="$2"
ip="$3"
home_dir="$4"
docroot="$5"

wrapper_script="#!/bin/sh
PHPRC=/usr/local/lib
export PHPRC
export PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_CHILDREN=10
exec  /usr/bin/php71-cgi
"
wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"

echo "$wrapper_script" > $wrapper_file
chown $user:$user $wrapper_file
chmod -f 751 $wrapper_file

exit 0


I have linked sk-php71.stpl and sk-php71.tpl to phpfcgid.stpl and phpfcgid.tpl

But when I select template sk-php71 PHPinfo on my selected domain shows PHP 7.0.17RC1...

Any help?

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

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

Postby skamasle » Fri Mar 03, 2017 9:51 pm

Hi

Try rebuild vhosts.

Edd123
Posts: 1
Joined: Fri Mar 10, 2017 2:58 pm

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

Postby Edd123 » Fri Mar 10, 2017 3:32 pm

Hi, all

PhpMyAdmin not working after installation the script.
I have error
Image
--------------------------------------------
phpMyAdmin - Error
Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
session_start(): open(SESSION_FILE, O_RDWR) failed: Permission denied (13)
----------------------------------------------
I have:
CentOS 6.8, VestaCP 0.9.8-17
Maybe the script changed some path
What can be done?

Syeef
Posts: 50
Joined: Tue May 03, 2016 11:35 pm

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

Postby Syeef » Fri Mar 10, 2017 4:05 pm

Edd123 wrote:Hi, all

PhpMyAdmin not working after installation the script.
I have error
Image


make sure your session path is writable. you can find the session path with a simple <?php phpinfo(); ?>

On my server it's:

Code: Select all

session.save_path =   /var/opt/remi/php70/lib/php/session

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

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

Postby skamasle » Fri Mar 10, 2017 7:11 pm

I not know why now phpmyadmin take php5.5 path

Run

Code: Select all

chmod 777 /opt/remi/php55/root/var/lib/php/session


And check all your session are writable /opt/remi/php??/root/var/lib/php/session

If you run info.php in phpmyadmin dir it take default php version but save sessions in php55

Some remi changes I not investigate it yet

Gytis
Posts: 1
Joined: Thu Mar 16, 2017 10:33 pm

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

Postby Gytis » Thu Mar 16, 2017 10:39 pm

skamasle wrote:

Code: Select all

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


Great script, thanks! Used it as a basis to add PHP 7.1 and it worked smooth :)

head
Posts: 147
Joined: Mon Aug 25, 2014 11:22 am

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

Postby head » Wed Mar 22, 2017 5:23 am

Just tried on my server and it set php from 7.0 to 5.5.6 as default.
How to fix that and revert 7 to default and rest optional?
I need 5.5 only for one site.

UPDATE (solution?):
check your /etc/httpd/conf.modules.d dir and remove (backup somewhere for sure)
php-related conf files except ones related to version you need by default.
For example - i removed 10-php55-php.conf and 10-php56-php.conf.
Files 15-php70-php.conf and 15-php.conf still there and now i have default php7.

Please someone confirm my information.

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

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

Postby skamasle » Thu Mar 23, 2017 7:44 pm

By default script not change default version

I need review that, remi repos sometime do changes and script can be un stable, but by default you will mantain your default version as it.


Return to “3rd Party Software”



Who is online

Users browsing this forum: No registered users and 2 guests