?
Solved

MSSQL functions not available

Posted on 2009-05-12
8
Medium Priority
?
853 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

771 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