Solved

MSSQL Not loading in phpinfo

Posted on 2009-07-13
4
2,024 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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…
The viewer will learn how to dynamically set the form action using jQuery.

624 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