Symptoms
-
Attempts to log in to the WordPress Dashboard produce the following error:
You do not have permission to view this directory or page.
-
Unable to open domain's PHP info page in Domains > example.com > PHP Settings > View the phpinfo() page:
Error: Unable to retrieve information about the PHP configuration.
-
Failed Request Tracing shows wrong paths to the domain directory:
PHP Warning: Unknown: open_basedir restriction in effect. File(C:Inetpubvhostsdomain.netlogsphp_errorsexample.netphp_error.log) is not within the allowed path(s): (C:/Inetpub/vhosts/domain.net;C:WindowsTemp) in Unknown on line 0 PHP Warning: Unknown: open_basedir restriction in effect. File(C:Inetpubexample.comhttpdocsWordPresswp-login.php) is not within the allowed path(s): (C:/Inetpub/vhosts/domain.net;C:WindowsTemp) in Unknown on line 0 PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
-
There is the
.user.ini
file in the domain's Document Root directory
Cause
The .user.ini
file contains additional PHP settings.
There are wrong paths for open_basedir option that overrides the PHP settings set in Plesk.
Resolution
-
Connect to the server via RDP
-
Go to
%plesk_vhosts%example.comhttpdocs
-
Open the
.user.ini
file in any text editor -
Adjust the value of the open_basedir option
Note: If it is not needed the file can be safely removed.