PHP exec, calling executable programs

If you touch your software enough does it become hardware?

Moderator: Forum Moderators

Post Reply
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

PHP exec, calling executable programs

Post by ProfHawking »

Calling all PHP wizards:

i want a PHP script to be able to kick off an exe on the server it is running on. its running on apache on a windows 2003 server.

i have been fiddling with the exec() function to no avail so far.

the application doesn't have to return any variables to php, and may take time to run so the php processor shouldn't wait for it.

Does anyone know how to do it?
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

scratch that

cracked it eventually
buzzmong
Weighted Storage Cube
Weighted Storage Cube
Posts: 7167
Joined: February 26th, 2007, 17:26
Location: Middle England, nearish Cov

Post by buzzmong »

How'd you do it Prof? I know php has a number of commands to run external programs, but it's been 6 months since I last did anything in php and the knowledge has gone *poof*.

I remember exec() being one of the most used though.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

i used system() in the end. not sure why exec() wasnt working...
but anyway code ended up like this:

Code: Select all

Weird, i get:

Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. 

when i try to post the code. even inside [ codes ]


if anyone has any suggestions as to how it could be improved or run separately that would be appreciated, at the moment the rest of the PHP waits for the sync.exe to finish its syncing :P
Post Reply