Laravel connection reset after any file changes - php

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 )

Related

I always received connection reset when trying to execute a test file with TCPDF library. Does this apache error log doing it?

Apache Error Log:
[Fri Dec 17 12:10:17.386441 2021] [mpm_winnt:notice] [pid 12996:tid 612] AH00455: Apache/2.4.51 (Win64) OpenSSL/1.1.1l PHP/8.0.12 configured -- resuming normal operations
[Fri Dec 17 12:10:17.386441 2021] [mpm_winnt:notice] [pid 12996:tid 612] AH00456: Apache Lounge VS16 Server built: Oct 7 2021 16:27:02
[Fri Dec 17 12:10:17.386441 2021] [core:notice] [pid 12996:tid 612] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Dec 17 12:10:17.399752 2021] [mpm_winnt:notice] [pid 12996:tid 612] AH00418: Parent: Created child process 18512
I added this:
#ThreadStackSize
<IfModule mpm_winnt_module>
ThreadStackSize 88888888
</IfModule>
at the very end of httpd.conf but the error is still the same. Thanks. I've been stuck here for almost 3 days now, the connection reset thing really is stubborn. I tried several resolve but neither of them solved the issue.
Add a proper SSL certificate. that should help. currently, you don't have an SSL certificate that doesn't match the domain name you are using.

500 Internal Server Error xampp codeignider and google adwords?

when i try to execute a module that need to use google adwords tha website don't do anything so i see in the inspect the element and say that have a 500 Internal Server Error, i search o sometimes say the is temporal error butt have two days with same error, so i read that maybe is xampp and permitions so i modificate the
httpd.conf, i change the ports i wirte the next code
<Directory />
AllowOverride All (also i tried with none)
Require all granted
</Directory>
i see the file hots in windows and set the 127.0.0.1 ....
i try to debug in app and i see that can pass in the next lines
$this->load->library('Google_adwords');
$objGoogleAdword = new Google_adwords();
I see the xampp php log
and see this error
[Wed Oct 11 13:22:14.132305 2017] [core:notice] [pid 1524:tid 576] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Wed Oct 11 13:22:14.135264 2017] [mpm_winnt:notice] [pid 1524:tid 576] AH00418: Parent: Created child process 8216
[Wed Oct 11 13:22:15.475520 2017] [ssl:warn] [pid 8216:tid 520] AH01909: www.example.com:444:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 11 13:22:15.747771 2017] [ssl:warn] [pid 8216:tid 520] AH01909: www.example.com:444:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 11 13:22:15.832788 2017] [mpm_winnt:notice] [pid 8216:tid 520] AH00354: Child: Starting 150 worker threads.
well i don't know why doen't works some idea?

How do I place SSL on a localhost using xampp?

I have created an SSL certificate, and imported it.
My Apache is working, but my localhost website is not showing https://. The site is up and running but only as http://.
I followed the steps shown here:
http://robsnotebook.com/xampp-ssl-encrypt-passwords
I am wondering if my problem is "One thing to keep in mind with this redirection is that if you have virtual hosts, you need to place the redirection code (with the RewriteCond and RewriteRule) inside of your virtual host declarations, otherwise the redirection won’t work"? Not sure what it is or how to do it.
This video is the same as above. I followed it and debugged the code, which is why my Apache is running. For me the issue was with the Code, not Ports being blocked as many other people had problems with, especially because of Skype, etc.
https://www.youtube.com/watch?v=PQZ8wzV9VU8
Hopefully, this makes sense, if you have any questions I'll do my best to answer them. Any advice, tips or links would be useful. Thank you.
I haven't found away how to correct the "match," if this is the problem. Did I enter something incorrectly when creating the SSL certificate?. Error Log is as follows:
[Fri May 19 16:19:14.955930 2017] [ssl:warn] [pid 6812:tid 252]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:15.015933 2017] [core:warn] [pid 6812:tid 252]
AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten --
Unclean shutdown of previous Apache run?
[Fri May 19 16:19:15.218945 2017] [ssl:warn] [pid 6812:tid 252]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:15.271948 2017] [mpm_winnt:notice] [pid 6812:tid
252] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.21
configured -- resuming normal operations
[Fri May 19 16:19:15.271948 2017] [mpm_winnt:notice] [pid 6812:tid
252] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Fri May 19 16:19:15.271948 2017] [core:notice] [pid 6812:tid 252]
AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d
C:/xampp/apache'
[Fri May 19 16:19:15.274948 2017] [mpm_winnt:notice] [pid 6812:tid
252] AH00418: Parent: Created child process 5588
[Fri May 19 16:19:16.048993 2017] [ssl:warn] [pid 5588:tid 264]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:16.473017 2017] [ssl:warn] [pid 5588:tid 264]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:16.542021 2017] [mpm_winnt:notice] [pid 5588:tid
264] AH00354: Child: Starting 150 worker threads.

