Error SQLSTATE[HY000]: General error: 1191 Can't find FULLTEXT index matching the column list
$connection = $this->_driver->getConnection(); |
|
|
|
try { |
|
$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, $this->_bufferResults); |
|
$result = $this->_statement->execute($params); |
|
} finally { |
|
$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); |
|
} |
|
|
$connection = $this->_driver->getConnection(); |
|
|
|
try { |
|
$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, $this->_bufferResults); |
|
$result = $this->_statement->execute($params); |
|
} finally { |
|
$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); |
|
} |
|
|
{ |
|
return $this->getDisconnectRetry()->run(function () use ($query) { |
|
$statement = $this->prepare($query); |
|
$query->getValueBinder()->attachTo($statement); |
|
$statement->execute(); |
|
|
|
return $statement; |
|
}); |
|
} |
{ |
|
$this->numRetries = 0; |
|
while (true) { |
|
try { |
|
return $action(); |
|
} catch (Exception $e) { |
|
if ( |
|
$this->numRetries < $this->maxRetries && |
|
$this->strategy->shouldRetry($e, $this->numRetries) |
$query->getValueBinder()->attachTo($statement); |
|
$statement->execute(); |
|
|
|
return $statement; |
|
}); |
|
} |
|
|
|
/** |
|
* Executes a SQL statement and returns the Statement object as result. |
* @return \Cake\Database\StatementInterface |
|
*/ |
|
public function execute(): StatementInterface |
|
{ |
|
$statement = $this->_connection->run($this); |
|
$this->_iterator = $this->_decorateStatement($statement); |
|
$this->_dirty = false; |
|
|
|
return $this->_iterator; |
$query->getEagerLoader()->disableAutoFields(); |
|
$statement = $query |
|
->select($count, true) |
|
->disableAutoFields() |
|
->execute(); |
|
} else { |
|
$statement = $this->getConnection()->newQuery() |
|
->select($count) |
|
->from(['count_source' => $query]) |
*/ |
|
public function count(): int |
|
{ |
|
if ($this->_resultsCount === null) { |
|
$this->_resultsCount = $this->_performCount(); |
|
} |
|
|
|
return $this->_resultsCount; |
|
} |
$num = $this->fetchTable($table_name)->find('all', array('conditions'=>$data["where"]))->count(); |
|
} |
|
else |
|
{ |
|
$num = $this->fetchTable($table_name)->find('all', array('conditions'=>$where_like_search))->count(); |
|
// print_r($num); |
|
// echo "here"; |
|
// exit; |
|
|
set_time_limit(240); //4minutes |
|
ini_set('memory_limit', '512M'); |
|
date_default_timezone_set('PRC'); |
|
|
|
$abc=$this->action_($array,$is_http=1); |
|
|
|
$show=array(); |
|
$show["code"]=200; |
|
$show["data"]=$abc; |
// echo "<br>======2======<br>\n"; |
|
|
|
// echo "不存在/"; |
|
|
|
$file=$this->$action($array); |
|
|
|
if ($file["code"]==200 and is_array($file["data"])) |
|
{ |
|
//获取数据成功! |
{ |
|
|
|
date_default_timezone_set('PRC'); |
|
|
|
$file=$this->action_cache($get_data); |
|
|
|
if ($file["code"]==200) |
|
{ |
|
$match=$file["data"]; |
$get_data["page"]=(int)$page; |
|
$belongsTo=array(); |
|
$belongsTo[0]="Yuanmasorts"; |
|
$get_data["belongsTo"]=$belongsTo; |
|
$website_=$this->cache_action($get_data); |
|
|
|
//处理成 websites/index 的模板也能用的格式,这样模板就不需要单独做了,因为只是这里需要这样的处理,所以不需要写成单独的函数了 |
|
$news=array(); |
|
if (count($website_["data"])!="0") |
* @throws \UnexpectedValueException If return value of action is not `null` or `ResponseInterface` instance. |
|
*/ |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
$result = $action(...$args); |
|
if ($result !== null && !$result instanceof ResponseInterface) { |
|
throw new UnexpectedValueException(sprintf( |
|
'Controller actions can only return ResponseInterface instance or null. ' |
|
. 'Got %s instead.', |
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')) |
|
); |
|
$controller->invokeAction($action, $args); |
|
|
|
$result = $controller->shutdownProcess(); |
|
if ($result instanceof ResponseInterface) { |
|
return $result; |
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
} |
|
|
|
$controller = $this->controllerFactory->create($request); |
|
|
|
return $this->controllerFactory->invoke($controller); |
|
} |
|
} |
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
$response = new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
/** @var mixed $response */ |
|
$response = $handler->handle($request); |
|
|
|
return $this->_addTokenCookie($token, $request, $response); |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$locale = Locale::acceptFromHttp($request->getHeaderLine('Accept-Language')); |
|
if (!$locale) { |
|
return $handler->handle($request); |
|
} |
|
if ($this->locales !== ['*']) { |
|
$locale = Locale::lookup($this->locales, $locale, true); |
|
} |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
if (!in_array($request->getMethod(), $this->methods, true)) { |
|
return $handler->handle($request); |
|
} |
|
[$type] = explode(';', $request->getHeaderLine('Content-Type')); |
|
$type = strtolower($type); |
|
if (!isset($this->parsers[$type])) { |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
); |
|
} |
|
$matching = Router::getRouteCollection()->getMiddleware($middleware); |
|
if (!$matching) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$middleware = new MiddlewareQueue($matching); |
|
$runner = new Runner(); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (strpos($url, '..') !== false || strpos($url, '.') === false) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (strpos($url, '/.') !== false) { |
|
return $handler->handle($request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
try { |
|
return $handler->handle($request); |
|
} catch (RedirectException $exception) { |
|
return $this->handleRedirect($exception); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$this->queue = $queue; |
|
$this->queue->rewind(); |
|
$this->fallbackHandler = $fallbackHandler; |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
} |
|
|
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
|
|
$response = $this->runner->run($middleware, $request, $this->app); |
|
|
|
if ($request instanceof ServerRequest) { |
|
$request->getSession()->close(); |
|
} |
// Bind your application to the server. |
|
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application and emit the response. |
|
$server->emit($server->run()); |
|
|
If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
If you want to customize this error message, create templates/Error/pdo_error.php