klaubert / waf-fle

WAF-FLE, ModSecurity Console
http://waf-fle.org
GNU General Public License v2.0
141 stars 74 forks source link

PHP Warning: Cannot modify header information - headers already sent #73

Open hans-mayer opened 4 years ago

hans-mayer commented 4 years ago

Dear All,

I installed waf-fle 0.6.4 on Debian 10 with Apache 2.4.38, php 7.3.19 and MySQL 8.0.20 When I open my Browser Chrome I see some empty areas in the HOME tab. But when I click on "EVENTS" I get an error "HTTP/1.1 500 Internal Server Error". In Apache error log there is

PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/waf-fle_0.6.4/header.php:74) in /usr/local/waf-fle_0.6.4/functions.php on line 1536, referer: http://xxxxxxxxx/waf-fle/index.php

Nothing happens when I click on "FILTER". MANAGEMENT shows Sensors, Users and Info. But when I try to edit a sensor I get this error 500 too. The error log in Apache is slightly different:

PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/waf-fle_0.6.4/header.php:74) in /usr/local/waf-fle_0.6.4/functions.php on line 2503, referer: http://xxxxxxxxx/waf-fle/management.php?s&edit&sensor=1

But it includes always this "Cannot modify header information - headers already sent"

As I run waf-fle successfully more than 2 year on a different Debian server ( which does not exists anymore ) with Apache 2.4.10 and PHP 5.6.13 I thought it's maybe an issue of PHP 7. So I installed within a Docker container Apache 2.4.10 with PHP 5.6.40, because I couldn't find a container with the same PHP version. But with this combination I run into exactly the same issues.

Any ideas what to do ?

Kind regards Hans

hans-mayer commented 4 years ago

Dear All,

here an update for others which run maybe in a similar issue: I installed MySQL version 5.5.59 in a docker container. As I have some other applications which are using MySQL version 8. And using MySQL version 5.5.59 solved the issue. But it's strange because the error message in Apache log wouldn't point to an MySQL issue, as it says: [php7:warn] [pid 5130] [client xx.xx.xx.xx:50082] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/waf-fle_0.6.4/header.php:74) in /usr/local/waf-fle_0.6.4/functions.php on line 1536, referer: http://xx.yy.zz/waf-fle/index.php

Kind regards Hans

--