View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 05025 | Bug reports | Survey participants (Tokens) | public | 2011-03-11 22:15 | 2011-04-14 00:00 |
| Reporter | Assigned To | Mazi | |||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.90+ | ||||
| Fixed in Version | 1.91RC5 | ||||
| Summary | 05025: Header already sent error | ||||
| Description | If a token is not in valid time frame and is used to enter in a survey, i am getting following error along with appropriate message. "Warning: Cannot modify header information - headers already sent by (output started at /home/content/68/7598978/html/limesurvey/common.php:4232) in /home/content/68/7598978/html/limesurvey/common.php on line 5098" Check screenshot | ||||
| Steps To Reproduce |
For more clarification, see image attached. | ||||
| Additional Information | We are echoing text before calling killSession() and hence the error. | ||||
| Tags | No tags attached. | ||||
| Attached Files | header_already_sent_corrected.patch (711 bytes)
Index: index.php
===================================================================
--- index.php (revision 9887)
+++ index.php (working copy)
@@ -665,6 +665,7 @@
$tokendata = $tkresult->FetchRow();
if ($tkresult->RecordCount()==0 || $areTokensUsed)
{
+ killSession();
sendcacheheaders();
doHeader();
//TOKEN DOESN'T EXIST OR HAS ALREADY BEEN USED. EXPLAIN PROBLEM AND EXIT
@@ -677,7 +678,7 @@
." (<a href='mailto:{$thissurvey['adminemail']}'>"
."{$thissurvey['adminemail']}</a>)<br /><br /> \n";
echo templatereplace(file_get_contents("$thistpl/endpage.pstpl"));
- killSession();
+
doFooter();
exit;
}
| ||||
| Bug heat | 4 | ||||
| Complete LimeSurvey version number (& build) | 9642 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Google Chrome, Mozilla Firefox, Microsoft IE | ||||
| Database type & version | MySQL(i) 5.1.37 | ||||
| Server OS (if known) | Windows 7 | ||||
| Webserver software & version (if known) | IIS 6.0 | ||||
| PHP Version | 5.2.13 | ||||
|
I can NOT reproduce this issue using the latest 1.91RC5 version. Can you test this version if you can reproduce the error with your survey?! |
|
|
Ok.. neither can i.. tested on 1.91RC5! But shouldn't killSession() be called before echoing text? |
|
|
Fixed at 1.91 RC5 The text echoed is just a PHP warning. Warnings and notices should generally be switched off at production servers. |
|
|
I see. ok. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-03-11 22:15 |
|
New Issue | |
| 2011-03-11 22:15 |
|
File Added: Capture.PNG | |
| 2011-03-11 22:16 |
|
File Added: header_already_sent_corrected.patch | |
| 2011-03-12 13:05 | Mazi | Note Added: 14420 | |
| 2011-03-12 13:05 | Mazi | Assigned To | => Mazi |
| 2011-03-12 13:05 | Mazi | Status | new => feedback |
| 2011-03-12 17:47 |
|
Note Added: 14421 | |
| 2011-03-12 17:47 |
|
Status | feedback => assigned |
| 2011-03-12 17:49 |
|
Note Edited: 14421 | |
| 2011-03-12 17:59 | Mazi | Note Added: 14422 | |
| 2011-03-12 17:59 | Mazi | Status | assigned => resolved |
| 2011-03-12 17:59 | Mazi | Fixed in Version | => 1.91RC5 |
| 2011-03-12 17:59 | Mazi | Resolution | open => fixed |
| 2011-03-12 18:01 |
|
Note Added: 14423 | |
| 2011-04-14 00:00 | c_schmitz | Status | resolved => closed |
| 2016-12-08 10:39 | c_schmitz | Category | Tokens => Survey participants (Tokens) |