Yes, but when you run it from command line it is run with your account that has H:\ mapped. The scheduler is run as the account 'System' and that doesn't know anything about H:\.
/Joakim > -----Original Message----- > From: Warren Vail [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 29, 2001 7:27 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Copying file to a network drive (in WinNT4) > > > I'll give this a try and let you know. PHP seems to be able > to get to my H > drive when I execute via the command line; > > >c:/apache/php/php.exe backup.php > > but seems to not be able to find the H drive when run as a > timed process; > > >at 7:00pm each(M,T,W,T,F) "c:/apache/php/php.exe backup.php" > (not sure > about the exact syntax here) > > perhaps the UNC path will do it. > > Thanks, > > Warren Vail > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 1:14 AM > To: [EMAIL PROTECTED] > Subject: SV: [PHP] Copying file to a network drive (in WinNT4) > > My best bet is that PHP doesn't know that h:\ exists. I have > seen similar > things before, > though not in PHP. Have you tried using the UNC path instead > (\\COMPUTER\SHARE)? > > >I also tried to execute a direct copy command via command prompt: > >$cmd = "cmd /c copy $src $dest"; > >passthru($cmd); > > Try mounting the network drive in PHP then copy the file: > > $cmd = "cmd /c net use h: \\COMPUTER\SHARE"; //Mount drive > passthru($cmd); > > //Copy the file here > > $cmd = "cmd /c net use h: /delete"; //Unmount the drive > passthru($cmd); > > > /Joakim > > > -----Ursprungligt meddelande----- > > Från: Warren Vail [mailto:[EMAIL PROTECTED]] > > Skickat: fredag den 28 september 2001 03:37 > > Till: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Kopia: [EMAIL PROTECTED] > > Ämne: RE: [PHP] Copying file to a network drive (in WinNT4) > > > > > > Let me know what you find, if anything. Seems I may be > encountering a > > similar problem executing mysqldump from a php script as a > > scheduled command > > on nt4. I can execute the command writing to a local drive > > and a remote > > drive when I execute from the DOS command line, but when > running as a > > scheduled (the AT command), the copy to the local drive > works, but the > > remote mounted drive fails. Does this sound similar? > > > > Good Luck, > > > > Warren Vail > > > > -----Original Message----- > > From: Joe Kaiping [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 27, 2001 12:30 PM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: RE: [PHP] Copying file to a network drive (in WinNT4) > > > > > > > > > -----Original Message----- > > > From: Ville Mattila [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, September 27, 2001 11:10 AM > > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > > Subject: Re: [PHP] Copying file to a network drive (in WinNT4) > > > > > > > Also, make sure that you have permission to create/modify > > > the $dest file. > > > > > > Should be, because I can copy the file via "normal way" in > > Windows.... > > > > > > > > > > Hi again, > > > > Not sure what you're up against. I searched > > http://www.php.net to confirm > > h:\file is the correct Windows file system syntax to use. > > Seems to be. > > Also there is no mention of copy() not working on windows, > > (except for when > > using a sharename instead of a mapped drive name. (But you're > > using a mapped > > drive name, h)) > > > > The apache daemon on unix runs under the permissions of a > > certain system > > user, usually "nobody". Not sure how NT does it, but if it > > also runs under > > a specific user, maybe that user doesn't have permission to > > write to the > > file? > > > > However, the version of PHP I'm running gives a "Permissions" > > error message > > when it doesn't have permission to write to the file. You > > got the following > > error instead, but I'm not sure about the behavior of PHP on > > windows, maybe > > a different error message is output when you don't have permission. > > > > Warning: Unable to create 'h:\redhouse.jpg': Invalid argument in > > c:\apache\htdocs\copypic.php on line 14 > > > > Anyway, I was unable to reproduce the "Invalid argument" > > error on Unix. I > > would doubt that there in a bug with copy() for Windows > > without it already > > appearing on the PHP site. So I'd guess that it is caused > because PHP > > doesn't like the format of the contents of either $src or > > $dest. I'd suggest > > going over those again with a magnifying glass. It sounds > > like you already > > have, though, so I'm out of thoughts for right now. > > > > Sorry for not being able to help any more. Best of luck! > > > > -Joe > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]