Linux
CakePHP 問題 - 站點錯誤
我有一個 cakePHP 站點,今天我將站點移到了新伺服器上,但由於某種原因,我不斷收到錯誤消息。它在另一台伺服器上執行良好,但這個具有 cpanel 的新伺服器似乎無法正常工作。不確定是什麼問題。
一些錯誤:
Notice (8): Trying to get property of non-object [CORE/cake/libs/model/datasources/dbo_source.php, line 549] Notice (8): Trying to get property of non-object [CORE/cake/libs/model/datasources/dbo_source.php, line 554] Warning (512): SQL Error: 1146: Table 'mycats.space' doesn't exist [CORE/cake/libs/model/datasources/dbo_source.php, line 440] Warning (2): Cannot modify header information - headers already sent by (output started at /home/mycats/public_html/cake/basics.php:338) [APP/controllers/app_controller.php, line 168] Warning (2): Cannot modify header information - headers already sent by (output started at /home/mycats/public_html/cake/basics.php:338) [APP/controllers/app_controller.php, line 169] Warning (2): Cannot modify header information - headers already sent by (output started at /home/mycats/public_html/cake/basics.php:338) [APP/controllers/app_controller.php, line 170] Warning (2): Cannot modify header information - headers already sent by (output started at /home/mycats/public_html/cake/basics.php:338) [APP/controllers/app_controller.php, line 175]
我最初的想法是關注 SQL 錯誤。我會確認數據庫已成功導入。根據以下消息,找不到其中一個數據庫表:
Warning (512): SQL Error: 1146: Table 'mycats.space' doesn't exist [CORE/cake/libs/model/datasources/dbo_source.php, line 440]
一旦您確認 mycats.space 存在,您將減少錯誤。通知和警告不應阻止網站載入,但仍應解決它們。
最重要的是,找到並修復 SQL 錯誤,然後報告下一組錯誤並解決它們。
-布倫丹