Jump to content

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"
Edited by alanl1
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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.