Page 1 of 1

PHP Running A Program

Posted: Sat Feb 05, 2011 3:10 pm
by jj911
Hi,

I'm trying to run a program on the computer hosting. I've tried using system, exec, passthru, but none of them work.

Even running a simple program such as exec(c system32 calc.exe) runs in the background, and doesnt show up on the host.

I need the exe to run, show up, may have a gui, and run in the correct folder the exe is in.

How would i accomplish that? (ive tried enabling all permissions, even running php as administrator)

im running this on windows server 20008.

Re: PHP Running A Program

Posted: Tue Feb 08, 2011 3:30 pm
by Jade
Sounds like a permissions error to me...I'd probably start there.

Re: PHP Running A Program

Posted: Tue Feb 08, 2011 5:43 pm
by gooney0
I don't work on Windows, but in Linux here is the way I'd go about it.

Have php set a flag in the database or a file.

Have a cron job (or scheduled task) check for the DB entry or file.

If found launch the program.

The big difference here is the program is being launched by the owner of the cron job.