Hi @Kazi-shahin, are you using Vagrant?
Try using the following --port param:
php artisan serve --port=8000
Hope it helps you.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I'm new in Laravel. Running Ubuntu as my OS and LAMP is install in my laptop.
After create a new laravel project. Once I command php artisan serve, Browser can not open my laravel project. If I type http://localhost:8000 the browser error is, "Whoops, looks like something went wrong."
Anyone can cooperate please?
Hi @Kazi-shahin, are you using Vagrant?
Try using the following --port param:
php artisan serve --port=8000
Hope it helps you.
Hi, No Luck!!! Here is my Terminal : shahin@BluBird-Interactive:~$ cd /var/www/html/laravel/test shahin@BluBird-Interactive:/var/www/html/laravel/test$ php artisan serve Laravel development server started on http://localhost:8000 [Mon Dec 22 18:26:53 2014] 127.0.0.1:38988 Invalid request (Unexpected EOF) ^C shahin@BluBird-Interactive:/var/www/html/laravel/test$ php artisan serve Laravel development server started on http://localhost:8000 ^C shahin@BluBird-Interactive:/var/www/html/laravel/test$ cd .. shahin@BluBird-Interactive:/var/www/html/laravel$ laravel new blog Crafting application... Application ready! Build something amazing. shahin@BluBird-Interactive:/var/www/html/laravel$ cd blog shahin@BluBird-Interactive:/var/www/html/laravel/blog$ php artisan serve Laravel development server started on http://localhost:8000 ^C shahin@BluBird-Interactive:/var/www/html/laravel/blog$ php artisan serve --port=8000 Laravel development server started on http://localhost:8000
@kazi-shahin are you using L5 or L4?
And do you only get that error, noting more is shown?
"Whoops, looks like something went wrong." is not helpful. If it's a browser error, click "Details" for the error message. If it's the Laravel error page, please state that.
If in doubt, screenshot it.
@MThomas My Version is : Laravel Framework version 4.2.13
@bashy only "Whoops, looks like something went wrong" What should happen once I do command, "php artisan serve" ?
@kazi-shahin looks like your server thinks it is in production mode, that is why it is not showing you the error. For the time being (not for forever), in config/app.php set 'debug' => true,. And show us the error stack that is generated.
If this does not show an error stack, revert the change and apply the change to config/local/app.php and check if the error stack is shown.
@MThomas Here is the Error: Error in exception handler: The stream or file "/var/www/html/laravel/test/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/laravel/test/bootstrap/compiled.php:9030
The storage directory needs to be writable :)
Here is the new error : http://awesomescreenshot.com/0e342ug478
What should happen once I do command, "php artisan serve"?
You should be able to view your site.
You must set an app key in app.php, this should have been done when you installed the copy of laravel, but now you must do it manual.
I have created Laravel from terminal by typing, "laravel new name" Still I need to do it?
If there is no random string set for key in config/app.php, you must generate one. I believe you can generate one with the artisan command php artisan app:key. But you can check that by running php artisan list or php artisan in your terminal.
What I need to do for this error: "Error in exception handler: The stream or file "/var/www/html/laravel/test/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/laravel/test/bootstrap/compiled.php:9030"
For that I repeat my previous comment:
The storage directory needs to be writable :)
Thanks a lot. Writable permission is okay. Key Generate is okay.
What about the "Debug = true / false". Should I keep them true at least at my localhost, so that I can get the error ?
In config/app.php you should set the debug => false (this is to prevent errors being shown in production mode).
In config/local/app.php you should set debug => true so errors are shown when in development/local mode.
What file is used is determined based on the environment you are in.
You should checkout these lessons/series, it will help you a lot in understanding laravel:
It is worth the 9 bucks :)
Hey, Thanks I got it. The issue is fixed. Thanks for the great suggestion.
I have a similar problem , my error details after setting 'debug' = TRUE are:
RuntimeException in compiled.php line 6693: No supported encrypter found. The cipher and / or key length are invalid.
1/1 RuntimeException in compiled.php line 6693: No supported encrypter found. The cipher and / or key length are invalid.
In your app aplication find files named ".env.example" and ".env". Those files has your key. If you don`t have ".env" even if you run this command:
php artisan key:generate
then copy your ".env.example" and rename it to ".env"
run again:
This should resolve the issue with "Woops" and key errors.
These are my steps:
in terminal:
go to the browser - works for me :)
invalid request (unexpected eof)?
It is because something already running on that port and you can change the port by command itself, by running following command
php artisan serve --port 8001
@SHAHRUKH4 - This just solved the problem in no time. Simple, straightforward and powerful. Changing the port number was all I needed to do!
@IKEAMADI - Ofcourse.
@shahrukh4 Thanks! it works for me
Please or to participate in this conversation.