phoenixx Posted January 2, 2012 Share Posted January 2, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/254236-php-exec-crashing-the-launched-program/ Share on other sites More sharing options...
QuickOldCar Posted January 2, 2012 Share Posted January 2, 2012 Best guess is it needs access to something else as well and can't, thus crashes. Quote Link to comment https://forums.phpfreaks.com/topic/254236-php-exec-crashing-the-launched-program/#findComment-1303499 Share on other sites More sharing options...
phoenixx Posted January 3, 2012 Author Share Posted January 3, 2012 No, I try posting the command in the windows+r run and it's perfect. It also does it when I call any shortcut from any program. I've tried it with several. Quote Link to comment https://forums.phpfreaks.com/topic/254236-php-exec-crashing-the-launched-program/#findComment-1303501 Share on other sites More sharing options...
kicken Posted January 3, 2012 Share Posted January 3, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/254236-php-exec-crashing-the-launched-program/#findComment-1303518 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.