VestaCP MultiPHP (Debian/Ubuntu) Topic is solved

Section with additional software for Vesta
blueberry
Posts: 15
Joined: Tue May 02, 2017 9:35 am

Re: VestaCP MultiPHP (Debian/Ubuntu)

Postby blueberry » Tue May 02, 2017 9:42 am

Hi, thank you for sharing.

I followed all the steps here: https://git.scit.ch/rs/VestaCP-MultiPHP

And got the following same error when running these 4 commands.

phpbrew update

phpbrew update --old

# PHP 5.6
phpbrew install 5.6 +default +openssl=shared -- --with-openssl-dir=/usr/include/openssl --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-pdo --with-pdo-mysql=mysqlnd --enable-exif --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-zlib-dir=/usr --with-mcrypt=/usr --with-mhash --with-xsl=/usr --enable-zip --enable-cgi --with-curl --with-gd --enable-pcntl --enable-mbregex --enable-gd-native-ttf --with-libdir=lib64 --enable-dba=shared --enable-intl --with-readline=/usr --enable-simplexml \--enable-soap --enable-zip --with-mhash=yes --enable-shmop --enable-sockets --enable-wddx --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-cdb --with-iconv --enable-exif --enable-ftp --with-gettext --with-pic

# PHP 7.0
phpbrew install 7.0 +default +openssl=shared -- --with-openssl-dir=/usr/include/openssl --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-pdo --with-pdo-mysql=mysqlnd --enable-exif --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-zlib-dir=/usr --with-mcrypt=/usr --with-mhash --with-xsl=/usr --enable-zip --enable-cgi --with-curl --with-gd --enable-pcntl --enable-mbregex --enable-gd-native-ttf --with-libdir=lib64 --enable-dba=shared --enable-intl --with-readline=/usr --enable-simplexml \--enable-soap --enable-zip --with-mhash=yes --enable-shmop --enable-sockets --enable-wddx --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-cdb --with-iconv --enable-exif --enable-ftp --with-gettext --with-pic

--------
PHP Warning: file_put_contents(/usr/local/php/php-releases.json): failed to open stream: Permission denied in phar:///usr/bin/phpbrew/src/PhpBrew/ReleaseList.php on line 129
Exception: Can't store release json file


In vestacp, i can see the php56 and php70 selector options in Web Templates. I rebuild the user. However, when i ran php info file in both php56 and php70, it shows:

500 Internal Server Error

Using default template there is no issue. It shows php info file correctly.

I'm using Ubuntu 16.04, default php is 7.0.

Can you kindly advice on this please?

ScIT
Posts: 209
Joined: Mon Feb 23, 2015 4:13 pm

Re: VestaCP MultiPHP (Debian/Ubuntu)

Postby ScIT » Tue May 02, 2017 10:04 am

blueberry wrote:PHP Warning: file_put_contents(/usr/local/php/php-releases.json): failed to open stream: Permission denied in phar:///usr/bin/phpbrew/src/PhpBrew/ReleaseList.php on line 129
Exception: Can't store release json file


Hi blueberry

Seems you have just not enough file permission, you should run the commands with root permission, just switch before you use my guide to root with the command sudo su.

You will get a Internal Server error because the php binarys are not compiled, in that way: this cant work :-)...

blueberry
Posts: 15
Joined: Tue May 02, 2017 9:35 am

Re: VestaCP MultiPHP (Debian/Ubuntu)

Postby blueberry » Tue May 02, 2017 3:24 pm

Bro, thank you for your kind reply. (Am relatively new to linux.)

Now, am able to run phpbrew install5.6 and 7.0. I just ran these 2 commands since previously the others i ran those commands as per your site instructions. And i restarted apache2. However, it still show 500 internal server error for php5.6 or php7.0. Default template no problem.

Am i missing something? Appreciate your advice and help.

i think am very close to getting this work, as i can see the php5.6 and 7.0 has been installed.

These are the messages shown when ran the commands.

----

* To configure your installed PHP further, you can edit the config file at
/root/.phpbrew/php/php-7.0.18/etc/php.ini

* WARNING:
You haven't setup your .bashrc file to load phpbrew shell script yet!
Please run 'phpbrew init' to see the steps!

To use the newly built PHP, try the line(s) below:

$ phpbrew use php-7.0.18

Or you can use switch command to switch your default php to php-7.0.18:

$ phpbrew switch php-7.0.18

# a2enmod actions cgi
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_SG:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_SG.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_SG.UTF-8").
Module actions already enabled
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Module cgi already enabled

blueberry
Posts: 15
Joined: Tue May 02, 2017 9:35 am

Re: VestaCP MultiPHP (Debian/Ubuntu)

Postby blueberry » Wed May 03, 2017 9:16 am

Bro, really nice and kind of you to share to the community. PHP selection is a useful feature.

i wish to update that I GOT THIS WORKING!

I ran the entire steps from the start again. And i realized i didnt update the symlinks correctly to point to the correct installed PHP version. After deleting the symlinks and re-creating, it works perfect!

-----

Create Symlinks
Symlink only needed for installed PHP Versions, PHP Version (php-x.x.xx) may be different.
php-7.0.18
php-5.6.30

ArisC
Posts: 27
Joined: Tue Apr 18, 2017 1:37 pm

Re: VestaCP MultiPHP (Debian/Ubuntu)

Postby ArisC » Wed May 10, 2017 9:24 am

Any plan for NGINX + PHP-FPM ? :/

ScIT
Posts: 209
Joined: Mon Feb 23, 2015 4:13 pm

Re: VestaCP MultiPHP (Debian/Ubuntu)

Postby ScIT » Tue May 16, 2017 6:17 am

ArisC wrote:Any plan for NGINX + PHP-FPM ? :/

atm not, because we do not use nginx / php-fpm in our systems :).


Return to “3rd Party Software”



Who is online

Users browsing this forum: Bing [Bot] and 2 guests