By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,816 Members | 2,053 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,816 IT Pros & Developers. It's quick & easy.

command line tool

P: n/a
Hi All,

How do I get php to run a command line tool, in Windows Server 2003, and the
continue with the job in hand, is this possible?

Cheers

Jun 2 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Johny Begood wrote:
How do I get php to run a command line tool, in Windows Server 2003, and
the continue with the job in hand, is this possible?
First, RTFM:

http://www.php.net/manual/en/function.exec.php#43917

Then, UTFG and STFW:

http://www.google.com/search?q=windo...ground+cmd+php
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Una celebridad es una persona que ha pasado toda su vida tratando de llegar
a famoso y cuando lo consigue, usa gafas negras para que nadie lo
reconozca.
Jun 2 '07 #2

P: n/a

"Iván Sánchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:f3**********@hercules.cohp1...
Johny Begood wrote:
How do I get php to run a command line tool, in Windows Server 2003, and
the continue with the job in hand, is this possible?

First, RTFM:
I couldn't agree more
>
http://www.php.net/manual/en/function.exec.php#43917
Thanks for the direction
>
Then, UTFG and STFW:

http://www.google.com/search?q=windo...ground+cmd+php
Thanks again for the direction
>

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Una celebridad es una persona que ha pasado toda su vida tratando de
llegar
a famoso y cuando lo consigue, usa gafas negras para que nadie lo
reconozca.

Jun 2 '07 #3

P: n/a
Hi Iván,

Thanks for your help, I can get the script to run the program but it seems
to be stuck, hanging,

this is what I've done

$instruct="smssender.exe [[/i] /p:00353857407335 /m:test from code ]";

exec($instruct);

I can see the program running in task manager, Win2003, $instruct is what
would be typed at the command line, any ideas?, what am I missing?

Cheers

"Iván Sánchez Ortega" <ivansanchez-alg@rroba-escomposlinux.-.punto.-.org>
wrote in message news:f3**********@hercules.cohp1...
Johny Begood wrote:
How do I get php to run a command line tool, in Windows Server 2003, and
the continue with the job in hand, is this possible?

First, RTFM:

http://www.php.net/manual/en/function.exec.php#43917

Then, UTFG and STFW:

http://www.google.com/search?q=windo...ground+cmd+php
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Una celebridad es una persona que ha pasado toda su vida tratando de
llegar
a famoso y cuando lo consigue, usa gafas negras para que nadie lo
reconozca.

Jun 2 '07 #4

P: n/a
Johny Begood wrote:
Thanks for your help, I can get the script to run the program but it seems
to be stuck, hanging,
Then it's the program's fault, not PHP's.
$instruct="smssender.exe [[/i] /p:00353857407335 /m:test from code ]";
Out of curiosity: Why the brackets?

For debugging purposes, please do an echo($instruct) just before the exec(),
and try putting exactly that into a command line. Does it get hung there?

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

"Wagner's music is better than it sounds."
- Mark Twain (1835-1910)
Jun 2 '07 #5

P: n/a
Then it's the program's fault, not PHP's.

You are correct, I just thought I was missing something
>
$instruct="smssender.exe [[/i] /p:00353857407335 /m:test from code ]";

Out of curiosity: Why the brackets?
They shouldn't be there
>
For debugging purposes, please do an echo($instruct) just before the
exec(),
and try putting exactly that into a command line. Does it get hung there?
echo($instruct) produces smssender.exe /p:00353857407335 /m:test from code

No it doesn't hang when I put exactly what $instruct echo's on the command
line, I think it may be the smssender.exe from M$oft, any guidance on where
I could an sms sender which operates from the command line?, I'm stuck with
win32.

Cheers
Jun 2 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.