Viewing 12 replies - 31 through 42 (of 42 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Can you try to add this line to firewall.php and see if it ouputs anything?
    Add it on line 2, just below the opening <?php tag:

    var_dump( headers_list() );
    Thread Starter rafaelmagic

    (@rafaelmagic)

    I got 3 entries about “Headers Already Sent”..

    array(1) { [0]=> string(24) “X-Powered-By: PHP/5.4.27” }

    ————————————————–
    #1
    Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/user/public_html/wp-content/plugins/ninjafirewall/ninjafirewall.php:2) in /home/user/public_html/wp-content/plugins/ninjafirewall/ninjafirewall.php on line 18

    Line 18:if (!session_id() ) { session_start(); }

    ——————————————————
    #2

    Warning: Cannot modify header information – headers already sent by (output started at /home/user/public_html/wp-content/plugins/ninjafirewall/ninjafirewall.php:2) in /home/user/public_html/wp-login.php on line 414

    Line 414:header(‘Content-Type: ‘.get_bloginfo(‘html_type’).’; charset=’.get_bloginfo(‘charset’));”

    ———————————————————-
    #3

    Warning: Cannot modify header information – headers already sent by (output started at /home/user/public_html/wp-content/plugins/ninjafirewall/ninjafirewall.php:2) in /home/mamagi75/public_html/wp-login.php on line 426

    Line 426:setcookie(TEST_COOKIE, ‘WP Cookie check’, 0, COOKIEPATH, COOKIE_DOMAIN);

    —————————————

    I was looking at the NGinx Instruction and I can install Php-fpm since I am running FCGI already. Maybe using the socket will help….

    Plugin Author nintechnet

    (@nintechnet)

    This is it:

    array(1) { [0]=> string(24) “X-Powered-By: PHP/5.4.27” }

    Is this sent by Nginx ?
    If it is, you can try to add this line to your Nginx conf file:

    proxy_hide_header X-Powered-By;

    And restart Nginx.

    See this for more details.

    Thread Starter rafaelmagic

    (@rafaelmagic)

    I added it to NGinx and it wasn’t it.

    I think its Varnish.

    I will uninstall Varnish and test the header tonight.

    If its doesn’t work with Varnish, you might want to mention it in a FAQ. =)

    Plugin Author nintechnet

    (@nintechnet)

    It works with any proxy/load-balancer, but no headers should be sent.

    If it is Varnish, you will need to add a remove resp.http.X-Powered-By; instruction. See varnish doc for more info about that.

    Thread Starter rafaelmagic

    (@rafaelmagic)

    Followed this guide:
    http://www.danielmiessler.com/blog/changing-your-server-headers-using-varnish

    Added the following lines to my default config
    sub vcl_deliver {
    remove resp.http.Via;
    remove resp.http.X-Cacheable;
    remove resp.http.X-Powered-By;
    remove resp.http.X-Varnish;
    remove resp.http.magicmarker;
    remove resp.http.Age;
    }

    Putty:
    curl -I http://yoursite.com

    Headers Gone. Checked mysite.com/wp-login.php

    Still have the the message at wp-login.php

    array(1) { [0]=> string(24) “X-Powered-By: PHP/5.4.27” }

    Then I uninstalled Nginx and Varnish and still have the message.

    Sorta funny. =)

    ———————————-
    Running Apache Only

    Tried to “Test Firewall Configuration”, it looped back to start.

    However it did not white screen, before it did with a .user.ini

    —————————
    So something in Apache is setting this header:
    array(1) { [0]=> string(24) “X-Powered-By: PHP/5.4.27” }

    Weird… Or maybe I am doing something wrong…

    Thread Starter rafaelmagic

    (@rafaelmagic)

    Spoke to early, white screen

    Plugin Author nintechnet

    (@nintechnet)

    Maybe it was added by PHP ?
    Try to add this line to the server main php.ini:

    expose_php = off
    Thread Starter rafaelmagic

    (@rafaelmagic)

    Nope. expose = off just turned off the php version.

    I could see Sessions being written by Ninja Firewall in tmp folder.

    Ninjacheck says that “Warning: session_start(): Cannot send session cache limiter”

    When I log in I get an email message

    I Added var_dump( headers_list() ); to line 2
    I got
    array(0) { }

    Which tells me that Apache is sending a Header. I am using php 5 and FCGI.

    Plugin Author nintechnet

    (@nintechnet)

    I got
    array(0) { }

    That part is fine, the array is empty. No headers are sent.
    But that still does not solve the problem.

    Thread Starter rafaelmagic

    (@rafaelmagic)

    At least I’m helping create the FAQ with ways to troubleshoot and check for headers, and delete them in Varnish. =)

    Do you think adding php-fpm will help?

    Plugin Author nintechnet

    (@nintechnet)

    You can give it a try, it works pretty well with php-fpm as you can see in our screenshots.

Viewing 12 replies - 31 through 42 (of 42 total)
  • The topic ‘VPS- Cent Os Install Help..’ is closed to new replies.