Solved

MSSQL functions not available

Posted on 2009-05-12
8
846 Views
Last Modified: 2013-12-13
In the code shown below i am trying to print out if the mssql function exists or not because i cant seem to use php to connect to a database and it always traces "MSSQL functions not available". I have uncommented the line: extension=php_mssql.dll  and restarted iis but still no luck.

Thx for help.
<?php
 

if (function_exists('mssql_fetch_row')) {

echo "MSSQL functions are available.<br />\n";

} else {

echo "MSSQL functions are not available.<br />\n";

}

?>

Open in new window

0
Comment
Question by:guswebb
  • 4
  • 3
8 Comments
 
LVL 14

Expert Comment

by:shobinsun
ID: 24363285
Hi,

check the php extension directory for the php_mssql.dll file.

It should be there.

Hope this will help you.

Regards
0
 
LVL 9

Author Comment

by:guswebb
ID: 24363476
The php_mssql.dll file is there i just checked it
0
 
LVL 10

Expert Comment

by:Phatzer
ID: 24363912
you need to have:
extension=php_mssql.dll in your php.ini file WITHOUT ';' before it.
0
 
LVL 10

Expert Comment

by:Phatzer
ID: 24363990
Sorry just noticed you had already done that.

Run <?php phpinfo(); ?> to see if 'php_mssql' shows there.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Author Comment

by:guswebb
ID: 24364189
I ran it and i searched for php_mssql (even searched for mssql) but it doesnt show anywhere, whats this mean?
Just as extra info btw it is installed on the server in C:\PHP not in windows system32 and i am changing the ini in the php.ini in that directory but i dont think this should matter.
0
 
LVL 10

Accepted Solution

by:
Phatzer earned 500 total points
ID: 24364210
OK, well this confirms that the extension is not being loaded by PHP.

What I'd suggest first is to check the paths shown at the top of the 'phpinfo' page to confirm that the paths there are correct. It should also show the extension path and path to php.ini there.

Once done, stop IIS and start it again if you've changed anything.
0
 
LVL 9

Author Comment

by:guswebb
ID: 24364926
Excellent yep that is what it was, for some reason my extension path had changed and i didnt notice. Thanks for all the useful info.
0
 
LVL 9

Author Closing Comment

by:guswebb
ID: 31580480
My configuration path was wrong and the phpinfo(); was enough to determine how to fix it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
This article discusses four methods for overlaying images in a container on a web page
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.

910 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

23 Experts available now in Live!

Get 1:1 Help Now