4

I'm working on Laravel 5 and I'm using PHP function php -S localhost:8888 folder-name - t to show the web site.

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

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

What is going wrong?

4
  • I heart another similar issue, try to change your port number and se if it helps, not 80 or 8080, but some thing free maybe 8081. I suggest you to go through the guideline here it is for xampp vhost but some of it can be used to check xampp in general. I will also suggest you to make vhost in xampp. stackoverflow.com/questions/27754367/… Commented Aug 3, 2015 at 8:24
  • Kindly try to setup vagrant, and you can get rid of machine dependent silly issues. Commented Aug 3, 2015 at 12:59
  • thanks, ill try them both. Commented Aug 3, 2015 at 14:18
  • Thanks so much guys. tho i found what my problem was, i was using the command like "php -S localhost:8888 folder-name - t" and is supposed to be like this "php -S localhost:8888 - t folder-name" thats why i couldnt properly use php internal server. Thanks for all the help Commented Aug 3, 2015 at 16:08

2 Answers 2

1

It sounds like a permissions issue. I don't have much experiencing working with Laravel on Windows, but I just fixed a similar issue on an Ubuntu box.

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

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

Sign up to request clarification or add additional context in comments.

Comments

1

It is a permission error actually. But if you try to run directly from your localhost server, it will work.

On windows 10 PHP Server will not be able to access PHP Pear extension that is why it is showing this error.

If you are running XAMPP. you have to go to your apache localhost with http://localhost/laravel-folder/public.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.