WordPress.org

Support

Support » How-To and Troubleshooting » Path to a Folder

Path to a Folder

  • I’m getting this error with a plugin:

    Warning: fopen(httpdocs/wp-content/plugins/weather_cache/metar_cache_EGLL.txt): failed to open stream: No such file or directory in /home/httpd/vhosts/greatblighty.com/httpdocs/wp-content/plugins/weather.php on line 315

    Looks like a path issue – any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Does the directory exist? You were most probably supposed to create the directory for the plugin to use to store cached information.

    Regards

    I’ve created the directory and applie sthe appropriate permissions – i think the problem is more to do with more the root part of the path?

    Moderator James Huff

    @macmanx

    Support Team Rep.

    Actually, I’d wager to be that your hosting provider has disabled fopen(). This seems to be a popular security precaution.

    Please run a quick test to see if indeed fopen has been disabled, they should not disabled fopens on local file system. That’s very lame.


    <?php
    $fd = fopen("file.txt", "r");
    $contents = fread($fd, filesize("file.txt"));
    fclose($fd);
    echo $contents;
    ?>

    Save this code in “test.php” and create a file called “file.txt” with a simple string. Run this “test.php” to see if it is happy. If it fails, then you should talk to your hosting provider. If it works, let’s debug this issue further.

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Path to a Folder’ is closed to new replies.