Last modified: 2010-05-15 15:50:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13272, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11272 - Warning: Cannot modify header information
Warning: Cannot modify header information
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.10.x
All All
: Highest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://e-komputer.info
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-10 09:02 UTC by Poon Poi Ming
Modified: 2010-05-15 15:50 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Poon Poi Ming 2007-09-10 09:02:12 UTC
I am trying to use the SpecialDeleteOldRevisions function but encountered the following error:

:  Warning: Cannot modify header information - headers already sent by (output started at 
:  /home/ekomrinf/public_html/ekompute/LocalSettings.php:149) in : /home/ekomrinf/public_html/ekompute/includes/WebResponse.php on line 10

When I tried to install Adsense in my LocalSettings.php, I encounter a similar error too:

: Warning: Cannot modify header information - headers already sent by (output started at 
: /home/ekomrinf/public_html/ekompute/adsense.php:4) in 
: /home/ekomrinf/public_html/ekompute/includes/WebResponse.php on line 10

What could be the possible cause? — ~~~~
Comment 1 Andrew Garrett 2007-09-10 09:05:14 UTC
You have some blank lines at the end of your LocalSettings.php. On line 149.
Comment 2 Poon Poi Ming 2007-09-10 22:16:08 UTC
Hi, I have checked but there is no blank lines on line 149. The pertinent section of LocalSettings.php reads:

$wgAvailableRights[] = 'DeleteOldRevisions';
$wgGroupPermissions['sysop']['DeleteOldRevisions'] = true;
include_once("$IP/extensions/SpecialDeleteOldRevisions.php");
#include_once( "$IP/adsense.php" );
?>

Line 149 is:
: include_once("$IP/extensions/SpecialDeleteOldRevisions.php");

Comment 3 Rob Church 2007-09-10 22:22:57 UTC
Try checking the file specified for blank lines or byte-order marks at the start of the file, and remove the "?>" tag from the end of the file, if present.
Comment 4 Poon Poi Ming 2007-09-11 00:13:36 UTC
Hi, I have checked and rechecked but there are no blank lines or byte-order marks at the start of the file nor blank lines at the end. I have removed the "?>" tag from the end of the LocalSettings.php file (I put it there earlier thinking that the closing tag was missing.)

I uploaded the mediawiki-1.10.1.patch(3).sig into the same directory as my LocalSettings.php but did not install because I don't know how. Could that be the problem?
Comment 5 Poon Poi Ming 2007-09-11 16:31:00 UTC
Hi, I have version 10.0.0 previously installed with WAMP in my personal computer. I have just tried exactly what I had done for SpecialDeleteOldRevisions function in my webhost server and managed to get it up without a single hitch. 

I then copied the WebResponse.php from version 10.0.0 in my personal computer into version 10.0.1 in my webhost server. However, the error message still persist. Could there be a bug in 10.0.1? (I have not installed the security patch, mediawiki-1.10.1.patch(3).sig, as it sounds quite complicated. I think the problem is not related, unless it is.)
Comment 6 Poon Poi Ming 2007-09-12 09:17:00 UTC
Hi, I have been trying on my own. As I am having two websites:
* one hosted by Siteground in USA (using Mediawiki 10.0.0); 
* one hosted by Internet-Hosting in Malaysia (using Mediawiki 10.0.1);

