[RESOLVED] Call to undefined function sqlsrv_connect()
Results 1 to 3 of 3

Thread: [RESOLVED] Call to undefined function sqlsrv_connect()

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    2

    resolved [RESOLVED] Call to undefined function sqlsrv_connect()

    I am moving my site and database to a new server. The configuration is nearly the same except the new server is 64bit. I can connect to the database remotely with the username and password that I have in my php code to connect. Here is my database connect code:

    Code:
    <?php
    $serverName = 'Nick_C_Desktop\SQLEXPRESS';
    $connectionInfo = array('Database'=>'CSLogs', 'UID'=>'cslogslogin', 'PWD'=>'123456');
    $connection = sqlsrv_connect($serverName, $connectionInfo);
    ?>
    This code worked perfectly fine on my old server, but gives me this error:

    Fatal error: Call to undefined function sqlsrv_connect() in C:\wamp\www\cslogs\includes\db_connect.php on line 4

    I have these two items in my php.ini file enabled:

    extension=php_pdo_sqlsrv_53_ts.dll
    extension=php_sqlsrv_53_ts.dll

    Which is what I had before. Using Wamp Server. PHP 5.3.13 all the same as before. What else am I missing that is not allowing this to connect to the SQL server. Thanks in advance!

  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    2
    I figured it out. Stupid 64 bit version on Wamp Server. Uninstalled and installed 32 bit and works fine.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    1
    Thanks, had the same problem.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •