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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 110

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 78

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.
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

LVL 43

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 43

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

763 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