I decided to copy the SpecialDeleteOldRevisions file from Internet-Hosting to Siteground. It works immediately without a single problem! (see http://e-holidaymaker.info/wiki/Halaman_Utama). I then try again on the Malaysian website, but it just refuse to work (see http://e-komputer.info/wiki/Halaman_Utama). I wonder why. I have asked my webhost to enable exec() to see if it works.

As for Adsense, both sites show the same error message with the same set of changes, ie. Warning: Cannot modify header information. However, I try another Adsense version for http://e-holidaymaker.info/wiki/Halaman_Utama and it works but I couldn't get it on the right column yet. (I think I may be able to resolve this right column thing in due time.)
Comment 7 Poon Poi Ming 2007-09-12 22:49:36 UTC
Awww! Sounds like a really hard nut to crack. If a solution is not forthcoming here, no other place will be able to assist me, LOL.
Comment 8 Poon Poi Ming 2007-09-13 10:27:29 UTC
Hi, I am at the end of the road. All recommendations have been implemented but the problem cannot be resolved. I do not encounter any problem with SpecialDeleteOldRevisions for Version 10.0.0 in both my personal computer and my website hosted by Siteground. 

As I am now suspect the possibility of a bug in 10.0.1, is it possible for me to downgrade from Version 10.0.1 to Version 10.0.0 that has served me so well? How do I go about doing it?
Comment 9 Brion Vibber 2007-09-13 15:21:52 UTC
You have extra space (probably blank lines), probably at the start or end of LocalSettings.php or one of the customized files you have edited or uploaded.

You'll have to check the files and remove the extra space.
Comment 10 Poon Poi Ming 2007-09-13 21:23:54 UTC
Hi Brion Vibber, thank you for your response. In the very first response to this thread, Andrew Garrett  and subsequently both Rob Church and my webhost at Internet-Hosting have informed me of the extra space or blank lines. I checked and rechecked but I could not find any.

Frustrated, I copied both the SpecialDeleteOldRevisions.php and LocalSettings.php files from my MediaWiki Version 10.0.1 software (hosted by Internet-Hosting) into my MediaWiki Version 10.0.0 softwares installed in both my personal computer and in my website hosted by Siteground. It worked immediately without a hitch (see Delete Old Revision link at bottom of page http://e-holidaymaker.info/wiki/Khas:Specialpages). 

In view of this, I concluded that there were nothing wrong with the two relevant files. Why would the same files work in one version and not the other? I am working on two assumptions. Either there is something wrong with Version 10.0.1 or there are some security features installed by my webhost that is causing the problem.

Installing MediaWiki in my personal computer has been a breeze. I have done it many times, each time I reformat my computer, and also in helping others to instal into their computers. However with Siteground web server, there were times when I had to ask them for assistance, eg. installing Tex and ImageMagick. I have asked Internet-hosting to enable exec() so that ImageMagick could work but they declined because of the security risk. However, Siteground did enable ImageMagick for me. 


Comment 11 Poon Poi Ming 2007-09-13 23:50:00 UTC
Sorry for being a pain in the ass but this is my final two destinations (the other being my webhost). All other attempts, including at MediaWiki Project Support Desk, have failed.

Actually, I am transferring my website from Siteground to Internet-hosting because of a lack of viewer traffic. As you can see, my Siteground website at http://e-holidaymaker.info/wiki/Halaman_Utama works perfectly as I intended. (I transferred ALL the relevant files from Internet-hosting a moment ago to Siteground and it works without a hitch!)

Already at the end of my wits, I used Kepner and Tregor problem-solving technique and by a series of elimination, boil down the problem to two major changes:
* a switch from Version 10.0.0 to Version 10.0.1
* a switch of webhost from Siteground to Internet-Hosting.

From what I gather here, the switch to Version 10.0.1 is not the cause. So that would boil down to the webhost, with its different settings (possibly security settings). I note that Siteground added one line for me in my LocalSettings.php, ie: 

$wgDiff3 = "/usr/bin/diff3";

Could this be the difference why it works in Siteground?
Comment 12 Rob Church 2007-09-13 23:54:18 UTC
I've already advised you on this matter privately, I think. Please note that this bug tracker is not a support forum; such discussions are better off on mediawiki-l or other mailing lists.

You may like to try disabling any extensions you have installed, and then re-enabling them one at a time to see which is the culprit.
Comment 13 Poon Poi Ming 2007-09-14 05:04:13 UTC
Hi, I have managed to solved the two issues by shifting the DeleteOldRevisions.php and Adsense.php from the extension folder up one level. Thanking all of you for your kind assistance.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links