久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

不能使用 'Object 作為類名,因為它是保留的

Cannot use #39;Object as class name as it is reserved Cake 2.2.x(不能使用 Object 作為類名,因為它是保留的 Cake 2.2.x)
本文介紹了不能使用 'Object 作為類名,因為它是保留的 Cake 2.2.x的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我在嘗試設(shè)置我們正在運行的站點的測試副本時遇到問題,我在 Mint VM 下安裝了文件和應(yīng)用程序,當(dāng)我將 apache 指向目錄時,我收到 500 錯誤和以下內(nèi)容-

I'm having an issue trying to set up a testing copy of a site we have running, I have the files and applications installed under a Mint VM and when I point apache at the directory I get a 500 error and the following-

[Thu Oct 25 15:09:39.714201 2018] [php7:error] [pid 8945] [client 192.168.0.14:52237] PHP Fatal error:  Cannot use 'Object' as class name as it is reserved in /home/jamesmcgrath/Documents/dashboard/lib/Cake/Core/Object.php on line 30
[Thu Oct 25 15:09:39.714547 2018] [php7:error] [pid 8945] [client 192.168.0.14:52237] PHP Fatal error:  Uncaught Error: Class 'Controller' not found in /home/jamesmcgrath/Documents/dashboard/lib/Cake/Error/ExceptionRenderer.php:174
Stack trace:
#0 /home/jamesmcgrath/Documents/dashboard/lib/Cake/Error/ExceptionRenderer.php(92): ExceptionRenderer->_getController(Object(InternalErrorException))
#1 /home/jamesmcgrath/Documents/dashboard/lib/Cake/Error/ErrorHandler.php(126): ExceptionRenderer->__construct(Object(InternalErrorException))
#2 /home/jamesmcgrath/Documents/dashboard/lib/Cake/Error/ErrorHandler.php(284): ErrorHandler::handleException(Object(InternalErrorException))
#3 /home/jamesmcgrath/Documents/dashboard/lib/Cake/Error/ErrorHandler.php(213): ErrorHandler::handleFatalError(64, 'Cannot use 'Obj...', '/home/jamesmcgr...', 30)
#4 /home/jamesmcgrath/Documents/dashboard/lib/Cake/Core/App.php(933): ErrorHandler::handleError(64, 'Cannot use 'Obj...', '/home/jamesmcgr...', 30, Array)
#5 /home/jamesmcgrath/Documents/dashboard/lib/Cake/Core/App.php(906): App::_checkFatalError()
#6 [internal function]: App::shutdow in /home/jamesmcgrath/Documents/dashboard/lib/Cake/Error/ExceptionRenderer.php on line 174

奇怪的是,我們直接從運行正常的網(wǎng)絡(luò)服務(wù)器中提取了文件.第一個錯誤讓我相信這是由于 php 或 apache 版本根據(jù)我在其他地方閱讀的內(nèi)容不同(工作網(wǎng)絡(luò)服務(wù)器是 7.1.10,測試服務(wù)器是 7.2.10,我無法確定是什么版本的apache 網(wǎng)絡(luò)服務(wù)器正在運行).

The weird thing is we've ripped the files straight from the webserver, which is functioning correctly. The first error makes me believe that it's due to the php or apache versions being different based on what I've read elsewhere (the working webserver is 7.1.10 and the testing one is 7.2.10, I can't determine what version of apache the webserver is running).

我不確定這兩個錯誤是否相關(guān),我還在適應(yīng)這種環(huán)境,所以在學(xué)習(xí)這些東西方面進(jìn)展緩慢.

I'm not sure if the two errors are related, I'm still getting used to this environment so progress is slow picking up this stuff.

任何幫助都將不勝感激.

Any help at all would be greatly appreciated.

推薦答案

后一個錯誤是由前一個錯誤的問題引起的,前一個錯誤應(yīng)該是不言自明的,名稱Object 保留,不能再用作類名.

The latter error is caused by the problem that causes former error, and the former error should be rather self-explantory, the name Object is reserved and cannot be used as class name anymore.

