Jump to content

Fatal error: Call to undefined function mssql_connect()


Recommended Posts

I am getting this error : Fatal error: Call to undefined function mssql_connect() when I try to run my scripts.


I have done the this script.

if (function_exists('mssql_connect')){
echo "Okay, fn is there<br>------------------<br>";
} else {
echo "Hmmm .. fn is not even there<br>------------------<br>";

if(extension_loaded("mssql")) {
echo "MSSQL is Loaded<br>";
else {
echo "MSSQL not loaded<br>";

if(extension_loaded("msql")) {
echo "MSQL is Loaded<br>";
else {
echo "MSQL not loaded<br>";
echo '<br><br>';

$ext = get_loaded_extensions();
if(in_array('mssql', $ext))
echo 'u have mssql installed<br><br>';
echo 'u do NOT have mssql installed<br><br>';


When I run this it says :

Hmmm .. fn is not even there


MSSQL not loaded

MSQL not loaded



u do NOT have mssql installed


I do have MSSQL installed and such. Can someone help me?

Link to comment
Share on other sites

Sorry for double post but I cant find the edit button.

I have done these that PFM said in another topic the first 2 are true but on the third my dir is like "C:/AppServ\php5\ext" is that ok?

I think I got the Windows Path set and I have restarted. Whats wrong?

For the mssql extension to work, all of the following must be true -


The php.ini that you are changing must be the one that php is using.


The php_mssql.dll must be in the ext folder.


The extension_dir setting in php.ini must be set to the ext folder, something like  extension_dir = c:\php\ext


To get changes made to php.ini to take effect, you must stop and start the IIS web service. Do this in the services control panel or reboot your computer. Just stopping and starting the web site in the IIS management console is not enough.


mssql requires: ntwdblib.dll to be available on the Windows PATH. It is better to add the php folder to the Windows PATH instead of moving any files around. Re-logon or reboot your computer to get any changes made to the Windows PATH statement to take effect.


The php folder must have proper permissions set to allow the IIS user account to read the files in the php folder and in the ext folder.


EDIT : wtf? theres a edit button on this post but not on my origional one T_T

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.