1

Has anyone had any luck getting ExpressionEngine 2.x working with nginx and/or PHP7? I have a CentOS 7 server with PHP7 and nginx installed. I have another site hosted on the server that runs just fine. A simple "hello world" example written in PHP will work but any attempt to load ExpressionEngine results in a 500 error. Tailing the logs isn't leading me to anything useful (I've checked logs for php-fpm and nginx).

Any advice? Here's the config that is working for me on another site (running Laravel 5):

http://pastebin.com/SEcYCqwe

I've tried the recipes here, but nothing seems to stop the 500 errors from happening: https://www.nginx.com/resources/wiki/start/topics/recipes/expressionengine/

3

Try changing the PHP MySQL driver. Previous versions of EE use mysql but for php7 you need to change the setting to mysqli.

Find the setting in the /system/expressionengine/config/database.php file.

CHANGE

$db['expressionengine']['dbdriver'] = 'mysql';

TO

$db['expressionengine']['dbdriver'] = 'mysqli';
| improve this answer | |
  • 1
    is correct, it does work under PHP7 (tested with EE v2.11.1), but you need to set the database driver: $db['expressionengine']['dbdriver'] = 'mysqli'; Make sure you clear your EE cache and you might find that third-party add-ons are not compatible - so work through them. I know P&T Field pack stuff throws errors. – Peter Lewis Mar 28 '16 at 11:16
  • This fixed my issue. – wise_gremlin Mar 29 '16 at 0:01
  • After messing around with PHP extensions this was the fix for getting EE 2.11.7 functioning under PHP 7.0 – Kenny Fraser Mar 29 '17 at 16:33
0

It looks as though only EE3.1 has full php 7 compatibility: https://ellislab.com/blog/entry/expressionengine-3.1.2-released#fn:php-7

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.