1
rajaito
WF-downloads problem - headers already sent
  • 2005/7/15 6:48

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


All of a sudden anytime a download is clicked I receive an error message: Headers already sent.

The only think I have done that could have possibly affected this was install wf-channel. I have since disabled wf-channel and I am still recieveing the same error.
My xoops site: ElectroniCulture.net

2
MadFish
Re: WF-downloads problem - headers already sent
  • 2005/7/15 7:24

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


I had this problem with WF-Downloads on several installs of XOOPS, and couldn't use it. The one thing the installs had in common is that they were quite old ones that had been gradually patched up to the latest and greatest.

The only solution I could find - which worked - was to transfer the site to a fresh install of XOOPS. No problems thereafter.

3
bluenova
Re: WF-downloads problem - headers already sent

For some reason this is a standard error message, for any error, if you look at the code on the download page, there is a fix on wf-projects forums with the code to tell you the real error message.

4
McNaz
Re: WF-downloads problem - headers already sent
  • 2005/7/15 8:34

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


I have found that this usually occurs when there is a blank space or extra lines outside of the <?php?> tags. Sometimes this is impossible to find and the best way is to use PHP's

headers_sent($filename$linenum));


function. Look through you wf-downloads code to where the download is initiated and add the following just before that:

if (headers_sent($filename$linenum)) {
   echo 
"Headers already sent in $filename on line $linenum";
}


This should pinpoint exactly where you whitespace is.

HTH.

5
bluenova
Re: WF-downloads problem - headers already sent

The link to the new visit.php page is here If you change to this file, you'll find what the error is that's causing your problems.

6
rajaito
Re: WF-downloads problem - headers already sent
  • 2005/7/15 15:54

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


I overwrote visit.php with the new one. But now instead of giving the error headers already sent, I get a blank page instead of a download. Now what??


The thing is, I haven;t messed with the WF-downloads code in weeks and it has been running just fine. This is new and all of a sudden. I am not sure how this could have happened.
My xoops site: ElectroniCulture.net

7
bluenova
Re: WF-downloads problem - headers already sent

The new visit.php should give you a proper error message if php-debug is on. Did you look at McNaz's advise about blank lines? Normally you should see an error message with the files containing the white space (if that is the issue).

8
rajaito
Re: WF-downloads problem - headers already sent
  • 2005/7/15 16:12

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


First let me say thanks for your immediate help guys!!

Here is an status update:

This is very weird. I installed the new visit.php page, then added the block of code McNaz suggested right befor the download section on visit.php:
if (headers_sent($filename$linenum)) {
   echo 
"Headers already sent in $filename on line $linenum";
}


Then when I went back to the download page on my site the error message had changed to tell me my NetFTP module was sending the headers first. Now I have had both of these modules running side by side for 3 or 4 months with no problem, so I can't understand why this has happened.

Luckily, I haven't made NetFTP public for my users yet, so I have just diabled it. But this just doesn't make sense to me.

Like I said earlier, The only thing I did recently was install wf-channel. But the problem didn't go away after disabling it.


Any ideas?
My xoops site: ElectroniCulture.net

9
bluenova
Re: WF-downloads problem - headers already sent

The error message should tell you which file from NetFTP or wf-downloads has the problem (problably white space) but if you havn't ftp'd or edited any files (in those modules) it would be very strange as to how it got there.

10
rajaito
Re: WF-downloads problem - headers already sent
  • 2005/7/15 16:17

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


I know its sounds crazy, but I really haven't changed those files in months. I'll try re-enabling NetFTP and pinpointing that white space.
My xoops site: ElectroniCulture.net

Login

Who's Online

263 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 263


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits