请问一个 Lumen 的问题,我在.env 中配置了 DB 的配置,但是依然报出找不到数据库配信信息。 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xiaoyu9965
V2EX    PHP

请问一个 Lumen 的问题,我在.env 中配置了 DB 的配置,但是依然报出找不到数据库配信信息。

  •  
  •   xiaoyu9965 2015-09-03 00:21:33 +08:00 6377 次点击
    这是一个创建于 3767 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我将测试环境的代码迁移到线上环境上来,然后就手动的配置下.env 。但是饱了这个莫名秒的错误。
    我的.env 配置如下:
    APP_ENV=local
    APP_DEBUG=true
    APP_KEY=3eKXjXbYW4O3OklteV4El31KXs0avK8

    APP_TIMEZOnE=PRC

    APP_LOCALE=en
    APP_FALLBACK_LOCALE=en

    DB_COnNECTION=mysql
    DB_HOST=10.137.208.14
    DB_PORT=3306
    DB_DATABASE=mkacall
    DB_USERNAME=admin
    DB_PASSWORD=cLuj0Ye9bl
    DB_TIMEZOnE=+08:00

    CACHE_DRIVER=file
    SESSION_DRIVER=file
    QUEUE_DRIVER=database

    MAIL_DRIVER=smtp

    MAIL_HOST=mailtrap.io

    MAIL_PORT=2525

    MAIL_USERNAME=null

    MAIL_PASSWORD=null

    MAIL_FROM_ADDRESS=null

    MAIL_FROM_NAME=null

    错误如下:
    InvalidArgumentException in DatabaseManager.php line 238:
    Database [] not configured.

    in DatabaseManager.php line 238
    at DatabaseManager->getConfig (null ) in DatabaseManager.php line 157
    at DatabaseManager->makeConnection (null ) in DatabaseManager.php line 67
    at DatabaseManager->connection (null ) in Model.php line 3152
    at Model::resolveConnection (null ) in Model.php line 3118
    at Model->getConnection () in Model.php line 1866
    at Model->newBaseQueryBuilder () in Model.php line 1809
    at Model->newQueryWithoutScopes () in Model.php line 1783
    at Model->newQuery () in Model.php line 3364
    at Model->call ('whereRaw', array (' email = ? AND password = ? ', array ('[email protected]', 'e10adc3949ba59abbe56e057f20f883e')))
    at AdminUser->whereRaw (' email = ? AND password = ? ', array ('[email protected]', 'e10adc3949ba59abbe56e057f20f883e'))
    at call_user_func_array (array (object (AdminUser ), 'whereRaw'), array (' email = ? AND password = ? ', array ('[email protected]', 'e10adc3949ba59abbe56e057f20f883e'))) in Model.php line 3380
    at Model::
    callStatic ('whereRaw', array (' email = ? AND password = ? ', array ('[email protected]', 'e10adc3949ba59abbe56e057f20f883e'))) in IndexController.php line 30
    at AdminUser::whereRaw (' email = ? AND password = ? ', array ('[email protected]', 'e10adc3949ba59abbe56e057f20f883e')) in IndexController.php line 30
    at IndexController->signin ()
    at call_user_func_array (array (object (IndexController ), 'signin'), array ()) in Container.php line 502
    at Container->call (array (object (IndexController ), 'signin'), array ()) in Application.php line 1348
    at Application->callControllerCallable (array (object (IndexController ), 'signin'), array ()) in Application.php line 1313
    at Application->callLumenController (object (IndexController ), 'signin', array (true, array ('uses' => 'App\Http\Controllers\Admin\IndexController@signin'), array ())) in Application.php line 1284
    at Application->callControllerAction (array (true, array ('uses' => 'App\Http\Controllers\Admin\IndexController@signin'), array ())) in Application.php line 1252



    3 条回复    2015-09-03 01:15:21 +08:00
    isCyan
        1
    isCyan  
       2015-09-03 00:39:10 +08:00 via iPhone
    这样直接贴上来泄露多少隐私信息啊…
    holystrike
        2
    holystrike  
       2015-09-03 01:08:23 +08:00 via Android
    bootstrap/app.php 把 loadenv 那句话取消注释
    xiaoyu9965
        3
    xiaoyu9965  
    OP
       2015-09-03 01:15:21 +08:00
    @holystrike 那句话已经注释掉了
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     949 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 29ms UTC 19:31 PVG 03:31 LAX 11:31 JFK 14:31
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86