Solved

MSSQL functions not available

Posted on 2009-05-12
8
847 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

810 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