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 8023415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:33:28+00:00 2026-06-04T22:33:28+00:00

Calls to PHP’s is_readable() function are returning false on a directory that is readable

  • 0

Calls to PHP’s is_readable() function are returning false on a directory that is readable from the command prompt. I have changed permissions to most-permissible and still no luck.

ls -lad /remote/samba_share
drwxrwxr-x 13 me users 0 May 29 15:49 /remote/samba_share

ls -la /remote/samba_share
drwxr-xr-x  4 me users 0 May  8 14:19 /remote/samba_share/local_dir
drwxr-xr-x 16 me users 0 May 14 19:49 /remote/samba_share/second_drive
drwxrwxrwx 12 me users 0 May 30 09:42 /remote/samba_share/ext_raid

Running the following code…

if (is_readable('/remote/samba_share'              )){ echo "share ok\n";  } else { echo "share BAD\n";  }
if (is_readable('/remote/samba_share/local_dir'    )){ echo "local ok\n";  } else { echo "local BAD\n";  }
if (is_readable('/remote/samba_share/second_drive' )){ echo "second ok\n"; } else { echo "second BAD\n"; }
if (is_readable('/remote/samba_share/ext_raid'     )){ echo "raid ok\n";   } else { echo "raid BAD\n";   }

…results in…

share ok
local ok
second BAD
raid BAD

Any directory under the samba share that is not on the physical primary partition seems to fail.

Config details of machine where is_readable() is called:

php -v
PHP 5.3.11-pl0-gentoo (cli) (built: May  5 2012 16:48:35)

php.ini:
    safe_mode = Off
    safe_mode_gid = On # (tried either way, shouldn't matter)
    ;open_basedir =

/etc/fstab entry:
    //remote_machine/samba_share /remote/samba_share cifs iocharset=utf8,credentials=/blahblah/samba_credentials,uid=me,gid=users,file_mode=0777,dir_mode=0777,auto   0 0

eix samba
[I] net-fs/samba
     Installed versions:  3.5.15!t

Config details of remote machine:

eix samba
[I] net-fs/samba
     Installed versions:  3.5.15!t

/etc/samba/smb.conf:

    [samba_share]
       path = /samba_share/
       public = yes
       writable = yes
    ;  printable = yes
       browseable = yes
       create mask = 0777
       create mode = 0777
       directory mode = 0777

I have tried everything I can think of to get this working, and now I feel dumb. 🙂 I can provide kernel config too if that seems relevant to anyone. THANKS for any help!

  • 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-06-04T22:33:30+00:00Added an answer on June 4, 2026 at 10:33 pm

    I didn’t find a simple answer for this, so I created a new PHP bug ticket to track down the problem better. Thanks for all the input!

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

Sidebar

Related Questions

I have created a function in PHP that calls a webservice and parses through
I have a cronjob that calls a PHP file via CURL every hour from
I have an AJAX Function that calls a PHP Script and displays the result
I have a function in my AS3 that frequently calls a PHP file. Most
I created a jQuery function that calls on a PHP server-side file that pulls
I have a PHP registration that calls a mysql db for a dropdown box.
I have a legacy PHP/MySQL app that calls mysql_connect(). Tons of existing downstream code
In php I have a script, that I use mod_rewrite to redirect all calls
i have a script that calls a php file and gets an JSON object
I have an AJAX request (using JQuery) that calls a PHP script which does

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.