Hi,

When this option is enable: Asynchronous Operation: output HTML, close connection, then store static file.
I get this error for any visited cache page:

Type php
Date XXX, XXX, XXX - XXX
User Anonymous
Location http://www.XXX.XXX/XXX/XXX
Referrer
Message Cannot modify header information - headers already sent in /var/www/vhosts/XXX.XXX/httpdocs/sites/all/modules/boost/boost.module on line 4097.
Severity error
Hostname XX.XXX.XX.XXX
Operations

This option worked fine before I done a clean upgrade from 1.03 to 1.17

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

What module are you using that could set a header & not be using drupal_set_header()? In any case to prevent this error from ever happening we can use headers_sent() to check before calling boost_async_opp().

mikeytown2’s picture

Status: Active » Needs review
FileSize
2.59 KB
mikeytown2’s picture

Status: Needs review » Fixed

committed; should be able to grab the dev version in 1 hour with these changes in

shahard333’s picture

I have this error after applying the patch for ever visited page:

Type boost
Date xxx, xxx xx, xxx - xx:xx
User Anonymous
Location http://www.XXX.XXX/XXX/XXX
Referrer
Message Headers already sent in on line 0. Asynchronous Operation will be disabled.
Severity notice
Hostname XX.XXX.XX.XXX
Operations

I get this error when Asynchronous Operation option is disable and enable

mikeytown2’s picture

Status: Fixed » Needs review
FileSize
1.91 KB

this will move the call into hook_exit; hopefully it will give us the correct location of where the headers are being sent from.

mikeytown2’s picture

Status: Needs review » Fixed

committed; turn boost verbose setting up to 7 and let me know what the output of the dblog is.

shahard333’s picture

I apply the new patch and change vebose setting to 7, here is the results:

1. "Message Headers already sent in on line 0. Asynchronous Operation will be disabled." Is now not showing when disabled
2. "Message Headers already sent in on line 0. Asynchronous Operation will be disabled." display when enabled (in vebose up tp 7 or 5 {I checked only these two settings})

here is the other notices that was appear after changing the vebose from 5 to 7 (display before and after the patch):
1.
Type boost
Date xxx, xxx xx, xxx - xx:xx
User Anonymous
Location http://www.XXX.XXX/XXX/XXX
Referrer
Message Debug: _boost_ob_handler()
HTTP Info: 200 - text/html
Path: cache/XXX.XXX.XXX/XXX.html
Content Container: node_page_default
Content Type:
ID:
Cache This: TRUE.
Severity notice
Hostname XX.XXX.XX.XXX
Operations

2.
Type boost
Date xxx, xxx xx, xxx - xx:xx
User Anonymous
Location http://www.XXX.XXX/XXX/XXX
Referrer
Message Debug: boost_cache_set_node_relationships()
0 of 10 given entries to the boost_cache_relationships table added or updated; 0 entries removed due to them being outdated.
Severity notice
Hostname XX.XXX.XX.XXX
Operations

I will not be available until the weekend, so I will not be able to test new patches.
Thanks for your help.

mikeytown2’s picture

Status: Fixed » Postponed (maintainer needs more info)

I need a list of all your enabled modules; one of them is conflicting with the way boost's async operation is working & I would like to know what could be causing the issue.

shahard333’s picture

Here is my enable modules list:

CCK:
Content
Content Copy
Content Taxonomy
Content Taxonomy Options
Content Templates
Fieldgroup
Node Reference
Number
Option Widgets
Text

Caching:
Boost
Memcache Admin

Core - optional:
Color
Comment
Contact
Database logging
Menu
Path
PHP filter
Poll
Profile
Search
Statistics
Taxonomy
Tracker
Trigger
Update status

Core - required:
Block
Filter
Node
System
User

Indymedia:
IP anonymize

Mail:
SMTP Authentication Support

Meta tags:
Nodewords
Nodewords - basic meta tags

Nodewords:
Basic meta tags

Oter:
404 Blocks
Admin links
Advanced help
Diff
FCKeditor
Frequently Asked Questions
Global Redirect
Last Node
Meta tags node type
Node Adoption
Nodeaccess
OpenSearch Plugin
Path redirect
Pathauto
Token
Twitter
Twitter actions

Spam control:
CAPTCHA
Image CAPTCHA
Text CAPTCHA

Taxonomy VTN:
Taxonomy VTN
Taxonomy VTN Terms Blocks
Taxonomy VTN Vocabulary Block

Views:
Views
Views UI

XML sitemap:
XML sitemap
XML sitemap custom
XML sitemap engines
XML sitemap menu
XML sitemap node
XML sitemap taxonomy

dankohn’s picture

Hi, I am also seeing this bug in a format that's easily replicatable. The issue is with pathauto. I'm trying to make a large number of aliases. When I run this script, I get the following error:

php pathauto.php

Warning: parse_url(http:///.): Unable to parse URL in /var/www/autism.healingthresholds.com/sites/all/modules/boost/boost.module on line 2760

Warning: Cannot modify header information - headers already sent by (output started at /var/www/autism.healingthresholds.com/sites/all/modules/boost/boost.module:2760) in /var/www/autism.healingthresholds.com/includes/bootstrap.inc on line 636

Warning: Cannot modify header information - headers already sent by (output started at /var/www/autism.healingthresholds.com/sites/all/modules/boost/boost.module:2760) in /var/www/autism.healingthresholds.com/includes/bootstrap.inc on line 637

Warning: Cannot modify header information - headers already sent by (output started at /var/www/autism.healingthresholds.com/sites/all/modules/boost/boost.module:2760) in /var/www/autism.healingthresholds.com/includes/bootstrap.inc on line 638

Warning: Cannot modify header information - headers already sent by (output started at /var/www/autism.healingthresholds.com/sites/all/modules/boost/boost.module:2760) in /var/www/autism.healingthresholds.com/includes/bootstrap.inc on line 639

Disabling boost fixes the error.

mikeytown2’s picture

makes since
http://us.php.net/parse_url

On seriously malformed URLs, parse_url() may return FALSE and emit a E_WARNING. Otherwise an associative array is returned...

Wrap parse_url in a try catch block; change the logic so it will fail gracefully?

mikeytown2’s picture

Version: 6.x-1.17 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active
mikeytown2’s picture

Status: Active » Needs review
FileSize
1.74 KB
mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dankohn’s picture

Status: Closed (fixed) » Needs review

Is this in the latest dev release? If so, I can download and confirm the fix for you?

xmarket’s picture

Hi dankohn,

I'm sure it is in the latest dev release indeed.

From the CVS list:

#657960: catch errors thrown by parse_url().

Without any offence: #657960 refer to this post node id. :D

mikeytown2’s picture

Status: Needs review » Fixed

already in dev, marking as fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

karlmc15’s picture

[Warning: Cannot modify header information - headers already sent by (output started... ]

These problems will face the situation causing the error as follows:
- If you use Unicode UTF-8 editor, you check to see strange characters will appear the file. Check with the editor like notepad, notepad + +.
- Add the following function in the first line of code:
ob_start ();

You can send mail for your own file to view, email; karlmc15@gmail.com