Skip to content

Setting Up a MySQL, Apache, and PHP Development Environment

Installing Apache and PHP

  1. Install Apache HTTP Server
    • If you don’t install it as a windows service, you can control it using the command line:
      • Start Apache: Run httpd.exe to start the server
      • Stop Apache: Hit CTRL-C in the httpd.exe console window to stop it
  2. Install PHP
    • add php install path to Windows path environment variable
    • copy php.ini-recommended to php.ini
    • edit php.ini to set the doc_root parameter and enable mysql support:
      doc_root = "c:\apache\htdocs"
      extension_dir = "c:\php\ext"
  3. Config Apache to call PHP as a SAPI module
    • Edit “c:\apache\conf\httpd.conf” to include the following:
      # Add index.php as a recognized directory index file
      DirectoryIndex index.html index.php

      # Load PHP 5 as SAPI module
      LoadModule php5_module "c:/php/php5apache2_2.dll"

      # Add mime type for PHP files
      AddType application/x-httpd-php .php

      # Configure the path to php.ini (you can insert this at the end of the file)
      PHPIniDir "c:/php"

Installing mySQL

  1. Install mySQL
    • If you don’t install mysql server as a Windows service, you can use the command line:
      (Start mysql)
      mysqld --standalone --console

      (Stop mysql)
      mysqladmin -uroot -p shutdown
  2. Install phpMyAdmin into Apache htdocs directory
    • copy to
    • In, set the value for the ‘blowfish_secret’ to anything
    • When logging into phpMyAdmin using the browser, input the mysql “root” user and default blank password.

Installing IlohaMail

  1. Download IlohaMail and unzip it
  2. Copy the “IlohaMail” subdirectory in the archive into Apache htdocs directory
    • Use phpMyAdmin to create a database and import the “MySQL/sql” file to create tables
    • Edit “conf.php” to change to a mySQL based storage:
      $backend = "DB";
    • Edit “db_conf.php” to set the database access:
      $DB_PASSWORD="user password";
      $DB_NAME="database name";
Leave a Reply

Your email address will not be published. Required fields are marked *