500 Internal Server Error with ISPconfig3+NGINX+WordPress+Multisite

Discussion in 'Installation/Configuration' started by zenny, Jul 7, 2015.

  1. zenny

    zenny Member

    Hi,

    Getting 500 internal server error when accessed to the site created with ispconfig3+nginx+wordpress+multisite.

    The error log says:

    " [error] 15209#15209: *1 FastCGI sent in stderr: "PHP message: PHP
    Parse error: syntax error, unexpected 'if' (T_IF) in /var/www/clients/client2/web1/web/wp-config.php on line 83" while reading response header from upstream, client: X.Y.Z.A, server: DOMAIN.TLD,
    request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web1.sock:", host: "DOMAIN.TLD" 2015/07/06 17:32:40 [error] 15209#15209: *1 FastCGI sent in stderr: "PHP message: PHP Parse error:
    syntax error, unexpected 'if' (T_IF) in /var/www/clients/client2/web1/web/wp-config.php on line 83" while reading response header from upstream, client: X.Y.Z.A, server: DOMAIN.TLD, request:
    "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web1.sock:", host: "DOMAIN.TLD" 2015/07/06 17:32:42"

    And the specific line 83-84 specified in wp-config.php reads like:

    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    I tried by appending the nginx directives as suggested in https://www.howtoforge.com/community/threads/wordpress-multisite-get-an-502.57031/page-2#post-305120, but no go. Also tried by disabling "fastcgi_intercept_errors on" line in /etc/nginx/sites-available/DOMAIN.TLD.vhost file, the problem persists!

    Any clue! Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This issue is a bug in the php file, it is not related to your nginx configuration. The error is in the line before the if, e.g. amissing ;
     

Share This Page