fcaserio Posted February 26, 2009 Share Posted February 26, 2009 On my application I have some automatic tasks where PHP is executed from DOS prompt. When I run my scripts from Apache PHP connects to the MSSQL server with no problems. But when I run it from DOS PHP is not connecting: C:\PHP\php.exe c:\htdocs\script.php Warning: mssql_connect(): Unable to connect to server: Any ideas why it's happening? MSSQL Server version: SQL2005 PHP version: 5.2.6 Quote Link to comment https://forums.phpfreaks.com/topic/147045-unable-to-connect-do-db-when-executed-from-dos-prompt/ Share on other sites More sharing options...
corbin Posted February 27, 2009 Share Posted February 27, 2009 Is the same php.ini being loaded from within Apache and the CLI? Also, what is the full error? (Cut out the username/host if you want.) Are you using Windows auth? Quote Link to comment https://forums.phpfreaks.com/topic/147045-unable-to-connect-do-db-when-executed-from-dos-prompt/#findComment-772275 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.