Title: Missing $_SERVER information
Last modified: December 9, 2020

---

# Missing $_SERVER information

 *  Resolved [ccgjosh](https://wordpress.org/support/users/ccgjosh/)
 * (@ccgjosh)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/missing-_server-information/)
 * We use PHP to get the referring page ( $_SERVER[‘HTTP_REFERRER’] ) to help track
   form conversions. While this method works great on other websites that we’ve 
   built (and host on the same server), we are having a problem with one of our 
   sites where this information is not being tracked properly.
 * I created a custom plugin and added this code to record data to the error_log:
 *     ```
       add_action('init', 'GF_User_Tracking::test_error_log');
       class GF_User_Tracking {
       	function test_error_log() {
       		error_log( print_r( $_SERVER, true));
       	}
       }
       ```
   
 * After clearing the cache, the proper data is stored. However, once the cache 
   has been created for a page, visiting that page is not recorded in the error_log.
   The same thing happens when I disable cache entirely.
 * I suspect it’s due to a setting or perhaps a conflicting plugin but I wanted 
   to reach out first before diving into the issue.
    -  This topic was modified 5 years, 5 months ago by [ccgjosh](https://wordpress.org/support/users/ccgjosh/).

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/missing-_server-information/#post-13771304)
 * Hi,
 * The same thing happens when I disable cache entirely.
 * wait a second , the issue still happens with cache plugin disabled ?
 * which server envs you can see if you create a phpinfo page ?
 * Best regards,
 *  Thread Starter [ccgjosh](https://wordpress.org/support/users/ccgjosh/)
 * (@ccgjosh)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/missing-_server-information/#post-13771486)
 * Sorry, I should have been more clear — when the cache is disabled, the error_log
   shows the correct data.
 * [PHP info can be viewed here](https://mackenziecommercial.com/php.php).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/missing-_server-information/#post-13771710)
 * Hi,
 * okay , then that makes sense
 * when page is cached, PHP will NOT be running at all , so it won’t log it out
 * you may need to invoke [ESI](https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url)
   for this
 * if you use ESI , you can use “$_SERVER[‘ESI_REFERER’]” to get the refer link 
   from parent URI
 * Best regards,
 *  Thread Starter [ccgjosh](https://wordpress.org/support/users/ccgjosh/)
 * (@ccgjosh)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/missing-_server-information/#post-13772107)
 * It looks like simply enabling ESI has solved the issue. I will keep an eye on
   it and do more research if needed. Thanks for your help!

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

The topic ‘Missing $_SERVER information’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ccgjosh](https://wordpress.org/support/users/ccgjosh/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/missing-_server-information/#post-13772107)
 * Status: resolved