Unable to start XAMPP Apache server on MacOS-Sierra - macos

Whenever I'm trying to start my Apache server from XAMPP on my Macbook (MacOS-Sierra) . I'm getting following application log :
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
And status remains Stopped. I re-install XAMPP and restarted my laptop multiple times, but I'm still having same issue. Couldn't find anything help to resolve this issue.

I found the solution:
Make sure port 80 is not being used (Use Network Utility and scan for port 80. If you found any application using port 80, then kill it)
Open terminal and execute
sudo apachectl stop
(ignore, if you get any error)
On the same terminal window execute
sudo /Applications/XAMPP/xamppfiles/bin/apachectl start
Open XAMPP control panel, your apache server might have started by now, if not then you can start manually by clicking start button.
This worked for me!!

Simply goto your terminal and type:
sudo apachectl stop
It'll ask for password. Enter your system password.
Go back to XAMPP control panel and start Apache.
It should get started now.

I had the same Problem and fixed it by deleting the lib folder in Applications/XAMPP/xamppfiles/ and installing XAMPP again. It's probably due to old lib files from previous versions not being updated properly.

Another related issue, which I faced caused Apache sever failure. And failure logs is :
[Sun Jul 30 12:43:58.747822 2017] [unique_id:alert] [pid 9188] (EAI 8)nodename nor servname provided, or not known: AH01564:
unable to find IPv4 address of "MacBook-Pro.local" AH00016: Configuration Failed
To solve this :
Executed following command
sudo -e /etc/hosts
Then, changed following entries
127.0.0.1 localhost
::1 localhost
to
127.0.0.1 localhost MacBook-Pro.local
::1 localhost MacBook-Pro.local

I had the same issue when I update my XAMPP app, if you have to do this, you first have to uninstall your XAMPP (save your HTDOCS files in another folder, NOT in XAMPP folder, or you will lose it), and after that you can install the newest version of XAMPP. It worked for me, hope for you too.

Related

Why won't Apache Server start in MAMP?

I'm trying to view php files locally on my mac.
I'm running Yosemite.
I have MAMP installed on my computer. When I press start the MySQL server starts but Apache doesn't. An error message appears saying 'Error. Apache couldn't be started. Please check your MAMP installation'
I've gone through the internet typing stuff into terminal and changing 'envvars' to '_envvars' but nothing works.
I reinstalled OSX and that worked but when I shut down the computer the problem occurs again.
Can anyone help?
Thanks
Check if you changed the Document Root Location or Renamed it. At least this was my mistake.
MAMP > Preferences > Web Server > Document Root
I didn't get it working with port 8000 or the default 8888, but did get it working with port 80 per the suggestion here:
http://forums.macrumors.com/showthread.php?t=1744944
That didn't work after all, but it didn't error out. However I manually ran the following at the command line (because log file was empty):
sudo /Applications/MAMP/Library/bin/apachectl start
Only to find that after upgrading I was missing the mod_example.so
httpd: Syntax error on line 83 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/Library/modules/mod_example.so into server: dlopen(/Applications/MAMP/Library/modules/mod_example.so, 10): image not found
Copied it from my old install and I was good to go.
If you try to start the server from the terminal, likely that will tell you what is wrong e.g.
sudo /Applications/MAMP/bin/startApache.sh
Password:
(48) Address already in use: make_sock: could not bind to address [::]:8888
(48) Address already in use: make_sock: could not bind to address 0.0.0.0:8888
no listening sockets available, shutting down
Unable to open logs
What you can do in this case, I was inadvertently running a Blockstack browser out of 8888, so changing MAMP to 8887 allowed it to start. [Your mistake might be different.]
Had the same problem, nothing in the logs. After trying the_dillio's suggestion:
sudo /Applications/MAMP/Library/bin/apachectl start
I got an error that pointed back to my vhosts file. It turns out I had an extra /VirtualHost tag. Removed it and it started working again.
i've solved this issue using this command in the terminal :
sudo apachectl stop
I think I've found the solution.
It was the wrong port. I altered the .conf file in the Apache folder. I changed all instances of port 8888 to 8000. When I run MAMP now it all seems to work fine.
Thanks for your help
Also be aware that if you by any chance deleted the folder that was set as Document Root the last time you were using MAMP, you will get this error. Simply open MAMP again, change Document Root to a location that does exist and start the servers.
I received the same error but interestingly it was caused simply because I renamed the root folder and didn't realize it. Sounds like you have a different issue but for anyone else who gets this error message, make sure you haven't renamed the root!
Absolutely bizarre behavior for MAMP PRO (paid license too btw...)
In my case I had to change the location of the log file in order to get it to work...
Click on Mysql icon then the little folder to the right of the path and try changing it to something else.
For MAMP :
You can open the terminal and write:
ps aux | grep mysql
lsof -i
killall -9 mysqld
I hope is good for you!
Bye
I had this experience when upgrading to V4. It tried to used the files from my previous installation and it just never worked. The workaround was to RENAME the original MAMP installation to something different than "MAMP", install brand new version and then copy files you may need like VHOST configs and DATABASES. After all this it worked just fine.
My Apache server problem arose after I enabled SSL. So if this is your case, check your https-ssl.conf file (Applications -> Mamp -> conf -> apache -> extra). The Document Root under the Virtual Host settings had a different file path for htdocs than where it was actually located (easily overlooked). I changed this to "/Applications/MAMP/htdocs" and problem solved. Perhaps also check Document Root in your https.conf file (Applications -> Mamp -> conf -> apache) to see if it has the correct file path to htdocs too.
These are the steps I used to solve this issue.
Checking vcredist that are required and installing them. to check which are the missing vcredist I used a tool called "check_vcredist" from wamp.
I also installed latest Microsoft Visual C++ Redistributable x64.
Doing this steps solved my issue of Apache server not running

