我刚刚安装了LDAP和PHPLDAPADMIN.Its,工作正常,但当我想创建新的入口页面时,只需刷新,没有任何东西,happend.There有几个错误:
无法识别的错误代码: 8192:不推荐使用函数create_function()
谢谢。
发布于 2019-05-15 18:26:29
试一下这段代码运行得很好。
第54行的/usr/share/phpldapadmin/lib/functions.php
将第54行更改为
function my_autoload($className) {将此代码添加到第777行
spl_autoload_register("my_autoload"); 将1083行更改为
$CACHE[$sortby] = __create_function('$a, $b',$code);将下面的代码添加到1091行
function __create_function($arg, $body) {
static $cache = array();
static $maxCacheSize = 64;
static $sorter;
if ($sorter === NULL) {
$sorter = function($a, $b) {
if ($a->hits == $b->hits) {
return 0;
}
return ($a->hits < $b->hits) ? 1 : -1;
};
}
$crc = crc32($arg . "\\x00" . $body);
if (isset($cache[$crc])) {
++$cache[$crc][1];
return $cache[$crc][0];
}
if (sizeof($cache) >= $maxCacheSize) {
uasort($cache, $sorter);
array_pop($cache);
}
$cache[$crc] = array($cb = eval('return
function('.$arg.'){'.$body.'};'), 0);
return $cb;
}最后,重新启动apache服务器sudo service apache2 restart。
发布于 2018-09-20 17:43:04
PhpLdapAdmin使用了一些在PHP7.2中被弃用的函数。看看这个修复:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890127
https://stackoverflow.com/questions/50698477
复制相似问题