Installing Apache web server with PHP module, MSSQL conectivity and Ioncube loader

If you ever wanted to install Apache web server with PHP and MSSQL support on Windows platform, you probably had a lot of problems. Here is a quick quide to save you a lot of time.
  1. First install Apache server in directory c:\apache. Do not install in the default directory because you'll have a lot of problems with paths.
  2. Get PHP zip archive (not installer) and extract it to c:\php.
  3. Get Ioncube loader archive and extract to c:\apache\ioncube.
  4. Copy php-recomended.ini from c:\php to c:\windows and rename it to php.ini. This is the location that php expects to find it.
  5. Copy php_mssql.dll from c:\php\extensions to c:\windows\system32.
  6. Replace c:\php\dlls\ntwdblib.dll with c:\windows\system32\ntwdblib.dll located on the machine where MSSQL server is installed. This is MSSQL client library and is different for every version
  7. Uncomment this line in the php.ini:
    Also add this for Ioncube loader:
    zend_extension_ts = C:\apache\ioncube\ioncube_loader_win_4.4.dll
  8. Edit c:\apache\conf\httpd.conf.
    At the end of LoadModule section add:
    LoadModule php4_module "c:/php/php4apache.dll"
    At the end of AddModule section:
    AddModule mod_php4.c
    AddType application/x-httpd-php .php
    Also add index.php to the directory index section:
    <IfModule mod_dir.c>
    DirectoryIndex index.html index.php



dien (28-07-2011 17:56) :
What version of PHP zip archieve are you downloading because 5.3.6 does not have php\extensions "php_mssql.dll.

it only has php\ext and inside that foler there is no php_mssql.dll

Back to articles list

This page was last modified on 2024-05-21 02:10:53