Apache won't start in wamp

I have been googling for the past few hours but I simply can't get my apache on wamp to start. My skype isn't running, and the test port 80 shows it isn't being used by anything. Before this happened, I was trying to add a new vhost, but now I have reverted back all of the files where I made changes. Anyway to debug why apache won't start?
Clicking on start/resume service for apache doesn't show any errors either.
Also just in case, I am running Win7 64bit
If you have an issue in the httpd.conf or any files included by it there are a couple of ways to find out what the problem is
First look at your Windows Event Viewer. Click on the Windows link in the menu on the left, and then submenu Applications.
Look for messages from Apache with the red error icon.
Secondly, open a command window, then CD into \wamp\bin\apache\apache2.x.y\bin, replace x,y with your actual version.
Now you can run this command to get Apache(httpd) to validate the httpd.conf file.
httpd.exe -t
This should give errors with line numbers related to the http.conf file.
It stops on the first error, so you will have to keep running it and fixing the error and then run it again until it gives the all OK message.
Use apaches startup debug tool from command: httpd.exe -e warn
press Win+R
type cmd and press enter
goto directory which contains your apache httpd.exe file. for example if your wamp is installed in e:\wamp type cd /d e:\wamp\bin\apache\ApacheX.X.X\bin in cmd and press enter.
type httpd.exe -e warn (or httpd.exe -e debug for more details) to see error message about problem which is prohibiting apache to start.
That is what I did and it helped me to find out what my Apache-PHP needed:
C:\Users\Admin>cd C:\wamp\bin\apache\apache2.4.9\bin
C:\wamp\bin\apache\apache2.4.9\bin>httpd -t
Syntax OK
C:\wamp\bin\apache\apache2.4.9\bin>httpd -k start
[Thu Apr 23 14:14:52.150189 2015] [mpm_winnt:error] [pid 3184:tid 112]
(OS 2)The system cannot find the file specified. : AH00436:
No installed service named "Apache2.4".
C:\wamp\bin\apache\apache2.4.9\bin>
The most simple solution:
Uninstall and reinstall WAMP (do not even try to set it up on top of existing installation - it would not help)
P.S.
If you wonder how did I get to this situation, here is the answer: I was trying to install WAMP and it throws me an error in the middle of installation saying:
httpd.exe - System Error
The program can't start because MSVCR110.dll is missing from your computer.
Try reinstalling the program to fix this problem.
OK
I got and installed Microsoft Visual C++ 2012 Redistributable from here http://www.microsoft.com/en-us/download/details.aspx?id=30679#
And it gave me the "dll" and the MYSQL started working, but not Apache.
To make Apache to work I uninstalled and reinstalled WAMP.
This solved the issue for me:
Right click on the WAMP system try icon -> Tools -> Reinstall all services
Go to C directory and then go to below mentiond path of you wamp server.
C:\wamp64\bin\apache\apache2.4.46\bin>
Then in Address bar enter "CMD" and press enter.that wil open the command prompt.
Now past below comman
httpd.exe -e warn
to see error message about problem which is prohibiting apache to start.
If you error is releated to port then
Right click on wamp server than on apache and then on httpd.confg,
Now search 80 and replace with 81 in that file and close and restart wamp
Invalid Command '80HostnameLookups' , perhaps misspelled or defined by a module not included in the server configuration
I got this error when I debug the issue (wamp server was not going online) by the procedure defined by #RiggsFolly. Just comment the line 80HostnameLookups Off by changing it to #80HostnameLookups Off.
This solution worked for me and apache starts running.Note:80HostnameLookups Off can be found on line 222 of httpd.conf file located in C:\wamp\bin\apache\apache2.4.9\conf
phpmyadmin.conf opened with apacheconf.exe and contents chained so you must do the following:
copy contents of phpsysinfo.conf [C:\wamp\alias]
paste into phpmyadmin.conf [C:\wamp\alias]
change Alias /phpsysinfo "c:/wamp/apps/phpsysinfo3.1.12/" to Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
change <Directory c:/wamp/apps/phpsysinfo3.1.12/ /> to <Directory c:/wamp/apps/phpmyadmin4.1.14/ />
its worked for me.
My solution was that 2 .dll files(msvcp110.dll, msvcr110.dll) were missing from the directory :
C:\wamp\bin\apache\apache2.4.9\bin
So I copied these 2 files to all these locations just in case and restarted wamp it worked
C:\wamp
C:\wamp\bin\apache\apache2.4.9\bin
C:\wamp\bin\apache\apache2.4.9
C:\wamp\bin\mysql\mysql5.6.17
C:\wamp\bin\php\php5.5.12
I hope this helps someone out.
Sometimes it is Skype or another application "Holding" on to port 80. Jusct close Skype
My solution on Windows 10 was just to stop IIS (Internet Information Services).
If Apache is installed as a Windows service, any errors will show up in the Windows System event log. To view the System event log, navigate to Windows Administrative Tools->Event Viewer and open the System log in the Windows Logs folder. Or, you can see the same errors by running httpd.exe at the command line. In my case, httpd.exe is located here: C:\Bitnami\wampstack-5.6.26-2\apache2\bin.
If there is a problem with starting Apache, most likely the problem can be fixed by editing the httpd.conf file located in the \apache2\conf folder.
As already suggested, you can check the syntax of the httpd.conf file by running httpd.exe -t at the command line.
I found that the I had to
Change SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;${PATH}" in httpd.conf
to
SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;%PATH%"
I had the same problem. My port 80 was not in use.
After thorough research, all I did was to download Update for Universal C Runtime.
Once installed and my PC restarted, all was OK.
I was having the same problem, the mysql service was starting but not the apache service, the main problem about that is one of your virtual hosts isn't config. correctly, all i did was deleted the virtual host that i created "D:\wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts, restarted all services apache service started working correctly and so i just went to localhost and added a virtual host automatically and so it worked!!
I was having same problem.
I followed this steps, problem solved.
run command line (CMD) with Administrator Permission.
cd c:/wamp64/bin/apache/apache2.4.27/bin
httpd.exe -k uninstall
httpd.exe -k install
at last restart all services from wamp system tray icon
It turns out I didn't have Microsoft visual c++ installed, installing it solved the problem for me.
If you have Microsoft Visual Studio running at time of running, try to disconnect it and try again

