Give proper error message when extensions are missing #275

Open
opened 2019-11-25 12:43:47 +00:00 by matthijskooijman · 0 comments
matthijskooijman commented 2019-11-25 12:43:47 +00:00 (Migrated from github.com)

When the DOM extension is missing, Hypha errors out with a fairly cryptic error message about the DomElement class not being found. The solution is to install the DOM extension (or php-xml Debian package).

Maybe we should check for the extensions we need (e.g. using https://www.php.net/manual/en/function.extension-loaded.php) and then show a proper error message when one is missing?

Which extensions do we need? I think:

  • dom (in the php-xml package)
  • mbstring (for utf-8 handling, in the php-mbstring package)
  • json (for json_encode(), in the php-json package)
  • session (probably included by default, but maybe check for completeness)
When the DOM extension is missing, Hypha errors out with a fairly cryptic error message about the `DomElement` class not being found. The solution is to install the DOM extension (or `php-xml` Debian package). Maybe we should check for the extensions we need (e.g. using [https://www.php.net/manual/en/function.extension-loaded.php](extension-loaded())) and then show a proper error message when one is missing? Which extensions do we need? I think: - dom (in the `php-xml` package) - mbstring (for `utf-8` handling, in the `php-mbstring` package) - json (for `json_encode()`, in the `php-json` package) - session (probably included by default, but maybe check for completeness)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha#275
No description provided.