This is a quick guide on how to install and configure Apache WWW Server, PHP and Firebird SQL server in a few easy steps on any Windows machine.
FireBird – FirebirdSQL.org
PHP – php.net. Get the .ZIP package, not the installer!!
Firebird – Run Installer as service with all default options
Apache – Run Installer with all default options
Alternate-download install: Unzip package to “c:\apache24”
PHP – UnZip into C:\PHP (default in this guide)
Stop the Apache Service
Copy needed files
Copy the FBCLIENT.DLL file from the Firebird /bin directory to the Apache /bin directory:
COPY "C:\Program Files\Firebird\Firebird_2_5\bin\fbclient.dll" "C:\Program Files\Apache Software Foundation\Apache2.2\bin"
Edit the httpd.conf file
Edit the httpd.conf file, find line DirectoryExtension and set it as:
DirectoryIndex index.php index.html
Add the following to Apache httpd.conf file (at the end). Directory by default is “C:\Program Files\Apache Software Foundation\Apache2.2\conf”
# # PHP 5 # LoadModule php5_module "c:/php/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "c:/php"
Create directory: “C:\PHP\Logs”
Rename C:\PHP\PHP.INI-PRODUCTION to C:\PHP\PHP.INI
Set ‘extension_dir’ to extension_dir = “C:\php\ext\”
Set ‘error_log’ to error_log = “C:\php\Logs\Errors.log”
Enable the following extension: extension=php_interbase.dll
Creating Virtual Hosts (Optional)
To Create Virtual Hosts on your local machine you need to configure the vhosts file and preferrably change the HOSTS file to include the domain name of your choice to point to the local IP address.
The VHosts file (httpd-vhosts.conf) is located in the Apache installation Directory, under “./conf/extras”.
Change the [domain] and [drive:path to domain root]
Add the following lines to the end:
<VirtualHost *:80> <Directory "[drive:path to domain root]"> Options Indexes FollowSymLinks AllowOverride FileInfo Options None Order allow,deny Allow from all </Directory> ServerAdmin webmaster@[domain] DocumentRoot "[drive:path to domain root]" ServerName [domain] ErrorLog "logs/[domain]-error.log" CustomLog "logs/[domain]-access.log" common </VirtualHost>
Under windows the HOSTS file is found under “C:\Windows\System32\Drivers\Etc”. Please note that the path can be hidden.
Under Win Vista and newer you need to have admin rights or elevated rights for the user to change the file, so start your editor with “run as admin”
After changing your HOSTS file it should be like this (if you have the original file as base):
# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 [domain]
Testing your setup
1) Enable the Apache Service
Open a CMD prompt, go to C:\apache24\bin and write "httpd.exe -k install"
2) Go to the /htdocs dir and create a phpinfo.php file, paste the following:
3) Open your browser and enter http://127.0.0.1/phpinfo.php
There, You are Done!