Solved

MSSQL Not loading in phpinfo

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exporting image to excel from php document 10 26
echo paypal data on screen 5 48
php string detection problem 7 33
PHP Parse error: syntax error, unexpected '[' 1 23
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…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

785 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