apache installation on windows
apache installation on linux
After installing apache, next step will be to install php.This is shown in our next process
Php can be downloaded from php site. First you need to download php php according to required operating system. If you want to install on windows, than you need to download Windows Binaries
PHP 5.2.3 zip package file otherwise go for tar file for linux PHP 5.2.3 (tar.gz). Before php download take a look on php download doc
Php Documentation HOWTO
Unzip windows php with any file extractor. In linux,
Untar by linux command on terminal
#tar –xvf php-5.2.3.tar.gz
Keep folder at you favorite location. E.g “c:\php”
Mysql is open source database. It is very powerful database in it field. This step is to install Mysql.
If mysql is not installed, you need to install it. Look at installation of Mysql
Mysql Installation on windows. Linux Mysql installation is same, instead of installed from RPMs.
After installation of mysql need to configure PHP
Php.ini-recommended file is in php folder. php.ini doc Rename it php.ini and
extension_dir = "./"
extension_dir = "C:\php\ext"
Whatever is your path?
Now search for this lines and uncomments mysql line, this will run mysql database integration with php modules.
Save this file php.ini in windows folder. Copy this “php.ini” & “libmysql.dll” file into where your windows are installed. I installed windows in c drive.
So my path is
“C:\WINDOWS” or windows 2000 server it is “C:\WINNT”
To run mysql you need to copy “C:\php\libmysql.dll” this file to windows folder “C:\WINDOWS”
Php is installed in our path. So we need to set path for apache. By this apache will know where to compile php files and where is php’s compiler.
Apache php configuration is easy. “C:\Program Files\Apache Group\Apache2\conf” go this folder. Open “httpd.conf” file in any text editor. Search for
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so”
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module "c:\php\php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
If you are using apache with different version
for apache 1.x use module
apache 2.0.x use module
apache 2.2.x use module need (php 5.2.x )
Copy these three lines in httpd.conf file and save it.
Now you can check it whether php is integrated with apache or not
Make a simple info.php file
phpinfo(); — Outputs lots of PHP information,
This will give Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License, Mysql database information extra. Mysql modules all information that are dynamic.
Copy this code in info.php file. Copy this php file
“C:\Program Files\Apache Group\Apache2\htdocs” folder. This is default folder of apache doc. http://localhost/ this path on web browser to run php files.
Now run info.php file on web browser http://localhost/info.php.
After installing and configure of apache php mysql, you need to restart finally apache.
Restart of apache services
and check output at browser http://localhost/info.php.