Php 7 installed but 5.6 is active


#1

Hello,

I have installed wordpress on a server of mine with Redis and Php 7. However, in phpinfo - easyengine panel (example.com:22222) i can see that 5.6 is active. To be more specific this is what i see: PHP Version 5.6.28-1+deb.sury.org~trusty+1

Php 7 is active in the website and checking the status with ee stack status --php7 says “php7.0-fpm: Running”.

Is there anything i’m missing?


#2

easy engine has site specific php version. Even if you have php 7 installed and running the site may be running on php 5.6.

you can use following command to make site run on php 7

ee site update domain.com --php7

for further info check this


#3

The site is installed with php7, as i said before. with “ee site create example.com --wpredis --php7”.

When trying to update the site it says that php7 is already activated on that website.


#4

That’s it.

You’re viewing PHP information for the tools running on port 22222. It’s completely coherent.


#5

Admin tools on :22222 use php 5.6, I don’t think they would all work on php 7 and that’s why. I was wondering the same a while back and found a post about it on easyengine tutorials. It doesn’t affect your wordpress installation.


#6

Just checked it with phpinfo(); inside the website root. You are right, thanks for the info, guys!


#7

I have similar issue. Only difference is that when I check phpinfo in my webroot php version is 5.6 instead of 7. I have checked that 7 is running and the site has been installed with flag --php7 right from the start. Any ideas?


#8

Your can check which version is active on your site by using the following command:

sudo ee site info domain.com


#9

I know, and that shows 7.0. But like I said phpinfo within webroot shows 5.6


#10

EE uses php 7.0 as default script engine (when you create your site with --php7) but configures php 5.6 as a backup, in case the main backend dies for some reason.

That would explain why you get the unexpected php version on running site.

Try restarting services and checking again your phpinfo() just in case:

service php5.6-fpm restart
service php7.0-fpm restart
ee clean --all

#11

Even this didn’t change anything. No errors shown, but because site uses 5.6 it seems 7.0 osn’t working properly then? Need to investigate logs more closely.


#12