Path to a Folder (5 posts)

  1. BuzzLightyear
    Posted 11 years ago #

    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?

  2. Cypher
    Posted 11 years ago #

    Does the directory exist? You were most probably supposed to create the directory for the plugin to use to store cached information.


  3. BuzzLightyear
    Posted 11 years ago #

    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?

  4. James Huff
    Support Team Rep.
    Posted 11 years ago #

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

  5. Cypher
    Posted 11 years ago #

    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.

    $fd = fopen("file.txt", "r");
    $contents = fread($fd, filesize("file.txt"));
    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.


Topic Closed

This topic has been closed to new replies.

About this Topic