PHP Running A Program

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
jj911
Forum Newbie
Posts: 1
Joined: Sat Feb 05, 2011 3:08 pm

PHP Running A Program

Post 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.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: PHP Running A Program

Post by Jade »

Sounds like a permissions error to me...I'd probably start there.
gooney0
Forum Commoner
Posts: 56
Joined: Fri Jan 21, 2011 1:40 pm
Location: Reston, VA

Re: PHP Running A Program

Post 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.
Post Reply