httpd on AWS suddenly stopped working after I set an A record

So today, I was trying to do two things: get rid of extensions like .php in my domains, and use an A record to point a subdomain I have to the IP of the server on which the site I am developing is running on.
I did both at the same time, then restarted httpd, but when it came back up - I couldn't access the website at all. httpd claims it is running fine. I decided to remove the rewrite rules to see if I had somehow introduced a bug into httpd.conf, but after another restart, it still didn't serve webpages. I tried restarting the server instance - no luck again.
I hadn't changed anything else and the server was serving webpages fine before this. I am trying to access the page using just the IP address, so I don't think the A record could have made a difference either.
The output in httpd's error log is the following:
[Wed Aug 10 16:39:44.263098 2016] [suexec:notice] [pid 1843] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Aug 10 16:39:44.308130 2016] [auth_digest:notice] [pid 1843] AH01757: generating secret for digest authentication ...
[Wed Aug 10 16:39:44.308701 2016] [lbmethod_heartbeat:notice] [pid 1843] AH02282: No slotmem from mod_heartmonitor
[Wed Aug 10 16:39:44.662464 2016] [mpm_prefork:notice] [pid 1843] AH00163: Apache/2.4.18 (Amazon) configured -- resuming normal operations
[Wed Aug 10 16:39:44.662486 2016] [core:notice] [pid 1843] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Aug 10 16:40:02.960708 2016] [mpm_prefork:notice] [pid 1843] AH00171: Graceful restart requested, doing restart
[Wed Aug 10 16:40:03.042697 2016] [auth_digest:notice] [pid 1843] AH01757: generating secret for digest authentication ...
[Wed Aug 10 16:40:03.043290 2016] [lbmethod_heartbeat:notice] [pid 1843] AH02282: No slotmem from mod_heartmonitor
[Wed Aug 10 16:40:03.105719 2016] [mpm_prefork:notice] [pid 1843] AH00163: Apache/2.4.18 (Amazon) configured -- resuming normal operations
[Wed Aug 10 16:40:03.105729 2016] [core:notice] [pid 1843] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Aug 10 16:40:03.105750 2016] [mpm_prefork:warn] [pid 1843] AH00167: long lost child came home! (pid 1968)
Any help?
Edit: I used dig on the domain that I pointed with the A-record, and it resolves to the IP (which currently times out but is otherwise the right IP). So it seemingly isn't an issue there, either. I can connect to the server with SSH fine.

ERR_CONNECTION_RESET error on local machine running xampp with php7

I recently updated my xampp installation to current version with php7, however every thing seem to work fine until i tried testing out a laravel 5.2 project.
Accessing a page that doesn't make a database connection has no issue, but trying accessing a route that makes a db query i get the error "ERR_CONNECTION_RESET".
The error log doesn't really show any concrete errors that cause this.
[Fri Apr 22 20:50:41.365814 2016] [ssl:warn] [pid 2856:tid 436] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 22 20:50:41.422857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.5 configured -- resuming normal operations
[Fri Apr 22 20:50:41.422857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Fri Apr 22 20:50:41.422857 2016] [core:notice] [pid 2856:tid 436] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Apr 22 20:50:41.427857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00418: Parent: Created child process 7024
I have gone through php.ini configuration several times. What could cause this problem?

Categories