XAMPP not running on Windows 7

I have installed XAMPP on Windows 7 ulimate successfully. But the following error was found during running Apache from XAMPP Control Panel:
Problem detected!
Port 3306 in use by ""C:\Program Files\MySQL Server 5.1\bin\mysqld" - defaults-file....
MySQL WILL NOT start without the configured ports free
You need to uninstall/disable/reconfigure the blocking application
or reconfigure my SQL and the Control Panel to listen on a different port
Please help solve this problem. Thanks in advance!
The message clearly says the port 3306 is being used by MySQL server. So XAMPP fails to bind to the same port.To launch XAMPP successfully, kill the MySQL server process. Then try restarting XAMPP.

Apache 2.4.3 (with XAMPP 1.8.1) not starting in windows 8

Just got XAMPP 1.8.1 installed on my Windows 8 PC, this version includes packages mentioned below:
Apache 2.4.3
MySQL 5.5.27
PHP 5.4.7
phpMyAdmin 3.5.2.2
FileZilla FTP Server 0.9.41
Tomcat 7.0.30 (with mod_proxy_ajp as connector)
Strawberry Perl 5.16.1.1 Portable
XAMPP Control Panel 3.1.0 (from hackattack142)
When I launched and tried to start Apache, it gave following error:
12:04:41 PM [Apache] Attempting to start Apache app...
12:04:41 PM [Apache] Status change detected: running
12:04:42 PM [Apache] Status change detected: stopped
12:04:42 PM [Apache] Error: Apache shutdown unexpectedly.
12:04:42 PM [Apache] This may be due to a blocked port, missing dependencies,
12:04:42 PM [Apache] improper privileges, a crash, or a shutdown by another method.
12:04:42 PM [Apache] Check the "/xampp/apache/logs/error.log" file
12:04:42 PM [Apache] and the Windows Event Viewer for more clues
After that I checked error.log, it was empty so no help from there.
So here is the solution for this:
I check port 80 used by Skype, after that I changes port to 81 and also along with that somewhere i read this error may be because of SSL Port then I changed SSL port to 444. However this got resolved easily.
One most important thing to notice here, all the port changes should be done inside config files, for http port change: httpd.conf for SSL httpd-ssl.conf. Otherwise changes will not replicate to Apache, Sometime PC reboot is also required.
Edit: Make Apache use port 80 and make Skype communicate on other Port
For those who are struggling with Skype, want to change its port and to make Apache to use port 80.
No need to Re-Install, Here is simply how to change Skype Port
Goto: Tools > Options > Advanced > Connection
There you need to uncheck Use port 80 and 443 as alternative for incoming connections.
That's it, here is screen shot of it.
I had the exact same error.
It was because i didn't run setup_xampp.bat
This is a better solution than going through config files and changing ports.
This problem may occur due to apache not getting required port (default is 80).
The port may be being used by other services.
For example: Skype also has default port 80.
Installing Skype and Apache both on same machine will cause conflict and hence Apache will not start.
Either, you change Skype port or change Apache port as described in following steps:
Change the ports of Apache and it will work for you.
Go to httpd.conf
How to change port for Apache:
Search for:
ServerName localhost:80
Change it to:
ServerName localhost:81
Also Search For:
Listen 80
Change it to:
Listen 81
If you have created any virtual hosts, change the ports there also.
Then restart your apache.
I had the same problem, but I understand the VMware service is the problem. VMware host service and Apache service conflict together.
To Solve it »
Run your task manager » in services tab find VMwareHostd » then right click and stop it » every thing have been solved.
Enter services.msc and shutdown anything SQL you have running.
The SQL server might be taking over the port.
I had the same problem and error, I tried changing the ports for http port from 80 to 81 and ssl port from 443 to 444 but still received the same error so I reverted the ports to default and ran setup_xampp.bat which solve the problem in seconds.
Skype is usually the culprit because it uses port 80 by default. Just close it or uncheck "Use port 80 and 443 as alternatives for incoming connections" under tools > options... > advanced > connection and then restart Skype.
I had to manually edit the 2 text files (httpd.conf and httpd-ssl.conf) using the Config button for Apache to run and change in notepad from 80 > 81 and 443 > 444
Using the Xampp UI config manager doesn't save the changes into Apache.
change 80 to 81 and 443 to 444 by clicking config button and editing httpd.conf and httpd-ssl.congf. Now you can Access XAMPP from 127.0.0.1:81
An error in your httpd.conf or other Apache config files will cause this. Revert httpd.conf et al to the pristine, installer versions and see if Apache runs again.
(I tried Skype and other suggestions here, no luck, but logs [XAMPP > Apache > Logs button] showed that it ran once when first installed. That was the giveaway.)
Likely errors:
Did you edit with a Windows text editor that changes line endings to non-Unix? (Solution here.)
Missing or invalid DSO files (.so)
I had this problem and then I ran "apache_start.bat" the error in german told me there was a problem with line 51 in httpd-ssl.conf which is
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
What I did was comment lines 163 (ssl module) and 522 (httpd-ssl.conf include) in httpd.conf;
I don't need ssl for development, so that solved it for me.

