I am running WAMP 2.2, Apache 2.2.9 and PHP 5.4 on Windows 7 64 bit. I recently got a strange issue. After some time I am unable to view any static resource. The browser just loads forever. I tried to view individual images but all I see is loading bar. When I reboot windows this problem goes away for few minutes. Here is what I tried:
Changed Apache server name from localhost:8088 to 127.0.0.1:8088
Changed apache port
Added 127.0.0.1 localhost entry in c:\windows\system32\drivers\etc\hosts
Stopped all services/applications that I felt may cause the problem
I sniffed http packets and found all requests are in pending. I monitored httpd process and noticed many processes are in waiting chain. Please see following images:
How do I find out what's causing the apache processes to load forever?
Could you try writing the following lines in httpd.conf and restarting Apache?
AcceptFilter http none
AcceptFilter https none
These directives have something to do with Windows' socket API and HTTP protocol buffering. See http://httpd.apache.org/docs/2.4/mod/core.html
Related
Environment: Apache / Linux 7.7 / PHP 7.2.10 / Wordpress
I am getting a net::ERR_CONNECTION_RESET error in Wordpress when I try to upload a new image or create a new post or page. When trying to create a new post, the error repeats in the console as wordpress tries to save the draft. I have found similar questions posted but most seem to point to browser issue.
error ONLY occurs when I am using the domain
error does not occur when I am using the machine name
I have gone through multiple troubleshooting sessions with the firewall team, and they insist that the connection is getting reset at the server, not the firewall
domain is SSL
this happens in all browsers
error occurs even with a fresh install of wordpress - no plugins
we have a dev environment that IS working with the url, but test environment, which is supposed to be identical, is not working with url. The main difference in two environments is an additional firewall, but firewall team says there is nothing they can see on firewall that would cause this.
Here is the error:
POST https://[domain here]/wp-admin/async-upload.php net::ERR_CONNECTION_RESET
load-scripts.php?c=1&load[chunk_0]=jquery-core,utils,moxiejs,plupload,plupload-handlers,jquery-ui-core,jquery-ui-widget,jquery-ui-tabs,jquery-form&ver=5.5.1:formatted:7172
Below is a sample virtual host entry. I think this is ok but posting in case someone might see an issue.
<VirtualHost *:*>
DocumentRoot /apache/httpd/www/html/]folder]
ServerName [domain here]:443
RewriteEngine On
RewriteRule .* - [E=REQUEST_SCHEME:https]
</VirtualHost>
Any troubleshooting tips would be greatly appreciated. Thank you
Contact your web hosting company and ask them to increase your PHP memory limit.
Or you can increase by adding the below code in the wp-config.php file
define( 'WP_MEMORY_LIMIT', '256M' );
Or you can also increase it by adding the below code in .htaccess file
php_value memory_limit 256M
Or you can also increase it by adding the below code in web server's php.ini file
memory_limit = 256M
Did you have checked Apache's error_log and/or PHP-FPM log?
My net::ERR_CONNECTION_RESET issue occurred because WordPress spammed a lot of PHP notices and PHP-FPM killed the process with
FastCGI: too much stderr received from server /path-to-instance/php74-fpm", increase FCGI_SERVER_MAX_STDERR_LINE_LEN (1023) and rebuild or use "\\n" to terminate lines, referer: https://wordpress-instance/wordpress/wp-admin/themes.php
I've fixed it by simply putting a
error_reporting(E_ALL & ~E_NOTICE);
into the wp-config.php. Maybe you have some customization in your wp-config.php which enables or disables logging, based upon your domain name?
I have an online Ubuntu VPS (with Plesk already installed), I tried a very simple index.php script in the /var/www/html directory using the IP address of the server in the browser ex. 123.123.123.133/index.php, but the response was always (The requested URL /index.php was not found on this server.)
the script was:
<?php
phpinfo();
?>
I restarted apache2 many times and I tried many of the solutions in the stack overflow but none of them worked for me.
any help with this issue??
Check the directory where Plesk serves its files from. Is that really /var/www/html? I thought Plesk was using /var/www/vhosts/<domain_name>.
Plesk documentation
I used to work on localhost before and never had such issue, the issue was with Apache that was not starting so I went to my http.conf file and changed the port 80 to 8080 and from then I have to put the url present in the image. I just want to use the "localhost/projectname" which is not running at the moment.
Earlier today I tried installing the MyImouto image board software on my Apache server. I already have the full MediaWiki engine installed on port 80 (localhost/wiki/) and the MyImouto board installed in a virtual host on port 3000, running completely separate from the main web server.
After fiddling around a little, I made a mistake with a php-based upload on the main server and had to reinstall apache and php both, which I did, and upgraded to the latest versions (Apache 2.2.22 and PHP 5.4.0). I managed to get my setup up and running successfully, both with the port 3000 virtual host and without. And MediaWiki functions fine, except for one thing.
NOW when I type in http://localhost/wiki/index.php as I have always done in the past, something is redirecting it to http://localhost:3000/wiki/index.php/Main_Page and shifting it to the other virtual host, where there is no wiki at all. However http://localhost/wiki/index.php/Main_Page does work perfectly.
There's an .htaccess file in localhost:3000 which I renamed to something else, but that doesn't seem to do the trick. I also tried clearing the browser cache as well as running a session_destroy via php. It didn't fix it.
I even turned off the second virtual host in Apache's httpd.conf, but it still redirects me which tells me that it is something in the main webserver. I did not touch the MediaWiki configuration or code during this entire time.
I also attempted accessing http://localhost/phpMyAdmin and THAT redirected me to http://localhost:3000/phpMyAdmin/, as well as http://localhost/AdminTools which does the same type of thing. Httpd.conf now no longer has any references at all to the virtual host *:3000.
However, my main index (http://localhost/index.php) has the following header redirect, which successfully lets it work even when http://localhost is typed into the address bar.
header("Location: index.php?content=main");
I tried disabling expires_module and headers_module in Apache, thinking there might be some weird caching issue due to that now-renamed .htaccess file. That did not help either. In addition, I checked my hosts file and there is nothing odd in there, nor am I proxying through anything (this -is- localhost after all).
Would appreciate any help in figuring out what's causing this and how to fix it.
Windows XP SP3
Enabled Modules in Apache:
actions, alias, asis, auth_basic, authn_default, authn_file, authz_default, authz_groupfile, authz_host, authz_user, cgi, dir, env, expires, headers, include, isapi, log, mime, negotiation, rewrite, setenvif, php5
Enabled extensions in PHP:
curl, fileinfo, gd2, mbstring, exif, mysql, mysqli, openssl, pdo_mysql, sockets
I managed to figure it out. After fiddling a little bit with .htaccess and Rewrite Rules (none of which did anything), I took a look inside my httpd.conf file again and found that I had typo'd my port-80 Virtual Host:
<VirtualHost *:80>
ServerAdmin -myemail-#gmail.com
ServerName -blahblah-.no-ip.org:3000
DocumentRoot "C:/wwwroot/tfg"
<Directory "C:/wwwroot/tfg">
OptionsIndexes FollowSymLinks
AllowOverride All
Allow from all
Deny from 186
Deny from 187
</Directory>
</VirtualHost>
When in fact it should have been ServerName -blahblah-.no-ip.org:80.
Simple typos: always the ones that slip by the easiest.
The setup:
On a Mac OS X 10.5.8, with the original Apache 2.2, where the only change is to uncomment
LoadModule php5_module
In the _DocumentRoot_ dir, /Library/Webserver/Documents/, in a file named info.php, write:
<? php phpinfo(); ?>
The problem:
Request http://localhost/info.php and the response is the output from the function (i.e. PHP executed the file).
However, request from domain 127.0.0.1 or 192.168.1.x and the response is the content of the file, w/ a header of Content-Type application/x-httpd-php.
The file is always found via the request, so it's not a hosts mapping problem. However, it's treated as an executable only when the request is for domain localhost. There are no virtual hosts set up in the apache conf, so I figure the behaviour should be the same regardless of the domain.
Any idea how to remedy this so that I could use this server on my LAN?
Thanks.
Not sure if this is the problem, but do you have any allow/deny from all settings on your mod_php module's configuration? I'm not sure if it allows that or not.
The reason I ask is because today I wound up tracking down an issue with a preconfigured Apache instance where mod_proxy was set to only allow on requests from localhost. Switching it to allow requests from 10.* fixed the problem of another machine on the network correctly proxying.
Look at the virtual hosts section of the httpd.confg? Is there anything there that sets the PHP filetype? In either case AddHandler php5-script php should be somewhere in the .conf.