Apache Not working in xampp version 3.2.2 - php

When I start the apache server using XAMPP v3.2.2, it comes with an error saying:
18:30:18 [Apache] Error: Apache shutdown unexpectedly.
18:30:18 [Apache] This may be due to a blocked port, missing dependencies,
18:30:18 [Apache] improper privileges, a crash, or a shutdown by another method.
18:30:18 [Apache] Press the Logs button to view error logs and check
18:30:18 [Apache] the Windows Event Viewer for more clues
18:30:18 [Apache] If you need more help, copy and post this
18:30:18 [Apache] entire log window on the forums
So then I go into the error file bit and it says:
[Wed Dec 30 18:12:12.892830 2015] [ssl:warn] [pid 11372:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include anID which matches the server name
[Wed Dec 30 18:12:13.066839 2015] [ssl:warn] [pid 11372:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 30 18:12:13.134845 2015] [mpm_winnt:notice] [pid 11372:tid 512] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations
[Wed Dec 30 18:12:13.134845 2015] [mpm_winnt:notice] [pid 11372:tid 512] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Wed Dec 30 18:12:13.134845 2015] [core:notice] [pid 11372:tid 512] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Dec 30 18:12:13.142847 2015] [mpm_winnt:notice] [pid 11372:tid 512] AH00418: Parent: Created child process 4144
[Wed Dec 30 18:12:13.900887 2015] [ssl:warn] [pid 4144:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 30 18:12:14.074292 2015] [ssl:warn] [pid 4144:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 30 18:12:14.134295 2015] [mpm_winnt:notice] [pid 4144:tid 564] AH00354: Child: Starting 150 worker threads.
I am confused and not sure how to fix it.

If your skype is turned on - you might exit the program because skype is using port 80

After a little research I've found that Win 10 might have a service running at port 80, something named "World Wide Web Publishing Service". What you need to do is stop this service or change the Apache port, like below:
Try this:
Method 1. Changing Apache default port:
On a text or a code editor open the file httpd.config - it should be located at C:\xampp\apache\conf\httpd.conf
Search for "Listen 80".
Change 80 to any other port number e.g. – 9080
Start XAMPP.
To access your localhost, open your browser and type: localhost:9080/sitefolder/ instead of just localhost/sitefolder/
You should be ok then.
If it doesn't work, go over the same process to change the port to 80 again and proceed to Method 2.
Method 2: Stop World Wide Web Publishing Service.
Note: Unless you’re running some software that depends on the Microsoft IIS Web Server, you should be fine when stopping it.
To stop this service, you can follow this video tutorial.

Related

XAMPP: Error Apache shutdown unexpectedly

I have trouble when connecting the Apache server with XAMPP, it gives me the error status below
Error: Apache shutdown unexpectedly
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
Here is the error logs given below
[Tue Apr 20 12:18:09.595619 2021] [ssl:warn] [pid 15252:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 20 12:18:09.651263 2021] [ssl:warn] [pid 15252:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 20 12:18:10.196918 2021] [mpm_winnt:notice] [pid 15252:tid 512] AH00455: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.0.3 configured -- resuming normal operations
[Tue Apr 20 12:18:10.196918 2021] [mpm_winnt:notice] [pid 15252:tid 512] AH00456: Apache Lounge VS16 Server built: Feb 17 2021 13:11:14
[Tue Apr 20 12:18:10.196918 2021] [core:notice] [pid 15252:tid 512] AH00094: Command line: 'd:\\system and apps\\xampp\\apache\\bin\\httpd.exe -d D:/System and Apps/XAMPP/apache'
[Tue Apr 20 12:18:10.199767 2021] [mpm_winnt:notice] [pid 15252:tid 512] AH00418: Parent: Created child process 6092
[Tue Apr 20 12:18:10.531312 2021] [ssl:warn] [pid 6092:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 20 12:18:10.586416 2021] [ssl:warn] [pid 6092:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 20 12:18:10.605417 2021] [mpm_winnt:notice] [pid 6092:tid 564] AH00354: Child: Starting 150 worker threads.
So, what I need to do to fix the problem?
If you’re using a Windows device, you can follow these four steps to update your default port settings in XAMPP.
I hope this will Help YOU

