Apache, PHP, MySQL, ASP.NET, JSP and Perl Solutions for your Web Development and Hosting Needs on Windows.
A Complete Web Development and Hosting Platform for Windows.

PHP 4.4.4

Building a Web Server, for Windows

Requirements

  • Apache 2.0

Download

Our Configuration

  • %SYSTEMROOT% : Win2000 -> C:\WINNT, WinXP -> C:\Windows
  • Install to : C:\www\php
  • Apache path : C:\www\Apache2
  • Server webroot : C:\www\webroot
  • PHP run-type : Apache 2.0 dynamically loaded SAPI module, php4apache2.dll
  • Built-in support for : SSL(OpenSSL), compression(zlib), MySQL

Setup

  • Unpack as C:\www\php-4.4.4-Win32
  • Rename directory C:\www\php-4.4.4-Win32 to C:\www\php
  • Copy file php4apache2.dll from C:\www\php\sapi to C:\www\php
  • [php4apache2.dll has to reside under the same directory as php4ts.dll]
  • Copy file php.ini-recommended from C:\www\php to your %SYSTEMROOT% directory
  • Rename file %SYSTEMROOT%\php.ini-recommended to php.ini
  • Edit %SYSTEMROOT%\php.ini
    • doc_root = C:/www/webroot/
    • [the directory your web server will be serving content from]
    • extension_dir = C:/www/php/extensions/
    • session.save_path = C:/www/tmp/
    • [location where temporary data files should be stored, needed for PHP's session functions]
    • [make sure this directory exists - if not, create it]

PHP Extensions

  • Edit %SYSTEMROOT%\php.ini, uncomment the extensions you wish to use under the 'Dynamic Extensions' Section.
  • Some extensions will require additional dlls to be loaded...
    • Method 1: [Recommended]
      Add C:\www\php\dlls to the System PATH
      • Set PATH under Start » Settings » Control Panel » System » Advanced » Environment Variables » System variables » Path
      • Reboot
    • Method 2:
      Copy individual dlls from C:\www\php\dlls to %SYSTEMROOT%\system32
  • If using PHP extension php_mcrypt, download libmcrypt.dll
    • Place libmcrypt.dll under directory C:\www\php\dlls if Method 1 was used, otherwise follow Method 2

Configuration for Apache 2.0

  • Edit C:\www\Apache2\conf\httpd.conf
    • Add LoadModule php4_module C:/www/php/php4apache2.dll to the bottom of the LoadModule list
    • [note the unix forward style slashes (/), instead of windows style back slashes (\)]
    • Edit DirectoryIndex index.html index.html.var index.php
    • [adds index.php to the end of the DirectoryIndex field]
    • Insert lines...
      AddType application/x-httpd-php .php [maps file extension .php to PHP]
      AddType application/x-httpd-php-source .phps [activates PHP syntax coloring]

Configuration for zlib

Modifications need to be made to php.ini to switch on zlib compression detection and encoding.

  • Edit %SYSTEMROOT%\php.ini
    • Method 1: [Recommended]
      Leave the compression to Apache's mod_deflate (which can work around browsers that do not conform to the standards and deal with proxies)...
      • output_buffering = On
      • output_handler =
      • zlib.output_compression = Off
    • Method 2:
      Redirect all output to the ob_gzhandler compression function...
      • output_buffering = On
      • output_handler = ob_gzhandler
      • zlib.output_compression = Off
    • Method 3:
      Transparent output compression using the zlib library...
      • output_buffering = Off
      • output_handler =
      • zlib.output_compression = On

Testing

  • Create phpinfo.php, containing the following code, and place under Apache's webroot directory...
    <?php phpinfo(); ?>
  • Access URL http://localhost/phpinfo.php
In the Spotlight

In the Spotlight

Developing and Hosting PHP+MySQL based websites and applications has never been simpler. The Web.Developer Server Suite provides a Platform & Framework on which to create standards-based CSS, XSLT, and XHTML sites running on PHP and MySQL. Save your time, focusing on core business. Reduce complexity and maximize your productivity.

Developers

Developers++

The Web.Developer Server Suite is more than just a Windows based Apache|PHP|MySQL Platform. Suitable for novices and professionals alike, a complete Hosting Solution is provided that is capable of creating and deploying websites and web applications both locally and on the internet. Create, test, publish and maintain your websites in-house, on your own server, where you are in full control.

Newsletter Signup

Newsletter Signup

Enter your e-mail address: