| 6:47 pm on Jul 6, 2005 (gmt 0)|
What error messages are you getting?
| 7:31 pm on Jul 6, 2005 (gmt 0)|
Here are the errors I get when trying to run this:
PHP Warning: opendir(\\\\theotherserver\\public): failed to open dir: No such file or directory in /var/www/html/nballoys.htm on line 26, referer: [myserver...]
PHP Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/html/nballoys.htm on line 29, referer: [myserver...]
File does not exist: /var/www/html/temp, referer: [myserver...]
| 8:05 pm on Jul 6, 2005 (gmt 0)|
How do you have the remote directory setup? As a Network File Share (NFS)? Are you accessing this from a *nix machine as well?
| 12:11 pm on Jul 7, 2005 (gmt 0)|
Both machines are running Fedora Core 2.
The remote machine's file shares are created using Samba. The directory I am trying to access is a public directory that everyone has access to and it does exists despite what the error message says.
| 12:57 pm on Jul 7, 2005 (gmt 0)|
Then the directory path should look like that defined in the samba share, something like:
$dir = "/theotherserver/public";
| 1:30 pm on Jul 7, 2005 (gmt 0)|
I have tried many different paths but none work.
The path on the remote computer in samba is: /home/public
If I use that path the code looks on the local computer which does not have that path.
Some of the paths I have tried:
It doesn't seem to recognize a UNC path at all.
I have control of both machines and can make changes as needed for the most part.
| 12:41 pm on Jul 8, 2005 (gmt 0)|
Is it even possible to do what I want to do in PHP?
| 1:27 pm on Jul 8, 2005 (gmt 0)|
Absolutely, and it works well. I use samba shares all the time. My suggestion would be to get your connection working first and then apply it to your $dir variable with PHP. What I mean is, try some command line work first. Are you able to run a simple listing command from the bash prompt?
ls -la /home/public
If not, you don't have your network share working. Once you get that working you simply use the same path in your $dir variable.
$dir = "/home/public";