I have recently installed the phpbb forum on my website, but when i configured all stuff with ANY problems, an error appear when trying to post somethig... The error has 500 code, so, to solve this, we can only check Apache logs.
My apache2 logs are the following:
Here is my config file:[Sun Mar 11 10:25:24.566311 2018] [php7:error] [pid 32391] [client xxx.xxx.xx.xx:xxxx] PHP Fatal error: Uncaught TypeError: Argument 1 passed to s9e\\TextFormatter\\Configurator\\TemplateNormalizations\\AbstractNormalization::normalize() must be an instance of DOMElement, null given, called in /var/www/example/forum/vendor/s9e/text-formatter/src/Configurator.php on line 7167 and defined in /var/www/example/forum/vendor/s9e/text-formatter/src/Configurator.php:4453\nStack trace:\n#0 /var/www/example/forum/vendor/s9e/text-formatter/src/Configurator.php(7167): s9e\\TextFormatter\\Configurator\\TemplateNormalizations\\AbstractNormalization->normalize(NULL)\n#1 /var/www/example/forum/phpbb/textformatter/s9e/factory.php(514): s9e\\TextFormatter\\Configurator\\TemplateNormalizer->normalizeTemplate('<blockquote><xs...')\n#2 /var/www/example/forum/phpbb/textformatter/s9e/factory.php(273): phpbb\\textformatter\\s9e\\factory->get_default_bbcodes(Object(s9e\\TextFormatter\\Configurator))\n#3 /var/www/example/example/phpbb/textformatter/s9e/factory.php(382): phpbb\\textformatter\\s9e\\factory->get_configurator()\n#4 /var/www/example/forum/phpbb/textformatter/s9e/parser.php(47): in /var/www/example/forum/vendor/s9e/text-formatter/src/Configurator.php on line 4453, referer: https://www.example.es/posting.php?mode=reply&f=2&t=1
Code: Select all
<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = '127.0.0.1';
$dbport = '';
$dbname = 'example';
$dbuser = 'root';
$dbpasswd = 'mypassword';
$table_prefix = 'phpbb_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';
@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('DEBUG_CONTAINER', true);
- File: /includes/sessions.php (Line_284)
FromTo:Code: Select all
$ip = htmlspecialchars_decode($request->server('REMOTE_ADDR'));
Explanation:Code: Select all
$ip = htmlspecialchars_decode($request->server('HTTP_X_FORWARDED_FOR'));
I use apache reverse proxy and cloudflare. I noticed that the forum users ip were wrong, so i changed this simple variables.