Home » Computers » Databases

Setting up Apache - PHP5 & MySQL - A Novices Experience

Aug 17, 2007
As an 'internet Marketing' newbie I recently was forced to set up a server on my laptop so I could properly test web-sites written in php code.

I am pretty much a html sort of guy and have come back around to the internet after an absence of five or six years, to find things have moved on, and that you need to be able to use this sort of stuff to do Internet marketing properly- article sights, pre made web-sites etc.

I was unable to open these 'pre-made' sights directly in Interent explorer and was only able to get a vague idea of what they looked like by opening them in Dreamweaver- which recognizes php code. I tried to open these sites in a web browser but was told I needed a local server. "How do I do that"? I asked.

So, I had no way to see what the final product would look like until I put it on my 'proper' Internet server - not a very efficient way to do things if you want to change elements around.

After a bit of a hunt around on the Internet I discovered that I needed to set up a testing server on my own computer. It seemed the easy way to do this was to get Apache server , PHP, and my SQL database installed on my machine. As there were no e-books available on this. [Is that a Niche Market?] I took a trip to my local bookstore and came away with something I thought would do the job.

There I was, filled with excitement and new ideas that this would all be nice and easy. But of course, it wasn't. My first problem was that the book told me to get Apache 1.3. But I could only find only find an Apache two download.

A search for 'Apache 1.3 download 'gives the following 'official' site

http://httpd.apache.org/download.cgi -but you have to look closely to find the 'ARCHIVE' file! Which is where the 1.3 versions live. Apparently The PHP people don't think their software works as well on the Apache2 software- probably still being ironed out- but I wanted to do what the book says. Find 1.3 versions here:

http://archive.apache.org/dist/httpd/ -

you'll need to go into the 'Binaries' for the windows download. But from there on its fairly simple. You need to fill in a few info boxes during the set up:

for network domain enter: localdomain
for Server Name enter: localhost
for Administrator email- whatever you want

Also choose to 'run as a service for All users'

So I downloaded this and installed it successfully on my computer. I then got PHP five from the 'official' PHP site -

Click the windows ZIP option: , This is not an 'Auto install' you Unzip the files and then copy them to your C:/ drive;

Make a folder and call it 'php' and copy your php files into it.

There are a number of sites on the web that will tell you which files to 'fiddle' with to make the Apache-MySQL/PHP trio work, but to keep it all in one place I'll sumarise here from my experience:

Once you have PHP installed, you will need to navigate to the back to the Apache Folder httpd file -


Open it with notepad and find the 'AddModule' section. [Hint: use Control F [windows find] and type 'AddModule'] insert the following lines after the final AddModule command: EXACTLY

#start addition

LoadModule php5_module c:/php/php5apache.dll
AddModule mod_php5.c
AddType application/x-httpd-php .php .phtml

#end addition

the bits with the # will not be recognized. I know this is a bit bamboozling but it was for me too! So don't give up yet.

Next, You will navigate to the Folder contining all the PHP files [should be C:/php] and locate the file labeled


Find the line that says

doc_root =

Change this to read- .

