Im trying to run a shell with cakephp but I’m not able to do it due to a SQL connection error, I’m always getting this
Warning:mssql_connect(): Unable to connect to server: XXXXX I’m sure the config for the data source is correct as I’m able to connect using the website side of the app.
Have anyone stumble with something like this?
BTW the webserver and the mssql server are not the same, they are on different hosts.
Environment Info ( I agree is a mess… ):
- Web server
- Windows server 2003 R2
- PHP-5.2.4
- IBM http server 6.1
- Cakephp 1.2
- DB Server
- Windows server 2003 R2
- Microsoft SQL server 2005
I have isolated the problem and found is not cakephp related, I created a script with just this line of code
mssql_connect('XXXX', 'YYYY', 'ZZZZ', true);
Giving me the same error. This should be something different between CLI and how php is run from the HTTP server.
Thank you!
Here are the steps I followed to narrow and then fix the problem:
php -imssql_connect('XXXX', 'YYYY', 'ZZZZ', true);As @charles mentioned if you are not working already in a project already deployed use sqlsrv drivers as those are maintained currently and the mssql are basically getting deprecated.
Thanks!