Header may not contain more than a single header errors

A place for users and developers of the Xataface to discuss and receive support.

Postby radeski » Thu Oct 18, 2007 6:45 am

Hi all,

I'm getting the following error when trying to update records:

"Warning: Header may not contain more than a single header, new line detected. in [...] dataface/actions/edit.php on line 167"

The error refers to the following:

/*
*
* Redirect the user to the appropriate record.
*
*/
header("Location: $link");
exit;

Can anyone steer me in the right direction to fix this?

Thank you!
radeski
 
Posts: 12
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sun Oct 21, 2007 12:54 am

Hi radeski,

For some reason it looks like some new lines in the status message aren't getting url encoded.. but they should.

If you go to line 167 of the file in question, you'll see a call to header() like
header("Location: $link");

Try adding:
echo $link;
exit;

Just before that... temporarily so you can see what the link is that it is trying to forward to..

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Another one

Postby projektoe » Wed Oct 31, 2007 11:39 am

Here's another ugly error I get - this ONLY happens when I try to edit records that I searched for...


Fatal error: [pear_error: message="Attempt to build quickform with no record set." code=256 mode=return level=notice prefix="" info=""]On line 59 of file /usr/local/apache/htdocs/dataface/actions/edit.php in function printstacktrace()
On line 889 of file /usr/local/apache/htdocs/dataface/Dataface/Application.php in function handle(array(array(Edit,http://[[edited]]/index.php?-action=edit&-table=GH_MEDIA_STU)
On line 1317 of file /usr/local/apache/htdocs/dataface/Dataface/Application.php in function handlerequest()
On line 19 of file /usr/local/apache/htdocs/gh_it_inventory/index.php in function display()
in /usr/local/apache/htdocs/dataface/actions/edit.php on line 59


Thanks,
Radek
projektoe
 
Posts: 2
Joined: Wed Oct 31, 2007 11:26 am

Postby shannah » Wed Oct 31, 2007 11:44 am

Yes.. this happens when your edits cause the record to not be matched by your search anymore. The save goes through ok, just when it redirects back to the edit form, it can't find the record to edit anymore because it doesn't match the search.

The next release results in a less scary error message when this occurs.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby projektoe » Wed Oct 31, 2007 11:47 am

OK, makes sense. Is there anything that can be done about this in the meantime? I myself get scared every time I see this, not to mention the rest of the users of our system :D

Thanks!
projektoe
 
Posts: 2
Joined: Wed Oct 31, 2007 11:26 am

Postby shannah » Wed Oct 31, 2007 11:55 am

You could make a custom error handler (http://ca3.php.net/errorfunc , http://ca.php.net/set-error-handler).

that isn't so scary looking.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 32 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved