ExBB Community » Разное » О жизни » Директивы нормальной работы ExBB 1.1.3 и PHP 8.x

Страниц (1): [1]
 

1. sqrt - 29 октября 2023 — 17:37 - перейти к сообщению
1) На индексной и других страницах, а также в Админке: setmodule.php?module=memcontrol и setsmiles.php:
CODE:
Warning: Resource ID#22 used as offset, casting to integer (22) in W:\domains\bbb.ru\forums\include\fm.class.php on line 662

Warning: Resource ID#20 used as offset, casting to integer (20) in W:\domains\bbb.ru\forums\include\fm.class.php on line 634

Warning: Resource ID#19 used as offset, casting to integer (19) in W:\domains\bbb.ru\forums\include\fm.class.php on line 662

Warning: Resource ID#27 used as offset, casting to integer (27) in W:\domains\bbb.ru\forums\include\fm.class.php on line 634

Warning: Resource ID#25 used as offset, casting to integer (25) in W:\domains\bbb.ru\forums\include\fm.class.php on line 634

Warning: Resource ID#30 used as offset, casting to integer (30) in W:\domains\bbb.ru\forums\include\fm.class.php on line 662

Deprecated: Function strftime() is deprecated in W:\domains\bbb.ru\forums\include\fm.class.php on line 275

Deprecated: Function strftime() is deprecated in W:\domains\bbb.ru\forums\include\fm.class.php on line 276

Deprecated: Function strftime() is deprecated in W:\domains\bbb.ru\forums\include\fm.class.php on line 277

Открыть: include/fm.class.php
Найти:
CODE:
function _DateFormat($time) {
$rus_m = array( '01' => 'Января', '02' => 'Февраля', '03' => 'Марта', '04' => 'Апреля', '05' => 'Мая', '06' => 'Июня', '07' => 'Июля', '08' => 'Августа', '09' => 'Сентября', '10' => 'Октября', '11' => 'Ноября', '12' => 'Декабря' );
$currDay = strftime("%d", $time);
$currMonth = strftime("%m", $time);
$currYear = strftime("%Y", $time);
$tm = date("H:i:s", $time);

return $currDay . ' ' . $rus_m[$currMonth] . ', ' . $currYear . ' - ' . $tm;
}

Заменить на:
CODE:
function _DateFormat($time) {
$rus_m = array( '01' => 'Января', '02' => 'Февраля', '03' => 'Марта', '04' => 'Апреля', '05' => 'Мая', '06' => 'Июня', '07' => 'Июля', '08' => 'Августа', '09' => 'Сентября', '10' => 'Октября', '11' => 'Ноября', '12' => 'Декабря' );
$currDay = date('d', $time);
$currMonth = date('m', $time);
$currYear = date('Y', $time);
$tm = date("H:i:s", $time);

return $currDay . ' ' . $rus_m[$currMonth] . ', ' . $currYear . ' - ' . $tm;
}

Найти:
CODE:
function _Write(&$fp, $arr) {
fseek($fp, 0);
ftruncate($fp, 0);
fwrite($fp, '<?die;?>' . serialize($arr));
fflush($fp);
flock($fp, 3);
fclose($fp);
clearstatcache();
unset( $arr, $this->_FilePointers[$fp] );

return;
}

Заменить на:
CODE:
function _Write(&$fp, $arr) {
fseek($fp, 0);
ftruncate($fp, 0);
fwrite($fp, '<?die;?>' . serialize($arr));
fflush($fp);
flock($fp, 3);
fclose($fp);
clearstatcache();
unset( $arr, $this->_FilePointers[(int)$fp] );

return;
}

Найти:
CODE:
function _Fclose($fp) {
fclose($fp);
unset( $this->_FilePointers[$fp] );
}

Заменить на:
CODE:
function _Fclose($fp) {
fclose($fp);
unset( $this->_FilePointers[(int)$fp]);
}


2) На главной станице АЦ admincenter.php в случае, если не включена функция exec() на хостинге:
CODE:
Fatal error: Uncaught Error: Call to undefined function exec() in /admincenter.php:54 Stack trace: #0 {main} thrown in /admincenter.php on line 54


Найти и удалить (спорное решение, или надо включить функцию через ПУ хостера или не будет отображаться "нагрузка сервера"Подмигивание:
CODE:
$loaded = @exec('uptime');
if (preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/i', $loaded, $srv_load)) {
$server_load = $srv_load[1] . ' ' . $srv_load[2] . ' ' . $srv_load[3];
}
2. sqrt - 2 ноября 2023 — 08:43 - перейти к сообщению
Открыть include/fm_class.php
Найти:
CODE:
function _JoinDate($time) {
$months = array( '00' => '', '01' => 'Янв.', '02' => 'Февр.', '03' => 'Март', '04' => 'Апр.', '05' => 'Май', '06' => 'Июнь', '07' => 'Июль', '08' => 'Авг.', '09' => 'Сент.', '10' => 'Окт.', '11' => 'Нояб.', '12' => 'Дек.' );
$currMonth = strftime("%m", $time);
$currYear = strftime("%Y", $time);

return $months["$currMonth"] . " " . $currYear;
}

Заменить на:
CODE:
function _JoinDate($time) {
$months = array( '00' => '', '01' => 'Янв.', '02' => 'Февр.', '03' => 'Март', '04' => 'Апр.', '05' => 'Май', '06' => 'Июнь', '07' => 'Июль', '08' => 'Авг.', '09' => 'Сент.', '10' => 'Окт.', '11' => 'Нояб.', '12' => 'Дек.' );
$currMonth = date('m', $time);
$currYear = date('Y', $time);

return $months["$currMonth"] . " " . $currYear;
}

Яндекс.Метрика   

Powered by ExBB
[Script Execution time: 0.0112]     [ ]