Dunno, I don't use MAMP, but I guess you shouldn't use a subdirectory of localhost to host your app.
@luddinus That doesn't work normally anyway... it's the exact same as Laravel. Direct your dev link to the public dir
@bashy I have a Laravel project and it works
@luddinus You probably changed the htaccess to direct it to the public folder.
Hm, i have the same error :/ Using mamp. I have tried with RewriteBase to pointing to the public folder, but not working :/
Laravel is no problem
Yep, same problem as others, doesn't work with XAMPP out of the box so I'm using artisan serve for the time.
There is a PR
People and incorrect vhost setups :P get in the habit or setup something properly instead of MAMP WAMP XAMPP VAMP BAMP RAMP TAMP JAMP EAMP etc
@bashy You forgot CAMP, LAMP and DAMP ;-)
@andy Oh I forgot those, thanks! 8-)
@bashy Why is incorrect? It fails ONLY in Lumen dude.
@luddinus Sure it works (or can work) but it's bad practice. It's fine for single files or small scripts but sites...no.
@bashy WHY?
@luddinus Because of this exact problem... do some research. The fact you're still on WAMP is one of the problems.
@bashy it's a problem in Lumen, not in Laravel, so...
@luddinus Works fine if you setup your document root properly :) not a problem with Lumen
I started using Vagrant and Laravel Homestead and now I can't go back to WAMP or XAMPP!
Yeah it works just fine for me out of the box. I've already finished two different services and started an API.
I used WAMP once, I also wiped my ass with poison oak on mistake too once, both experiences sucked and were painful.
@dberry Totally agree! I found getting apache, php and mysql going on OSX way easier than MAMP.
@andy, haha, dev-ing on a mac is so much easier overall than on Windows.
I do use vagrant now, it's just so easy, but, I started off on the server engineering side of things so there was a time I had to setup servers from a blank command-line.
Take the time to learn how to set up a server on your own, break down and start learning virtualbox & vagrant, you'll thank everyone in here who has badgered you thus far.
Head over to http://serversforhackers.com sign up, do the tuts, look over the forums, buy the book. @fideloper has done a hell of a job with this.
Being a dev, you don't have to be a server engineering genius, but it is beneficial to you to know how everything fits together and even knowing the basics will make you a better developer.
if anyone is still having this problem use virtual host in your Apache server (in httpd-vhosts.conf file).
I have found a solution in this post http://todiadiyatmo.com/running-laravel-lumen-from-sub-directory/ But there is an error in solution, you should use Illuminate\Http\Request as Request instead of symfony request.
Its not pretty to change public/index.php but neither the limiting the app to root folder even though its for the greater good in the end.
@andy I just came across this issue. I'm not sure if you resolved it but I was having the same problem, and I found the issue. I found the issue in the MAMP error logs. I had a MemeCache error. By default, you can see that the .env file has SESSION_DRIVER set to null, with a fallback of memcache. Make sure that this is uncommented in your .env file with a setting of array. I hope that it helps you or anyone else that has this same issue.
SESSION_DRIVER=array
QUEUE_DRIVER=arra
Please or to participate in this conversation.