Laravel - 上传到服务器时出错

时间:2017-04-04 19:06:57

标签: laravel shared-hosting

我将laravel项目上传到服务器,创建数据库,导入数据库,更改.env文件,我收到以下错误:

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

为什么呢?我必须尽快解决这个问题。

有什么问题?

谢谢

1 个答案:

答案 0 :(得分:1)

我相信你对表名的大写字母有问题。这对您的服务器contenttranslations != contentTranslations很重要。这是不同的表格。