ndcisiv Posted October 12, 2009 Share Posted October 12, 2009 I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 2008 box that is running Apache 2.2.14, PHP 5.2.11, and MySQL 5.1.39. My problem is I am trying to call a VBScript that interracts with a database on another machine but I can't seem to get it to actually run the script. Watching Process Explorer I can clearly see that httpd.exe spawns php-cgi.exe which spawns wscript.exe so it appears that the actual call is working. However, after a few seconds the php-cgi.exe process closes and the wscript.exe process breaks out into its own process (no parent anymore) and never runs the code or closes. I actually have to end task for it to go away. When I run the script through PHP Command Line, it works perfectly as expected. This happens both with the vbscript being on the local machine, and on a UNC path of another machine. I stripped down the code to the most simple form I could, and even tried putting nothing more than a message dialog in the VBScript, and still I run into this error. Does anyone know why this might be happening? I don't see any errors in the logs, or through the browser when the page loads. This exact same setup was working on a Windows 2000 Server machine so I'm not sure if this is something unique to 2008 or just a overlooked setting somewhere. Link to comment https://forums.phpfreaks.com/topic/177457-php-script-runs-on-cli-but-not-through-web-browser/ Share on other sites More sharing options...
trq Posted October 12, 2009 Share Posted October 12, 2009 I would suggest that your httpd user doesn't have permissions to execute the script in question. Link to comment https://forums.phpfreaks.com/topic/177457-php-script-runs-on-cli-but-not-through-web-browser/#findComment-935774 Share on other sites More sharing options...
ndcisiv Posted October 12, 2009 Author Share Posted October 12, 2009 I have tried running the service as the Local System account, as well as the domain admin account. Both ways get me to the same place. I'm not sure where else to check. Link to comment https://forums.phpfreaks.com/topic/177457-php-script-runs-on-cli-but-not-through-web-browser/#findComment-935787 Share on other sites More sharing options...
ndcisiv Posted October 14, 2009 Author Share Posted October 14, 2009 It seems that changing Apache to run as a program instead of as a service fixed this issue. I guess as a service in Vista/2008, it is not allowed to interact with the desktop (even when checked). I don't know the reasoning behind it, just know that it works now. Link to comment https://forums.phpfreaks.com/topic/177457-php-script-runs-on-cli-but-not-through-web-browser/#findComment-936864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.