bwdutton / gallery3

The simplest, most intuitive way to host your photos on your website.
https://galleryrevival.com/
GNU General Public License v2.0
131 stars 26 forks source link

Feature req: error message from installer if mbstring not installed #20

Open JamieFlournoy opened 2 years ago

JamieFlournoy commented 2 years ago

I'm upgrading an old, non-working Gallery 2 installation to Gallery 3 (3.1.5).

If certain php extensions are missing, the installer (at /index.php) will render an error document listing what's missing. See attached screenshot below.

This doesn't work for mbstring. If mbstring is missing, /index.php returns a 500 server error header with no document, and nothing is logged to the error log. It's not easy to figure out what's causing the error since there are no clues as to what's wrong.

(I believe that since the index.php document has error_reporting(0); and ini_set("display_errors", false); in it, that's why I was seeing an empty error page and nothing in the Apache error log. Disabling these lines made an error message appear that clearly said that mbstring was missing.)

The feature request is: detect whether mbstring is missing and print some kind of error message saying so, ideally in the same style as the screenshot. If that's not easy, just putting something in the error log saying "The mbstring PHP extension is not installed and it is necessary so please install it now" would be helpful.


Screen Shot of nice error message