Solved

MSSQL Not loading in phpinfo

Posted on 2009-07-13
4
1,933 Views
Last Modified: 2013-12-13
I am using PHP to connect to a MSSQL server 2005 on an IIS7 Server 2008 box. I've downloaded and installed php 5.2.10 several times. I've used the installer and configured it manually. When I uncomment out the php_mssql.dll file in php.ini, it will not show in phpinfo().

I've done iisreset and other things and it is just not showing. Does anyone have any ideas?
0
Comment
Question by:MrBaseball9
  • 2
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
Hube02 earned 250 total points
ID: 24842873
From the PHP documentation at http://us.php.net/manual/en/mssql.requirements.php. This is the part that is usually missed.

=================================
Requirements for Win32 platforms.

The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access through named pipes. Configuration of the client will require installation of all the tools.
==================================
0
 

Author Comment

by:MrBaseball9
ID: 24842977
I actually downgraded php and was able to get a little farther. MSSQL is now showing up in phpinfo.  
I was reading somewhere where 5.3 doesn't play well with 64-bit architecture.

I'm now getting the following error:
Named Pipes Provider: Could not open a connection to SQL Server [53].
0
 
LVL 18

Expert Comment

by:Hube02
ID: 24844191
Can you supply some code from where you make your connection?
0
 

Author Comment

by:MrBaseball9
ID: 24850267
I took out the username/password and it allowed me to connect. I now only have 1 error to fix and hopefully my program will be functional!

Here's the connection string that is successful:

$serverName = ("SERVERNAME");

$connectionInfo = array( "Database"=>"db_name");


$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
     echo "Unable to connect.</br>";
     die( print_r( sqlsrv_errors(), true));
}
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Eloquent ORM manual paginator defaults to simple 2 31
website maintenance mode 1 24
hbo knew my windows software 4 60
Split wordpress loop 35 56
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question