Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory

  • 0

I have a project on Laravel 5 and I work with it at the office and at home too. It works fine, but recently at home it stopped working. Laravel show me two ErrorException

file_put_contents(G:projectstorageframeworkviews/751d8a0fd8a7d4138c09ceb6a34bb377aa2d6265.php):
failed to open stream: No such file or directory

and

file_put_contents(G:projectstorageframework/sessions/aIXycR4LIAUBVIqZu0T590paOMIpV8vfZGIroEp0):
failed to open stream: No such file or directory

I’m searching problem decision with Google and find information about correct rights. All advice is about Linux, but I’am work in Windows at the office and at home too.

When I try to clear application cache and view cache, artisan talk to me – …cleared. But cache data and views are present in storage.

How can I fix this problem?

Thanks in advance!

Click to rate this post!
[Total: 0 Average: 0]
Share This Post
Share
  1. You should typically run the php artisan config:cache command as part of your production deployment routine. I suggest you

    1. Remove the configuration cache file
    2. Flush the application cache
    3. Create a cache file for faster configuration loading

    To do this, run the following Artisan commands on your command line

    1. php artisan config:clear
    2. php artisan cache:clear
    3. php artisan config:cache

    Where you don’t have access to the command line on your server, you can programmatically execute commands by adding the following to your routes:

    Route::get('/clear-cache', function() {
        $exitCode = Artisan::call('config:clear');
        $exitCode = Artisan::call('cache:clear');
        $exitCode = Artisan::call('config:cache');
        return 'DONE'; //Return anything
    });

    And then call the clear-cache route from your browser.

    I hope this is helpful.

    • 1
  2. You have two root elements in your template.

    <div class="form-group">
      ...
    </div>
    <div class="col-md-6">
      ...
    </div>

    And you need one.

    <div>
        <div class="form-group">
          ...
        </div>
    
        <div class="col-md-6">
          ...
        </div>
    </div>

    Essentially in Vue you must have only one root element in your templates.

    • 0
  3. The best way to solve this problem is, go to directory “laravel/bootstrap/cache” and delete config.php file. or you can rename it as well like config.php.old And your problem will be fix. Happy coding 🙂

    • 0
Leave an answer

Leave an answer

Browse

close