Alik2, в файле phpbb3/phpBB/config/cron.yml
Весь код заменить на
Код: Выделить всё
services:
cron.manager:
class: phpbb\cron\manager
arguments:
- @cron.task_collection
- %core.root_path%
- %core.php_ext%
cron.lock_db:
class: phpbb\lock\db
arguments:
- cron_lock
- @config
- @dbal.conn
# ----- Cron tasks -----
cron.task_collection:
class: phpbb\di\service_collection
arguments:
- @service_container
tags:
- { name: service_collection, tag: cron.task }
cron.task.core.prune_all_forums:
class: phpbb\cron\task\core\prune_all_forums
arguments:
- %core.root_path%
- %core.php_ext%
- @config
- @dbal.conn
calls:
- [set_name, [cron.task.core.prune_all_forums]]
tags:
- { name: cron.task }
cron.task.core.prune_forum:
class: phpbb\cron\task\core\prune_forum
arguments:
- %core.root_path%
- %core.php_ext%
- @config
- @dbal.conn
calls:
- [set_name, [cron.task.core.prune_forum]]
tags:
- { name: cron.task }
cron.task.core.prune_shadow_topics:
class: phpbb\cron\task\core\prune_shadow_topics
arguments:
- %core.root_path%
- %core.php_ext%
- @config
- @dbal.conn
- @log
- @user
calls:
- [set_name, [cron.task.core.prune_shadow_topics]]
tags:
- { name: cron.task }
cron.task.core.prune_notifications:
class: phpbb\cron\task\core\prune_notifications
arguments:
- @config
- @notification_manager
calls:
- [set_name, [cron.task.core.prune_notifications]]
tags:
- { name: cron.task }
cron.task.core.queue:
class: phpbb\cron\task\core\queue
arguments:
- %core.root_path%
- %core.php_ext%
- @config
calls:
- [set_name, [cron.task.core.queue]]
tags:
- { name: cron.task }
cron.task.core.tidy_cache:
class: phpbb\cron\task\core\tidy_cache
arguments:
- @config
- @cache.driver
calls:
- [set_name, [cron.task.core.tidy_cache]]
tags:
- { name: cron.task }
cron.task.core.tidy_database:
class: phpbb\cron\task\core\tidy_database
arguments:
- %core.root_path%
- %core.php_ext%
- @config
calls:
- [set_name, [cron.task.core.tidy_database]]
tags:
- { name: cron.task }
cron.task.core.tidy_plupload:
class: phpbb\cron\task\core\tidy_plupload
arguments:
- %core.root_path%
- @config
calls:
- [set_name, [cron.task.core.tidy_plupload]]
tags:
- { name: cron.task }
cron.task.core.tidy_search:
class: phpbb\cron\task\core\tidy_search
arguments:
- %core.root_path%
- %core.php_ext%
- @auth
- @config
- @dbal.conn
- @user
- @dispatcher
calls:
- [set_name, [cron.task.core.tidy_search]]
tags:
- { name: cron.task }
cron.task.core.tidy_sessions:
class: phpbb\cron\task\core\tidy_sessions
arguments:
- @config
- @user
calls:
- [set_name, [cron.task.core.tidy_sessions]]
tags:
- { name: cron.task }
cron.task.core.tidy_warnings:
class: phpbb\cron\task\core\tidy_warnings
arguments:
- %core.root_path%
- %core.php_ext%
- @config
calls:
- [set_name, [cron.task.core.tidy_warnings]]
tags:
- { name: cron.task }
Открыть phpBB/phpbb/cron/task/core/tidy_search.php и заменить содержимое файла на
Код: Выделить всё
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\cron\task\core;
/**
* Tidy search cron task.
*
* Will only run when the currently selected search backend supports tidying.
*/
class tidy_search extends \phpbb\cron\task\base
{
/**
* phpBB root path
* @var string
*/
protected $phpbb_root_path;
/**
* PHP file extension
* @var string
*/
protected $php_ext;
/**
* Auth object
* @var \phpbb\auth\auth
*/
protected $auth;
/**
* Config object
* @var \phpbb\config\config
*/
protected $config;
/**
* Database object
* @var \phpbb\db\driver\driver_interface
*/
protected $db;
/**
* User object
* @var \phpbb\user
*/
protected $user;
/**
* Event dispatcher object
* @var \phpbb\event\dispatcher_interface
*/
protected $phpbb_dispatcher;
/**
* Constructor.
*
* @param string $phpbb_root_path The phpBB root path
* @param string $php_ext The PHP file extension
* @param \phpbb\auth\auth $auth The auth object
* @param \phpbb\config\config $config The config object
* @param \phpbb\db\driver\driver_interface $db The database object
* @param \phpbb\user $user The user object
* @param \phpbb\event\dispatcher_interface $phpbb_dispatcher The event dispatcher object
*/
public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, \phpbb\event\dispatcher_interface $phpbb_dispatcher)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->auth = $auth;
$this->config = $config;
$this->db = $db;
$this->user = $user;
$this->phpbb_dispatcher = $phpbb_dispatcher;
}
/**
* Runs this cron task.
*
* @return null
*/
public function run()
{
$search_type = $this->config['search_type'];
// We do some additional checks in the module to ensure it can actually be utilised
$error = false;
$search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user, $this->phpbb_dispatcher);
if (!$error)
{
$search->tidy();
}
}
/**
* Returns whether this cron task can run, given current board configuration.
*
* Search cron task is runnable in all normal use. It may not be
* runnable if the search backend implementation selected in board
* configuration does not exist.
*
* @return bool
*/
public function is_runnable()
{
return class_exists($this->config['search_type']);
}
/**
* Returns whether this cron task should run now, because enough time
* has passed since it was last run.
*
* The interval between search tidying is specified in board
* configuration.
*
* @return bool
*/
public function should_run()
{
return $this->config['search_last_gc'] < time() - $this->config['search_gc'];
}
}
удалить все файлы из папки cache кроме .htaccess и index.htm
За ваши деньги решу ваши проблемы. Стучи в ЛС.
Нет человека - нет проблемы. (c)