![]() |
Unknown Error in index.php Code
Unable to add cookies, header already sent.
File: /homepages/26/d196297218/htdocs/index.php Line: 8 Search Engine Friendly URLs by vBSEO 3.2.0 Viewable: http://www.legionofangels.net ---------------------------------------------- Solutions, thoughts, ideas? |
Make sure there is no whitespace before the <?php tag in index.php & config.php.
|
I don't get this at all the code looks and works fine now on Firefox, but not on IE 7 or Safari 3.2 or whatever I have.
The original code maker of which it works on his own website installed it tonight. I'm lost. |
What is line 8 on your php page? (I get the error in both firefox and safari on my mac.)
|
Quote:
Line 8 is our Meta Tag or Meta Description. |
Very strange. I'm not sure what else to suggest. Whenever I've heard this error brought up, it is because of either an extra space around the php tags or because part of the header is parsed prematurely (I can't remember if that was also because of the extra space). I guess I would start over with writing the index page. Start a new one and slowly add in parts of the code until you get the error.
|
It's caused when you run a script that adds cookies AFTER content has been sent to the browser. White-space is content, BTW.
|
PHP Code:
|
I don't get the error when testing it on my site. Try copying the code from here into a new page and test it.
Also, you may want to correct this line (//feed2.js is incorrect): HTML Code:
<script language="JavaScript" src="http://feed2js.org//feed2js.php?src=http%3A%2F%2Frss.cnn.com%2Frss%2Fcnn_showbiz.rss&chan=title&num=7&desc=1" type="text/javascript"></script> |
Quote:
It errored again. The lower right white box is gone again though. |
Ah ha! This is where you are going wrong:
<?php include("mypoll.php"); ?> (I think that's the one.) Look at what it spits out. It starts with an <html> tag again (and another <head> and <body> tag) |
PHP Code:
Thanks for your help so far, but we're still not seeing what the problem is. |
What do the templates look like - adv_portal_pollresult, etc.? Do they start with the <html> tag?
To see the problem, view your page source right after you spit out the showthread pages and you'll see this: HTML Code:
<div class="content" style="position:relative;float:left;background-color:white;left:71px;"> |
This is one of his templates:
adv_portal_polloption_multiple HTML Code:
<tr> I got a pm from someone on this, what if we put that code in the middle box in an iframe, will that fix the error? It'll make that one section of the front page no content, but there will be a ton of other content in divs anyway. --------------- Added [DATE]1222361393[/DATE] at [TIME]1222361393[/TIME] --------------- This is: adv_portal_poll HTML Code:
<tr> This is: adv_portal_polloption HTML Code:
<tr> |
i can't find the culprits within the guys poll files/code. i thought he would have "echo:html"
the only echo's i see are echo $poll; are the double/body/headers coming from another template? |
This is:
adv_portal_pollresult HTML Code:
<tr> |
I really don't know anything about iframes, so I don't know if that will fix the error. Did you look in the page source and see what I am talking about?
|
yep. we see it. were still trying to figure out what part of the mypoll.php is making it come out.
it's definately mypoll.php. but idk php so i don't know how he's making a whole new page echo out like that. |
Hmmm, I'm really not sure either. I guess I might go and compare mypoll.php to usage.php and see what the differences are.
|
Quote:
Quote:
--------------- Added [DATE]1222362390[/DATE] at [TIME]1222362390[/TIME] --------------- Quote:
|
Quote:
|
This is our usage php file:
PHP Code:
|
Turn on this and see what comes out - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
|
awesome idea. i never knew that existed. i got this
<!-- BEGIN TEMPLATE: STANDARD_ERROR --> and the closer as well. "end template: standard_error" this is wierd cause... i was under the impression that the mypoll.php was adding html that was ruining everything and causing all the problems. but now it seems there is 1 problem first, which then creates the broken html problem. so first, the code either doen'st work or something is going wrong, and then, as a result, the error template gets spewed which breaks the index html formatting. that's my guess on all this. correct me if i'm wrong |
The code worked last night when the guy installed it. I seen it, i voted on it, it worked, then a half hour later I refreshed the page and it was messed up.
|
So, what changed between when you saw it and when it stopped working? Where other polls added to the site? *Something* changed.
OK, we know that since there is an error, the STANDARD_ERROR template is being called and that is putting in the whole new html page and causing the header error. (So, it's kinda an error causing another error.) We need to find what the original error is. Have you looked in your apache error_logs? I have written in some notes that you can put this line in a php page to help spit out errors: PHP Code:
Of course, I just went to test your page again and it is now displaying fine (the copy I made on my site is fine, I mean.). Trying to troubleshoot things like this is fun, fun, fun! |
lol. i was thinking it better to find the error template, kill the header and closer, and then i should get the first error right? O_o or at least the page will look better while i still have the other error? :p
--------------- Added [DATE]1222368135[/DATE] at [TIME]1222368135[/TIME] --------------- ....wow!!! guess wut? i deleted the html tags from the standard:error template in vb, got rid of the iframe i used to enclose mypoll.php, and it all suddenly works now. O_o what happend to the error that was causing the error page?? |
Yet after it appearing, and appearing when I changed styles because apparently all those templates needed to be on all styles which they are now.
I cleared cookies/cache on both IE 7 and FF 3.x and now it shows the error again. Ridiculous |
Yep, I am still seeing the error also when I view your page. All is still fine on the page I have on my test site. The only changes I made for the test site where to change the path for the css, usage.php, and mypoll.php files.
I don't know if it does anything regarding this error, but the whole DOCTYPE thing should be on one line.) |
Correction - the templates weren't fixed on all styles, only on Default.
Our Default style is Crucifixion for the forum, so when he adds the template changes to all styles we believe the code will be fixed. But stay tuned. Another thing I'm noticing is that when it does work its not showing a graphical display but a numerical one, how do I show a graphical display of the poll bars. It's in some of the coding but not appearing. My poll bars are all gifs to, so it's not a PNG thing. |
1 Attachment(s)
It is showing as a graphical display on my test site.
|
error template fixed on all templates. should work now. i guess
|
I don't know what is up with that page right now (could be my ISP or something else), but this error is in the page source:
<b>Warning</b>: include(mypoll.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/homepages/26/d196297218/htdocs/index2.php</b> on line <b>101</b><br /> <br /><b>Warning</b>: include() [<a href='function.include'>function.include</a>]: Failed opening 'mypoll.php' for inclusion (include_path='.:/usr/lib/php5') in <b>/homepages/26/d196297218/htdocs/index2.php</b> on line <b>101</b><br /> |
He probably didn't remove the grab "mypoll.php" line from the index when you looked. Then we think our server got really busy for a second.
Another concept here that might be totally off is that maybe we have conflicting codes on the page. As you are testing just the poll code, not the other code we have next to it, or that one showing recent posts. I think I'm wrong but I'm throwing it out there. |
Quote:
Something you could try is changing your path in your include statement: include('./mypoll.php'); or include('/home/yoursite/mypoll.php'); |
Quote:
|
Quote:
include('http://www.legionofangels.net/mypoll.php'); |
It's empty now... Attempts to access mypoll.php directly come back with a 404.
|
Quote:
Anyways, this is the site that I found it on: http://www.sportsrant.com/ Of which that is the dude I got it from the owner of that site. He actually has a flash poll modification here at vb.org but he said that isn't the one on his page when I added him to msn. I just wanted to ask, because I was like, that doesn't look like flash to me. It looks like vb normal code ( < you know what i mean ). The issue with his code that I don't like is that when you vote it takes you to the thread, I'd rather it sit still and let you see the results on the front page. If you go back to the Home page and/or hit refresh you'll see the results on the front page knowing that you've voted, probably a cookie doing that. Any poll system on any site such as nfl.com which I frequent a lot of FOX Sports automatically shows you the results, kind of like flash but it could be done with Java I bet and others perhaps. But there is no point of me getting into how I'd like it to work if I can't even get it to work. As I said we stopped only temporarily on this, I haven't seen the coder I hire for $ in like 2 weeks online, so I can't ask him to just step in and fix this. ---------------------------------------------------------------- HOWEVER, What I've determined or am wondering on your opinions is where the error actually is. See I obviously believe in my semi-experienced site coder however he is not an expert and maybe there is a coding error on the front page that is conflicting with the script. OR maybe the codes we have up for latest posts in certain forums conflict with the poll code. All I know is an HTML error trying to access or open 2 pages on the same page doesn't make sense. ( it's true obviously but why would the poll code do that? ) I know that if it works on your guys test sites but doesn't work on my existing site tells me something is wrong and I can't find the conflict. I'd like to run my stuff or my page with it on, in one of those HTML examiners to see if it can tell me what the heck is wrong. In short what I'm trying to say is, I don't know what the error even is to fix it, and I don't understand why it's creating that HTML error. I contacted vBSEO as well because it says on the front page when the error occurs, Search Engine Friendly, etc. and I said your URL for vBSEO should not even be appearing on my front page. They are willing to go in the FTP and make sure that the vBSEO and vBSEO sitemap are working fine, but if they are, then it's not the SEO doing something. Again, still looking for the light in the tunnel here. P.S. I'm aware from another thread that vb.org will not release it's front page poll system and that is fine. Be advised though that I'd gather our codes are extremely similar if not exact...minus whatever error is occurring and I fully intend whether I have to pay for this code or not to release this here on .org so that all forum owners have the option of poll on front page. It gives users the opportunity to create there own CMPS basically with an add on such as poll, posts, or whatever, without having to just go get VB Advanced. So I'm eventually going to figure this out and release it. Especially after all you're help and nearly 40 posts. |
i think something with vb is prolly not playing well with his poll. did you ever check what version of vbulletin the guy who created the poll is running?
only now do i realize, if were getting vbseo messages in the error message. that's ONE clue that it's the forum mucking things up. the second clue was how i had to go into vbulletin, and remove the header and footer from the error template to "kinda" get it to work. so in the end. i think our front page is perfectly legit and free and clear of any possilbe "conflicts" it would make. and i would instead blame VBULLETIN as the one doing all this. maybe vb and his poll just ain't the right version numbers? can't play along? idk. that's where i stand now. |
All times are GMT. The time now is 06:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|