To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
Hi.
*
*** We have a problem executing commands in our NT system. We have tried to work with exec,system and passtrhu commands but none of them make any change.
*** We have tried several things like:
*** *** exec("dir c:\\");
*** *** exec("c:\\winnt\\system32\\cmd.exe dir c:\\");
*** *** exec("copy c:\\temp\\filea.txt c:\\temp\\fileb.txt");
*
** and we have given all possible permissions to the directories involved.
*
*** Our system*uses a load balancing system that comes with site server. Other machines without this configuration work correctly.
*
*** Can anyone help us?
*
Thanks
Thanks for your answer but going further about this problem, i think that permissions are set correctly. It looks like if it was something about running the exec/system command. It seems like if php wasn't able to call a shell.
In this code,
<?
copy ("c:\\file1.txt","d:\\file1.txt");
$text="copy c:\\\\file1.txt d:\\\\file2.txt";
exec($texto,$array1,$return_value1);
?>
The first command executes correctly but the second returns an empty array and 128 as a return value.
Do you know what does this "128" value mean?
Can this be related with our shell problem?
Another one bites the dust.... I have been unsuccessfull this both the exec() and system() functions using win2000 and IIS.
Any one found a solution please let me know.
To start : i have the same problem as you'r all. I have tryed using Win98 WinApache, but
all my results just came out in my Apache DOS-box. Then i tryed w2kserver and apache, the same result, now im trying IIS and the newest Php(date : 26/11-00) but nothing !!
I read somewhere that PHP has a problem
creating child-processes on Win-maschines soeee ... the solution (AND I HATE IT)
is to use Linux. Not that i have Linux, but that the creators of Php doesnt fix the bug. They know the problem, but dont want to fixit !!!! That SUX !!!
I am having the same problem with Win 2k Server and IIS 5.0.
Also, this is failing with ASP calls. HOWEVER, if I call "notepad.exe" using exec(), it does work (however the process is hidden and only can be seen in Task Manager).
I am trying to execute a Windows App that I wrote in VB to do a specific task, then it terminates itself and exits gracefully.
I am running PHP 4.0.6
Any suggestions are welcome.
Oh, and I have given IUSR_SERVERNAME the proper rights for executing files.
Year later, all new PHP but that issue is still there. php.exe and executed program are just hangin in background after exec/system. One guy explains this somehow (http://www.phpbuilder.com/forum/read.php3?num=4&id=1896&thread=1889), but it's a little help. Looks like PHP team just consider win version as an constant beta.
When executing files created with visual basic, you must give the IUSR_...account access and rights to the run time libraries needed by VB apps.. Such as msvbvm60.dll.