wesman2232 Posted July 26, 2008 Share Posted July 26, 2008 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. <?php 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>'; else echo 'u do NOT have mssql installed<br><br>'; phpinfo(); ?> 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? Quote Link to comment https://forums.phpfreaks.com/topic/116707-fatal-error-call-to-undefined-function-mssql_connect/ Share on other sites More sharing options...
wesman2232 Posted July 26, 2008 Author Share Posted July 26, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/116707-fatal-error-call-to-undefined-function-mssql_connect/#findComment-600075 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.