Need help setting up localhost on Windows 7 machine

Posted on 2015-02-07
Last Modified: 2015-02-07
Starting the PHP learning process.  I have some simple scripts that run from the command line, but I want to be able to run right from Windows, then when I have that as I want to locate it at a web server.  Mr. Google told me I needed to set up Apache server, PHP, and MYSQL.  I already have PHP (though I think I need to run PHP-Win for the next step, and not sure about how to do or if that is automatic), so installed WAMP to get Apache and MYSQL.  I got numerous errors during installation, and when done got a final error that "MSVCR110.dll" could not be found and a suggestion to re-install.  Re-installation threw dozens of errors, all stating it could not rename various files.

I found other posts that were not a one-stop installation like WAMP.  I could not tell from the documentation that it was for Windows, not Linux.

So, the need for this posting is to get localhost set up.  When I can run from localhost I'm sure I'll be back for PHP help.
Question by:Mike Caldwell
LVL 108

Accepted Solution

Ray Paseur earned 500 total points
ID: 40595760
No points for this because it's not an answer, just a suggestion.  Drop what you're doing, get an inexpensive shared hosting account (I use ChiHost and like them, PHP also recommends the vendors listed below), and free copy of FileZilla for FTP/SFTP.  Write your scripts on your computer, then upload them to your hosting account and do your testing over the internet, working in exactly the same environment and way your clients will use your site.  It's a one-touch "build" process, and it gives you the peace of mind knowing that things are always in a stable environment.  And choose Linux hosting, not windows.  Much better debugged!  This setup will literally cost no more than pennies per day and it's a lot better than getting everything working "at home" only to have it fail "on the road."

Author Comment

by:Mike Caldwell
ID: 40595763
Actually Ray I own several hosting accounts; my son and I provide high volume data (billions of records, about fifty million documents stored at our Rackspace host), so sending to a host would be no problem.  I'm trying to do some side stuff without involving my son because he does all of our programming and I want to sort of surprise with a few simple utilities, plus I want to not be so ignorant myself.  So I thought if I ran out of Windows localhost I wouldn't have to expose what I am doing!  I'll see what else shows up, but if I just can't get there from here I'll do as you suggest and of course would be worth the points.
LVL 76

Expert Comment

ID: 40595873
What you are looking at is setting up windows Apache php mysql. (WAMP)
Download mysql server from and install it.
Download Apache for windows and install it.
You say already have PHP.
Localhost is the reference to self on a computer.

There are several options IDE (zend, Netbeans, etc.) that you can use or do you use a notepad++ or context?

Rereading the original post, I find that I might not fully understand what you are looking to do.
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

LVL 42

Expert Comment

by:Chris Stanyon
ID: 40595900
A one-stop WAMP installation is by far the easiest option. If installing WAMPServer gives you errors, then I would look at addressing those instead of doing the modular install. I've installed WAMP server lots of times (including on Windows 7), and it's always ran smoothly - it literally sets up the whole WAMP stack in one go. If you're getting errors, then it's likely you have other problems with your PC.

By default, the WAMPServer sets up Apache to serve your web files from 'localhost' - the root is set as C:\wamp\bin\apache\apacheX.X.X\htdocs. This is fine for doing quick web tests, but I tend to find configuring Apache with name-based virtual hosts to be more effective - it allows you to easily isolate separate projects.

Once setup, you can serve different domains, each from their own folder, for eaxmple: --> \My Documents\Project 1\public_html --> \My Documents\Project 2\public_html \My Documents\YourDomain\public_html

You don't need to register the domains - you simply add an entry to the Windows Hosts file, and you can then closely replicate your actual online hosting package, all from your own PC.

Personally find it a lot easier to develop locally than remotely.

Author Comment

by:Mike Caldwell
ID: 40595904
Chris, the one click setup with WAMP is what was attractive.  But as I originally posted, it did not install, and the error messages simply said "Try again", which got worse.  And I did look at the individual installs, and stopped at Apache for Windows; lots of options listed, plus the stated need to compile locally or look somewhere else for a binary.  Meanwhile my son has provided me with the credentials to park at our own server, so think I'll just take Ray's advice.  I'm trying to learn PHP, not be my local IT guy!
LVL 42

Expert Comment

by:Chris Stanyon
ID: 40595913
Fair enough - my point about the errors was simply to say that it's not likely to be a problem with WampServer - it's more likely a problem with your PC - carrying on without fixing them will likely manifest problems in other ways - always a better option to fix rather than ignore :)

Good luck with your PHP - as you start getting your head around it, you'll be amazed at what you can do!

And always look at various resources for learning - there's a lot of 'junk' out there that will lead you down the garden path, and inevitably to frustration.

Author Comment

by:Mike Caldwell
ID: 40595918
Thanks Chris.  Keep watch; I will no doubt have a lot of questions re: PHP.  We have an API that clients can access with their client side program; I'm trying to not be the most ignorant man in the room!  And perhaps I can come up with some simple canned services that we can provide to those who would use our data but can't justify writing their client side of the API.

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
get radio button vale in array 7 37
Time difference 10 36
PHP Script - Am I missing anything here? 8 39
PHP string issue 5 18
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now