Needs review
Project:
Aggregator2
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2006 at 01:09 UTC
Updated:
1 Sep 2006 at 13:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
adixon commentedthis fix is already in bootstrap.inc as:
on the other hand, aggregator2 is still crapping out on a refresh sometimes, I suspect it's in the aggregator2 code somewhere (perhaps getting the feed information via http outputs a header somehow?).
Conclusion - i'm changing this to an aggregator2 module bug.
Comment #2
adixon commentedOkay, turns out the refresh bug is in fact in aggregator2, i've attached a patch that fixes it.
Commentary:
It's not so critical because normally the refresh is handled by the cron, and the refresh is actually working, it just fails at the end with the drupal_goto() call. The problem is in the calls to flush() immediately before various sleep commands included in the feed parsing. I don't know why those flush commands are there, but they are generating headers that show up when I check with a header_sent (they seem to be empty headers). I tried putting ob_start() and ob_end_clean() around the flushes but that didn't work (because it was outputing headers, not content), but then i converted the flushes to ob_clean() and that solved it. I suspecting those flushes were there in error (you use the flush() trick if you're trying to use sleep as a way of animating output, i'm guessing they just got put in by copying from some sleep() function example).
Comment #3
johnhanley commentedadixon,
Thanks for researching and resolving this issue. It has been hounding me for awhile.
My previous attempts in diagnosing the problem revealed that ob_get_length() was zero immediately before executing
at the end of content_import_admin_refresh_feed(), yet the "headers already sent" message persisted.
I am beginning to suspect that this is a PHP 5 issue because I don't remember this occurring with PHP 4.x.
In any event thanks again.
Comment #4
jimmychuang commentedCould you attach the correct files let me to replace the error one?
I have no idea about coding.
Comment #5
dimitryous commentedwarning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/drupal-4.6.9/includes/database.mysql.inc:27) in /Library/WebServer/Documents/drupal-4.6.9/includes/common.inc on line 99.
MacOS 10.3.9
php 4.3.11
MySQL - 4.1.20-max
Apache 1.3.33
drupal-4.6.9
Cannot login after first user created:
warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/drupal-4.6.9/includes/database.mysql.inc:27) in /Library/WebServer/Documents/drupal-4.6.9/includes/common.inc on line 99.
warning: session_regenerate_id() [function.session-regenerate-id.html]: Cannot send session cookie - headers already sent by (output started at /Library/WebServer/Documents/drupal-4.6.9/includes/database.mysql.inc:27) in /Library/WebServer/Documents/drupal-4.6.9/modules/user.module on line 817.
warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/drupal-4.6.9/includes/database.mysql.inc:27) in /Library/WebServer/Documents/drupal-4.6.9/includes/common.inc on line 192.
Blank page ...
Do I have a chance to get all the stuff working ok if I UPGRADE?