Installing Apache / PHP / MySQL / phpMyAdmin / Eclipse Zend PDT / Zend Framework: on XP Gaming machine

Since I’m creating a new install of a development environment on an XP gaming machine, I thought I’d just document the process for posterity.

  1. Make sure you are running at least Service Pack 2.
  2. Here is the version I’m installing: http://www.apache.org/dist/httpd/binaries/win32/apache_2.2.11-win32-x86-no_ssl.msi
  3. I won’t repeat details that are on other websites already, so just follow the instructions from here, then I’ll tell you what I did differently
  4. Instead of adding “php5apache2.dll” to “LoadModule php5_module”, since we are on Apache 2.2, point it to filename “php5apache2_2.dll”.
  5. Install Webyog. Make sure to search for the community edition. While phpMyAdmin is great, it can be buggy sometimes and you should really develop with a proper client.
  6. Download the all in one Eclipse Zend PDT package.
  7. Download Zend Framework.
  8. Install phpMyAdmin. When you configure it, you may get complaints about mcrypt, bzip2, timezone and zip not being enabled. Fix it all and more by editing php.ini and
    // change the following lines from ...
    
    ;extension=php_bz2.dll
    
    ;extension=php_zip.dll
    
    ;extension=php_mcrypt.dll
    
    ;date.timezone =
    
    // ... to
    
    extension = php_bz2.dll
    
    extension = php_zip.dll
    
    extension=php_mcrypt.dll
    
    date.timezone = America/Los_Angeles

    (note that you should pick your own timezone)

  9. I chose to enable mysqli extensions (extension=php_mysqli.dll) and disable mysql. Also, you may want to enable the pdo and pdo_mysql extensions.
  10. For development, it’s best to turn this on in php.ini:
    error_reporting = E_ALL | E_STRICT
  11. Depending on how your application is used, you may want to turn on short tags:
    short_open_tag = On
  12. Add include path to Zend library in php.ini…e.g.
     include_path = ".;C:\Documents and Settings\Administrator\My Documents\Zend\ZendFramework-1.7.5\library"
  13. To make sure that index.php shows in case there is no index.html, go to httpd.conf, and under <IfModule dir_module> add “index.php” after “index.html”.
  14. In httpd.conf, uncomment
    # Virtual hosts
    
    Include conf/extra/httpd-vhosts.conf

    then add your path to docroot to that file

  15. If you are setting up more than one docroot, and you probably are going to do this if you’re installing Eclipse and Zend Framework, you need to configure the proper directives for the .htaccess to work, so find the Directory section and copy this part to httpd.conf:
    <Directory "C:\path\to\public">
    
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks Includes ExecCGI
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>
  16. Make sure to enable mod_rewrite in httpd.conf:
    LoadModule rewrite_module modules/mod_rewrite.so
About these ads

2 responses to “Installing Apache / PHP / MySQL / phpMyAdmin / Eclipse Zend PDT / Zend Framework: on XP Gaming machine

  1. Thanks for this. Was a great guide to installing a more permanent installation of WAMP than the wampserver executable.

    I’d suggest one or two additions/modifications:
    Perhaps add how to install PEAR to the installation (using c:\webserver\php\go-pear).

    If you do that you can use http://pear.zfcampus.org/ to install the zend framework using the official pear channel. Makes it easy to install and to grab the latest version that has Zend_Tool available, which can then be used to set up your Zend Framework projects quickly.

  2. phpMyAdmin is for managing your database. It isn’t for uploading files. If O’Reilly has files for you to “import”, just copy and paste them into the correct folder. The only import you should do on phpMyAdmin are sql files, usually name something.sql

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s