PDA

View Full Version : Can I get DoOutput to not send header?


JoeHarrison
04-29-2002, 06:53 PM
I am trying to intigrate something with vB, but my headers are being sent twice. (I get something like "Warning: Cannot add header information - headers already sent") I think the headers are being sent by the initial PHP script and again at the end of the program when I call dooutput.

It looks like there is attribute to not send the headers, but I can't seem to get it to work. Here is what I tried:

eval("dooutput(\"".gettemplate('new_test')."\",0);");

If someone could help me out it would be greatly appriciated.

Thanks,
Joe

JoeHarrison
04-29-2002, 07:03 PM
Never mind!

I had it right all along!!! I made that change that I had above... and then I uploaded it to the WRONG PLACE!!! So when I tried to run it, it just kept being the old one. Can you believe it?

JoeHarrison
04-29-2002, 07:40 PM
OK well, I just tried it again and now it dosn't work again! And I DID upload it correctly. I am getting that "Header Cannot be Sent" error.

Admin
04-30-2002, 06:22 AM
Paste the full error here. The headers are probably sent from a different place.

JoeHarrison
04-30-2002, 05:19 PM
FireFly,
Here is the full error:
Warning: Cannot add header information - headers already sent by (output started at /home/harrison/public_html/newheader/test.php:11) in /home/harrison/public_html/forums/admin/functions.php on line 1545

The weird thing is... this worked fine about an hour ago. No error at all. I cam back and tried it again and I get an error. Is the header automatically sent when I include global.php?

Thank you,
Joe

Admin
05-01-2002, 09:56 AM
That line in functions.php sets a cookie, which is just like sending headers (it's exactly like it).

What line 11 of test.php and why are you printing stuff there?

JoeHarrison
05-01-2002, 06:27 PM
FireFly,

First I'll try to explain what I am trying to do. I recently installed vbIndex (https://vborg.vbsupport.ru/showthread.php?s=&threadid=37021) by el3m3nt (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=5425) to be used for the main page when people come to my site. However, for the non-vb pages of my site, I wanted to include the poll that is used on the vbIndex page. So, I copied the poll section of vbIndex (originally written by wajones (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=55)) and put it into it's own php file (attached). I replaced the eval's at the bottem with eval dooutput's. Now, I am trying to include this file within the non-vbpages of my site. Sometimes, this works without any problems (like now)... other times, it gives me the error. Here is my test link: http://www.joeharrison.com/newheader/test.php

This file has the follwing to include poll.php:
<?php include "/home/harrison/public_html/forums/joe_poll.php" ?>

Thank you,
Joe

Admin
05-01-2002, 06:49 PM
I'm not sure about this, it's hard without seeing how your whole site is built and using the vB engine, but anyway: Try sticking $noheader=1; in poll.php right before you require global.php. It should solve the problem if it's what I'm thinking it is. :)

JoeHarrison
05-02-2002, 02:26 AM
FireFly,

I havn't gotten that error again but I'll try what you suggested if I do. Thanks very much for your help. I'm really looking forward to the release of vbHome Full (https://vborg.vbsupport.ru/showthread.php?s=&threadid=35058) by nakkid (https://vborg.vbsupport.ru/member.php?action=getinfo&find=firstposter&threadid=35058) ... it should make site intigration much easier!

Thanks again,
Joe

PS. You're no longer the president? haha (new avatar)

Mark Hensler
05-02-2002, 05:31 AM
Que pasado al presidente?!
*pánico*
Es él muerte?