I've been trying for the last 15 hours to get this to work. Basically (it's that easy) I'm trying to create a folder on a mounted network(XP) drive (E:) using the mkdir function from a local script. I haven't got it to work. I've gotten two responses

No such file or directory

and

Permission Denied

I think I'm getting close using the code that returns permission denied.

First, I've been using the mkdir function like this

mkdir($path, 0777)

I've tried setting $path to several things.... (it only works when I put $path in single quotes ' ' and use escaping backward slashes)

$path1 = 'E:\Customer\Ryan';
$path2 = '\\Widescreen\network folder\Customer\Ryan';

(E:\ = \Widescreen\Network Folder)

Path1 returns file or directory not found
Path2 returns Permission Denied

I have Apache 1.3 and PHP 5 installed on both computers.

I've done a lot of searching for similiar problems. I might need to set up some <directory/> options in Apache config or change something in the php.ini.

As for XP folder permissions, I'm allowed to do everything on the network drive.

Any help is greatly appreciated!!

    I've tried it, and I'm stumped.

    Not a clue. Sorry.

      You could try 2 things...
      1. Try using the DIRECTORY_SEPARATOR constant insteat of escaping your \'s
      2. Don't escape them at all and just create the path as normal in a string.

      Always only use single quotes there.
      Try printing your path and making sure it is correct before passing it to the mkdir() function.

      Just some thoughts.

        Write a Reply...