Jump to content

php exec command hanging


alanl1

Recommended Posts

Hi All

I have a php exec command which runs SQLCMD as follows the sqlcmd command works great by itself but when i run it in php it hangs, any ideas

exec('c:\WINDOWS\system32\cmd.exe /c START C:\inetpub\wwwroot\batchfiles\export.bat');

this runs a sqlcmd batch file as follows

sqlcmd -S d3licsql02 -d TestData -U sa -P sqldba -Q "select * from dbo.newtable" -s "," -o "C:\inetpub\wwwroot\cleansed\result.csv"
Link to comment
https://forums.phpfreaks.com/topic/279647-php-exec-command-hanging/
Share on other sites

but it takes less than half a second to run when i run it by itself, when it is in the php exec command it just hangs and hangs until an error is produced

 

 

	HTTP Error 500.0 - Internal Server Error

	C:\PHP 5\php-cgi.exe - The FastCGI process exceeded configured request timeout

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.