Answer the question
In order to leave comments, you need to log in
How to change php version for apche2?
I always worked with linux
and there were no problems with it, but now I started working on Mac OS X EL Capitan
it and the problem is this:
It costs php55 and php56 to be installed through homebrew
and the problem is what I do in the console it php -v
gives out PHP 5.6.29
, but phpinfo()
it shows:
That is, the console version and the version for are apache
different!
Please help me change the version for apache
a newer one! I can not understand !
How to do it ? !
Answer the question
In order to leave comments, you need to log in
And how do you have php connected to Apache, most likely as an Apache module. Check the Apache module version.
LoadModule php5_module /usr/lib/apache2/modules/libphp5.5.8.so like this in config Enter the
version of the required module there. There was also a console command to enable the required module in Apache (sudo a2enmod php7.0 see below)
PS Apache was rebooted after all the manipulations ?? Need to reload
PPS
Switch PHP version ( Apache ):
from php5.6 to php7.0:
sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart
from php7.0 to php5.6:
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
from here askubuntu.com/questions/756879/cant-install-php5-o...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question