ag3nt42 Posted May 14, 2008 Share Posted May 14, 2008 Ok so i'm not so sure this question belongs here but i'm having a hell of a time with it... I'm trying to setup a new webserver using MS SQL(Which i hate!!!) IIS 5, and PHP5.. now i have php installed and IIS 5 working and MS SQL working. My problem is that php5 won't use the mssql functions.. when i run this function in my browser it tells me the functions are not available: Code: <?php if (function_exists('mssql_fetch_row')) { echo "MSSQL functions are available.<br />\n"; } else { echo "MSSQL functions are not available.<br />\n"; } ?> I've uncommented the php_mssql.dll file in the ini and I have the client tools installed on the same pc.. the evironment variables are set correctly.. does ANYONE know of ANYTHING else that could be causing this? Believe me if i could i would load up MYSQL in a heartbeat but i'm being forced to use MSSQL for work related reasons. thanks in advance everyone... ps. I've searched EVERYWHERE for a solution to this and cannot find one. Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/ Share on other sites More sharing options...
wildteen88 Posted May 14, 2008 Share Posted May 14, 2008 Have you restarted IIS? Is PHP using the php.ini you are modifying (check this via phpinfo) I believe the php_mssql.dll extension requires the msql.dll and ntwdblib.dll libraries in order to function. These files should be in the root of your PHP installation folder. If you have added your PHP foldert to the PATH then the problem is to do with something else. Have you setup the extension_dir directive to point to your PHP extension folder. Make sure you use an absolute path (C:/path/to/php/ext) rather than a relative path (./../path/to/php/ext) Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/#findComment-541311 Share on other sites More sharing options...
PFMaBiSmAd Posted May 14, 2008 Share Posted May 14, 2008 Someone else just asked the same - http://www.phpfreaks.com/forums/index.php/topic,197064.msg888989.html#msg888989 Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/#findComment-541314 Share on other sites More sharing options...
ag3nt42 Posted May 15, 2008 Author Share Posted May 15, 2008 http://www.v7n.com/forums/attachments/coding-forum/7503d1210784368-mssql-php-sry-8-blah.txt above is a link to a txt file.. save it to your pc rename it to html that is my phpINFO Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/#findComment-541838 Share on other sites More sharing options...
wildteen88 Posted May 15, 2008 Share Posted May 15, 2008 Currently PHP is not reading a php.ini file after reviewing your phpinfo output you posted above. Where is your php.ini file located to? It should be in C:\Inetpub\php (I assume this is where PHP is installed). If you haven't got a php.ini then rename the file called php.ini-recommended to php.ini Restart IIS and rerun phpinfo() again. To see if PHP is reading your php.ini, the Loaded Configuration File line should be set to C:\Inetpub\php\php.ini Ignore the Configuration File (php.ini) Path line. Once you have gotten PHP to read the php.ini then read through the post PFMaBiSmAd linked to. Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/#findComment-542010 Share on other sites More sharing options...
ag3nt42 Posted May 15, 2008 Author Share Posted May 15, 2008 just after my post i had taken a stronger look at my phpinfo page and realized that it said it was looking for my php.ini file in the c:\windows dir... so I moved both my ntwdbl.dll and my ini file to that directory... restarted and now it works... tsks tsk tsk ... my bad... preciate the help everyone... i'm still left with a boggle however, and that is how do i alter that so that it looks in my php folder for the files rather then the windows dir? Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/#findComment-542243 Share on other sites More sharing options...
wildteen88 Posted May 15, 2008 Share Posted May 15, 2008 just after my post i had taken a stronger look at my phpinfo page and realized that it said it was looking for my php.ini file in the c:\windows dir... so I moved both my ntwdbl.dll and my ini file to that directory... restarted and now it works... tsks tsk tsk ... my bad... preciate the help everyone... i'm still left with a boggle however, and that is how do i alter that so that it looks in my php folder for the files rather then the windows dir? Move whatever files you moved back to your PHP folder. PHP does not require files to moved to the Windows folder. You should add PHP to the PATH Environment Variable. By adding PHP to the PATH, PHP will look for files in the PHP installation folder. Quote Link to comment https://forums.phpfreaks.com/topic/105647-mssql-and-php-sry8/#findComment-542380 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.