diff options
author | ozh <ozh@ozh.org> | 2013-09-05 18:36:47 +0400 |
---|---|---|
committer | ozh <ozh@ozh.org> | 2013-09-05 18:36:47 +0400 |
commit | e6748601549a70b8f160ea302590e0611fd618e4 (patch) | |
tree | 29952d7003adb1632d1a2b6c2503dc47d668b23f /admin | |
parent | 10e00cb0f585ffd1dcfa6048230a3af8b0a27812 (diff) |
Safer DB version number, and debug feedback if failure on install
Related:
- https://github.com/YOURLS/YOURLS/issues/1479#issuecomment-23428747
- https://core.trac.wordpress.org/ticket/25228
Diffstat (limited to 'admin')
-rw-r--r-- | admin/install.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/admin/install.php b/admin/install.php index e0a65800..0567e3a2 100644 --- a/admin/install.php +++ b/admin/install.php @@ -4,16 +4,20 @@ define( 'YOURLS_INSTALLING', true ); require_once( dirname(dirname(__FILE__)).'/includes/load-yourls.php' ); require_once( YOURLS_INC.'/functions-install.php' ); -$error = array(); +$error = array(); $warning = array(); $success = array(); // Check pre-requisites -if ( !yourls_check_database_version() ) +if ( !yourls_check_database_version() ) { $error[] = yourls_s( '%s version is too old. Ask your server admin for an upgrade.', 'MySQL' ); + $ydb->debug_log[] = 'MySQL version: ' . yourls_get_database_version(); +} -if ( !yourls_check_php_version() ) +if ( !yourls_check_php_version() ) { $error[] = yourls_s( '%s version is too old. Ask your server admin for an upgrade.', 'PHP' ); + $ydb->debug_log[] = 'PHP version: ' . phpversion(); +} // Is YOURLS already installed ? if ( yourls_is_installed() ) { |