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 MultiPHP (Debian/Ubuntu)

Section with additional software for Vesta
Post Reply
  • Print view
Advanced search
52 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
blueberry
Posts: 25
Joined: Tue May 02, 2017 9:35 am

Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

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

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

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

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

Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

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

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

Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

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

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

Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

Post by ArisC » Wed May 10, 2017 9:24 am

Any plan for NGINX + PHP-FPM ? :/
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

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

splot
Posts: 1
Joined: Fri Jul 28, 2017 11:39 am

Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

Post by splot » Fri Jul 28, 2017 11:41 am

Hi every body,
i'm follwing instructions step-by-step.

I havent' understood one line:

Then change --with-openssl-dir=/usr/include/openssl to --with-openssl-dir=/usr/local/sslold and compile.


What do i have to do?


Thanks
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

Post by ScIT » Sat Jul 29, 2017 12:43 pm

splot wrote:Hi every body,
i'm follwing instructions step-by-step.

I havent' understood one line:

Then change --with-openssl-dir=/usr/include/openssl to --with-openssl-dir=/usr/local/sslold and compile.


What do i have to do?


Thanks
I think this part is documented well, only append to PHP 5.3 and Ubunut 16.04, like it is described. If you want to use this, check the command on next line, then you will understand what you have to change.
Top

ahouse
Posts: 171
Joined: Fri Sep 01, 2017 1:05 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

Post by ahouse » Mon Sep 04, 2017 11:07 am

does work on my test platform ( virualbox + ubuntu server 16.04.3)
На моей тестовой платформе вроде как нормально завелось.
Top

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

Re: VestaCP MultiPHP (Debian/Ubuntu)
  • Quote

Post by blueberry » Wed Sep 20, 2017 7:43 am

Yes, same issue with Openssl.so showing disabled in PHP info file. After trying your suggested, it works. I also additionally added the extension in php.ini file as well.
ktanev wrote:In my case, the file php_openssl.so is missing from the extension directory. But when I go to the dir, there have few files and openssl.so, so basically I just create symlink to the file openssl.so with filename php_openssl.so :)

If you are using 5.5.38 PHP, you need to do this:

1. go to

Code: Select all

/usr/local/php/php/php-5.5.38/lib/php/extensions/no-debug-non-zts-20121212
2. create symlink

Code: Select all

ln -s openssl.so php_openssl.so
Probably this will work for other versions of php... Just change the dir
Top


Post Reply
  • Print view

52 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 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
 

 

Login  •  Register

I forgot my password