Plesk shows error: Fatal error: Call to a member function configuration()

Created:

2016-12-12 03:46:03 UTC

Modified:

2017-08-08 13:36:46 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk shows error: Fatal error: Call to a member function configuration()

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  • Plesk shows the following error:

    New configuration files for the Apache web server were not created due to the errors in configuration templates: Fatal error: Call to a member function configuration() on null in /usr/local/psa/admin/conf/templates/default/nginxDomainVhost.php.
  • Apache syntax check shows the following error:

    # httpd -S
    httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 58 of /etc/httpd/conf/plesk.conf.d/server.conf: Could not open config directory /etc/httpd/conf/plesk.conf.d/ip_default: No such file or directory
  • Apache has been reinstalled manually. The following can be found in /var/log/yum.log :

    Nov 08 17:47:26 Erased: httpd-2.4.6-40.el7.centos.4.x86_64
    Nov 08 17:47:26 Erased: httpd-tools-2.4.6-40.el7.centos.4.x86_64
    ....
    Nov 11 18:01:36 Installed: httpd-tools-2.4.6-40.el7.centos.4.x86_64
    Nov 11 18:01:36 Installed: httpd-2.4.6-40.el7.centos.4.x86_64
  • Missing value for httpd component in Plesk database:

    MariaDB [psa]> SELECT `ServiceNodeEnvironment`.* FROM `ServiceNodeEnvironment` AS `ServiceNodeEnvironment` WHERE (`serviceNodeId` = '1' AND `section` = 'componentsPackages' and name='httpd');

    +---------------+--------------------+-------+-------+
    | serviceNodeId | section | name | value |
    +---------------+--------------------+-------+-------+
    | 1 | componentsPackages | httpd | |
    +---------------+--------------------+-------+-------+

Cause

Plesk cannot determine the new Apache installation.

Resolution

  1. Reinstall microupdates according to KB article # 213385609 Using Micro-Updates in Plesk.

  2. Check Apache syntax and recreate missing directory:

    # httpd -S
    httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 58 of /etc/httpd/conf/plesk.conf.d/server.conf: Could not open config directory /etc/httpd/conf/plesk.conf.d/ip_default: No such file or directory

    # mkdir /etc/httpd/conf/plesk.conf.d/ip_default
  3. Check Apache syntax again and recreate missing directory if the issue persists.

  4. Reconfigure the server to recreate Apache configuration files:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all
Have more questions? Submit a request
Please sign in to leave a comment.