Support » Plugin: NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall » VPS- Cent Os Install Help..
VPS- Cent Os Install Help..
-
Hi,
Deleted all security plugins.
I am running a VPS with CentOs.
I tried all the INI’s, php.ini, php5.ini, .user.ini.
When I hit Enable, I white screen.
Waited 5 minutes on all runs.
Still have a white screen.
Nothing in Error Logs.
Is their a CentOs VPS install workaround.
-
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() );
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 18Line 18:if (!session_id() ) { session_start(); }
——————————————————
#2Warning: 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’));”
———————————————————-
#3Warning: 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….
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.
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. =)
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.Followed this guide:
http://www.danielmiessler.com/blog/changing-your-server-headers-using-varnishAdded 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.comHeaders 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 OnlyTried 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…
Spoke to early, white screen
Maybe it was added by PHP ?
Try to add this line to the server main php.ini:expose_php = off
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.
I got
array(0) { }That part is fine, the array is empty. No headers are sent.
But that still does not solve the problem.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?
You can give it a try, it works pretty well with php-fpm as you can see in our screenshots.
- The topic ‘VPS- Cent Os Install Help..’ is closed to new replies.