doc_root = "C:\Apache\htdocs"
[if there is a # in front of the doc_root command- remove it or it wil only be seen as a comment]

You also need to locate the command

extension_dir = "./" and replace it with

extension_dir = "C:\php\ext""

The final part of the equation is the MySQL database installation, and here I encountered some problems. As I could only find a copy off my SQL5 instead of four as being suggested in the text.

MySQL 5 installation is pre-packaged, but when I came to the final part of the installation. I encountered a problem. The setup wizard said it could not fully install the database because I did not have TCP permissions on port 3306!!!!

Whaaaaaat....is a port 3306? This one again stumped me, and it was off to the mySQL frequently asked questions. Here, I finally found someone who made sense, and I paraphrase his response for any of you who are having the same problem.

here's what you need to do:

Uninstall MySQL completely, turn the computer off and then run the installer again tick all the boxes along the way.

Go to Windows Firewall. Start - Control Panels - Windows Firewall - Exceptions tab.

Click the "Add Port" button:
Name: mysql
Port: 3306

Click the "Add Program" button.
Browse to where you have installed MySQL ( C:/Programs Files/MySQL/MySQL 5.x.x/bin/mysql )

This seems this seems to satisfy Apache For those using another server you may need to follow the other procedure.

Download the the MySQL Administrator program from
dev.mysql.com or mysql.he.net
Unzip the program and launch "MySQLAdministrator.exe" directly out of the unzipped directory by double clicking on the MySQL Administrator.exe file. put in the following information:

Server host: localhost
Username: root
Password: whatever

Click "OK"

Click on the "Startup Variables" item on the left, then the "Security" tab. Check the checkbox for "Disable grant tables."

Click the "Service Control" item on the left and then the "Start/Stop Service" tab.

Click "Stop Service" -- once the services has stopped, click the button again to start the service.

Thanks to Mike from wimpyplayer.com for the bulk of that info.

So, the outcome I was desiring was partly achieved: I am now able to 'see' a full picture of a PHP webpage in the local browser on my computer- but only when I launch it from 'Dreamweaver' my web editing application, but, only one page at a time - it doesn't act like a proper website, but perhaps that's the next thing for me to learn.
About the Author
Paul Warren is a Wealth Creation Educator and stock trader. You can download Wealth Creation Audio Books and Free Wealth Creation E-books at his site mymillionairebuddy.com
Please Rate:
(Average: Not rated)
Views: 589
Print Email Share
Article Categories
    • Artists
    • Gambling
    • Humanities
    • Humor
    • Movies
    • Music
    • Photography
    • Tattoos
    • Television
    • Classic Cars
    • Motorcycles
    • Recreational Vehicles
    • SUVs
    • Trucks
    • Vans
    • Branding
    • Business Opportunities
    • Careers and Jobs
    • Corporate
    • Customer Service
    • Direct Mail
    • Entrepreneurship
    • Ethics
    • Financing
    • Franchising
    • Home-Based Business
    • Human Resources
    • Import and Export
    • Leadership
    • Management
    • Market Research
    • Marketing and Advertising
    • Negotiation
    • Network Marketing
    • Networking
    • Organizational
    • Presentation
    • Project Management
    • Public Relations
    • Small Business
    • Strategic Planning
    • Team Building
    • Telemarketing
    • Training
    • Ask an Expert
    • College and University
    • Home Schooling
    • K-12
    • Languages
    • Online Education
    • Psychology
    • Accounting
    • Credit
    • Currency Trading
    • Debt Consolidation
    • Insurance
    • Investing
    • Leasing
    • Loans
    • Mortgage
    • Mutual Funds
    • Personal Finance
    • Stock Market
    • Structured Settlements
    • Taxes
    • Wealth Building
    • Coffee
    • Cooking
    • Gourmet
    • Recipes
    • Wine and Spirits
    • Acne
    • Aerobics
    • Alternative Medicine
    • Beauty
    • Cancer
    • Cosmetics
    • Depression
    • Diabetes
    • Diseases and Conditions
    • Fitness Equipment
    • Fitness
    • Hair Loss
    • Heart Disease
    • Medicine
    • Men's Health
    • Muscle Building
    • Nutrition
    • Skin Care
    • Supplements and Vitamins
    • Weight Loss
    • Women's Health
    • Yoga
    • Arts and Crafts
    • Babies
    • Collecting
    • Elderly Care
    • Genealogy
    • Hobbies
    • Parenting
    • Pets
    • Pregnancy
    • Woodworking
    • Feng Shui
    • Gardening
    • Home Appliances
    • Home Security
    • Interior Design
    • Landscaping
    • Affiliate Programs
    • Article Marketing
    • Auctions
    • Audio
    • Banner Advertising
    • Blogging
    • Broadband
    • Domain Names
    • E-Books
    • E-Commerce
    • Email Marketing
    • Ezines and Newsletters
    • Forums
    • Internet Marketing
    • Link Popularity
    • Pay-Per-Click
    • Podcasting
    • RSS
    • Search Engine Marketing
    • Search Engine Optimization
    • Security
    • Social Media
    • Spam
    • Video
    • Viral Marketing
    • Web Design
    • Web Development
    • Web Hosting
    • Copyright
    • Cyber Law
    • Intellectual Property
    • National, State, Local
    • Patents
    • Regulatory Compliance
    • Trademarks
    • Buying
    • Selling
    • Baseball
    • Basketball
    • Boating
    • Cycling
    • Extreme Sports
    • Fishing
    • Football
    • Golf
    • Hockey
    • Hunting
    • Martial Arts
    • Running
    • Scuba Diving
    • Soccer
    • Swimming
    • Tennis
    • Dating
    • Divorce
    • Marriage
    • Weddings
    • Astrology
    • Buddhism
    • Christianity
    • Faith
    • Hinduism
    • Islam
    • Judaism
    • Meditation
    • Metaphysical
    • New Age
    • Cable and Satellite TV
    • Cell Phones
    • Communication
    • Gadgets and Gizmos
    • GPS
    • Satellite Radio
    • Video Conferencing
    • VoIP
    • Addictions
    • Coaching
    • Goal Setting
    • Motivational
    • Stress Management
    • Time Management
    • Clothing
    • Electronics
    • Fashion
    • Gifts
    • Jewelry
    • Causes and Organizations
    • Environment
    • History
    • Holidays
    • Men's Issues
    • Nature
    • Philosophy
    • Politics
    • Women's Issues
    • World Affairs
    • Air Travel
    • Camping
    • Cruises
    • Destinations
    • Outdoors
    • Article Writing
    • Book Reviews
    • Copywriting
    • Fiction
    • Non-Fiction
    • Poetry
    • Quotes
    • Screenplay
    • Tools and Resources