We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Running ExpressionEngine 2.x on nginx with PHP7?

How Do I?

houdini2232's avatar
houdini2232
32 posts
9 years ago
houdini2232's avatar houdini2232

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/

       
Ingo Wedler's avatar
Ingo Wedler
63 posts
9 years ago
Ingo Wedler's avatar Ingo Wedler

I have running EE 2.11.1 on CentOs 7 with nginx 1.9.12 and it’s running fine. What says the nginx error.log about the 500’s error? Normally it should give you a hint…

Is the path to the php-fpm socket on line 26 in your config correct?

       
Ingo Wedler's avatar
Ingo Wedler
63 posts
9 years ago
Ingo Wedler's avatar Ingo Wedler

Oh, and i remember, i upgraded php with the yum-replace command, and i had to install one php extension manually, it was php70u-json extension…

       
houdini2232's avatar
houdini2232
32 posts
9 years ago
houdini2232's avatar houdini2232

I’m pretty sure I have php-fpm pointing correctly because a simple PHP file with:

<?php echo 'hi'; ?>

is working just fine.

The only thing I get in the logs is in the nginx access log:

51.121.083.45 - - [28/Mar/2016:18:52:50 -0500] "GET / HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
       
houdini2232's avatar
houdini2232
32 posts
9 years ago
houdini2232's avatar houdini2232

SOLVED. Changing the dbdriver from “mysql” to “mysqli” solved the problem (this setting lives in the database.php file).

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.