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.
- The topic ‘Missing $_SERVER information’ is closed to new replies.