WAMP apache won't start (port 80 not in use) - php

Apache won't start in WAMP3 (Windows 10), and I couldn't find any answer here or elsewhere that fixed the problem. So far I've tried the following:
check if port 80 was in use (see image 1)
check if world wide web services were turned on in windows (see image 2)
check "httpd.exe -t" - result "syntax OK"
I have restarted my computer and wamp several times with no success
Any other suggestions?
Image of the problem:
Image 1:
Image 2:

Here is the Dialog that you are supposed to read and act upon when installing WAMPServer 3
--- Installation of Wampserver ---
BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you need to remove Wampserver BEFORE installing the elements that were missing.
Make sure you are "up to date" in the redistributable packages VC9, VC10, VC11, VC13 and VC14
See --- Visual C++ Packages below.
Do not install Wampserver OVER an existing version, follow the advice:
-- Installing a new version of Wampserver: http://forum.wampserver.com/read.php?2,123606
If you install Wampserver over an existing version, not only it will not work, but you risk losing your existing databases.
Install Wampserver in a folder at the root of a disk, for example C:\wamp or D:\wamp. Use an installation path that does not include spaces or diacritics; Therefore, no installation in c:\Program Files\ or C:\ Program Files (x86)\
You must BEFORE installing, disable or close some applications:
Close Skype or force not to use port 80
--Item No. 04 of the Wampserver TROUBLESHOOTING TIPS:
Disable IIS
Item No. 08 of the Wampserver TROUBLESHOOTING TIPS:
If these prerequisites are not in place, Press the Cancel button to cancel the installation, then apply the prerequisites and restart the installation.
--- Visual C++ Packages ---
The MSVC runtime libraries VC9, VC10, VC11 are required for Wampserver 2.4, 2.5 and 3.0, even if you use only Apache and PHP versions with VC11.
Runtimes VC13, VC14 is required for PHP 7 and Apache 2.4.17
VC9 Packages (Visual C++ 2008 SP1)
http://www.microsoft.com/en-us/download/details.aspx?id=5582
http://www.microsoft.com/en-us/download/details.aspx?id=2092
VC10 Packages (Visual C++ 2010 SP1)
http://www.microsoft.com/en-us/download/details.aspx?id=8328
http://www.microsoft.com/en-us/download/details.aspx?id=13523
VC11 Packages (Visual C++ 2012 Update 4)
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: http://www.microsoft.com/en-us/download/details.aspx?id=30679
VC13 Packages] (Visual C++ 2013[)
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: https://www.microsoft.com/en-us/download/details.aspx?id=40784
VC14 Packages (Visual C++ 2015)
The two files vcredist_x86.exe and vcredist_x64.exe to be download are on the same page:
http://www.microsoft.com/fr-fr/download/details.aspx?id=48145
If you have a 64-bit Windows, you must install both 32 and 64bit versions, even if you do not use Wampserver 64 bit.
This is item number 20 of TROUBLESHOOTING TIPS of Wampserver: http://forum.wampserver.com/read.php?2,134915
You should also remember that WAMPServer must be installed As an Administrator and should also be run As an Administrator

Related

Apache Server Not Working After Installing PhP

[EVERYTHING WORKS NOW!]
MY SOLUTION:
The first mistake i made, was simply, that i had some random 32bit version of PHP installed, and some random 64bit version of Apache! After that, i just downloaded the latest version of PHP, and put it in my c:\php folder, THEN downloaded the LATEST version of the VC14 version of Apache, from the apachelounge website (VC14 category on the left side on the website). And the last mistake was, that i had the W3SVC from IIS still running, so i stopped that one under services (search in windows for services.msc)! And yeah, thats it, all solved now!
So, i have a problem, i installed Apache recently, and set up a working webserver!
This all worked fine, my whole website works flawlessly, and its fully usable!
BUT, all of my php scripts did NOT work, when loading one on the website, apache just show the entire source code of the .php file, instead of displaying it like an html page!
So, i noticed, i do not have PHP configured with my apache server!
What i then did, was download php, put it in c:\php, configure the php.ini, and all of that works, i know because in IIS 10, my website worked perfectly fine with PHP!
so i installed php, for apache 2.4, the VS11 version, the same goes for apache, (i did that because the latest versions of both did not work for me, i had the same problem)!
and as soon as i do the last step,
add these lines to my httpd.conf (inside my apache folder):
LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir " C:/php"
, when i want to start the apache server, it just tells me this:
"The requested operation has failed."
(this happens when i select the service of my server in the Apache-Monitor, and click on "start)
(NO error log is beeing created from apache, nothing inside the error nor log folder (both configure in the httpd.conf))
only CMD gives me the following erro:
httpd: Syntax error on line 533 of C:/Apache24/conf/httpd.conf: Cannot
load c:/php/php5apache2_4.dll into server: %1 is not a valid Win32
application.
Now, as soon as i remove these 3 lines from my httpd.conf, the server works perfectly fine again, can be started, and the website is usable, except, all php pages do not work(of course).
i heard something about a "libphp5.so", i do not know if it has anything to do with neither my apache server, nor my whole problem, but i don't know, atleast i have no such thing in my "C:\Apache24" folder!
SOME INFORMATION THAT MIGHT BE IMPORTANT:
All this is hosted from a normal PC (Windows 10) (64 Bit), 32GB RAM, 8x4GHz processor etc..!
yes, i have added c:\php to my Path environment variable! (as said before, all is working if i do not add these lines, which according to google results, are necessary to get php to work with apache)!
If anyone knows what to do, id be so glad, because i do not want to keep using IIS (its good but..), as i could do definitely more with Apache!
Read the manual carefully. Reinstall apache and use PHP 5.6. unless you are ready to fix issues that come with PHP 7.1. Notice Do NOT use VC11+ versions of PHP with the apache.org binaries. This is taken from PHP.net
Apache:
Please use the Apache builds provided by Apache Lounge. They
provide VC11, VC14 and VC15 builds of Apache for x86 and x64. We use
their binaries to build the Apache SAPIs.
If you are using PHP as module with Apache builds from apache.org (not
recommended) you need to use the older VC6 versions of PHP compiled
with the legacy Visual Studio 6 compiler. Do NOT use VC11+ versions of
PHP with the apache.org binaries.
With Apache you have to use the Thread Safe (TS) versions of PHP.
VC11, VC14 & VC15 More recent versions of PHP are built with VC11,
VC14 or VC15 (Visual Studio 2012, 2015 or 2017 compiler respectively)
and include improvements in performance and stability.
The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed
The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
The VC15 builds require to have the Visual C++ Redistributable for Visual Studio 2017 x64 or x86 installed
TS and NTS TS refers to multithread capable builds. NTS refers to
single thread only builds. Use case for TS binaries involves
interaction with a multithreaded SAPI and PHP loaded as a module into
a web server. For NTS binaries the widespread use case is interaction
with a web server through the FastCGI protocol, utilizing no
multithreading (but also for example CLI).
Source: PHP.NET Manual
Make sure Apache2 and PHP binaries have the same:
Visual Studio C++ binary compatibility version
(Visual Studio C++ 2015 = VC14, Visual Studio C++ 2017 = VC15)
system architecture: 32bit(win32) / 64bit(win64)
for example:
php-7.3.15RC1-Win32-VC15-x86
be sure u have:
httpd-2.4.41-win32-VC15
best place to download Apache 2 binaries for Windows is Apache Lounge
(on Top Left corner you control the VC version):
https://www.apachelounge.com/download/VC15/
and to download PHP binaries also mind that with Apache you have to use the Thread Safe (TS) versions of PHP. go here:
https://windows.php.net/qa/
do not forget to add (System Variables) PATH for php,
open cmd As Administrator and type:
setx path "%PATH%, C:\php73" /M

WAMPserver 3.0.4 on Windows 10 (64 bit): Apache server (httpd service) did not start

I recently installed WAMPserver 3.0.4 x64 bit on my Windows 10 64 bit OS.
Issue:
Apache server (2.4.18) did not start with the following error message:
Could not execute menu item (internal error)
[Exception] Could not perform service action:
The service did not respond to the start or control request in a timely fashion
Similar Question was raised before on stackoverflow, but the resolutions posted there didn't help in my case.
(I've mentioned the details below).
Diagnosis:
Step 1:
Tested port 80, since my Apache server was using this one. Here is what the test returned:
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP Port 80 is not found associated with TCP protocol
Port 80 is not found associated with TCP protocol
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is not actually used.
Step 2:
Even though the result showed that Port 80 was not an issue, I tried to change port number from 80 to 8080.
Still received the same error. The test showed that Port 8080 was not being used either.
So, the issue is clearly not with the Port number.
Step 3:
Changed the PHP version from 5.6 to 7 through the WAMP server menu. This didn't produce any different result.
Step 4:
As per the most voted suggestion on the same error on a previous discussion, I typed 'httpd -e debug' on the cmd prompt:
(link to previous discussion: wamp server does not start: Windows 7, 64Bit)
C:\wamp64\bin\apache\apache2.4.18\bin>**httpd -e debug**
After executing the script for a brief moment, the process hung up. I am listing the last 3 statements that showed up:
[Wed Sep 07 19:57:35.680559 2016] [so:debug] [pid 8496:tid 428] mod_so.c(266): AH01575: loaded module userdir_module from C:/wamp64/bin/apache/apache2.4.18/modules/mod_userdir.so
[Wed Sep 07 19:57:35.691570 2016] [so:debug] [pid 8496:tid 428] mod_so.c(266): AH01575: loaded module vhost_alias_module from C:/wamp64/bin/apache/apache2.4.18/modules/mod_vhost_alias.so
[Wed Sep 07 19:57:35.712582 2016] [so:debug] [pid 8496:tid 428] mod_so.c(266): AH01575: loaded module php7_module from C:/wamp64/bin/php/php7.0.4/php7apache2_4.dll
The last one says that php7_module was loaded from
/wamp64/bin/php/php7.0.4/php7apache2_4.dll
before freezing the command prompt.
This was the same file mentioned as the culprit in the earlier discussion.
I thought that this must be the culprit in my case as well.
Step 5:
Downloaded the file php7apache2_4.dll from
https://bugs.php.net/bug.php?id=69801
and put it in my /wamp64/bin/php/php7.0.4/ location
The error still persists and I am not sure what else to do?
I had also tried:
Rebooting the system
Running the WAMP Server as an administrator
Going to Apache > Service Administration > Install Service
Nothing has worked yet!
Did you read the dialog that is shown as part of the install about making sure you have the full set of Microsoft C/C++ Runtime libraries installed.
Windows 10 does not come with them all installed
--- Installation of Wampserver ---
BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you need to remove Wampserver BEFORE installing the elements that were missing.
Make sure you are "up to date" in the redistributable packages VC9, VC10, VC11, VC13 and VC14
See --- Visual C++ Packages below.
--- Do not install Wampserver OVER an existing version, follow the advice:
Install a new version of Wampserver:
If you install Wampserver over an existing version, not only it will not work, but you risk losing your existing databases.
--- Install Wampserver in a folder at the root of a disk, for example C:\wamp or D:\wamp. Take an installation path that does not include spaces or diacritics;
Therefore, no installation in c:\Program Files\ or C:\Program Files (x86)\
We must BEFORE installing, disable or close some applications:
- Close Skype or force not to use port 80
Item No. 04 of the Wampserver TROUBLESHOOTING TIPS:
Disable IIS
Item No. 08 of the Wampserver TROUBLESHOOTING TIPS:
If these prerequisites are not in place, Press the Cancel button to cancel the installation, then apply the prerequisites and restart the installation.
--- Visual C++ Packages ---
The MSVC runtime libraries VC9, VC10, VC11 are required for Wampserver 2.4, 2.5 and 3.0, even if you use only Apache and PHP versions with VC11. Runtimes VC13, VC14 is required for PHP 7 and Apache 2.4.17
-- VC9 Packages (Visual C++ 2008 SP1)
32bit from here
and 64bit from here
-- VC10 Packages (Visual C++ 2010 SP1)
32bit from here
and
64bit from here
-- VC11 Packages (Visual C++ 2012 Update 4)
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: 32bit and 64bit
-- VC13 Packages] (Visual C++ 2013[)
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: 32bit and 64bit
-- VC14 Packages (Visual C++ 2015)
The two files vcredist_x86.exe and vcredist_x64.exe to be download are on the same page: 32bit and 64bit
If you have a 64-bit Windows, you must install both 32 and 64bit versions, even if you do not use Wampserver 64 bit.
This is item number 20 of TROUBLESHOOTING TIPS of Wampserver:
ALSO remember you must install WAMPServer "As an Administator" and also run it that way.
Update: Someone suggested me to check the latest version for Visual C++ Redistributable for Visual Studio.
I installed the latest from
microsoft.com/en-us/download/details.aspx?id=48145
and this resolved my issue.
Thanks to those who took out their time to try to answer my question.

Showing Error opening of WAMP server

I have installed WampServer 2.2 on Windows 8.1.
When I try to start WampServer, it shows the following error:
The program can't start because MVSCR110.dll is missing from your computer.
How can I fix this?
MVSCR110.dll references to the Visual C++ 2012 Redistributable, of which you do not have.
The Visual C++ 2012 Redistributable is required for Apache to run. The reason why your Wamp installation is not going online is because Apache is unable to start.
A forum post on the WAMP Server forums deals with this problem with an earlier version of Wamp, to quote:
For Windows 32 : Be sure that you have installed the Visual C++ 2012
SP1 Redistributable Package x86 : VC12 SP1 vcredist_x86.exe
For Windows 64 : Be sure that you have installed the Visual C++ 2012
SP1 Redistributable Package x64 : VC12 SP1 vcredist_x64.exe
Apache will not run without this component
In fact if you are running the 64bit Windows it is a good idea to
install all the 32bit libraries as well as the 64bit ones. After all
64bit windows runs 64 and 32 bit code. You will probably find you need
at least one of the 32bit runtimes for some app/utility you will
install at some point.
Some users have also said that installing the Redistributable for their processor type isn't enough, so it may be a good idea to install both x64 and x86 versions.
WampServer versions b and later require the VC++ 2012 version, which can be downloaded here.
As far as I remember Windows 8.1 comes (out of the box, so to speak) with only one of Microsofts Visual C++ runtimes installed.
It seems a little odd that you are getting the message you claim if you are in fact using WAMPServer 2.2(a,c,d,or e)
The program can't start because MVSCR110.dll is missing from your
computer.
As as far as I am aware nothing delivered by any of the WAMPServer 2.2 releases i.e. 2.2a, 2.2c, 2.2d, 2.2e were compiled with MSVC 2012. In fact as stated on the download pages on SourceForge
Attention : All the components of the v2.2 WampServer stack have been compiled with VC9 version of Microsoft compiler. Earlier versions of Wampserver have been made with VC6 version of Microsoft compiler. So, You can't mix components of 2.2 stack with previous version of Wampserver Stack components. If you do it you will get an instable Wampserver.
However, if that is in fact the error you are getting after installing WAMPServer 2.2, then that message is saying that you need to install the MSVC 2012 runtime library.
Which can be downloaded from here.
You will also need to make sure that you have the MSVC 2008 runtime library installed as well, as wampmanager.exe is an old program as has not needed to be recompiled for a while now which can be downloaded from here
This runtime will also be required to run Apache and MySQL executables if you did in fact install WAMPServer 2.2.something
Oh and if you are using a 64bit WAMPServer, you will need to download and install the 32bit AND the 64bit version of the MSVC 2008 runtime library, as wampmanager.exe is a 32bit program even if you have installed the 64bit version of WAMPServer and of course the Apache and MySQL will need the 64bit libraries.
If this does not fix your issue, then have a look at the Windows Event Log
Windows Key + R to launch the run dialog then enter eventvwr.exe and press the OK button
- On the left side of the windows click 'Windows Logs -> Applications'
- Look for the names 'Apache' or 'MySQL' in the 'Source' column which have a error symbol in the first column.
The error messages sent here are normally very descriptive and should at least point you in the right direction to solving your problem.
when you migrate to windows 8.1, MVSCR110.dll is outdated. then, it should be updated and installed into your PC again.

Magic library does not run on wamp server

I am using magic library to change the resolution of the images. But I am getting following error when I am running the Wamp.
I am also sharing links of the website I have followed.
Link
http://www.zoharbabin.com/5-steps-to-get-imagemagick-on-xampp-1-7-3/
These are step by step instructions on how to get ImageMagick running under PHP in a Windows environment. Apache does not provide binaries for Windows and relies upon several sources to do so:
XAMPP
WampServer
Apache Lounge
Bitnami
Apache Haus
It is recommended to download either the XAMPP or WampServer distributions as they are complete packages that contain Apache HTTP server, PHP and MySql known and tested to work together.
Making ImageMagick work was not easy for me. It took two days of trial and error to get this to work. Hopefully this will help you get up and running faster. I have this running on the following:
Windows 7 Home Edition 64-bit
XAMPP 5.6.3
Apache HTTP 2.4.10 (Win32), VC 11
PHP 5.6.3 x86 VC 11, Thread safe
Thus, a 32-bit web framework compiled with VC 11 and thread safety enabled all running on 64-bit Windows 7. You must choose a 32-bit ImageMagick DLL distribution along with a 32-bit VC11 thread safe DLL wrapper to match.
The instructions below should work equally well with WampServer as there is no dependency on the Windows web framework.
The important thing to understand here is that you must know your web server environment and what components are installed and built with. you must match bitness, Visual C runtime, and thread safety configurations together.
Step #1: Install imageMagick to C:\ImageMagick
Go to Link and download the latest release. Use the 32 bit DLL version (ImageMagick-6.9.0.0-Q16-x86-dll.exe)
Install it into C:\ImageMagick directory
Step #2: Get the PHP wrapper from the Windows PECL repository
Go to http://pecl.php.net/package/imagick
Get the latest stable version, 3.1.2. You want the 32-bit, VC 11, thread safe version
php_imagick-3.1.2-5.6-ts-vc11-x86.zip
Step #3: Create distribution directory
Create a /php/ext/imagemagick directory
Copy the ZIP into it and unzip it
Step #4: Make backup copy of DLLs
Make a C:\ImageMagick\Backup directory
Copy DLLs in the C:\ImageMagick directory to the C:\ImageMagick\Backup directory
Step #5: Overwrite DLLs
This is the most important step that if you don't do, will result in the PHP wrapper not loading correctly:
Take all the DLL files in \php\ext\ImageMagick and overwrite those in C:\ImageMagick
If you do a SET on the DOS command line you will see that the ImageMagick installer had created a entry into the system variable environment path (i.e. to C:\ImageMagick). Supporting DLLs will be picked up from there and they will be the Pecl Windows repository DLLs, not the distribution.
Step #6: Set module extension in PHP.INI
First, copy the php extension wrapper php_imagick.dll into the /php/ext directory. Then modify the PHP.INI to do this:
extension=php_imagick.dll
Step #7: Reboot Apache
Reboot Apache
Go to phpinfo and see that imagick is installed as a module.
Here's where you can learn more about your environment.
Pay attention to stuff in phpinfo like:
Compiler: MSVC11 (Visual C++ 2012)
Architecture: x86 (32 bit; as opposed to x64 which is 64 bit)
Thread safety: enabled (TS)
Apache Environment Configuration (PATH should have C:\ImageMagick included)
More gory details: Installing ImageMagick with PHP and Windows

PHP Install Failure With wampserver2

I installed wampserver 2.2e (php5.4.3 / apache 2.2.22) on my Windows 2003 machine, and get this error in the system event logs:
Generate Activation Context failed for C:\wamp\bin\php\php5.4.3\php5apache2_2.dll. Reference error message: The referenced assembly is not installed on your system.
The DLL in question does exist in the folder specified.
Update: VC10 SP1 (32-bit) was installed prior to wamp.
I previously had tried to install apache and php manually, and encountered issues with apache loading the php5 module correctly as well. I assumed that WAMP would work fine (it has on all other instances when I have installed). I did have an earlier version of both apache and php working on this machine.
Now I'm not so sure it's the install, but something with Windows?
Update 2: In the system event logs, I noticed this error each time I try to run wamp. I looks related as it is referencing VC9, but the website says to install VC10:
Dependent Assembly Microsoft.VC90.CRT could not be found and Last Error was The referenced assembly is not installed on your system.
You need to install the Microsoft Visual Studio C++ Redistributable Package. LINK This link is for the 2010 version. Check the PHP documentation, you may need an older version.
Taken directly from WAMP website:
WARNING : You must install Visual C++ 2010 SP1 Redistributable Package
x86 or x64 VC10 SP1 vcredist_x86.exe 32 bits :
http://www.microsoft.com/download/en/details.aspx?id=8328 VC10 SP1
vcredist_x64.exe 64 bits :
http://www.microsoft.com/download/en/details.aspx?id=13523
You also need Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
The 2010 VC redist is for Apache.
The 2008 redist is for Wampmanager.

Categories