Failed opening required file: server.php - php

I am having the error as shown below using lumen 5.1.
Failed opening required 'C:\xampp\htdocs\sample/server.php' (include_path='.;C:\xampp\php\PEAR') in Unknown on line 0
I am using bash command line and using the php artisan serve. When running the serve on Git Bash I don't get any errors. However when I started to type localhost:8000 in my browser I am getting the above error.
What can I do to solve this?

Related

laravel artisan error while clearing config cache

when I run php artisan cache:config the command throw the following error
PHP Warning: require(): Filename cannot be empty in /home/****/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 71
PHP Fatal error: require(): Failed opening required '' (include_path='.:/usr/share/php') in /home/****/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 71
I have no idea what causing this and how to fix it.
it turns out that there is one suspicious file inside config folder, once it's deleted the artisan command works just fine again.

I can't execute php artisan serve on linux

Whenever i try to execute php artisan serve command i get this error
PHP Warning: require(/home/mehdi/laravelOrig/vendor/autoload.php):
failed to open stream: No such file or directory in
/home/mehdi/laravelOrig/artisan on line 18
PHP Fatal error: require(): Failed opening required
'/home/mehdi/laravelOrig/vendor/autoload.php'
(include_path='.:/usr/share/php') in /home/mehdi/laravelOrig/artisan
on line 18
I did try some answers i found on google and here but it still wont work , am I missing something ?
Thank you!
First of all install composer on your system and type following command.
1) goto your project directory from command line
2) composer update
3) php artisan serve.

After typing php artisan serve, encounter error when trying to reach 127.0.0.1:8000

I'm using IIS as web server,
after I ran php artisan serve on the terminal,
I encountered error when trying to reach 127.0.0.1:8000.
Warning: Unknown: failed to open stream: No such file or
directory in Unknown on line 0
Fatal error: Unknown: Failed
opening required 'C:\inetpub\wwwroot\laravel/server.php'
(include_path='.;C:\php\pear') in Unknown on line 0
I have tried to look for other answers here, but none of them seems to work.
Any idea what went wrong. Thanks in advance.
This error is coming cause in your working repository server.php file is missing.
Oops forgot to update .I've downloaded the laravel 5.4,It turns out I forgot to include the .dev file, it works now

Fatal error: Unknown: Failed opening required Error in Laravel 5.2 Auth

I just have installed laravel Authentication to my application and launch my server php artisan serve at URL http://localhost:8000/ and I got the following errors .
I am using Xampp and Windows 10.And Xampp is installed in D root directory.
Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0
Fatal error: Unknown: Failed opening required
'D:\xampp\htdocs\ecom/server.php' (include_path='.;D:\xampp\php\pear')
in Unknown on line 0
try the following on your cmd line:
php -S localhost:8888 -t public
Make sure the "-S" is capitalized. Hope this resolves your issue.
Type your command line :
php -S localhost:8000 -t public
because port is not public
Server.php make an Exception and your Anti-Virus like Avast delete it Automatically. Make turn off your Anti-VIrus Software. Hope this resolves your issue.

phalcon php built-in server Failed opening required .htrouter

Trying to run phalcon 2.0.7 app using built-in http server in php 5.6 and included .htrouter to make URI rewrite working. Everything seems find until I use die() in controller. For the first time it works as expected but when refreshed it throws PHP fatal error:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required '.htrouter.php' (include_path='.:') in Unknown on line 0
Is there a way to fix that or should I start configuring other http server?
I had the .htrouter in my public dir so this helped a lot:
php -S localhost:8000 -t public public/.htrouter.php :)

Categories