MSSQL functions not available

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.
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

Who is Participating?
PhatzerConnect With a Mentor Commented:
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.

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

It should be there.

Hope this will help you.

guswebbAuthor Commented:
The php_mssql.dll file is there i just checked it
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

you need to have:
extension=php_mssql.dll in your php.ini file WITHOUT ';' before it.
Sorry just noticed you had already done that.

Run <?php phpinfo(); ?> to see if 'php_mssql' shows there.
guswebbAuthor Commented:
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.
guswebbAuthor Commented:
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.
guswebbAuthor Commented:
My configuration path was wrong and the phpinfo(); was enough to determine how to fix it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.