[ZBX-6874] Disabling requested database PHP extention results in unfriendly fatal error Created: 2013 Aug 09  Updated: 2022 Sep 09  Resolved: 2022 Sep 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 2.1.2
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Ivo Kurzemnieks Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: configuration, database, installation, setup
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-9898 blank page if config file present but... Closed

 Description   

As of ZBX-6020 in ZABBIX 2.2 all mysql functions will be replaced with mysqli. By default mysqli functions in PHP configuration are disabled. Since we're suppressing connection errors with @ to produce friendly user errors in setup, due a disabled database extention, user will get a white page. Removing @ from mysqli_connect, page would show a fatal error, that PHP can't find such function. Same thing happens in not only for index.php but for setup.php as well. Setup tries to initialize database before we even see the installation steps.

There are few options:

  • Extend function checkPhpDatabases to support requesting a specific database type and in case one of required functions does not exist, throw an error;
  • or use extention_loaded() before calling database functions;
  • some other and/or better solution.

Small discussion about this fix is required.



 Comments   
Comment by Vitalij Romanovskij (Inactive) [ 2013 Sep 25 ]

The problem exists if you have configuration file and don't have required PHP database extension.

Comment by Ivo Kurzemnieks [ 2022 Sep 06 ]

Looks like this has been fixed in 3.0
Possible in ZBX-9898
Closing the issue as duplicate.

Generated at Thu May 02 00:45:54 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.