Installing Apache, PHP, MySQL and Wordpress on Windows Platform - Part 1

Posted by Daniel - 529 Views

Install PHP, install Apache, install mySQL, install wordpressHi, this is the list of steps I have been using to install Apache, PHP, MySQL and Wordpress on Windows platform as development purposes, so this might not be the perfect setting for production server, but it works well for my development workstation in order to test and debug. I had wrote it with the most practical way hoping that these steps can be easily adapted by the first time user of Apache, PHP, mySQL and Wordpress if they want to taste this powerful combination of open source products. OK, lets get started shall we…

INSTALLING APACHE, MySQL AND PHP

1) Install Apache as windows service.
c:\apache is a good path to install it so it will be easier for you to browse the files later for maintenance since the default will install Apache on a very long path - a bit annoying for me. I am using
Apache 2.2.4 when this tutorial was written, you can get Apache here.

2) Install MySQL- I use MySQL version 5 - and also I recommend you to install MySQL GUI Tools. There will be a step where you need to enter the root password for mySQL, you can enter anything but for this tutorial purpose please enter “1234567″ for root password.

3) Extract the PHP5 files to
c:\php. If you haven’t download it, you can get the PHP5 files here.

4) We will use CGI php.exe instead of using the ISAPI module so Copy php5ts.dll to
c:\php. You may choose to use the ISAPI module if you want to but based on my experience (forgive the lack of my knowledge please), I can’t get the PHP to run with ISAPI module, and I haven’t had time to find out why.

5) Edit php.ini files
- find doc_root entry. put “c:\apache\htdocs
- find extension_dir entry put “c:/php/ext
- find extension list entries then enable these extensions for mysql support:

extension=php_mysql.dll
extension=php_mysqli.dll

6) Edit your Apache httpd.conf file then add these lines above the Main Configuration line block:

ScriptAlias /php/ “c:/php/”
AddType application/x-httpd-php .php

# For PHP 5
Action application/x-httpd-php “/php/php-cgi.exe”

Also add these lines for directory permission on c:\php

<directory>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
Satisfy all
</directory>

Find the DirectoryIndex entry then make sure you put index.php there as shown below:

<ifmodule>
DirectoryIndex index.html index.php
</ifmodule>

7) Restart apache by typing this commands on the command prompt:

net stop apache2 [enter]
net start apache2 [enter]

Note: If you have IIS installed, you have to make sure that the IIS is not running before starting Apache service. To shut the IIS down, type this command on your command prompt:

net stop iisadmin /y [enter]

8 ) Create a text file with notepad, then type this line on the file:

save it as info.php into c:\apache\htdocs

Open your browser then type http://localhost/info.php on the address bar then hit enter key.

if everything goes well the page will display your php configuration values with the php version info at the top. OK, lets get to the Part 2 - Installing Wordpress.

__________________________

Related posts brought to you by Yet Another Related Posts Plugin.

share this article

Digg del.icio.us Netscape StumbleUpon Yahoo! MyWeb reddit Furl Magnolia Newsvine Technorati SlashDot Blinklist Simpy Google
This post as PDFPosted in: Programming - January 2008


Leave a Reply


Options for your comment:





Get my Full Feed Here or you can subscribe to one of my category based feeds below:
Coffee Break

Latest Blog Entries

Categories

Neighbours and Friends

Comments - Thanks Guys :)

  • Sean: This is a great piece of code and thanks for adding the updates. Sean’s last blog post: Not All Text Message Marketing Is Created...
  • rodhy: Thank for your code, it very usefull for me. best regard.
  • Wes: How do I activate those extensions?
  • Michael Lindborg: Looking for a PDU converter brought me to this site. It looks like the PDUCONV would suit my needs, but the link to nerdlabs is...
  • 3d architectural renderings: sweet home 3d is pretty decent but its limited 3d architectural renderings’s last blog post: Coral Bay