Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/YOURLS/YOURLS.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorozh <ozh@ozh.org>2013-09-05 18:36:47 +0400
committerozh <ozh@ozh.org>2013-09-05 18:36:47 +0400
commite6748601549a70b8f160ea302590e0611fd618e4 (patch)
tree29952d7003adb1632d1a2b6c2503dc47d668b23f /admin
parent10e00cb0f585ffd1dcfa6048230a3af8b0a27812 (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.php10
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() ) {