WordPress.org

Ready to get started?Download WordPress

Forums

Path to a Folder (5 posts)

  1. BuzzLightyear
    Member
    Posted 9 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
    Member
    Posted 9 years ago #

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

    Regards

  3. BuzzLightyear
    Member
    Posted 9 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. Actually, I'd wager to be that your hosting provider has disabled fopen(). This seems to be a popular security precaution.

  5. Cypher
    Member
    Posted 9 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.


    <?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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags