Thanks Rich & Tom for all your help. Adding a user for apache on the remote PC's or modifying the user in httpd.conf did the trick. -----Original Message----- From: Richard Lynch [mailto:ceo@xxxxxxxxx] Sent: Friday, April 20, 2007 3:48 PM To: Haig (Home) Cc: php-general@xxxxxxxxxxxxx Subject: Re: copy file from server to shared network folder While I don't claim to understand the Windows security model, or lack thereof, when you 2x click on something in Windows, you are you. When php does exec() php is *NOT* you. PHP is running with the permissions of the User setting in httpd.conf, whatever that means under Windows. What it means to you is that PHP User probably does NOT have permission to do what you are doing when you 2x click. Meanwhile, back at the ranch, if you are using exec() and you aren't using the optional argument to find out what error number the Operating System is giving you when it doesn't work, you're doing it wrong. :-) http://php.net/exec On Thu, April 19, 2007 11:04 pm, Haig (Home) wrote: > Hi everyone, > > > > I can't seem to be able to copy a txt file from the server over to a > network > drive. > > > > Server is apache on winxp and the remote PC is also running XP. > > > > Remote folder is shared with all read/write rights enabled. > > > > I also tried executing a bat file where the bat file contains the copy > command and that didn't work either. > > > > 2x clicking on the bat file works. > > > > I tried > > > > echo exec("c:\\test.bat"); > > > > and also > > > > echo system ("c:\\test.bat"); > > > > and > > > > exec('c:\Windows\system32\cmd.exe /c START c:\test.bat'); > > > > and > > > > exec('c:\\Windows\\system32\\cmd.exe /c START c:\\test.bat'); > > > > > > with no success. > > > > The last 2 items did launch the cmd process. > > > > Any ideas? > > > > > > > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php