Menu

Files being read as directories

Anonymous
2011-11-23
2013-12-11
  • Anonymous

    Anonymous - 2011-11-23

    I posted this yesterday as http://code.google.com/p/osfilemanager/issues/detail?id=39 but I wondered if anyone else has this error.

    When I try to browse, it tries to open my files as directories, and of course fails. I found the point in the code where it issues the error message and modified it to output a bit more information, but I'm not a PHP programmer, so my understanding of what is going on it limited.

    Directory 'ejournals-slides.pdf' is unreadable. Dir is '' = bool(false) ; request = array(2) { ["p"]=> string(4) "home" ["d"]=> string(0) "" }
    Directory 'ejournals.pdf' is unreadable. Dir is '' = bool(false) ; request = array(2) { ["p"]=> string(4) "home" ["d"]=> string(0) "" }
    Directory 'test' is unreadable. Dir is '' = bool(false) ; request = array(2) { ["p"]=> string(4) "home" ["d"]=> string(0) "" }
    

    I assume that the null value of $d means "Server Directory" (and those three files are indeed in there), so presumably at some stage it has issued PHP's equivalent of a 'cwd' command. But in that case surely the value of $d (and $du) should be "." so that is_dir stands some chance of success.

    What puzzles me is that this is a fresh install of 2.2 - I can't see how osfm could work for anyone the way it's written…so I am obviously missing some critical piece of information here, but I can't see what.

     
  • Anonymous

    Anonymous - 2011-11-23

    Found the error and posted it to http://code.google.com/p/osfilemanager/issues/detail?id=39
    A server directory value must end with a slash. This line can be added to index.php after line 114:

    if ($userdir[strlen($userdir)-1] != '/') $userdir = $userdir.'/';
    
     
  • Devin

    Devin - 2013-12-11

    Thanks. this is also fixed in a newer version here

    http://cheryl.io

     

    Last edit: Devin 2013-12-11

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.