2

I am using nginx with php-fpm, and we are receiving a lot of errors like this:

2022/01/23 12:48:13 [error] 5514#5514: *9277 FastCGI sent in stderr: "PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/evtm.dev.nick/wp-content/db.php) is not within the allowed path(s): (/var/www/vhosts/evtm.dev.nick/:/usr/lib/php/:/tmp/:/data/sucuri:/var/www/prepend/) in /var/www/vhosts/evtm.dev.nick/wp-includes/load.php on line 545" while reading response header from upstream, client: 10.0.2.33, server: dev-nick.evtm.com, request: "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "dev-nick.evtm.com", referrer: "https://dev-nick.evtm.com/" 

It is saying that the file /var/www/vhosts/evtm.dev.nick/wp-content/db.php is not within the allowed path of /var/www/vhosts/evtm.dev.nick - when it clearly appears to be.

Is there something preventing it from working recursively?

1 Answer 1

1

The issue was a symlink file db.php. This was copied from another folder on another instance, and the symlink was pointing to that original file.

Unlinking the file and linking to the correct one resolved the issue.

1
  • Thank you. It helped. ln -s /home/myuser/web/example.com/public_html/wp-content/plugins/query-monitor/wp-content/db.php wp-content/db.php Commented Aug 30, 2022 at 10:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.