Forum for discussing general topics related to Couch.
13 posts Page 1 of 2
Hi

I need some help, I got the following errors on a website of mine

Warning: Cannot modify header information - headers already sent by (output started at /home/astraele/public_html/contact-astra-electrical-services.php:7) in /home/astraele/public_html/cms/cms.php on line 376

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/astraele/public_html/contact-astra-electrical-services.php:7) in /home/astraele/public_html/contact-astra-electrical-services.php on line 18

I found the thread on how to fix it but did not do anything, still getting the error, the thread I found is below

viewtopic.php?f=4&t=53

Any ideas or what else can I try to fix it?

Thank you in advance

Ian
Hello Ian,

I've already listed all the reasons I could think of in the post you mentioned.
I'll now have to take a look at your setup first-hand to know what else could be going wrong.

Please PM me the FTP+Couch creds for your site, if that is OK with you.

Thanks.
Hi KK

am trying to send you a PM but it's stuck in my outbox for some reason?
Ahh it's sent now
Thanks.

I logged-in and had a look aand couldn't find the error anywhere :?
Carefully scrutinized the contact page as well as all the other three templates but the error is nowhere to be found.

Can you please check and let me know if you still get it?
If yes, please also PM me the exact link (I figured it was the contact page).
ahh sorry I took the php error reporting off the contact page on the site

I'll put it back in, one sec
I put the error reporting back in and is showing the errors on the contact page
Thanks.

I had a look at the contact template, Ian.

The original post about this problem (viewtopic.php?f=4&t=53) very prominently mentions a leading cause of this problem to be the 'space before the opening <?php tag'.

Your template has the following (abbreviated) code -
Code: Select all
<?php
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);
?>

<?php require_once( 'cms/cms.php' ); ?>

<cms:template title='Astra Electrical Services Contact Page'>
..
..

Can you see the blank newline just above the <?php require_once( 'cms/cms.php' ); ?> ?
That is the problem. The error message also reports this (line 7) -
output started at /home/astraele/public_html/contact-astra-electrical-services.php:7

Please delete the newline and that should fix the problem.
Thank you so much, I read the bit about the white space(blank lines) in that thread and thought it meant at the very start and end of the php file, did not think it would be a issue just above as when I did not have the error reporting in, it was still displaying the error but is perfect now

Thank you so much for taking the time to check it out and have a look, really appreciate it
You are welcome, Ian :)
13 posts Page 1 of 2