Saturday, February 11, 2017

WAMP Fix for Windows 10

If you use WAMP, XAMPP, EasyPHP or any of the development platforms for PHP on Windows 10 then you might have encountered a problem of a missing file or Port 80 is already being used.

Here we’ll show how to fix those common issues between those platform, underlined as WAMP fix, since it works for all.

Port 80 Already Being Used:


You might encounter that problem since Apache relies on Port 80 to communicate, at least in its default settings, there are two solutions for this, but first, let’s explore what’s causing the problem.

Skype:


If you’re a Skype home user, then it could be the reason, Skype by default will monitor activity on Port 80 and 443, I won’t get into details of why, because it’s been a long debate online, some say it’s a genius fix by the original creator of Skype, others say it doesn’t make any sense, since 80 is for HTTP.

You can easily disable Skype from monitoring that port by opening Skype, click on the Tools menu, then Options.

From there, click on the Advanced tab in the sidebar to expand it and select Connection, uncheck the option for “Use port 80 and 443 for additional incoming connections”.


That’s it, you’re done. Skype will no longer interfere with Apache, or more specifically, port 80.

World Wide Web Publishing Service:


In windows 10, WWW Service is enabled by default (IIS), this service is used to monitor HTTP protocol and performance counters, usually enabled for Windows Server.

I have no idea why this service is turned on by default in Windows 10, its use is for, well, web connectivity and administration, servers.

By default it will monitor Port 80 which will conflict with the default Apache setting, there are two ways to disable it, one is temporary and the other is permanent.

To temporary stop the service, click on the Start menu and search for “services.msc”, without quotes. Locate “World Wide Web Publishing Service”, click it, then on the left side bar click on “Stop the service”.


You may have to do this every time you start the platform (WAMP/XAMPP/EasyPHP), good for casual developers that don’t really want to interfere the default setup of Windows 10.

To permanently remove the service, go into Control Panel, click on “Uninstall a Program” then from the left sidebar, click on “Turn Windows features on or off”.

Expand the “Internet Information Services” and uncheck the “Word Wide Web Services”, then click on Ok.


Apache’s Default Port:


I honestly wouldn’t recommend doing this, but that’s just my opinion. It doesn’t really affect anything, but you might have to change your localhost URL every time you type it, from “localhost” to “localhost:port”, port being the new port number you have picked.

Services like WAMP, XAMPP and EasyPHP provide an easy way to edit Apache’s port. From their control panel, find the configuration option for Apache.

Find the option that edits “httpd.conf”, and then find the line that says either “Listen 80” or “Listen 127.0.0.1:80”, change 80 to whatever port number you think is suitable, 8080 is a popular choice, after that all you need to do is restart Apache. Older versions might have a “Port 80” line instead.


This could change slightly, but the basics will remain the same, configure Apache to change the port.
Your new localhost URL to view your local project will most likely need to be one of either:
  • 127.0.0.1:8080
  • localhost:8080

MSVCR110.dll is Missing:


You might encounter that error every time you try to start WAMP, XAMPP or EasyPHP on Windows 10. The reason for that is C++ Redistributable for Visual Studio 2012 is not installed and even removed after an upgrade to Windows 10, which is a dependency for those platforms to run.

To fix that, go to this URL:
http://www.microsoft.com/en-eg/download/details.aspx?id=30679

Download the x86 or the x64, depending on your system or which platform architecture you’re using. If you’re unsure, check the platform website for details (WAMP/XAMPP/EasyPHP). Though installing them both should be just fine.

Conclusion:


Windows 10 is an amazing operating system, they seem to be trying to push a lot of services and features on all users by default, which I would consider to be their only downside so far, unless you also count the lack of update notes.

I was and still am always hopeful that programs and platforms do a basic check of their dependencies on install, it would save a lot of hassle for their users. I’m sure they’ll release updates soon that will install the C++ dependency they need to run, until then, just use this manual fix.

Hopefully these solutions are sufficient enough to cover all the problems you might encounter with Windows 10 and PHP development, if you do find another though, please let us know, we’ll be more than happy to feature your solution in this article.

Keep on developing.


0 comments:

Post a Comment