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/

2 Answers 2

4

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';
3
  • 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. Commented Mar 28, 2016 at 11:16
  • This fixed my issue. Commented Mar 29, 2016 at 0:01
  • After messing around with PHP extensions this was the fix for getting EE 2.11.7 functioning under PHP 7.0 Commented Mar 29, 2017 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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.