Launching an EXE from PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Launching an EXE from PHP

Post by thomas777neo »

Hi All

I have a fax application that allows command line parameters to it.

If I execute the command in the command line, all works 100%. Yet, if I run the exact same command through a Php script it doesn't do anything.

Here's an example:

Code: Select all

<?php
chdir("c:\\");
$output = system("C:\WINDOWS\System32\calc.exe");
?>
Could it be the webserver(Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7e PHP/5.0.3 ) or php(PHP: 5.0.3) setup???

This R driving me NUTS!!!!!
Please HELP 8O
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I've tried it, and if i look in my process list, i see that calc.exe is there. But it doesn't appear on my window list...
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post by thomas777neo »

That's weird, windows has created a virtual world that nobody know about.
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

sounds to me like the application isnt getting "focus"

best off going to a "programming windows" forum although we have some very knowledgable people amongst us.

:cry: If only feyd were here, id bet my life he could answer it
Post Reply