Forum Moderators: coopster

Message Too Old, No Replies

Exec() works on one machine, doesn't on other.

         

Artie_J

8:53 pm on Apr 29, 2006 (gmt 0)

10+ Year Member



I have set up two computers, one at work and one at home, with
identical configurations. Both machines have Windows2k, SP4.
I have installed a wamp package called IBserver on both, same version.
Same directory structure, directory names, etc.

This code behaves differently on the 2 machines:

<?php
exec('notepad.exe');
?>

At home, the Notepad window pops up ready for bizness. Close the window,
program terminates, no problem.
However, at work, no program window pops up. Notepad.exe runs as a process in the
background that will not terminate.

Is this a permission settings issue? I have never set any permissions on either machine. Settings in Windows and IBserver installs are default.
I read around on the web that PHP uses cmd.exe, and the correct permissions for cmd.exe have to be set for IUSR_<machine name>. I see NO IUSR_ on either machine!
All users have read and execute permissions. Nothing is check "denied".
(This is for a lan browser based application. No connection to the wicked world web.)

Home and work computers have other apps installed that are different from each other.

Anyway, would appreciate any suggestions to get it to work at work. Or work at work.

Habtom

12:59 pm on Apr 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Isn't exec meant to run an application on the backgroud? I might be mistaken, though.

Hab

Artie_J

11:48 am on May 1, 2006 (gmt 0)

10+ Year Member



Well, it opens a foreground window on my home computer. I didn't have to enable/permit/do anything special.
Anybody else running Apache on Windows2K? What happens when you run the command exec('notepad.exe')?

Also...I used Beyond Compare to compare my php.ini files on the two machines...no difference!

Artie_J

2:14 pm on May 1, 2006 (gmt 0)

10+ Year Member



I stumbled on the answer myself. Apache has to be allowed to interact with the desktop, there's a setting in the properties.
Somebody at work must have changed it, grrrrr....