PDA

View Full Version : Installed php7, but seem to be using php5.5



einarso
04-23-2016, 09:44 AM
I am having a problem making WP work with the right php version. I am running WP on a Mac mini server I recently updated. Checking the php in terminal I see the following:

server:~ xxxxServer$ php -v
PHP 7.0.4 (cli) (built: Mar 14 2016 08:14:23) ( NTS )

Looking good - I have upgraded to php7 so this was to be expected. But running the phpinfo file - not so good....:
http://altikost.no/phpinfo.php
According to this, I am still running php5.5

Anyone who has any tips?

Raz0rEdge
04-23-2016, 11:14 AM
You should check the configuration of your web server to make sure that it is pointing to the right version of PHP.

einarso
04-23-2016, 11:28 AM
You should check the configuration of your web server to make sure that it is pointing to the right version of PHP.

Well... I have looked at the httpd.conf file where I was told to add the line for LoadModule php7, and LoadModule php5 is blocked out. If I leave the LoadModule php7 line unblocked, I get the following message when I run $ apachectl -k restart:

[Sat Apr 23 16:25:16.705312 2016] [so:warn] [pid 14488] AH01574: module php7_module is already loaded, skipping
httpd not running, trying to start
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs

If I block out the LoadModule php7 line, I do not get the "already loaded" message. So are there any other files than httpd.conf loading the modules?

Is there any other places I can check which php version loads?

einarso
04-23-2016, 11:35 AM
ps: the web server seems to be working and using php5.5 even when no php modules seems to be loaded with the httpd.conf file...