Tag: PHP

  • Testing http header IP forwarding

    I need to determine what the application sees versus what is being sent, these scripts helped me see the discrepancy and validate the change once resolved: <?php header(‘Expires: 0’); // Proxies. header(‘Cache-Control: no-store, no-cache, must-revalidate’); // HTTP 1.1. header(‘Cache-Control: post-check=0, pre-check=0’, FALSE); header(‘Pragma: no-cache’); // HTTP 1.0. $client = @$_SERVER[‘HTTP_CLIENT_IP’]; $forward = @$_SERVER[‘HTTP_X_FORWARDED_FOR’]; $remote =…

  • php Warning: Cannot modify header information

    I received the error of “php Warning: Cannot modify header information”, and found the fix is to update my php.ini to include this: output_buffering = On I ‘could’ also set the variable in an include page, if my site was running PHP as a CGI.