Solved

MSSQL Not loading in phpinfo

Posted on 2009-07-13
4
1,882 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now