Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1062581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:38:58+00:00 2026-05-16T18:38:58+00:00

have a file that is readable and writable but fopen is returning false… if(is_readable($file))

  • 0

have a file that is readable and writable but fopen is returning false…

if(is_readable($file)) echo 'readable ';
if(is_writable($file)) echo 'writable ';
$fp = fopen($file, 'a+');
var_dump($fp);

result is

readable writable bool(false)

Any ideas?

sure it must be a permission thing but tried 777 on the file with same results.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:38:59+00:00Added an answer on May 16, 2026 at 6:38 pm

    Let’s try to get more information.
    What does

    $file = 'p:\muh';
    
    error_reporting(E_ALL);
    ini_set('display_errors', true);
    echo 'phpversion: ', phpversion(), "\n";
    echo 'uname: ', php_uname("s r"), "\n"; // name/release of the operating system
    echo 'sapi: ', php_sapi(), "\n";
    
    echo $file, file_exists($file) ? ' exists' : ' does not exist', "\n";
    echo $file, is_readable($file) ? ' is readable' : ' is NOT readable', "\n";
    echo $file, is_writable($file) ? ' is writable' : ' is NOT writable', "\n";
    
    $fp = fopen($file, 'a+');
    if ( !$fp ) {
      echo 'last error: ';
      var_dump(error_get_last());
    }
    else {
      echo "ok.\n";
    }
    

    print?

    see also: http://docs.php.net/error_get_last

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PreferenceActivity that loads its preferences from an XML file which looks
The title is horrible but that's the best I could do. What I have
I have app that exports data in CSV. Recently I added Open In... feature
I have a fairly naive thing I want to do and I want to
It seems like, for many javascript widgets, the authors have made a conscious effort
I have a table of of more then 100 rows. each row consist of
I have a struct with three variables: two unsigned ints and an unsigned char.
I'm trying to expand a minified CSS file (don't ask) to make it human
I am writing data to xml files in my android app. I looked up
I've been loading a lot of binary files recently using C/C++, and I'm bothered

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.