0
我上傳laravel項目服務器,創建數據庫,導入數據庫,更改.ENV文件,我收到以下錯誤錯誤:Laravel - 當上傳到服務器
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbname.contentTranslations' doesn't exist
數據庫已創建和我有進口所有表格。在phpmyadmin,如果我做了一個選擇它的作品。
完整的錯誤:
in Connection.php line 332
at PDO->prepare('select `contentTranslations`.`image` from `content` inner join `contentTranslations` on `contentTranslations`.`id_content` = `content`.`id` where `contentTranslations`.`active` = ? and `contentTranslations`.`lang` = ? and `content`.`id_page` = ? and `content`.`id_pageZones` = ? order by `contentTranslations`.`id` asc') in Connection.php line 332
at Connection->Illuminate\Database\{closure}(object(MySqlConnection), 'select `contentTranslations`.`image` from `content` inner join `contentTranslations` on `contentTranslations`.`id_content` = `content`.`id` where `contentTranslations`.`active` = ? and `contentTranslations`.`lang` = ? and `content`.`id_page` = ? and `content`.`id_pageZones` = ? order by `contentTranslations`.`id` asc', array('1', 'pt', '1', '1')) in Connection.php line 762
at Connection->runQueryCallback('select `contentTranslations`.`image` from `content` inner join `contentTranslations` on `contentTranslations`.`id_content` = `content`.`id` where `contentTranslations`.`active` = ? and `contentTranslations`.`lang` = ? and `content`.`id_page` = ? and `content`.`id_pageZones` = ? order by `contentTranslations`.`id` asc', array('1', 'pt', '1', '1'), object(Closure)) in Connection.php line 725
at Connection->run('select `contentTranslations`.`image` from `content` inner join `contentTranslations` on `contentTranslations`.`id_content` = `content`.`id` where `contentTranslations`.`active` = ? and `contentTranslations`.`lang` = ? and `content`.`id_page` = ? and `content`.`id_pageZones` = ? order by `contentTranslations`.`id` asc', array('1', 'pt', '1', '1'), object(Closure)) in Connection.php line 350
at Connection->select('select `contentTranslations`.`image` from `content` inner join `contentTranslations` on `contentTranslations`.`id_content` = `content`.`id` where `contentTranslations`.`active` = ? and `contentTranslations`.`lang` = ? and `content`.`id_page` = ? and `content`.`id_pageZones` = ? order by `contentTranslations`.`id` asc', array('1', 'pt', '1', '1'), true) in Builder.php line 1648
at Builder->runSelect() in Builder.php line 1634
at Builder->get(array('*')) in Builder.php line 632
at Builder->getModels(array('*')) in Builder.php line 327
at Builder->get() in FrontendController.php line 55
at FrontendController->home('pt')
at call_user_func_array(array(object(FrontendController), 'home'), array('locale' => 'pt')) in Controller.php line 55
at Controller->callAction('home', array('locale' => 'pt')) in ControllerDispatcher.php line 44
at ControllerDispatcher->dispatch(object(Route), object(FrontendController), 'home') in Route.php line 190
at Route->runController() in Route.php line 144
at Route->run(object(Request)) in Router.php line 642
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 644
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 618
at Router->dispatchToRoute(object(Request)) in Router.php line 596
at Router->dispatch(object(Request)) in Kernel.php line 267
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 54
爲什麼?我必須儘快解決這個問題。
什麼問題?
謝謝
您是否在'.env'中添加了適當的憑據? –
如果你可以在phpMyAdmin中看到表格,並使用相同的憑證,它應該可以工作。你真的可以檢查'contentTranslations'表是否真的存在嗎?另外,儘量不要在表名中使用大寫字母,您應該將表名改爲'content_translations',在窗口機器上大寫字母可能會導致問題。 –
是的。存在內容翻譯。沒有「t」大寫字母。但我認爲這不是問題。 @JanWytze – user3242861