【问题标题】:Error 500 laravel after upload files of server上传服务器文件后报错 500 laravel
【发布时间】:2016-07-18 08:18:03
【问题描述】:

我用 laravel 5.2 cms master 完成了一个项目,我在 500 处收到错误。可能是什么?

    Error 500

Houston, We Have A Problem.
Internal Server Error

What does this mean?

Something went wrong on our servers while we were processing your request. An error has occurred and this resource cannot be displayed. This occurrence has been logged, and a highly trained team of monkeys has been dispatched to deal with your problem. We're really sorry about this, and will work hard to get this resolved as soon as possible.

This error can be identified by cc577d3d-22a6-4683-b154-38b01d62fd9e. You might want to take a note of this code.

Perhaps you would like to go to our home page?

【问题讨论】:

    标签: laravel


    【解决方案1】:
        <?php
    
    /*
     * This file is part of Bootstrap CMS.
     *
     * (c) Graham Campbell <graham@alt-three.com>
     *
     * For the full copyright and license information, please view the LICENSE
     * file that was distributed with this source code.
     */
    
    /*
    |--------------------------------------------------------------------------
    | Application Routes
    |--------------------------------------------------------------------------
    |
    | Here is where you can register all of the routes for an application.
    | It's a breeze. Simply tell Laravel the URIs it should respond to
    | and give it the controller to call when that URI is requested.
    |
    */
    
    // send users to the home page
    $router->get('/', ['as' => 'base', function () {
        Session::flash('', ''); // work around laravel bug if there is no session yet
        Session::reflash();
    
        return Redirect::to('pages/home');
    }]);
    
    // send users to the posts page
    if (Config::get('cms.blogging')) {
        $router->get('blog', ['as' => 'blog', function () {
            Session::flash('', ''); // work around laravel bug if there is no session yet
            Session::reflash();
    
            return Redirect::route('blog.posts.index');
        }]);
    }
    
    // page routes
    $router->resource('pages', 'PageController');
    
    // blog routes
    if (Config::get('cms.blogging')) {
        $router->resource('blog/posts', 'PostController');
        $router->resource('blog/posts.comments', 'CommentController');
    }
    
    // event routes
    if (Config::get('cms.events')) {
        $router->resource('events', 'EventController');
    }
    

    【讨论】:

      【解决方案2】:

      问题可能在于访问文件和需要权限。

      尝试运行这个:

      sudo chmod 755 -R laravel_blog
      
      chmod -R o+w laravel_blog/storage
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-01-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-10-11
        • 2018-03-18
        相关资源
        最近更新 更多