Integrated PHP 5 And Apache 2 Server
August 16, 2009 at 5:39 pm | In Apache Web Server | Leave a CommentHow to configure Apache 2 and PHP 5 can be read on it’s installation manual, Iam here just want to make simplified the configuration by split it to few steps
This configuration have following notes
- Your PHP5 installation are on the “c:\”
- Your Apache server installation on “c:\Program Files\Apache Group\Apache2″.
- Your Window Directory located on “C:\Windows”.
- This installation Method using “Installing PHP as an Apache module” because this method was faster in performance.
- This installation established on Windows platform, so if you on Unix especially Linux, just convert backslash “\” become “/”
So few changes may be should be taken when perform on different platform and installation directory
Configure Http.conf [Apache Web Server]
- Locate the installation folder of Apache Web server on typically like this “Apache Group/Apache2″ as default.
- Add “LoadModule php5_module c:/php”
- Because we are using Apache 2, we don’t need to add “php5_module”
- Locate the Addtype section and add on the first line “AddType application/x-httpd-php.php”.
- The rest configuration can be modified consider of your requirement.
Configure php.ini
This file was located on the PHP installation, there are two versions of PHP.INI file, “php.ini-dist” and “php.ini-recommended”, use “php.ini-recommended” then move it to your windows directory and rename it become “php.ini”, the default windows directory usually located on “c:\Windows or c:\winnt”.
On the new and current php.ini, modify following lines with no double quote:
- Set “doc_root” to your “Apache Web Server documument root” => “doc_root = c:\Program Files\Apache Group\Apache2\htdocs”
- Set “extension_dir” to “user_dir =C:\php5\ext“
- because we want to use mysql as the Database Server then uncomment the “;extension=php_mysql.dll” become “extension=php_mysql.dll” by deleting the semicolon mark, so if you would choose another Database Server then uncomment the appropriate module on the list.
- copy and paste the library that you want to use to “C:\Windows\System32” as default.
- The default files that you should to copy were : “fdftk.dll”, “fribidi.dll”,”msql.dll”,”libeay32.dll”,”gds32.dll”,”libmhash.dll”,”libmysql.dll” and “ntwdblib.dll”
At this point we dunno whether the configuration was working right or not ! so
create php file on “C:\Program Files\Apache Group\Apache2\htdocs” (depend on your web server directory) and name it “phpinfo.php” and put this script “<?php phpinfo() ?>”. If the configuration was working right the screen will show up, by typing this address on the URL “http://localhost:80/phpinfo.php” depend on your port number on the configuration file that your already being made !!.

Php Version
Nb: This Screen will Tell us all setting configuration that already being made and definitely Your running PHP Version !
No Comments Yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.