Jump to content

php exec crashing the launched program


phoenixx

Recommended Posts

I'm using a program called Do It Again which is a mouse recorder. I am trying to launch a shortcut to it from my php script. Seems all is okay when I run it as a stand alone program, and is not set to have to be run by the administrator - still when I launch it from my php page I get the windows popup saying the program has crashed. "DoItAgain.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

 

It's not the program, but something in my code:

 

$command= 'C:\\xampp\htdocs\poster\dia\\Monty_20.dia';
exec($command);

 

I also tried the following but get the windows popup error: "The Application Failed to Initiate Properly"

 

$command= ('START C:\\xampp\\htdocs\\poster\\dia\\Monty_20.dia');

 

Any help would be greatly appreciated. I've been at it for 3 hours now and I'm pulling out what little hair I have left.

Link to comment
https://forums.phpfreaks.com/topic/254236-php-exec-crashing-the-launched-program/
Share on other sites

If your using apache as a system service, then it won't be able to interact with the desktop (nor will anything launched via it).  My guess is your program is crashing because it is assuming some system call worked which did not in this restricted environment.

 

To fix it you'd have to allow apache to interact with the desktop.  You do this in the group policy editor somewhere, but I am not sure where.  Google can give you better instructions.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.