Jump to content


New Members
  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

Chris1394's Achievements


Newbie (1/5)



  1. <?php if (function_exists('mssql_fetch_row')) { echo "MSSQL functions are available.<br />\n"; } else { echo "MSSQL functions are not available.<br />\n"; } ?> Returns: MSSQL functions are available
  2. Ok, even more confusing. This is cut/paste from phpinfo System Windows NT 5.2 build 3790 Build Date Nov 8 2007 23:18:08 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API ISAPI Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINDOWS ??? Loaded Configuration File C:\XAMPP\php\php.ini ??? PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety enabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams php, file, data, http, ftp, compress.zlib, zip Registered Stream Socket Transports tcp, udp Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*
  3. I've read the other topic mentioned, and I have added my PHP folder where php.ini resides to PATH, and rebooted several times, but it still insists on looking in c:\windows for the php.ini file when I check phpinfo. Here is my path var. %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\XAMPP\php\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ Why won't it look to my php folder? Looking in my C:\windows folder, there is no php.ini there. How is even phpinfo even working if it is looking for a place where the ini doesn't live?
  4. 4 php.ini files come up in my system with a search for *php*.ini. Two called php.ini, one called php5.ini, and one called php4.ini. How do I tell which one is being used. The folder I added to PATH contains php5.ini I made sure all four had php_mssql.dll without the leading ';'. I made sure all four pointed to the folder with php_mssql.dll in the extension_dir variable. Like I stated earlier, I'm a complete newb at this. I have 0 experence with php but was forced to take on a project that needs it. Thanks for your help.
  5. Still banging my head on the desk oh this one. PFMaBiSmAd, I have made sure that each file that comes up in *php*.ini and looks like like a php.ini file has php_mssql.dll uncommented. php_mssql.dll is in the folder that is specified by extension_dr in each .ini I have stopped and restarted IIS several times, used iisreset/stop and /start and have rebooted the computer. mtwdblib.dll is in system32, AND the php dir is in the PATH variable. I reset permissions on the php folder to full control for everyone. Might not be the smartest thing, but I wanted to make sure it wasn't a permissions error since my server is not yet live. Gnawz, <html> <body> <? $rs= mssql_query ($sql); //or connect as follows: //db connection $con = mssql_connect ($dbHost, $dbUser, $dbPass) or die ('MsSQL connect failed. ' . mssql_error()); mssql_select_db($dbName) or die('Cannot select database. ' . mssql_error()); $dbHost = 'localhost'; $dbUser = '######'; $dbPass = '######'; $dbName = '######'; //define your parameters accordingly ?> </body> </html> Still gives me: Fatal error: Call to undefined function mssql_query() in C:\Inetpub\wwwroot\testphpsql.php on line 4 I of course did define username, password, and db Thank you
  6. Thank you for the advice, I will be working on this again tonight, and I'll add any additional info then.
  7. Hi all, I'm running Windows Server 2003, MS Sql 2005, and IIS6. I am trying to connect php to my sql database, and I keep getting the following error from the script below: Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\testphpsql.php on line 4 <html> <body> <?php $con = mssql_connect ("servername", "user", "password"); mssql_select_db ("ad-ls_phpbb", $con); $sql= "SELECT * FROM TestTable"; $rs= mssql_query ($sql, $con); echo "The field number one is: "; echo mssql_result ($rs, 0, 0); mssql_close ($con); ?> </body> </html> I'm new to PHP in general, but I have copied all of my .dlls from my php folder into my system32 folder, and I have uncommented extension=php_mssql.dll in my php.ini file. I'm lost, I've looked though the boards and used search but nobody ever seems to come back and say what fixed this issue. I'll be greatful for any help. Thanks, Chris
  • 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.