locked
IIS6 with FastCGI and PHP5 : access to SQL Server database RRS feed

  • Question

  • User-1036692752 posted
    Hello,
    
    I've got a server (Windows Server 2003 Standard Edition SP2) with IIS6 service enabled. I've installed FastCGI, then PHP5 (tried version 5.3 with installer and also 5.4.0 zip file).
    But from my website on IIS, i can't access to a SQL Server database (on an other server) with PHP.
    
    I obtain this message :
    " Fatal error: Call to undefined function mssql_connect() in C:[...] on line 20 "
    
    It seems that PHP doesn't know SQL Server databases. I think this statement is confirmed by the "Configure Command" section in phpinfo.php :
    
    " cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static" "--disable-static-analyze" "
    
    What can I do please?
    
    Thanks
    Friday, April 6, 2012 4:30 PM

Answers

  • User-1475386077 posted

    Call to undefined function mssql_connect()
     

     

    Hi,

     

    You will have to make sure that mssql_connect PHP function is enabled on your server.

    You can check it in php.ini file of your PHP configuration

    If this function is listed in disabled_functions list of php.ini that means its disabled server wide

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, April 7, 2012 11:44 AM

All replies

  • User-1315512054 posted

    Hello,

    You could read more about PHP and MS SQL at http://msdn.microsoft.com/en-us/library/cc793139(v=sql.90).aspx and http://php.net/manual/en/book.mssql.php

    Regards

    Saturday, April 7, 2012 4:03 AM
  • User-1475386077 posted

    Call to undefined function mssql_connect()
     

     

    Hi,

     

    You will have to make sure that mssql_connect PHP function is enabled on your server.

    You can check it in php.ini file of your PHP configuration

    If this function is listed in disabled_functions list of php.ini that means its disabled server wide

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, April 7, 2012 11:44 AM
  • User-655144444 posted
    You need to make sure the phpmssql dll is available in extension directory and enabled it in php.ini
    Wednesday, April 11, 2012 3:53 AM
  • User-1036692752 posted

    Hello,

    Thank you for answers.

     But it still doesn't work :-(

     I've read all PHP doc about IIS6 and PHP with FastCGI, i tried PHP 5.2, 5.3, 5.4, verified that "mssql_connect" function isn't in "disabled functions"...

    You need to make sure the phpmssql dll is available in extension directory and enabled it in php.ini
     

    With version 5.2 and 5.3, it was the case, but with 5.4, this dll doesn't exists! From the official PHP doc, mssql functions seams to be automatically integrated (normally...).

    If someone has a new idea I take!

    If I find solution, I will post it here.

    Regards

    Friday, April 13, 2012 4:16 PM