Link to home
Start Free TrialLog in
Avatar of guswebb
guswebbFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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

Avatar of shobinsun
shobinsun
Flag of India image

Hi,

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

It should be there.

Hope this will help you.

Regards
Avatar of guswebb

ASKER

The php_mssql.dll file is there i just checked it
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.
Avatar of guswebb

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Phatzer
Phatzer
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of guswebb

ASKER

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.
Avatar of guswebb

ASKER

My configuration path was wrong and the phpinfo(); was enough to determine how to fix it.