Solved

MSSQL functions not available

Posted on 2009-05-12
8
849 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

789 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