chimit's avatar

Redirect returns Error 500

Hi!

I have a strange problem with redirect in Lumen. On my local machine I use Homestead, and everything is OK. But on production (Ubuntu, nginx, Apache, PHP as module) the simple return redirect('http://google.com') returns blank page with Error 500.

All other routes work good.

0 likes
1 reply
chimit's avatar

I've found the solution of my problen. It was... Memcached. I didn't have Memcached installed on the server, but my .env file is default and has these lines:

CACHE_DRIVER=memcached
SESSION_DRIVER=memcached
QUEUE_DRIVER=database

I don't know why, but Lumen requires Memcached on redirect(); and doesn't throw any errors into the log. So I had to install Memcached:

sudo apt-get install php5-memcached memcached

sudo service apache2 restart

sudo service memcached status
 * memcached is running

Please or to participate in this conversation.