diff options
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 37eea7c0f..cf1cd1b50 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -578,3 +578,30 @@ function validateShortcutList($shortcuts) { } return $shortcuts_ok; } + +function errorMessage($errorTitle, $error = '') { + // Prevent empty <h2> tags by checking if error isn't empty first + if ('' !== $error) { + $error = htmlspecialchars($error, ENT_NOQUOTES, 'UTF-8'); + $error = "<h2>{$error}</h2>"; + } + $errorTitle = htmlspecialchars($errorTitle, ENT_NOQUOTES, 'UTF-8'); + return <<<MSG + <h1>{$errorTitle}</h1> + {$error} + <h2>Common problems</h2> + <p>A typical problem leading to this message is wrong file permissions in the <code>./FreshRSS/data/</code> folder so make sure the Web server can write there and in sub-directories.</p> + <h2>Common locations for additional logs</h2> + <p><strong>N.B.:</strong> Adapt names and paths according to your local setup.</p> + <ul> + <li>If using Docker: <code>docker logs -f freshrss</code></li> + <li>To check Web server logs on a Linux system using systemd: <code>journalctl -xeu apache2</code> + and if you are using php-fpm: <code>journalctl -xeu php-fpm</code></li> + <li>Otherwise, Web server logs are typically located in <code>/var/log/apache2/</code> or similar</li> + <li>System logs may also contain relevant information in <code>/var/log/syslog</code>, or if using systemd: <code>sudo journalctl -xe</code></li> + </ul> + <p>More logs can be generated by enabling <code>'environment' => 'development',</code> in <code>./FreshRSS/data/config.php</code></p> + <p>Running the feed update script (with the same user and PHP version as your Web server) might provide other hints, e.g.: + <code>sudo -u www-data /usr/bin/php ./FreshRSS/app/actualize_script.php</code></p> + MSG; +} |
