PHP 5 install Windows Apache Server

This notes is for PHP 5 installation on Windows 2003 using an Apache Web Server.
Download VC9 x86 Thread Safe PHP 5.3.8 (Server has MS 2008 C++ Compiler).
Installing as an Apache handler, PHP module.

1. Download and Install php-5.3.8-Win32-VC9-x86.msi

Change the Destination Folder to C:\PHP\

Web Server Setup:
Select Apache 2.2.x Module

Select Apache Configuration Directory:
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\


2. Configure httpd.conf

During installation, PHP will insert the following lines into your Apache httpd.conf configuration file to load the PHP module for Apache.

#BEGIN PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL
PHPIniDir “”
LoadModule php5_module “php5apache2_2.dll”
#END PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL

Add the path to php.ini
PHPIniDir “C:/php”

Next, need to insert these two lines to your Apache httpd.conf
Add
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
inside <IfModule mime_module></IfModule>
Example:
<IfModule mime_module>
.
.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
Change it to:
DirectoryIndex index.php

3. Make an index.php, example:

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo ‘<p><b>Hello!<b></p>’; ?>
 <?php phpinfo(); ?>
 </body>
</html>

Be the first to comment  Posted by Ferdy - September 28, 2011

Categories: PHP   Tags:

Apache Server on MS Windows

Using Apache HTTP Server 2.2 on Microsoft Windows Server 2003/2008.

1. Download Win32 Binary and Install
httpd-2.2.21-win32-x86-openssl-0.9.8r.msi

Enter DNS and Server Name
Select for All Users on Port 80, as a Service.
Depault path is:
C:\Program Files (x86)\Apache Software Foundation\Apache2.2

During the installation, Apache will configure the httpd.conf
A test html file is created and it’s located in the default “DocumentRoot”
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\index.html

2. To Change the DocumentRoot, edit httpd.conf in the conf folder.
Change the path, for example C:\wwwApache
DocumentRoot “C:/wwwApache
Note: the backslash is replaced by forward slash
Also edit the Directory <Directory “C:/wwwApache”>

3. Copy the index.html to c:\wwwRoot

4. Restart the Apache Server

5. Test the installation using a web browser:
http://localhost/

It should display “It Works

Be the first to comment  Posted by Ferdy - September 27, 2011

Categories: Apache Server   Tags:

Windows Installer

Windows Installer V5.0.7600.16385
msiexec /Option Product.msi (Optional Parameter)

Example:
msiexec.exe /i Product.msi /q

You can control the install directory by passing it as a parameter to the install.
For example, to install to e:\SomeDirectory
msiexec.exe /i Product.msi /q INSTALLDIR=e:\SomeDirectory

Display Options:
/quiet – Quiet mode, no user interaction
/passive – Unattended mode – progress bar only
/q[n|b|r|f] – Sets user interface level
n – No UI
b – Basic UI
r – Reduced UI
f – Full UI (default)
/help – Help information

Be the first to comment  Posted by Ferdy -

Categories: MS Windows   Tags:

« Previous PageNext Page »