Laravel Error - Unknown: Unsuccessful opening of '../public' (include_path = '; C: \ php \ pear \') in Unknown on line 0 is required

I am working on Laravel 5 and I am using the php -S localhost:8888 folder-name - t function php -S localhost:8888 folder-name - t to show the website.

Everything worked fine until I upgraded to Window 10. Now I try to run the project in my browser, I get a blank page and this message is in my cmd :

[Mon Aug 03 00:17:05 2015] PHP Fatal error: Unknown: Failed to open the required 'public' (include_path = '; C: \ php \ pear \') in Unknown on line 0

What is going wrong?

+4
source share
2 answers

This sounds like a permission issue. I don't have much experience with Laravel on Windows, but I just fixed a similar problem in the Ubuntu field.

The source of trouble for me was that I installed the composer as root , so I had to remove it. / vendor, change the owner and group ~ / .composer to ubuntu: www -data strong> (ubuntu is my user, www-data is my Nginx user) and reinstall the linker . I also made sure permissions. / storage were recursively configured to 775 and changed the owner of my entire Laravel project to ubuntu: www-data strong>.

Some things will definitely be different if you're on Windows, but hope this helps!

+1
source

This is actually a permission error. But if you try to start directly from your local server, this will work.

On Windows 10, PHP Server will not be able to access the PHP Pear extension, so it shows this error.

If you are using XAMPP. you need to go to your apache localhost using http: // localhost / laravel-folder / public .

+1
source

All Articles