Re: copy file from server to shared network folder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux