I am getting a 502 bad gateway error when clicking on topics. This only happens when I am logged in as admin. The site works fine otherwise. I get this in debug log:
[14-Sep-2018 00:47:30 UTC] PHP Notice: Undefined index: SERVER_PORT in /home/content/a2pewpnaspod04_data01/88/41242588/html/wp-content/plugins/wpforo/wpf-includes/functions.php on line 257
[14-Sep-2018 00:47:30 UTC] PHP Notice: Undefined index: SERVER_PORT in /home/content/a2pewpnaspod04_data01/88/41242588/html/wp-content/plugins/wpforo/wpf-includes/functions.php on line 257
[14-Sep-2018 00:47:30 UTC] PHP Notice: Undefined index: HTTP_HOST in /home/content/a2pewpnaspod04_data01/88/41242588/html/wp-content/plugins/wpforo/wpf-includes/functions.php on line 258
The lines from functions.php:
257 $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
258 $url = $protocol . "://" . $_SERVER['HTTP_HOST'] . ($with_port ? $port : '') . $_SERVER['REQUEST_URI'];
I'm on godaddy managed WP hosting.
That's very strange that your server doesn't have $_SERVER["SERVER_PORT"] variable. This is a general variable for all servers. Please let me know what serer you use and what is your PHP version. Your server maybe a non-standard or the versions are very old. Here are wpForo server requirements:
https://wpforo.com/docs/root/wpforo-installation/server-requirements/
Hi jasonb,
We couldn't find such a warning on our test websites. Could you please send admin login details to support[at]gvectors.com email address to allow us to debug it?
Hi,
I've done the following:
added recommended server settings:
memory_limit = 256M
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 180
max_input_vars = 10000
I had a wp technician working on it and he determined that is was a server issue, since he was not getting the error by staging. I moved from godaddy to siteground, though the issue still persists, though I was going make the move anyway.
Also recreated .htaccess, but that did not help.
I also had some residual user settings from bbpress that I had installed previously, and I followed their instructions for removing that, it removed the keymaster role from my username but did not resolve the error page issue.
502 bad gateway error when clicking on topics.
I had many of these during development and testing of few sites at the same time.
In my case it was a simple router problem since I was connected via NAT protocol.
A reboot of the modem/router and sometimes disconnect/connect the ADSL line solve the problem for few days until the next boot.
Clearing browser cache helps too.
First time when I called for support [bluehost] they found nothing wrong at their end and they gave that modem/router solution.