I have a problem with a Laravel application. When serving the app, does not matter if its with >>php artisan serve<< or Apache, the application works at first, but then breaks with "The connection was reset". I looked at the apache logs, path is /var/log/apache2/error.log, there i see:
AH00169: caught SIGTERM, shutting down
AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
AH00094: Command line: '/usr/sbin/apache2'
AH00171: Graceful restart requested, doing restart
php artisan serve log.:
[Fri Jun 11 00:34:36 2021] 127.0.0.1:38974 Accepted
[Fri Jun 11 00:34:36 2021] 127.0.0.1:38974 Closing
Environment modified. Restarting server...
[Fri Jun 11 00:34:36 2021] PHP 7.4.3 Development Server (http://127.0.0.1:8000) started
I did edit php.ini, disabled opcache as so opcache.enable=0.
Also added below code at the start of .htaccess
php_flag xcache.cacher Off
php_flag xcache.size 0
php_flag xcache.stat Off
Any advice on where to get additional logs or what are possible causes. Thanks
i had the same problem.
try adding php_flag opcache.enable Off in your .htaccess in the public directory (like Alberto said in the comments)
Related
I need Xampp for Windows 32 bit with a php version of at least 7.4. I can only find a php version 7.3 which is too low. So I need to upgrade it.
I downloaded vc15 x86 threadsafe/zip from, php.net. I extracted it. Renamed xampp\php to xammp\php-old. I then copied php.ini-development to php.ini and made all the changes to php.ini as per this tutorial https://www.youtube.com/watch?v=ir_ZewB_PHY
I restarted Xampp but its giving the error message: Error: Apache shut down unexpectedly. This may be due to a blocked port, missing dependencies..."
I dont have Skype/ Team Viewer or Anydesk open.
I changed the port settings of the httpd.conf File to listen to port 8080 instead of port 80. In http-ssl.conf I changed listen 443 to listen 4433.
I restarted Xampp but I'm still having errors. The Apache (error.log) reflects there errors.
[Wed Aug 24 12:39:53.747228 2022] [ssl:warn] [pid 4220:tid 460] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Aug 24 12:39:53.922456 2022] [core:warn] [pid 4220:tid 460] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Aug 24 12:39:53.922456 2022] [ssl:warn] [pid 4220:tid 460] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
[Wed Aug 24 12:39:53.938089 2022] [:emerg] [pid 4220:tid 460] AH00020: Configuration Failed, exiting
I really dont know how to solve this and support will be greatly appreciated. My os is Windows 10 32 bit. I was told my laptop cant be upgraded to 64 bit.
Many thanks in advance.
Edit 24 August 2022 !7h30 Johannesburg
I checked PHP module lines in my httpd-xamp.conf is correct.
LoadFile "C:/xampp/php/php7ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
`LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"
I ran httpd.exe -t from the windows command prompt it it shows that the syntax is OK.
I ran httpd.exe -v and it shows Server version: Apache/2.4.38 (Win32)
I am having trouble with apache2 error.log. The 500 errors are not appearing there (/var/log/apache2/error.log), I am just getting these lines every time I restart the apache2 service :
[Tue May 26 10:19:33.931998 2020] [mpm_prefork:notice] [pid 30119] AH00171: Graceful restart requested, doing restart
[Tue May 26 10:19:33.947081 2020] [so:warn] [pid 30119] AH01574: module ssl_module is already loaded, skipping
[Tue May 26 10:19:33.968226 2020] [mpm_prefork:notice] [pid 30119] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u configured -- resuming normal operations
[Tue May 26 10:19:33.968246 2020] [core:notice] [pid 30119] AH00094: Command line: '/usr/sbin/apache2'
I put error_reporting = E_ALL, display_errors = On, display_startup_errors = On, log_errors = On in the /etc/php/7.4/apache2/php.ini AND /etc/php/7.4/cli/php.ini.
I don't even get the errors on the browser, I am just receiving a message in the inspector "500 Internal Servor Error".
What else should I configure to make them appear in the error.log?
Ok, I missed one thing, such the biggest thing.
I had to change the LogLevel from warn to debug in apache2.conf file (/etc/apache2/apache2.conf) and now it works !
I have a recent problem in Ampps Software on Windows 10, Apache stopping automatically if PHP version is 7.1 but if I change back PHP Version to 5.6 it's working fine
and here's the error log for Apache
<pre>
[Mon Oct 22 10:28:12.413768 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/5.6.31 configured -- resuming normal operations
[Mon Oct 22 10:28:12.413768 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 11:43:51
[Mon Oct 22 10:28:12.413768 2018] [core:notice] [pid 12484:tid 684] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Mon Oct 22 10:28:12.417758 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00418: Parent: Created child process 5924
[Mon Oct 22 10:28:13.307885 2018] [mpm_winnt:notice] [pid 5924:tid 740] AH00354: Child: Starting 64 worker threads.
[Mon Oct 22 10:28:45.068164 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/7.1.8 configured -- resuming normal operations
[Mon Oct 22 10:28:45.068164 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 11:43:51
[Mon Oct 22 10:28:45.068164 2018] [core:notice] [pid 9816:tid 700] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Mon Oct 22 10:28:45.070158 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00418: Parent: Created child process 15180
[Mon Oct 22 10:28:47.563384 2018] [mpm_winnt:crit] [pid 9816:tid 700] AH00419: master_main: create child process failed. Exiting.
</pre>
I didn't change anything or install anything new, and I reinstalled it many times and tried XAMPP it's working fine
Thank you.
Its solved by disabling Ioncube loader extension for me, Thanks for all replies
Try changing the php version used by AMPPS by following their guide here ->
http://www.ampps.com/wiki/How_to_change_php_version
In the AMPPS control panel, select options and then select change php version. The changed version should now be displayed in the control panel.
Try run httpd.exe with as administrator and it worked.
C:\Program Files (x86)\Ampps\apache\bin
I know this is 4 months old, but I have had significant problems with PHP on windows and today I got this problem fixed.
AMPPS - It won’t run PHP 7.1 with out changing the executables to run as administrator mode. Apache will terminate without an error. I believe this is because even if AMPPS is running in admin priviledges these are not granted to the php.exe when it is run. Go to the file location of php.exe, right click and click on properties, click the compatibility tab and select the check box for ‘run as administrator’. Do the same for the httpd.exe under apache->bin->httpd.exe. (Not sure if the httpd priviledge change matters but I did it and it worked.)
Run AMPPS and hopefully like me, your php/apache problems are gone.
i solved mine following steps below:
i switched PHP version to 5.6 which everything works normally,
then went to this URL:
http://localhost/ampps/index.php?
there i found some updates available
notification on top of the page below url bar on the page
if you see updates available for your php 7.0 7.1 ...
90% you will resolve this issue like mine
i tried update all available updates
then restart the ampps app
now working with PHP 7.1 great.
i hope it works for you as well.
A bit late but since i've been using Ampps for 5 years , i provide similar solutions for my common errors maybe someone find it useful .
If you changed Document Root path in "httpd.conf" , make sure that folder still exists.
If you see the logs about InnoDB files, follow the path and delete that dump files and logs.
If you got this error "master_main: create child process failed" in log files :
Change PHP version to 7.1 and Try this:
Open AMPPS panel --> PHP --> Configuration.
Search for the following line and comment it by adding ';' at the beginning of the line: zend_extension="{$path}\php-7.1\ioncube_loader_win_7.1.dll"
I am running XAMPP and have rebuilt my PHP server from the ground up, renamed the server from ServerV1 to ServerV2, and now attempting a basic POST request from Android volley, returns the error found within the Apache logs:
[Sat Dec 19 19:24:57.528601 2015] [core:notice] [pid 7956:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Dec 19 19:24:57.531601 2015] [mpm_winnt:notice] [pid 7956:tid 260] AH00418: Parent: Created child process 5784
[Sat Dec 19 19:24:58.047631 2015] [ssl:warn] [pid 5784:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Dec 19 19:24:58.290645 2015] [ssl:warn] [pid 5784:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Dec 19 19:24:58.325647 2015] [mpm_winnt:notice] [pid 5784:tid 272] AH00354: Child: Starting 150 worker threads.
I am not listening on any used ports:
I have research others simply running as an administrator in sources like: https://teamtreehouse.com/community/solved-xampp-apache-error and
XAMPP - Apache Error
Upon attempting that, it still does not work, where the only return from any POST is a 0.
NOTE: I have tested every action with google chromes POSTMAN and know my routes do work and return the proper JSON objects.
https://chrome.google.com/webstore/detail/postman-rest-client-short/mkhojklkhkdaghjjfdnphfphiaiohkef?hl=en
What steps can I take to alleviate this issue?
Try just by commenting Listen 443 (like #Listen 443)in httpd-ssl.conf file. it will Work 100%. Mine site it has work 100%.
Try this:
Open httpd-ssl.conf here:
C:\xampp\apache\conf\extra
Comment out the line and change it to localhost
#ServerName www.example.com:443
ServerName localhost
And of course restart your Apache
i know this is late but i've found the answer... Apparently you have to right click on the xampp-control.exe file and run it as administrator, and then probably it works perfectly now! that worked for me.
just shutdown that application which is using 443 port & retry. mine vmware workstation was using 443 port i just kill process tree of vmware & retried it works for me.
I faced this issue after copying my xampp folder from windows 7 to another installation of windows 10.
Have tried the solutions listed here, but none worked for me. I had no time to try other solutions so I just made a new installation from scratch
installing new xampp (7.3.16) works for me
This is possible due to DocumentRoot path have not set correctly.
I had the same issue, and I solved it. The reason for me was because port 8080 was in use. I found it by running "netstat -ab" in the command prompt in administrator mode. Then I changed the port (From both xampp config and httpd.conf) for something else and it worked.
I'm experiencing problems when running a specific PHP file; in the latest Firefox it keeps giving the error 'The connection was reset' (I've tried running the PHP file in a different browser - the latest Internet Explorer but get the same problem).
I've also tried completely uninstalling both XAMPP and Firefox (default browser) - then reinstalling them.
I have even tried clearing the cache in Firefox and also ran CCleaner.
I'm not sure what is causing this problem as when I run the exact PHP file on another machine (on Windows 7 - with XAMPP & latest Firefox) it works perfectly fine and it is not like the PHP file is fairly complex/resource intensive (it does not even call/use MySQL!)? :S
I have tried integrating some debug/error reporting code within the PHP file - but that does not produce/do anything, but I've noticed whenever the PHP file is ran; apache does create/update an 'error.log' file within the 'XAMPP/apache/logs' folder with the following errors:
[Tue May 28 07:31:18.158004 2013] [ssl:warn] [pid 2404:tid 328] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue May 28 07:31:18.283009 2013] [mpm_winnt:notice] [pid 2404:tid 328] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Tue May 28 07:31:18.283009 2013] [mpm_winnt:notice] [pid 2404:tid 328] AH00456: Server built: Aug 18 2012 12:41:37
[Tue May 28 07:31:18.283009 2013] [core:notice] [pid 2404:tid 328] AH00094: Command line: 'c:\\users\\admin\\xampp\\apache\\bin\\httpd.exe -d C:/Users/Admin/XAMPP/apache'
[Tue May 28 07:31:18.283009 2013] [mpm_winnt:notice] [pid 2404:tid 328] AH00418: Parent: Created child process 4112
PS-1: I noticed it is referring to SSL within the above log - I'm not using SSL?.
PS-2: The XAMPP settings are exactly the same since the install (like I have not modified/updated php.ini or have added anything that does within the .htaccess file).
OS: Windows 8 (64 bit)
XAMPP: 1.8.1 (installed relatively to user 'Admin' => 'C:/Users/Admin/XAMPP')
Browsers: Latest - Firefox (default) and Internet Explorer, both have NO third-party extensions/add-ons installed/enabled
Security programs: Avira Free Antivirus, Malwarebytes Anti-Malware (PRO) and KeyScrambler (Personal)
I had what might be a similar problem a few years back, and, if I recall correctly, it was caused by using Notepad to write the script. Upon switching to another text editor the problem was fixed. As I recall, there were hidden characters inserted by Notepad (or whatever it was that I had used).