Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

3 Answers 3

up vote 0 down vote accepted

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

http://www.php.net/manual/en/intro.mssql.php

share|improve this answer
    
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.

share|improve this answer
    
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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