Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:34:49+00:00 2026-05-31T17:34:49+00:00

Im trying to run a shell with cakephp but I’m not able to do

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:34:50+00:00Added an answer on May 31, 2026 at 5:34 pm

    Here are the steps I followed to narrow and then fix the problem:

    • Check which php.ini is your cli using by running the next command: php -i
    • Isolate the problem, I was thinking it was something with cakephp, but at the end every problem is related to a single line in php, my problem was around this line of code mssql_connect('XXXX', 'YYYY', 'ZZZZ', true);
    • Based on the info provided here I found out that the next dll was outdated or not compatible with Windows Server 2003, just get ntwdblib.dll ver. 2000.80.2039.0, use this exact version as others like ver.2000.80.194.0 didn’t worked for me.

    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!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to Run Shell script in Cygwin but I am getting Following
I'm trying to run a shell command using the backtick operators, but the fact
I'm trying to run some shell command if a string is not present in
I'm trying to run this command from the shell: sqlite3 salesShare1.db select UsersSale.saleSpecificProduct, UsersSale.fAtMall,
I am trying to run a jar using this command in my shell script
I'm trying to run this shell script in order to install RVM in an
I am trying to run simple shell commands in my script, but am unable
I am trying to run this shell script command through applescript on my mac
I'm trying to write a shell script that, when run, will set some environment
I am trying to run the VS 2008 SP1 installer , but it says

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.