hasib32
hasib32

Reputation: 835

Laravel 4.1 Invalid request Unexpected EOF

I am trying to install Laravel 4.1. After installed when i run php artisan serve I get this error: Invalid request (Unexpected EOF). I have no idea why it's showing this error. I also have laravel 4.0 installed and it's working fine.

Upvotes: 4

Views: 8036

Answers (3)

aug
aug

Reputation: 11714

I also had this problem. I believe if you are serving with artisan you have to specify the port number like so:

./artisan serve --port=XXXX --host=whatever.com

The problem for me was I didn't set the base correctly. Make sure that in your file your base is set to be at this port as well. So for my case, I had to set my index.html to be

<base href="http://www.whatever.com:XXXX/" />

After I fixed that, it served correctly. Hope this helps.

EDIT: Oh and FYI make sure what you type in your browser is exactly the same as what you set your base to be. So that means you can't do whatever.com:XXXX and expect it to serve. You're gonna need to do www.whatever.com:XXXX. Life is frustrating sometimes.

Upvotes: 1

Antonio Frignani
Antonio Frignani

Reputation: 961

Landed here after having this problem myself. Searching around, the error seems to be related to the network prediction feature of some browser (primarily Chrome). Disabling the feature, did the trick for me on Windows with php 5.4.9

Source: https://bugs.php.net/bug.php?id=60471

Upvotes: 3

Anshad Vattapoyil
Anshad Vattapoyil

Reputation: 23463

Make sure you are updated the installation successfully.

Run this in your project directory.

composer update

Upvotes: 1

Related Questions