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

  • SEARCH
  • Home
  • 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 7723599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:28:55+00:00 2026-06-01T04:28:55+00:00

Basically, I have a script that cannot see an existing directory on the OS

  • 0

Basically, I have a script that cannot see an existing directory on the OS X machine. The directory has been copied off an external hard drive onto the desktop, which I think may be the core of the issue.

    $path = '/Users/username/Desktop/testfolder';
    $path = realpath($path);

This above doesn’t work.

    $path = '/Users/username/Desktop';
    $path = realpath($path);

This above works fine.

I’ll give you a little context of the situation. I’m running Mac OS X Lion 10.7. I have installed XAMPP. This is a kiosk iMac that needs to communicate with an iPad on the same network, otherwise I wouldn’t be running apache on OS X. The iPad needs to retrieve some images off of the iMac, and the PHP is basically functioning as a proxy to do this. I’ve created a backend that lets the administrator setup the path to the images, which is where this error is occuring.

So, I’m not sure what is going on. I imagine it has to do with some conflict of permissions and owner of these files from the external hard drive. I am sure we could do a “chown” or “chmod” in Terminal, but this isn’t really a great solution. I love to make the PHP accommodate such a scenario. Any thoughts? Please!? 🙂

  • 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-01T04:28:57+00:00Added an answer on June 1, 2026 at 4:28 am

    Kind of a weird issue, but although this works:

    $path = '/Users/username/Desktop';
    $path = realpath($path);
    

    The “Desktop” directory didn’t have correct permissions. Once I changed permissions on Desktop, it allowed me to access this path:

    $path = '/Users/username/Desktop/testfolder';
    $path = realpath($path);
    

    The manual does state The running script must have executable permissions on all directories in the hierarchy, otherwise realpath() will return FALSE. which did seem to be the issue.

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

Sidebar

Related Questions

So basically I have a PHP script that takes all the images from the
I have a script that I'm trying to get working. Basically, what I'm trying
I am stuck with a peculiar issue here. I have a script that basically
I have a simple script that does some search and replace. This is basically
I have this script which basically toggles a bgColor class on and off so
I have this script that basically will show a product or products based on
I have a very large php maintenance script (basically it recreates thumbnails for an
In my script, I have a function foo which basically uses pynotify to notify
I have a sh/bash script that needs to call a batch file with parameters
I have a script that reads two csv files and compares them to find

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.