Search code examples
phpcodeignitercloudflare

How to solve Error 520 original error in Codeigniter?


My Codeigniter package connected with Cloudflare. If my package connected with Cloudflare. It's not working and it shows "Error 520: Web server is returning an unknown error".Error 520 original error

Without Cloudflare it's working fine.


Solution

  • The problem behinds with Cloudflare does not process requests with HTTP headers that are over 32KB. If you are storing multiple/large cookies, beware, they may be truncated, which may prevent users from being able to visit your site and it works fine without Cloudflare.

    520 error problem fixed by while using session stored in the database. and it's working fine with Cloudflare.

    Session storage reference:- https://codeigniter.com/userguide3/libraries/sessions.html#database-driver