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
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Windows Help

Windows Help Help with the Windows operating system

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-18-2000, 06:10 AM   #1
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
exec(),passthru() and system() don't work.

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
Anon is offline   Reply With Quote
Old 07-18-2000, 12:14 PM   #2
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

Are the permissions on that server set the same? Owned by the same user?
Anon is offline   Reply With Quote
Old 07-18-2000, 05:03 PM   #3
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

Get Linux, all its @!#$ works :)

Peace,
-Curt
Anon is offline   Reply With Quote
Old 07-19-2000, 08:19 AM   #4
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

Hi Tim:

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?

Thanks



Anon is offline   Reply With Quote
Old 08-24-2000, 10:16 AM   #5
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

Hello,

Do you fin a solution to your problem ?

I've the same on a windows 95 machine : can you help me ?

Bye !
Anon is offline   Reply With Quote
Old 11-16-2000, 02:11 AM   #6
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

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.


thanks
Anon is offline   Reply With Quote
Old 11-25-2000, 09:22 PM   #7
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

Hi there ....

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 !!!

Write to me if you find and solution

Martin D
Scandinavia
Denmark
Anon is offline   Reply With Quote
Old 10-12-2001, 01:11 AM   #8
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

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.

Javier
Anon is offline   Reply With Quote
Old 11-11-2001, 04:35 PM   #9
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

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.
Anon is offline   Reply With Quote
Old 12-22-2001, 06:01 AM   #10
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: exec(),passthru() and system() don't work.

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.
Anon is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:26 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.