• Can anyone help explain the meaning and possible fix for these two lines from my error log please?

    I’m seeing these repeat every few seconds.

    [21-Aug-2017 22:06:00 UTC] PHP Warning: include(../../../../wp-load.php): failed to open stream: No such file or directory in /home/xxxx/public_html/wp-content/themes/scout-websites-group/includes/twitter_feed.php on line 2
    [21-Aug-2017 22:06:00 UTC] PHP Warning: include(): Failed opening ‘../../../../wp-load.php’ for inclusion (include_path=’.:/opt/alt/php70/usr/share/pear’) in /home/xxxx/public_html/wp-content/themes/scout-websites-group/includes/twitter_feed.php on line 2

    Thank you

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • It seems as if the file wp-content/themes/scout-websites-group/includes/twitter_feed.php in line 2 tries to run the command include(../../../../wp-load.php)
    This relative addressing where you traverse the directory hierarchy backwards (../../../../) can give unexpected results, if the executing file isn’t located in the exact location the author expects.
    I’m not totally sure, but it’s possible that you need to add one more instance of ../ to that relative address. But in general, you need to bring this up with the theme’s author.

    Thread Starter pstretch

    (@pstretch)

    I wondered that but the number of steps in the relative path looks correct to me i.e. back to the WordPress root where wp-load.php is.

    Thread Starter pstretch

    (@pstretch)

    If I temporarily change the include function to an absolute path the errors stop, but I still can’t see anything wrong with the relative path reference.

    Could it be something to do with the include_path? I thought that the a path in the include function overrides include_path (https://php.net/manual/en/function.include.php) but maybe there’s something subtly wrong with my code.

    By the way, do you have colon or semicolon after the statement?

    Thread Starter pstretch

    (@pstretch)

    It ends with a semicolon.

    I’ve now tried dropping a copy of wp-load.php into the /home/xxxx/public_html/wp-content/themes/scout-websites-group/includes directory and making the include call it from there. Not an ideal solution but it works for now without using absolute references.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP warning in logs’ is closed to new replies.