Object 在 PHP 7.2 中被軟保留后變成了 PHP 7.2 中的硬保留名稱.為了獲得適當(dāng)?shù)?PHP 7.2 兼容性,請將您的 CakePHP 依賴項升級到至少最新的 2.10.x 版本.

Object has become a hard-reserved name in PHP 7.2, after being soft-reserved as of PHP 7.0. For proper PHP 7.2 compatibility, upgrade your CakePHP dependency to at least the latest 2.10.x release.

如果您使用內(nèi)置加密,您還必須切換到 OpenSSL(請參閱 Security.useOpenSsl 配置選項),或者如果您的應(yīng)用程序使用的加密不是不兼容,通過 PECL 安裝 Mcrypt,或使用類似 phpseclib/mcrypt_compat.

If you are using the built-in encryption, you'll also have to either switch to OpenSSL (see the Security.useOpenSsl configuration option), or if the encryption that your app is using isn't compatible, install Mcrypt via PECL, or use a polyfill like phpseclib/mcrypt_compat.

如果此時您無法升級 CakePHP,則必須將 PHP 安裝降級到 7.1.x 或更早版本.

If you cannot upgrade CakePHP at this moment, then you'll have to downgrade your PHP installation to 7.1.x or earlier.

另見

  • https://github.com/cakephp/cakephp/issues/11346
  • 食譜> 核心庫> 實用程序> 安全性
  • 說明書 > 附錄 > 遷移指南
  • PHP 手冊 > 附錄> 從 PHP 7.1.x 遷移到 PHP 7.2.x > 向后不兼容的更改 > 類名的對象
  • PHP 手冊 > 附錄> 從 PHP 7.1.x 遷移到 PHP 7.2.x > 其他更改 > 將 MCrypt 遷移到 PECL

這篇關(guān)于不能使用 'Object 作為類名,因為它是保留的 Cake 2.2.x的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Session is lost after an OAuth redirect(OAuth 重定向后會話丟失)
Pagination Sort in Cakephp 3.x(Cakephp 3.x 中的分頁排序)
CakePHP Shared core for multiple apps(CakePHP 多個應(yīng)用程序的共享核心)
Login [ Auth-gt;identify() ] always false on CakePHP 3(在 CakePHP 3 上登錄 [ Auth-identify() ] 始終為 false)
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes)(致命錯誤:允許的內(nèi)存大小為 134217728 字節(jié)已用盡(嘗試分配 87 字節(jié)))
How to get complete current url for Cakephp(如何獲取 Cakephp 的完整當(dāng)前 url)
主站蜘蛛池模板: 日韩国产一区二区三区 | 中文字幕国产一区 | 自拍偷拍亚洲欧美 | 91精品国产91久久久久久吃药 | 国产美女视频一区 | 99热这里都是精品 | 国产欧美一区二区三区国产幕精品 | 午夜午夜精品一区二区三区文 | 日韩免费视频一区二区 | 久久国产精品一区二区三区 | 亚洲国产乱码 | 日本三级电影免费 | 人人擦人人 | 国产91丝袜在线18 | 中文字幕久久精品 | av网站在线播放 | 午夜精品一区二区三区在线视频 | 国产欧美日韩精品一区 | 欧洲一区二区三区 | 伊人看片 | 中文字幕视频在线免费 | 亚洲免费视频播放 | 国产中文字幕在线 | 亚洲视频一区在线观看 | a免费观看 | 欧美一区二区三区在线视频 | 亚洲欧美日韩在线 | 欧美嘿咻 | 国产成人精品久久 | 亚洲欧美视频一区 | 亚洲高清在线观看 | 国产午夜精品一区二区三区嫩草 | 免费精品视频在线观看 | 久久久久久久国产精品 | 91视频免费观看 | 中文字幕加勒比 | 欧美一级欧美一级在线播放 | 久久久久国产一区二区三区四区 | 欧美久久精品一级c片 | 久久久久国产一区二区 | www.伊人.com|