apache exited unexpectedly and chrome browser failed without any response

i have an angular application with Yii2 restful , when i load application there are a lot of resources with multiple rest api requests at the first.
sometimes a rest api failed with (failed) status and net::ERR_CONNECTION_RESET in chrome browser. when an api request failed all other api requests also failed.
i'm using windows , apache , php 7.1 (xampp)
also i have same problem with linux and nginx
my apache error log :
[Tue Oct 09 11:16:12.832792 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00428: Parent: child process 11936 exited with status 3221226356 -- Restarting.
[Tue Oct 09 11:16:13.038794 2018] [ssl:warn] [pid 3392:tid 508] AH01909: www.example.com:4433:0 server certificate does NOT include an ID which matches the server name
[Tue Oct 09 11:16:13.061795 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00455: Apache/2.4.33 (Win32) OpenSSL/1.0.2n PHP/7.1.16 configured -- resuming normal operations
[Tue Oct 09 11:16:13.061795 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00456: Apache Lounge VC14 Server built: Mar 22 2018 10:55:30
[Tue Oct 09 11:16:13.061795 2018] [core:notice] [pid 3392:tid 508] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Oct 09 11:16:13.064796 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00418: Parent: Created child process 3312
[Tue Oct 09 11:16:13.595807 2018] [ssl:warn] [pid 3312:tid 440] AH01909: www.example.com:4433:0 server certificate does NOT include an ID which matches the server name
[Tue Oct 09 11:16:13.708809 2018] [ssl:warn] [pid 3312:tid 440] AH01909: www.example.com:4433:0 server certificate does NOT include an ID which matches the server name
[Tue Oct 09 11:16:13.731810 2018] [mpm_winnt:notice] [pid 3312:tid 440] AH00354: Child: Starting 150 worker threads.
error image in chrome
I think it is about ThreadStackSize of apache but i can't increase it.
Is there anyone can help me please ?
Finally i found answer , it was about yii2 logging stack, when multiple requests sent to server concurrently, there were a lot of log stack that kept until the request ended then yii2 saved logs to database .
Also debugger module keeps logs until end of request.
When i decreased stack size of logs, requests executed correctly.
another way to solving this problem is changing db session to file session but i think its not good idea because we lose the speed and performance to executing requests.

Laravel connection reset after any file changes

I have laravel 4.2 installed in a local environment (windows 10) for testing, but keep getting a connection reset error after updating any files.
My project will load and the server properly displays my pages. However if I update a file (index for example) and then try access a page that renders the newly updated file, I always get a connection reset error. Even a change as simple as a period.
Even more interesting is when I use php artisan to serve my files, I never get the connection reset problem. If I visit the page through artisan serve it works, and then all the sudden xampp wants to work, but only after I have loaded the page from artisan once before.
If I make changes to the file again I have to repeat this process.
Local Setup
My project is being hosted locally from xampp (v 3.2.2) with the following v-hosts config. The hosts files have also been properly configured.
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/myproject/public"
ServerName myproject.local
ServerAlias myproject.local
ErrorLog "logs/myproject.log"
CustomLog "logs/custom.myproject.log" combined
<Directory "C:/xampp/htdocs/myproject/public">
AllowOverride All
Require all granted
</Directory>
In short: I change a file, I get connection reset on xampp when trying to access that page. I view the page from artisan and then refresh the page on xampp, all the sudden it works.
Update
I have tried alternates such as laragon suggested by Lucas, however the same error persists. After updating any file when trying to access that page I get a connection reset error.
I have found more information looking at the apache log in laragon.
[Tue Mar 01 08:52:22.785519 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00428: Parent: child process 8276 exited with status 3221225725 -- Restarting.
[Tue Mar 01 08:52:22.928687 2016] [ssl:warn] [pid 6748:tid 544] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 01 08:52:22.938712 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.16 configured -- resuming normal operations
[Tue Mar 01 08:52:22.938712 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Tue Mar 01 08:52:22.938712 2016] [core:notice] [pid 6748:tid 544] AH00094: Command line: 'C:\\laragon\\bin\\apache\\apache-2.4.17/bin/httpd -d C:/laragon/bin/apache/apache-2.4.17'
[Tue Mar 01 08:52:22.939695 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00418: Parent: Created child process 3672
[Tue Mar 01 08:52:23.214917 2016] [ssl:warn] [pid 3672:tid 532] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 01 08:52:23.296629 2016] [ssl:warn] [pid 3672:tid 532] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 01 08:52:23.306647 2016] [mpm_winnt:notice] [pid 3672:tid 532] AH00354: Child: Starting 64 worker threads.
[Tue Mar 01 08:52:24.159843 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00428: Parent: child process 3672 exited with status 3221225725 -- Restarting.
[Tue Mar 01 08:52:24.305896 2016] [ssl:warn] [pid 6748:tid 544] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 01 08:52:24.315916 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.16 configured -- resuming normal operations
[Tue Mar 01 08:52:24.315916 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Tue Mar 01 08:52:24.315916 2016] [core:notice] [pid 6748:tid 544] AH00094: Command line: 'C:\\laragon\\bin\\apache\\apache-2.4.17/bin/httpd -d C:/laragon/bin/apache/apache-2.4.17'
[Tue Mar 01 08:52:24.317905 2016] [mpm_winnt:notice] [pid 6748:tid 544] AH00418: Parent: Created child process 3600
[Tue Mar 01 08:52:24.580068 2016] [ssl:warn] [pid 3600:tid 552] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 01 08:52:24.666114 2016] [ssl:warn] [pid 3600:tid 552] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 01 08:52:24.675120 2016] [mpm_winnt:notice] [pid 3600:tid 552] AH00354: Child: Starting 64 worker threads.
This issue was finally resolved with a configuration change with Apache.
Add the following to the httpd.conf file:
<IfModule mpm_winnt_module>
ThreadStackSize 8888888
</IfModule>
Then Restart.
The problem is that windows has a smaller stack size by default than on the Linux/Unix systems. It took me a while to figure this out. Apache was silently crashing and I was getting no errors in my logs making it hard to trace.
The project I am working on has large regular expression calls and apparently this was a known trigger to cause this issue with apache on windows. If you look at apache documentation we can update the ThreadStackSize to a value closer to Unix/Linux systems of 8MB.
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#ThreadStackSize
I hope this helps anyone else developing on a windows system running apache as a local server. This was a major headache for some time.
php artisan serve use the PHP built on server (php -S localhost:80 -t public) to host the application.
Maybe the problem can be your apache configuration, so try this:
# define DOCROOT variable
define DOCROOT "C:/xampp/htdocs"
<Directory "${DOCROOT}">
AllowOverride All
Require all granted
</Directory>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/myproject/public/"
ServerName myproject.dev
</VirtualHost>
if the problem persists, try use Laragon and open it always as administrator.
Opening php error log may help you find the real problem. there was an error in my codes( using isset() directly on a function )

XAMPP on windows. Apache Shutdown Unexpectedly. Apache not starting

This is a common issue where the port is already in use by other applications. But I have corrected the issue from skype where it was using port 80 and 443. But I am not sure what else application might be preventing apache from running.
Here is the error log
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash or a shutdown by another method.
Press the Logs button to view error logs and check.
the Windows Event Viewer for more clues.
IF you need more help,
copy and post this entire log window in the forum
I have checked the error log file. It would be nice if anyone would kindly explain me the issue. I am new in using xampp
[Mon Jan 11 15:41:31.711045 2016] [ssl:warn] [pid 6344:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:33.542795 2016] [ssl:warn] [pid 6344:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:37.708844 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Mon Jan 11 15:41:37.709343 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Mon Jan 11 15:41:37.709343 2016] [core:notice] [pid 6344:tid 768] AH00094: Command line: 'D:\\xampp\\apache\\bin\\httpd.exe -d D:/xampp/apache'
[Mon Jan 11 15:41:37.963876 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00418: Parent: Created child process 5008
[Mon Jan 11 15:41:44.877326 2016] [ssl:warn] [pid 5008:tid 688] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:46.246564 2016] [ssl:warn] [pid 5008:tid 688] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:46.644423 2016] [mpm_winnt:notice] [pid 5008:tid 688] AH00354: Child: Starting 150 worker threads.
Well if you read the messages from Apache it is quite obvious you have tried to activate SSL and there is a problem with what you have done.
I think this part of the error message from XAMPP is most relevant a crash or a shutdown by another method.
Assuming you did this by uncommenting the Include conf/extra/httpd-ssl.conf line in httpd.conf then just comment that line out again and then try and fix your SSL config.
As suggested by the error message, look at the Windows Event Viewer. Apache writes there as well as its log file. SOmetimes the errors shown in Event Viewer are very descriptive and will identify a line number in a config file where the error exists
RE Your comment :
I had previous installation of xamp on my system. I had deleted the source folder of xampp and reinstalled xampp
Its possible that as you did not uninstall the old version of XAMPP something from the old version is still registered with your system and that is what is causing this odd situation.
I would uninstall this XAMPP (properly) and then check if you still have an Apache and/or MYSQL service registered, look using the services snapin.
If they are still there you can remove them like this (sc delete ) :-
Start command window using "Run as Administrator"
sc delete MYSQL
sc delete Apache
Make sure you have backed up any databases, although it may already be to late for this.
Then you can re-install the version of XAMPP you want to use.

Big WAMP issue with orange icon

I have a problem with WAMP becouse that dont want to start, icon stay orange all the time.
What I try:
I change Skype port to :88 (dont work)
I change port on httpd.conf:
Listen 12.34.56.78:8080listen 0.0.0.0:8080 Listen [::0]:
8080
Dont Work
I run at CMD: iisreset /stop and then try to run WAMP (dont work)
WHen I run Test port 80 I get message: Your port is not actually used.
I really dont know what is a problem here! Please help!
My apache error log say:
[Sat Dec 05 14:23:40.045710 2015] [mpm_winnt:notice] [pid 1936:tid 396] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations
[Sat Dec 05 14:23:40.061311 2015] [mpm_winnt:notice] [pid 1936:tid 396] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Sat Dec 05 14:23:40.061311 2015] [core:notice] [pid 1936:tid 396] AH00094: Command line: 'D:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d D:/wamp/bin/apache/apache2.4.9'
[Sat Dec 05 14:23:40.061311 2015] [mpm_winnt:notice] [pid 1936:tid 396] AH00418: Parent: Created child process 2748
[Sat Dec 05 14:23:40.716512 2015] [mpm_winnt:notice] [pid 2748:tid 328] AH00354: Child: Starting 64 worker threads.
[Sat Dec 05 23:24:18.242493 2015] [mpm_winnt:notice] [pid 1936:tid 396] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Dec 05 23:24:20.270497 2015] [mpm_winnt:notice] [pid 2748:tid 328] AH00364: Child: All worker threads have exited.
[Sat Dec 05 23:24:20.395297 2015] [mpm_winnt:notice] [pid 1936:tid 396] AH00430: Parent: Child process 2748 exited successfully.
It is not Apache that is the issue.
You probably have a database corruption.
Look at your mysql error log using the wampmanager menus like this
wampmanager -> MySQL -> MySQL Log
First things first.
Close WAMP and try netstat -a or use CurrPorts.
Check which process is using the same port that WAMP uses, 80? 443?
Kill the process with taskkill /T /F /IM name_of_process.exe
Try to run WAMP again.
Repeat the process and make sure that Apache is on port 80/443.

Categories