When Hypha fails to start, the current master release only return HTTP status 500. It is left to the browser to render the page.
It is handier to (when in debug mode) to print the error and provide a more meaningful error screen. This can be accomplished by extending index.php:
before session_start() and:
}
catch (Throwable $e)
{
http_response_code(500);
error_log((string)$e);
echo '<h1>Hypha down</h1>';
echo '<p>The requested page can not be loaded.</p>';
echo '<p>Path: ' . $_SERVER['PHP_SELF'] ?? '' . '</p>';
echo '<p>IP Address: ' . $_SERVER['HTTP_X_FORWARDED_FOR'] ?? '' . '</p>';
echo '<p>User Agent: ' . $_SERVER['HTTP_USER_AGENT'] ?? '' . '</p>';
echo '<p>Error: <pre>' . $e . '</pre></p>';
}
after exit;.
When Hypha fails to start, the current master release only return HTTP status 500. It is left to the browser to render the page.
It is handier to (when in debug mode) to print the error and provide a more meaningful error screen. This can be accomplished by extending
index.php:try {before
session_start()and:after
exit;.