1
votes
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\Laravel\Blog\server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0

Someone knows, why did this happen?

1
This is something to do with your pc/hosting server setup, not Laravel it's self. - Ashley Brown
check in your project folder "server.php" file is missing ? - Udhav Sarvaiya
Yes, right. It seems that what makes the 'server.php' file missing is considered the virus by the anti-virus I use. 😂 - Chata Rizeii

1 Answers

0
votes

In your project folder, the server.php file is missing so you got this error

The solution will to create another project then copy the newly created server.php this will solve it.

Another Solution is:

  1. Open the link: https://github.com/laravel/laravel/blob/master/server.php
  2. Copy all code
  3. Open Notepad and paste your copy code
  4. save Notepad file and set name server.php
  5. Copy the server.php file and paste it inside your Laravel project

Run your project again in browser Now you will not get an error and the Laravel project will work properly.