aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/install.php
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2017-02-20 15:51:31 +0800
committerAndreas Gohr <andi@splitbrain.org>2017-02-20 18:41:08 +0100
commit02bca5d42d808721c3ef1d5ac01621a4f7c18411 (patch)
treedfdd88e6c87e502e3a5722036ffa49f4994e705b /install.php
parenteedb5034dc515706179f8be4ddf25b49e5d067c4 (diff)
downloaddokuwiki-02bca5d42d808721c3ef1d5ac01621a4f7c18411.tar.gz
dokuwiki-02bca5d42d808721c3ef1d5ac01621a4f7c18411.zip
Fix calling undefined function random_int() when doing install.php
Otherwise the it will fail with the following error: 2017/02/20 14:34:57 [error] 16242#0: *59 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined function random_int() in /var/www/dokuwiki/inc/PassHash.class.php on line 630" while reading response header from upstream, client: 172.18.35.245, server: _, request: "POST /dokuwiki/install.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "10.5.234.170", referrer: "http://10.5.234.170/dokuwiki/install.php" Fixes #1852
Diffstat (limited to 'install.php')
-rw-r--r--install.php21
1 files changed, 2 insertions, 19 deletions
diff --git a/install.php b/install.php
index ac8705a59..69e44704b 100644
--- a/install.php
+++ b/install.php
@@ -9,7 +9,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/');
if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_INC.'conf/');
-require_once(DOKU_INC.'inc/PassHash.class.php');
+// load and initialize the core system
+require_once(DOKU_INC.'inc/init.php');
// check for error reporting override or set error reporting to sane values
if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); }
@@ -641,21 +642,3 @@ function print_errors(){
echo '</ul>';
}
}
-
-/**
- * remove magic quotes recursivly
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- *
- * @param array $array
- */
-function remove_magic_quotes(&$array) {
- foreach (array_keys($array) as $key) {
- if (is_array($array[$key])) {
- remove_magic_quotes($array[$key]);
- }else {
- $array[$key] = stripslashes($array[$key]);
- }
- }
-}
-