[development] authentication hooks - PLEASE HELP
mfredrickson at ppmns.org
Mon Dec 19 15:15:35 UTC 2005
>> If that warning comes with no message ahead of it, it most often means
> that some included file, such as a module or something, has whitespace after
> the ?> at the end of the file. Check your contributed modules and custom
> code to make sure there is no whitespace there.
I've hit this problem when dumping debugging code to the output stream. I
think the problem is caused by a call to the drupal_goto() function, which
mangles the headers and causes the previous print()/echo() etc to fail.
The solution I found and prefer is using drupal_set_message(). This function
stores the info I need until the next page load.
Another good alternative during debugging is using naïve prints/echos with
the devel module's option to interrupt redirects (ie. Stop drupal_goto from
acting immediately). This is a helpful option when printing out stack traces
or arrays. I find it irritating to have to click through a lot of pages that
I'm not debugging, however.
Finally, on a more personal note: I know it can be frustrating not to
immediately get the support you need. I think you will find however, that
people on this list, and in the support forums, are willing to help, and
help a lot. As a relative newby I've had my share of unanswered questions,
but I find that I can usually get the answer I need by revisiting and
rephrasing the issue.
More information about the development