Title: 502 error after php7 update
Last modified: September 11, 2018

---

# 502 error after php7 update

 *  Resolved [milleronic](https://wordpress.org/support/users/milleronic/)
 * (@milleronic)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/502-error-after-php7-update/)
 * Hi
 * Updated multisite install with php 7 and now get a 502 error when trying to switch
   users. 100k+ daily users, buddypress, WP 4.9.7, nginx, config with WP-starter
   and composer. dedicated hosting with unison replication between redundant web
   and db servers (MariaDB), F5 load balanced, cloudflare enabled. 502 error page
   is generated by cloudflare
    No issues with user switch (v 1.3.1) before php 7
   update. Have checked permissions and owner:group in php-fpm config Any ideas?
    -  This topic was modified 7 years, 9 months ago by [milleronic](https://wordpress.org/support/users/milleronic/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [7 years, 9 months ago](https://wordpress.org/support/topic/502-error-after-php7-update/#post-10680311)
 * This is most likely caused by your Nginx configuration having a low limit for
   the maximum header size, which causes Cloudflare to return a 502. This has come
   up before. Take a look here: [https://wordpress.org/support/topic/502-bad-gateway-36/](https://wordpress.org/support/topic/502-bad-gateway-36/)
 *  [joelpeterson](https://wordpress.org/support/users/joelpeterson/)
 * (@joelpeterson)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/502-error-after-php7-update/#post-10688875)
 * I can confirm that the solution in that thread worked for me when I had the issue.
 *  Thread Starter [milleronic](https://wordpress.org/support/users/milleronic/)
 * (@milleronic)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/502-error-after-php7-update/#post-10832536)
 * [https://wordpress.org/support/topic/502-bad-gateway-36/#post-9644813](https://wordpress.org/support/topic/502-bad-gateway-36/#post-9644813)
   
   Above nginx directives did not clear this up.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘502 error after php7 update’ is closed to new replies.

 * ![](https://ps.w.org/user-switching/assets/icon.svg?rev=3193956)
 * [User Switching](https://wordpress.org/plugins/user-switching/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-switching/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-switching/)
 * [Active Topics](https://wordpress.org/support/plugin/user-switching/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-switching/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-switching/reviews/)

## Tags

 * [502 Bad Gateway](https://wordpress.org/support/topic-tag/502-bad-gateway/)

 * 3 replies
 * 3 participants
 * Last reply from: [milleronic](https://wordpress.org/support/users/milleronic/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/502-error-after-php7-update/#post-10832536)
 * Status: resolved