PDA

View Full Version : session cache limiter error


deborah366910
03-08-2009, 03:32 PM
I am using my own php form and have added a Security question and honeypot feature to the form (from yr contact form solution pack) and have the following error on the page :

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/afrika/public_html/lendersquotes/html/includes/FinanceHeader.php:4) in /home/afrika/public_html/lendersquotes/html/forms/WAVT_ValidatedForm_PHP.php on line 3

Link is: http://lendersquotes.com/html/Enquiry_form.php

I have used your pdf instructions to extract the relevant code for these features and have rechecked them. I do not have sessions on this site so not sure why this is happening.
I have tried forums to find a solutions to no avail.
thanks for help

Ray Borduin
03-09-2009, 08:11 AM
It looks like you have to move you include refrence:

/home/afrika/public_html/lendersquotes/html/includes/FinanceHeader.php

lower on the page. It is causing problems above the other code running on the page.

martistott342331
05-26-2010, 01:01 PM
I am having the exact same problem. My error code is:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/reflec3/public_html/Contact/Contact Webmaster/ContactForm102/ContactForm_GMC/contactWebmaster.php:2) in /home/reflec3/public_html/Contact/Contact Webmaster/ContactForm102/ContactForm_GMC/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php on line 3


The link to my site is:

http://reflectingchrist.org/Contact/Contact%20Webmaster/ContactForm102/ContactForm_GMC/contactWebmaster.php

I have looked for the line of code to move, but did not find it. Do I look in contactWebmaster.php ?

Ray Borduin
05-28-2010, 07:32 AM
yes, look at line contactWebmaster.php page on line 2 and the other page on line 3. Most likely the problem is solved by an update in the first location, but it depends on what you find on those lines.

martistott342331
05-28-2010, 08:13 AM
Thanks for your reply. I don't know php well, so I'm going to ask your advice on what to do with the lines of code.

Line 2 of contactWebmaster.php is:

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


Line 3 of WAVT_ValidatedForm_PHP.php is:

session_start();

Now what do I do with these lines of code?

Ray Borduin
05-28-2010, 10:59 AM
It probably means you either have a blank line or space character in that first line.

highlight the line before and after, is there a blank line or space character in the code?

martistott342331
05-28-2010, 01:23 PM
Thanks, I had a blank line at the beginning. It's amazing what a little white space can do! I wish I had known about that, but I bought the contact form solution in the first place because I didn't know php. Problem solved.

kenny409515
06-24-2010, 09:21 AM
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/web05b/b1189/pow.countrylog/htdocs/contact.php:1) in /hermes/web05b/b1189/pow.countrylog/htdocs/ContactForm_GMC/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php on line 3

This is what I am getting... What is the issue I am running into with this script... Any help would be great. The site is http://www.countrlylogcottages.com/contact.php

Eric Mittman
06-24-2010, 10:07 AM
You page link seems to be broken. The error you are getting about the headers already being sent is almost always due to some white space characters outside of the php blocks that are interpreted as output.

Since the error says the output is occurring on line 1 of your contact.php this is the page that you should check for issues. Look for a space or return that is outside of the php block at the top of the page.

I have seen before where having the BOM signature on the page causes this error to occur. You can check on this setting by doing a save as for the file, in the save as dialog box there should be a check box for the option of including the BOM signature on the page. You should make sure that this option is not enabled.

kenny409515
06-24-2010, 10:22 AM
Sorry about that link it is http://www.countrylogcottages.com/contact.php... I checked the link and I also checked the BOM signature... To no avail I can still not figure it out...

Eric Mittman
06-24-2010, 10:53 AM
Post back with a copy of the page in a zip archive and I will take a look to see if I can spot the problem, it is the contact page that I would like to see.

kenny409515
06-24-2010, 06:40 PM
Here you go

Jason Byrnes
06-25-2010, 08:03 AM
please send a copy of the contact.php page so I can examine the code.

kenny409515
06-25-2010, 12:07 PM
Here you go...

Jason Byrnes
06-25-2010, 12:33 PM
when I open this page and go to File -> Save As, i see the "Include Unicode Signature (BOM)" option is checked (See attached screen shot). It would not be checked for me unless it where applied to the file.

With the contactus.php page open, go to File -> Save As and uncheck the "Include Unicode Signature (BOM)" option.

kenny409515
06-25-2010, 01:06 PM
It still doesn't work even after the BOM signature was removed...

Jason Byrnes
06-25-2010, 02:35 PM
make sure the change is being uploaded, if your still getting the error at line, the page on the server still has the BOM signature on it, this is a PHP bug.

kenny409515
06-25-2010, 03:17 PM
I changed the BOM to the title and then I uploaded it under another name... http://www.countrylogcottages.com/contact1.php. It still isn't working... X-x

Jason Byrnes
06-25-2010, 05:41 PM
When i open this file ion Dreamweaver and go to File -> Save As, the "Include Unicode Signature (BOM)" option is still checked. It needs to be unchecked. If the Include Unicode Signature option is checked when the file is saved, it will cause the error. It is a PHP bug.

kenny409515
06-25-2010, 07:03 PM
Okay... So my Dreamweaver CS4 is a little screwed up and I couldn't save even with the BOM unclicked. So I downloaded Notepad2 and that worked!! If anyone has been following this post and having the same issue that I had you can get that Notepad2 here: http://www.flos-freeware.ch/notepad2.html. Thanks guys!

Jason Byrnes
06-28-2010, 07:28 AM
Great, glad to hear you where able to resolve the issue.