CodeIgniter Forums
Unable to make database connection to MSSQL - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Unable to make database connection to MSSQL (/thread-41479.html)



Unable to make database connection to MSSQL - El Forum - 05-09-2011

[eluser]Unknown[/eluser]
I'm running CI 2.0.2 and PHP 5.3.2 on Redhat 6 and need to query a legacy MSSQL 2005 table.

My old environment had CI 2.0.2 and PHP 5.2.8 running on IIS6 and the connection was made as expected. With 5.3.2 and Redhat the MSSQL connection cannot be made and I get a blank screen in my CI app.

Some mentioned that I need the Microsoft SQL Server 2005 Driver:
http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx

This driver is for PHP apps running on Windows. Our new environment runs on Redhat.

Is there a solution that doesn't tie me to a version of PHP pre 5.3?


Unable to make database connection to MSSQL - El Forum - 06-16-2011

[eluser]Unknown[/eluser]
Hi,

The php_mssql.dll is obseleted and php ver 5.3.x doesn't support. You may have to rewrite to Ms SQL driver availble in the microsoft site.

I also have the same problem Blank screen..! Did you find any solutions..?

Regards
Dhana


Unable to make database connection to MSSQL - El Forum - 06-16-2011

[eluser]Frank Wong[/eluser]
On Ubuntu php5, I had to install the database driver php5-sybase to connect to mssql. I am assuming it should be the same for Redhat, but can't verify as I don't use Redhat.

None of those drivers from Microsoft work correctly on Linux.