We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
VestaCP MultiPHP (Debian/Ubuntu)
VestaCP MultiPHP (Debian/Ubuntu)
Better way to solve it: viewtopic.php?f=41&t=17129
Hi!
As already discussed in thread viewtopic.php?f=11&t=12691 and viewtopic.php?f=10&t=12734 I published "my" solution for VestaCP with MultiPHP and PHPBrew. The Solution is based on a little rewrite of the idea from Peter Anikin (http://anikin.pw/all/multiversionnost-p ... s-vestacp/).
You can find the guide on our GITLab Server: https://git.scit.ch/rs/VestaCP-MultiPHP
After installation you should be able to choose the different PHP Versions inside of VestaCP -> WEB -> Domain -> Web Template (Apache2):
After that you have to rebuild the user with v-rebuild-user or inside of VestaCP Backend. Now you can use different PHP Versions for different Domains.
If you need to edit your php.ini file or include additional modules such as Ioncube you will find it under: /usr/local/php/php/php_x.x.x/etc/php.ini - after modification you don't need to restart Apache2, the change will be loaded directly with the next request over php cgi.
MultiPHP is tested on Ubuntu Server 14.04 LTS, maybe someone can try this on Debian and let us know if it works.
Best Regards
Raphael
Edit 2016-09-27: Modified Installation Guide and added setup informations for PHP 5.5 and 5.6.
I would suggest to switch base system to PHP 5.6, only 5.x version that is still supported (http://php.net/supported-versions.php) - then you can still switch to 5.4 or 5.3 if needed.
Hi!
As already discussed in thread viewtopic.php?f=11&t=12691 and viewtopic.php?f=10&t=12734 I published "my" solution for VestaCP with MultiPHP and PHPBrew. The Solution is based on a little rewrite of the idea from Peter Anikin (http://anikin.pw/all/multiversionnost-p ... s-vestacp/).
You can find the guide on our GITLab Server: https://git.scit.ch/rs/VestaCP-MultiPHP
After installation you should be able to choose the different PHP Versions inside of VestaCP -> WEB -> Domain -> Web Template (Apache2):
After that you have to rebuild the user with v-rebuild-user or inside of VestaCP Backend. Now you can use different PHP Versions for different Domains.
If you need to edit your php.ini file or include additional modules such as Ioncube you will find it under: /usr/local/php/php/php_x.x.x/etc/php.ini - after modification you don't need to restart Apache2, the change will be loaded directly with the next request over php cgi.
MultiPHP is tested on Ubuntu Server 14.04 LTS, maybe someone can try this on Debian and let us know if it works.
Best Regards
Raphael
Edit 2016-09-27: Modified Installation Guide and added setup informations for PHP 5.5 and 5.6.
I would suggest to switch base system to PHP 5.6, only 5.x version that is still supported (http://php.net/supported-versions.php) - then you can still switch to 5.4 or 5.3 if needed.
Last edited by ScIT on Tue Sep 27, 2016 7:53 pm, edited 1 time in total.
Re: VestaCP MultiPHP (Debian/Ubuntu)
Will be nice do a script :)
And add php 5.5 and 5.6
And add php 5.5 and 5.6
Re: VestaCP MultiPHP (Debian/Ubuntu)
Script is not planed, compiling takes long and I think it's better to do this setup "step by step" for each server. If you have more then 4 or 5 VestaCP Server you can do a script by yourself.skamasle wrote:Will be nice do a script :)
And add php 5.5 and 5.6
PHP 5.5 and 5.6 is not a problem, our systems runs with PHP 5.6 thats because it is not listed. I've updated the Documentation to add the requested PHP 5.5 and 5.6 versions.
I would suggest to switch base system on PHP 5.6, only 5.x version that is supported (http://php.net/supported-versions.php). Then you can still switch to 5.4 or 5.3 if needed.
Best Regards
Raphael
-
- Posts: 4
- Joined: Thu Sep 29, 2016 6:03 am
Re: VestaCP MultiPHP (Debian/Ubuntu)
Either rebuild the user with v-rebuild-user or inside of VestaCP Backend. Now you are able to use different PHP Versions for different Domains.
Re: VestaCP MultiPHP (Debian/Ubuntu)
Yep, like it's written in thread and guide :-). I'm glad that it works for you!MaryGutierrez wrote:Either rebuild the user with v-rebuild-user or inside of VestaCP Backend. Now you are able to use different PHP Versions for different Domains.
Re: VestaCP MultiPHP (Debian/Ubuntu)
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: /root/.phpbrew/bashrc: line 17: syntax error near unexpected token `$'\r''
'bash: /root/.phpbrew/bashrc: line 17: `function __phpbrew_set_path()
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: /root/.phpbrew/bashrc: line 17: syntax error near unexpected token `$'\r''
'bash: /root/.phpbrew/bashrc: line 17: `function __phpbrew_set_path()
Re: VestaCP MultiPHP (Debian/Ubuntu)
Please check your bashrc file on line 17, maybe it's a problem like here described: http://stackoverflow.com/questions/6473 ... token-in-rpligin wrote:[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: /root/.phpbrew/bashrc: line 17: syntax error near unexpected token `$'\r''
'bash: /root/.phpbrew/bashrc: line 17: `function __phpbrew_set_path()
If this does not resolv the problem, please post more information about your OS and VestaCP Version.
Thank you.
Re: VestaCP MultiPHP (Debian/Ubuntu)
Installed PHP 5.3
Don't work
Don't work
Not Found
The requested URL /cgi-bin/php/phpinfo.php was not found on this server.
Re: VestaCP MultiPHP (Debian/Ubuntu)
Do you have rebuilded your user? In VestaCP under User -> Rebuild or over command line v-rebuild-user username. If you follow the tutorial "step by step" it "have" to work :-).pligin wrote:Installed PHP 5.3
Don't work
Not Found
The requested URL /cgi-bin/php/phpinfo.php was not found on this server.
Re: VestaCP MultiPHP (Debian/Ubuntu)
YesScIT wrote:Do you have rebuilded your user? In VestaCP under User -> Rebuild or over command line v-rebuild-user username. If you follow the tutorial "step by step" it "have" to work :-).pligin wrote:Installed PHP 5.3
Don't work
Not Found
The requested URL /cgi-bin/php/phpinfo.php was not found on this server.
I think this script is not working
Code: Select all
wrapper_script='#!/usr/local/php/php53/bin/php-cgi -c/usr/local/php/php53/etc/php.ini'
wrapper_file="/home/$user/web/$domain/cgi-bin/php"
echo "$wrapper_script" > $wrapper_file
chown $user:$user $wrapper_file
chmod -f 751 $wrapper_file
P.S. nginx + apache2