Website shows blank page: open_basedir restriction in effect

Refers to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.5 for Linux

Created:

2016-11-16 13:25:33 UTC

Modified:

2016-12-21 20:41:16 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website shows blank page: open_basedir restriction in effect

Symptoms

Website shows blank page. The error in /var/www/vhosts/domain.tld/logs/error_log :

[Sun Feb 14 15:41:46 2016] [error] [client 1.1.1.1] PHP Fatal error:  Unknown: Failed opening required '/var/www/vhosts/domain.tld/httpdocs/index.php' (include_path='.:') in Unknown on line 0
[Sun Feb 14 15:41:50 2016] [error] [client 91.204.25.4] PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/domain.tld/httpdocs/index.php) is not within the allowed path(s): ({WEBSPACEROOT}{/}{:}{TMP}{/}) in Unknown on line 0

Domain level php.ini file contains template value for open_basedir parameter:

# cat /var/www/vhosts/system/domain.tld/etc/php.ini | grep open_base
open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}

Cause

Customized /usr/local/psa/admin/plib/PhpSettings/Config.php file.

Resolution

  1. Download plesk-core package from autoinstall.plesk.com , e.g.:

    # mkdir plesk_core
    # cd plesk_core
    # wget http://autoinstall.plesk.com/PSA_11.5.30/dist-rpm-RedHat-el5-x86_64/base/plesk-core-11.5.30-rhel5.build115130819.13.x86_64.rpm
  2. Extract files from the package: # rpm2cpio plesk-core-11.5.30-rhel5.build115130819.13.x86_64.rpm | cpio -idmv

  3. Create backup of /usr/local/psa/admin/plib/PhpSettings/Config.php :

    # cp /usr/local/psa/admin/plib/PhpSettings/Config.php{,.backup}
  4. Replace Config.php with extraced one:

    # cp /path_to_plesk_core/plesk_core/usr/local/psa/admin/plib/PhpSettings/Config.php /usr/local/psa/admin/plib/PhpSettings/Config.php
  5. After that update PHP settings for the domain in Home > Subscriptions > domain.tld > Websites & domains > PHP settings

Have more questions? Submit a request
Please sign in to leave a comment.