diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-03 02:35:13 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-03 02:35:13 -0500 |
commit | 675fd21cf145ff882463d604fe9e4bf9defa256e (patch) | |
tree | 394a8fbc073b1e7bda9de012e88b627247d20e58 /templates | |
parent | ab1856901367eab3ee390047f7829bdabfd2410d (diff) | |
download | ampache-675fd21cf145ff882463d604fe9e4bf9defa256e.tar.gz ampache-675fd21cf145ff882463d604fe9e4bf9defa256e.tar.bz2 ampache-675fd21cf145ff882463d604fe9e4bf9defa256e.zip |
Add a check that makes sure PDO is available
Calling an unavailable class is a fatal error, so people without PDO
were left with a fairly useless blank screen and no indicator of what
was wrong. Let's be a bit more user-friendly.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_test.inc.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/templates/show_test.inc.php b/templates/show_test.inc.php index fcd6c703..6a2b2b2b 100644 --- a/templates/show_test.inc.php +++ b/templates/show_test.inc.php @@ -62,6 +62,16 @@ </td> </tr> <tr> + <td valign="top"><?php echo T_('PHP PDO'); ?></td> + <td valign="top">[ + <?php echo debug_result('', check_pdo()); ?> + ] + </td> + <td> + <?php echo T_('This tests whether the PDO extension and the MySQL driver for PDO are installed. These are required by Ampache.'); ?> + </td> +</tr> +<tr> <td valign="top"><?php echo T_('PHP session extension'); ?></td> <td valign="top">[ <?php @@ -170,7 +180,7 @@ <td valign="top"><?php echo T_("Database connection"); ?></td> <td valign="top">[ <?php - if (!Dba::check_database()) { + if (!check_pdo() || !Dba::check_database()) { echo debug_result('',false); } else { @@ -187,7 +197,7 @@ <td valign="top"><?php echo T_('Database tables'); ?></td> <td valign="top">[ <?php - $db_inserted = Dba::check_database_inserted(); + $db_inserted = check_pdo() ? Dba::check_database_inserted() : false; if (!$db_inserted) { echo debug_result('',false); } |