• Subject: Persistent Error in error.log File – Need Help!

    Dear Support Team and WP Community,

    I’ve been noticing a large number of [error] entries in my error.log file. These entries sometimes appear multiple times per second, especially when the site is scanned by various crawlers. As a result, the error.log file has grown quite large. Here’s an example of the error I’m seeing:

    2023/08/20 10:15:24 [error] 4069776#4069776: *2705805 FastCGI sent in stderr: "PHP message: PHP Warning:  file_exists(): open_basedir restriction in effect. File(core/post-comments) is not within the allowed path(s): (/var/www/clients/client1/web2/web:/var/www/clients/client1/web2/tmp:/var/www/enduro.de/web:/srv/www/enduro.de/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) in /var/www/clients/client1/web2/web/wp-includes/blocks.php on line 576" while reading response header from upstream, client: 66.249.69.99, server: enduro.de, request: "GET /amp/minienduro-jugend-im-endurosport-betritt-zum-ersten-mal-die-europaeische-buehne-83347 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/web2.sock:", host: "www.enduro.de"

    From a Google search, I found the following suggestion:

    In the file wp-includes/blocks.php on line 532, change this:

    if (is_string( $block_type ) && file_exists( $block_type ) ) {

    to this:

    if ($block_type != "core/post-comments" && is_string( $block_type ) && file_exists( $block_type ) ) {

    However, after a recent WordPress update, the problem has resurfaced. Is there a permanent solution to this issue? I’d greatly appreciate any assistance.

    Best regards,
    Marko

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The error message mentioned occurs when calling up an amp page. This in turn is provided via the AMP plugin you use. Does the error occur on other, non-amp pages as well? If not, then you should contact the support of the AMP plugin you are using to clarify the problem. As far as I can see it says “penci-pennews-amp”, so it probably belongs to your commercial theme.

    Please note that you should never customize WordPress core files.

    Thread Starter Marko B

    (@marko-b)

    Many thanks for your response. It’s not explicit on AMP pages. It’s also on other pages: 2023/08/20 10:39:41 [error] 4069776#4069776: *2707034 FastCGI sent in stderr: “PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(core /post-comments) is not within the allowed path(s): (/var/www/clients/client1/web2/web:/var/www/clients/client1/web2/tmp:/var/www/enduro.de /web:/srv/www/enduro.de/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) in /var/www/clients/client1/web2/web/wp-includes/blocks.php on line 576” while reading response header from upstream, client: 66.249.69.99, server: enduro.de, request: “GET / HTTP /1.1”, upstream: “fastcgi://unix:/var/run/php/web2.sock:”, host: “www.enduro.de”

    or

    2023/08/20 10:39:32 [error] 4069776#4069776: *2707387 FastCGI sent in stderr: “PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(core/post-comments) is not within the allowed path(s): (/var/www/clients/client1/web2/web:/var/www/clients/client1/web2/tmp:/var/www/enduro.de/web:/srv/www /enduro.de/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) in /var/www/clients /client1/web2/web/wp-includes/blocks.php on line 576” while reading response header from upstream, client: 2001:9e8:4815:cf00:b1ae:2a9a:59:9a0f, server: enduro.de, request : “GET /enduro-dm-uelsen-exciting-turns-am-first-day-83806/?fbclid=IwAR2D6VViIGUpmyb8lEvdW9BlHP385jpcwaEh8Oc1gQbm6nOMTw8QMSzHUBA HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php/web2.sock :”, host: “www.enduro.de”, referrer: “https://l.facebook.com/”

    Thank you for the hint that I shouldn’t change the core files, but that’s the only way so far to not show the error in the error.log anymore.
    Is there any other way I can solve the problem? Many thanks for your help.

    Deactivate all plugins as a test. Is the error gone then? Then one of the deactivated plugins was to blame. You can find out which one is the cause by reactivating them one by one.

    If the error still occurs, change the theme to a standard theme like TwentyTwentyThree. If the error is then gone, it was probably due to the theme you used before.

    If you don’t want to do these tests in the live system, make a copy and test it in the test system.

    Before each change I would recommend to make a backup.

    Contact your host. open_basedir governs the directories a script can access. And, it looks like ‘core’ is not one of those directories.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP message: PHP Warning: file_exists():00 open_basedir restriction in effect.’ is closed to new replies.