我有一個非常古老的CakePHP 1.3.2應用程序,用於在給定域下的服務器上工作。我有原始文件,現在我試圖設置它,並讓它在不同域下的新服務器上運行。將CakePHP 1.3.2應用程序移動到新服務器
起初,我不得不修覆在根目錄/ index.php文件以下行:
define('CAKE_CORE_INCLUDE_PATH', '/home/SOME_NAME/cakephp-1.3.2');
的應用程序甚至找不到框架。它現在找到它,但我得到404 Page Not Found
錯誤。我完全無能爲力,並且我甚至無法確定數據庫連接是否成功使用新的用戶/密碼/主機參數。一些事情的唯一跡象是,我的服務器上找到以下日誌文件,並獲取與以下行每次我試圖通過瀏覽器來訪問應用程序時填充:
2015-06-09 10:00:24 Warning: Warning (512): /home/SOME_NAME/public_html/OLD_DOMAIN_NAME/tmp/cache/ is not writable in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/cache/file.php, line 267]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): array_keys() expects parameter 1 to be array, boolean given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1936]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): array_keys() expects parameter 1 to be array, boolean given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1949]
2015-06-09 10:00:24 Warning: Warning (2): array_filter() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1953]
2015-06-09 10:00:24 Warning: Warning (2): array_values() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1953]
2015-06-09 10:00:24 Warning: Warning (2): array_unique() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 2045]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): array_keys() expects parameter 1 to be array, boolean given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1936]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): array_keys() expects parameter 1 to be array, boolean given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1949]
2015-06-09 10:00:24 Warning: Warning (2): array_filter() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1953]
2015-06-09 10:00:24 Warning: Warning (2): array_values() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1953]
2015-06-09 10:00:24 Warning: Warning (2): array_unique() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 2045]
2015-06-09 10:00:24 Warning: Warning (2): array_unique() expects parameter 1 to be array, null given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1229]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1448]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): array_keys() expects parameter 1 to be array, boolean given in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo_source.php, line 1936]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
2015-06-09 10:00:24 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/SOME_NAME/cakephp-1.3.2/cake/libs/model/datasources/dbo/dbo_mysql.php, line 127]
任何建議如何從這裏開始將錯誤縮小到更具體的東西?
您是否嘗試過搜索「OLD_DOMAIN_NAME」的應用文件?它會出現在你的代碼中某處的引用,你需要改變它。 – drmonkeyninja
新服務器上的文件仍位於OLD_DOMAIN_NAME文件夾中,因此路徑存在且文件仍在此處。我會搜索一下,看看還有什麼會彈出。 – mmvsbg