Jump to content

Recommended Posts

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:

<?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!

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.