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

LVL 9
guswebbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shobinsunCommented:
Hi,

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

It should be there.

Hope this will help you.

Regards
0
guswebbAuthor Commented:
The php_mssql.dll file is there i just checked it
0
PhatzerCommented:
you need to have:
extension=php_mssql.dll in your php.ini file WITHOUT ';' before it.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

PhatzerCommented:
Sorry just noticed you had already done that.

Run <?php phpinfo(); ?> to see if 'php_mssql' shows there.
0
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.
0
PhatzerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
0
guswebbAuthor Commented:
My configuration path was wrong and the phpinfo(); was enough to determine how to fix it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

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.