Page 15 of 24

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

Posted: Tue Jan 31, 2017 9:53 pm
by skamasle
xaritoshka2004 wrote:Hi, how to add php 5.3, thanks
As php 5.2 you need compile it.

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

Posted: Tue Feb 14, 2017 10:25 pm
by emva
skamasle wrote:Hi.
First of all as I say always, sorry for my bad english, I try to improve every day :)
SK PHP Selector:
Круто!!!!
Спасибо огромное!

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

Posted: Fri Mar 03, 2017 5:55 pm
by morralletti
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?

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

Posted: Fri Mar 03, 2017 9:51 pm
by skamasle
Hi

Try rebuild vhosts.

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

Posted: Fri Mar 10, 2017 3:32 pm
by Edd123
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?

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

Posted: Fri Mar 10, 2017 4:05 pm
by Syeef
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

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

Posted: Fri Mar 10, 2017 7:11 pm
by skamasle
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

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

Posted: Thu Mar 16, 2017 10:39 pm
by Gytis
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 :)

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

Posted: Wed Mar 22, 2017 5:23 am
by head
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.

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

Posted: Thu Mar 23, 2017 7:44 pm
by skamasle
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.