XAMPP - local host problems

I have picked up some possible answers to my problem here, but none have so far worked.
I have installed XAMPP but get the dreaded HTTP 404 error on both IE and Firefox when asking for 'http://localhost/'. I work with Dreamweaver but cannot get the testing server (XAMPP) to work, although I can connect to the linux/apache remote server.
Skype has been uninstalled. Therefore XAMPP is running on port 80 by itself.
XAMPP says Apache and Mysql have 'started'.
Is there someone that could please help me?
If some other software is using the same port as XAMPP, so please change it. Like Skype is using 80 or 443 change it and then run xampp.
Thanks Colin and nc3b,
In \xampp\apache\logs\error.log is this message:
httpd.exe: Syntax error on line 35 of
C:/Program Files
(x86)/xampp/apache/conf/httpd.conf:
ServerRoot must be a valid directory
Line 35 says: ServerRoot "/xampp/apache"
Typed this C:\Program Files\xampp\apache into browswer which pointed me to apache_installservice which loaded (url c:/windows/system32/cmd.exe) saying apache isn't installed, went through a couple of yes/no questions on the dos type browser page - this resulted in the system saying several files could not be installed (chmod reasons).
When installing XAMPP, instead of going with the default drive of c:/ I instructed that XAMPP be installed in c:/programfiles - Duhhhh maybe this is my problem?
Will try reinstalling directly on the c:/ drive.
Thanks for pointing me in the direction..... will let you know the outcome....
Close Skype if you have it open... just a shot in the dark. If it fixes your issue, then change the port number it uses, I had an issue a while back where Skype prevented XAMPP from running.
I had exactly the same problem recently after installing node.js on windows 8, my wordpress admin stopped working. Here's what fixed the problem: I opened command line as administrator and type NET STOP HTTP. (this stopped the default windows web server which use port 80).
After doing this I'm able to access my Wordpress administrator site which use port 80 by default.

Resources