![]() |
Execute Commands with Command Prompt
I've been working on a way to add a whole bunch of users to windows server 03. I've made one PHP file that will create me a batch file to add the users but that requires me to also run the batch file. I remembered seeing something on php.net about executing commands. I've tried system() and exec() and I've been getting these errors: "Warning: system() [function.system]: unable to fork [echo hello] in c:\inetpub\wwwroot\test.php on line 7" and "Warning: exec() [function.exec]: Unable to fork [dir] in c:\Inetpub\wwwroot\test.php on line 4". I was wondering if anyone had any info on this.
|
http://ca3.php.net/manual/en/ref.exec.php
http://www.google.ca/search?hl=en&q=...G=Search&meta= Check those links at search google if you haven't already found a source or tutorial, or something you can refer to. If you have found something that you are following, post the link, and post some of your code. I've never done what you are trying to do here, but I figure you will probably geta response, or responses faster(and a solution) if you post some code. :) |
I haven't tried it too, but I would think you could use the system. But you say it doesn't work, so I don't know?
:
system("some command", $var); |
Quote:
|
Of course, I just gave it a try, maybe he didn't do it in that way.
|
If the application doesn't bring the ability to set some variables to the outside world, you're going to have to do some very arcane things to affect them. Does that answer your question? If ifs and buts were candy and nuts, we'd all have a Merry Christmas. Same goes for voodoo and unfounded guesses/hope.
|
Quote:
|
I know, as i said I just gave it a try, maybe it was it.
Quote:
|
| All times are GMT -5. The time now is 12:47 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC