New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpbrew switch doesn't change php on apache #226
Comments
This is normal behaviour. |
thanks, @heanz. |
@heanz This really isn't documented very well at all in the readme.md, who's deals with documentation ? p.s. Nice one for the answer q-dos ;) |
@molemann : to achieve the switch with apache, I think you may wrap I'm not sure if it could work or not as I use nginx/fpm which allow you to have as much php versions running at the same time as you want (</troll> 😄 ) But I you manage to do so, feel free to share with us so we can add it to the docs! |
This is an example bash script for changing the apache php version: #!/bin/bash
# Change Apaches PHP Module to 5.5.10
echo "Loading PHP 5.5.10 ..."
echo "LoadModule php5_module /usr/lib/apache2/modules/libphp5.5.10.so" > /etc/apache2/mods-available/php5.load
sudo service apache2 reload Basically, it writes the path of the 5.5.10 module |
Where do the |
@Anahkiasen You can know where apache library directory is by |
Yes no don't mind me, they weren't getting installed because I wasn't installing with |
shit, I'm having problems installing apsx2 in ubuntu. in ubuntu this is called apache2 and not apxs2. |
I scripted this on my Ubuntu 15.10 instance. Created a little shell script UsageAttempting to switch to a php version that wasn't built for apache
Successfully changing to a php version that has an existing
/home/luker/bin/phpbrewswitch
|
Hello! I ran into the same problem, but can't get it to work, like gmbelart. Since I'm currently using Apache/2.4.18 (Ubuntu), which runs PHP 7.0 out of box, there isn't even a php5.load file in /etc/apache2/mods-enabled. And if i add the line to the php7.0.load apache won't reload. Error: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line I even tried to create the php5.load file, but this failed as well. Please, help me guys! |
Hello Does anyone know how to switch version on Apache using PHP fast cgi? |
Die you build php with +apxs2? |
@Pupp3tm4st3r Yes, I did. @schneidermayer comment works fine for me as Apache module. |
On Ubuntu 17.04 I'm using following bash function
it needs version number as an argument, so while I have following version installed:
All I need to do is to type one command with version number, e.g.: |
great article, helped a lot http://www.sivaschenko.com/multiple-php-versions-simultaneously-apache/ |
Maybe too late, but for colleagues with apache2 + debian need to install the libapache2-mod-php7.3 and disable the default/system php that you have. after that, restart the apache2 service. |
This is also helpful to tell apache2 to use phpbrew's |
hello
when I run this
phpbrew switch 5.4.27
then execute
php -v
it give me php version 5.4.27,
but when I execute script on browser,
it give me php version 5.3.28
I try to reload apache with
sudo service apache2 reload
nothing change,
still give me 5.3.28but if I change file on /etc/apache2/mods-enabled/php5.load
from
LoadModule php5_module /usr/lib/apache2/modules/libphp5.3.28.so
to
LoadModule php5_module /usr/lib/apache2/modules/libphp5.4.27.so
then I reload apache,
finally
give me 5.4.27it's bug of phpbrew switch? or not?
my laptop
OS: elementary os luna (based on ubuntu 12.04)
Apache: 2.2.22
sorry for my bad english .. 😃
thanks.
The text was updated successfully, but these errors were encountered: