Laravel 5 opens the page and reports an error
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 16:48:24
0
4
542

There are 2 questions:
1. Local php artisan serve can be used
2. I don’t know why after moving the server, it will create or read files in the / directory, so there is no permission and an error is reported
3 . It is a permission directory, and it has also been 777ed. However, it should not be a simple permission, because it is impossible for the program to read /. All relative directories are used, but I don’t know where this absolute directory is used.

ErrorException in Filesystem.php line 109:
file_put_contents(/b53e72be8b40e01b5dd6a10f6254791b9c073338.php): failed to open stream: Permission denied

Already tried:

php artisan clear-compiled
php artisan optimize      
php artisan cache:clear
过去多啦不再A梦
过去多啦不再A梦

reply all(4)
黄舟

The problem is found. If there is no views directory, it will go to the root directory

Filesystem.php, if no path is passed, it will be empty...

 public function put($path, $contents, $lock = false)
    {
        return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    }

I deleted the entire storage directory before migrating, but now I forgot to rebuild the views directory when rebuilding

  /*
    |--------------------------------------------------------------------------
    | Compiled View Path
    |--------------------------------------------------------------------------
    |
    | This option determines where all the compiled Blade templates will be
    | stored for your application. Typically, this is within the storage
    | directory. However, as usual, you are free to change this value.
    |
    */

    'compiled' => realpath(storage_path('framework/views')),
巴扎黑

Permission denied

Permission issue

阿神

Insufficient permissions:

chown -R www-data:www-data /var/www
chmod 777 -R /var/www/html/storage
阿神

It is probably a permissions issue. All laravel deployment issues can be solved here. Just choose your own server version http://bbs.earnp.com/blog?tit...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template