Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header already sent #29

Closed
psi-4ward opened this issue Jan 9, 2017 · 10 comments
Closed

Header already sent #29

psi-4ward opened this issue Jan 9, 2017 · 10 comments
Assignees
Labels

Comments

@psi-4ward
Copy link

Hey,

You have an output block over the php init stuff: https://github.com/lamclennan/pdnsmanager/blob/master/index.php#L17
which leads to Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:17) in /var/www/html/lib/headers.php on line 19

Chears

@loewexy loewexy added the bug label Feb 6, 2017
@TheFatherMind
Copy link

I am seeing this error as well through nginx. It is making it unusable. Any idea when this will be fixed?

@loewexy
Copy link
Owner

loewexy commented Jul 10, 2017

I am not able to reproduce this issue. Also a warning should not render the software unusable.

@TheFatherMind
Copy link

TheFatherMind commented Jul 10, 2017

I would be more than happy to set you up with access to a dev site on my server so that you can tinker with it if you like. It does work. Although it is filling my logs. I edited the code and added "error_reporting(0);" to the top of each PHP document to get the error off the top of the pages. I am using PHP 5.6.31. I am sure the PHP version is related to why you cannot replicate the error.

FYI: So far your version has been the best GUI I have seen yet. (: Looking forward to getting it 100% usable.

@morremeyer
Copy link

I tried to reproduce this on a Ubuntu Xenial (with PHP 5.6.31-1~ubuntu16.04.1+deb.sury.org+1), but I don't get any errors.

@TheFatherMind If you are still experiencing those problems and want to show them to me on your systems, please mail me at developer@maurice-meyer.de, PGP key with the fingerprint C56B20A600EE30EE618FA6025D3C9B15D1BEE8BC is available at the usual key servers.

@psi-4ward
Copy link
Author

psi-4ward commented Jul 20, 2017

Do you have the php.ini settings:
error_reporting = E_ALL
display_errors = On
?

@psi-4ward
Copy link
Author

The error is totally clear:
https://github.com/loewexy/pdnsmanager/blob/master/index.php starts with <!DOCTYPE html> which leads to flush the output buffer. Starting with the first flush you are note able to modify the headers.

The Line in https://github.com/loewexy/pdnsmanager/blob/master/lib/headers.php#L19 should be removed. If we need this header we have to adjust the apache / nginx config to deliver it.

@morremeyer
Copy link

morremeyer commented Jul 20, 2017

@psi-4ward Thanks for beating me to see what is obvious - while I was just wondering why I can't reproduce it. I just pushed f238b7e to the master, where the headers are set before the HTML block starts.

While this should fix the issue, do you have any idea why I can't reproduce that? My error_reporting is set at E_ALL and display_errors is on, so I wonder why I don't get this error?

@psi-4ward
Copy link
Author

Hmm also check your php error log and apache error log

@morremeyer
Copy link

@psi-4ward Did that, too. I'm using nginx + php-fpm with the nginx error log level set to info, doesn't give me anything, neither does the php-fpm error log (which I have set to my production values, that is workers logging to it, too).

This is really strange, I'll try to find out more about this.

@TheFatherMind
Copy link

@mauricemeyer I have eMailed you login information to your own area so you can see this issue and play around. My mail server is going through a DNS switch over and it got stuck in the queue. I will eMail you from a different account in the mean time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants