I'm running Apache and PHP 5.4.3. I have a script that uses mssql_connect. When I execute the script I get: Fatal error: Call to undefined function mssql_connect(). I cannot use sqlsrv. I copied the file to ntwdblib.dll and mssql is not commented in php.ini. Any way around this? Thanks!


My understanding is in PHP5.3+ it was removed. SQLSRV is your only option in a windows environment.


  • Then I will have to use older PHP I guess, thanks! – user1594313 Aug 16 '12 at 13:56

Please see -- http://www.php.net/manual/en/mssql.requirements.php and ensure you met all the requirements. Also, are you sure you are using PHP 5.5.24 because the current latest version is 5.4.x.

  • whoops, fixed that. – user1594313 Aug 16 '12 at 13:52

You need use FreeTDS library. Its simple. Refer to this link: http://docs.moodle.org/24/en/Installing_MSSQL_for_PHP

But library php_dblib.dll for php 5.4 is not found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.