using PHP to run third party program (IIS)

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
FATO
Forum Newbie
Posts: 3
Joined: Sun Feb 17, 2008 10:17 pm

using PHP to run third party program (IIS)

Post by FATO »

Hi all, I'm new to PHP and to this forum too.

I got a problem regarding to the subject title by using exec() / system() and other forms of program execution listed on the official PHP website. I hope that anyone who got similar experience or solution can reply to this topic.

The target application is a .BAT file. For example, The .BAT file is used to open notepad.exe. It works when I double click the notepad.BAT. However, it wont work when I use exec(notepad.BAT); in my PHP code. The browser hanged without any response and when I open up the task manager the notepad.exe is somehow running in the background.

I've tried searching the forum about related topics and followed some of the instructions given(security settings) by fellow solution contributors. Unfortunately those wont work as well.

Thanks in advance to those who read and reply.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: using PHP to run third party program (IIS)

Post by Christopher »

Functions like exec() are to run console applications that provide output on stdout. Notepad is a Windows app that will not work like this.
(#10850)
FATO
Forum Newbie
Posts: 3
Joined: Sun Feb 17, 2008 10:17 pm

Re: using PHP to run third party program (IIS)

Post by FATO »

Oh... Notepad is just an example, I've tried on other applications like Winamp, third party video format convertor software that supports batch file processing also. Same situation...
FATO
Forum Newbie
Posts: 3
Joined: Sun Feb 17, 2008 10:17 pm

Re: using PHP to run third party program (IIS)

Post by FATO »

I've tried Apache and did the following:

go start->control panel->administrative tools->services

then set the Apache 2 to log on as my account. It works.

But when I try to do the same on IIS, the IIS service itself failed to restart. Any ideas?
Post Reply