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 8778585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:34:37+00:00 2026-06-13T19:34:37+00:00

After upgrading to PHP 5.4 and using CodeIgniter’s PHP framework my application refused to

  • 0

After upgrading to PHP 5.4 and using CodeIgniter’s PHP framework my application refused to connect to the SQL Server 2005 database. There were no configuration changes performed, and I made sure to install the PHP SQLSRV drivers (3.0.3) as well. The specific message from CI was “Unable to connect to your database server using the provided settings”.

Switch back to PHP 5.3 and everything works.

To make sure that the sqlsrv drivers are installed on PHP 5.4 I ran php -m and it displays “sqlsrv”. phpinfo() looks good as well.

I can’t get any debug information on how/why sqlsrv isn’t connecting with the new drivers. What’s funny is that if I download sqlsrv-5.4-nts-snap.zip from this funny page of drivers on MS’s site – then it works! However it seems to be using sqlsrv 2.0 drivers.

Does SQLSRV work on PHP 5.4?

  • 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-06-13T19:34:38+00:00Added an answer on June 13, 2026 at 7:34 pm

    Finally debugging this issue – it turns out the issue was with the connection parameters when using TCP/IP instead of shared memory/named pipes. My connection settings in CodeIgniter were:

    $db['default']['hostname'] = 'localhost';
    

    Equivalent to:

    $db = sqlsrv_connect("localhost", $config);
    

    I wrote up a custom page that just ran this sqlsrv_connect with the right config variables (username/password/UTF-8/etc). Then using print_r( sqlsrv_errors()); I was met with the following:

    [Microsoft][SQL Server Native Client 11.0]Shared Memory Provider: The
    Shared Memory dll used to connect to SQL Server 2000 was not found

    Bizarre! But I now know that it’s something related to shared memory versus TCP/IP.
    After digging through the documentation (chm file) for “Microsoft Drivers for PHP for SQL Server” I found that to connect via TCP/IP (on a local box) you need to use (local), 1433 as the servername – where 1433 is whatever port you’re using.

    To sum up the changes (CodeIgniter specific, but also generally for sqlsrv_connect). Changed /application/config/database.php:

    $db['default']['hostname'] = 'localhost';
    

    to

    $db['default']['hostname'] = '(local), 1433';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Call to undefined method after upgrading to PHP 5.4.0 mentions a few APC bug-reports
I noticed after upgrading from 4.2 to 4.3.1 that there is no longer a
I have read the following tutorial Uploading Files To the Server Using PHP and
After upgrading to 1.7 (all on a dev server thankfully!) I am getting the
Using a Wordpress 3.x Network. After upgrading to the most recent version, all the
My problem was, after migrating a website to another server using backup buddy, I
I'm using jquery and uploadify to upload photos to server. After uploading photos they
After upgrading to a newer hibernate version (guess it came with the switch from
After upgrading node to v0.8.1, bundled Meteor apps now throw an error: node: symbol
After upgrading to 12.04, my Eclipse that I had since 11.10 has been full

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.