Accessing Microsoft SQL Server (mssql) from PHP under Apache o n Unix or Linux PHP is an open-source scripting language used to create database-driven web applications. PHP supports a number of database extensions that e nable PHP scripts embedded within web pages to access data stored in relational databases and display the results. PHP includes ODBC support through its Unified ODBC database extension. This tutorial shows you how to use ODBC to access remote SQL Server databases from PHP scripts running under the Apache web server. Connect PHP to SQL Server 2000, SQL Server 2 005, SQL Server 2008, SQL Server 201 2 and SQL Server Express When developing this tutorial, we accessed SQL Server 2000 – 2012 and Express databases from PHP on UNIX and Linux. PHP and Linux To access SQL Server from PHP on Linux, we used Easysoft ODBC drivers with PHP on RedHat and Ubuntu (Edgy Eft, Feist y Fawn, Gutsy Gibbon and Hardy Heron). Easysoft ODBC drivers should work with any recent 32-bit or 64-bit Linux distribution — CentOS, Debian GNU/Linux, Fedora, Kubuntu, Mandrake/Mandriva, OpenSUSE/SUSE, RedHat Enterprise Linux (RHEL), Slackware and so on. PHP SQL Server Pre-requisites To connect PHP on UNIX/Linux with SQL Server, we used: PHP 4.2 or later . Apache 2.0 or later . SQL Server ODBC driver . PHP 4.2 or Later To check which version of PHP you are running, use the php -v command from the shell prompt.