Install and Configure PHP 5.3 and Apache 2.2
1. Goto http://httpd.apache.org/ ,download and install windows binaries httpd-2.2.25 MSI installer.
2. Goto www.php.net/downloads.php and click on the latest windows binaries package.
X64 - 64bit OS
X86 - 32bit OS
Apache + LoadModule : Thread Safe
Apache + FastCGI : Non-Thread Safe
IIS : Thread Safe
IIS + FastCGI : Non-Thread Safe
3. Download and Unzip the file to your directory E:\phpserver.
4. Now move the file E:\phpserver\php5ts.dll to C:\windows\php5ts.dll.
5. Create a directory called E:\phpweb.
6. Rename the file E:\phpserver\php.ini-production to E:\phpserver\php.ini.
7. In the file E:\phpserver\php.ini, changes the following values to "doc_root" and "extension_dir" [use backward slashes].
doc_root = "E:\phpweb"
extension_dir = "E:\phpserver\ext"
8. Open C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
9. Change the "DocumentRoot" to following value [use forward slashes].
DocumentRoot "E:/phpweb"
10. In the same httpd.conf file, change the "Directory" entry to following value [use forward slashes].
<Directory "E:/phpweb">
11. In the same httpd.conf file, search the word "media types" and add the following text after the two AddType lines.
ScriptAlias /phpserver/ "E:/phpserver/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/phpserver/php-cgi.exe"
SetEnv PHPRC "E:/phpserver/"
12. Find and replace following things
"AllowOverride None" to "AllowOverride All"
"Deny from all" to "Allow from all"
13. Lastly in the httpd.conf file, change the "DirectoryIndex" entry to following value
DirectoryIndex index.htm index.html index.php
14. Restart Apache server
15. To test our Apache/PHP installation, create a file "E:\phpweb\index.php" with the following content
<?php echo phpinfo(); ?>
16. Then in browser go to http://localhost/index.php.
No comments:
Post a Comment