View Full Version : Pluhnews question
Borsti
11-13-2002, 01:20 AM
Hi,
I?m testing around with Pluhnews. Now my Question is if I can use PluhHeader and PluhNews alltogether on one page (with include)? I?m getting PHP errors when I try that. Can that be done? I want to combine that with Anchor Links on top of the page.
I also would like to make the include call from a php page in another directory but I?m getting PHP errors with not finding ./global parameters.
The last one is the date format: http://www.php.net/manual/en/function.date.php
Are there some available in other languages (german in detail). I would just need the days.
Thanks a lot!
Lars
Borsti
11-13-2002, 10:06 AM
Hm.. when I only include PluhNews.php on another site I get this strange error:
Warning: Cannot add header information - headers already sent by (output started at /usr/local/etc/httpd/htdocs/forums/news_d.php:9) in /usr/local/etc/httpd/htdocs/forums/admin/functions.php on line 1573
Do they mean HTML headers? I don?t want to let that define by Pluhnews. Any help?
Lars
Borsti
11-13-2002, 11:28 PM
I think I got it... have to move all the initialization stuff into the page, where I include the pluh php´s
Jwolfe
11-14-2002, 05:10 PM
Could you post specifically what you did to clear up this error? I have been getting the same error and it's just about driven me to insanity. :)
Thanks in advance.
Borsti
11-14-2002, 11:14 PM
The problem seems to be that the initialization and the DB calls comes up twice if you include both headline and news in one PHP page. I did´nt try it yet (because lack of time) but if I understood it right, then setting all the Headers and Variables should happen in your PHP file to prevent double declarations... something like that.
Hope that helps! I´ll be very busy during the next days but I might be able to verify that next week!
Lars
Jwolfe
11-15-2002, 01:15 AM
If I understand what you are saying, I have tried this. I still get the same errors. :(
Borsti
11-15-2002, 01:27 AM
Did you delete the definitions in the News and Headline files after putting them into your include page?
Jwolfe
11-15-2002, 03:58 PM
I am not sure what you mean by 'definitions'.
This is my error:
Warning: Cannot add header information - headers already sent by (output started at c:\hosting\hostname\member\myname\forums\news.php: 7) in c:\hosting\hostname\member\myname\forums\admin\fun ctions.php on line 1573
After I installed this script, I changed the variables in the PluhConfig.php to suit my requirements. I checked to see that the single file, PluhHeadlines.php and PluhNews.php was working correctly. My initial test and viewing in the browser led me to believe it was.
Next, I created a new .php page (which I refer to as my 'news page' and named it news.php), which is the page that was to initiate the script. I did this with an include statement. This page also was placed in the forums directory.
While working on this page, and viewing it in my browser, the above error started to appear. The error appeared randomly. I could not reproduce it consistently. In fact, sometimes the page would load correctly on my machine, and not load correctly on several other machines and vice versa.
Here are my trouble shooting steps:
1. I again went back to loading and viewing the PluhNews.php and PluhHeadlines.php page alone. The error appeared randomly again (on several different machines all not producing the errors consistently or at the same load time), and I could not determine what was triggering it.
2. I tried inserting the variables and eliminating the include PluhConfig.php statement in PluhHeadlines.php and PluhNews.php. Again, the errors appeared.
3. I created a test page to replace my news.php page and placed it in a different directory. Again, the errors appeared randomly.
4. I created another test page, and eliminated all include statements, combining the script into one page. Again, the errors appeared randomly.
5. I am not quite sure I even understand the error statement. So I reason if this error is happening randomly perhaps it is a cookie issue/cache issue. I turn to vBulletin control panal to investigate.
6. "Add Standard headers
This option does not work with some combinations of web server, so is off by default. However, some IIS setups may need it turned on. It will send the 200 OK HTTP headers if turned on."
I tried setting this to "yes". The errors did not go away.
7. "Add No-cache headers
Selecting yes will cause vBulletin to add no-cache HTTP headers. These are very effective, so adding them may cause server load to increase due to increase page requests."
I tried setting this to "yes". The errors did not go away.
8. I did a search for similar errors on the official vBulletin page, and lo and behold found one. The exact same error. This person was advised to check that there were no spaces before or after the <? and ?>. His problem was resolved. I check to see if this is the case with my issue, and unfortunately, it was not.
9. I do a search at vBulletin.org to see if anyone has a similar issue and stumbled on your post.
I am at a loss. The fact that this issue is random and a few others have reported the same issue leads me to believe something is not speaking correctly between the script and vBulletin. Maybe it has to do with server setup. At this point, I've just about given up and am looking for another script. I am on a deadline to get this project published, and I am not a php programmer. If I had the time right now to learn this, I would but the bear is chomping at my door right now :) so I am at this point looking for another script or someone to take some sympathy on my predicament and tell me exactly what this error statement is telling me.
Thanks for your time.
Jwolfe
11-16-2002, 08:15 PM
Check your pms... I solved this.
Robert Basil
12-01-2002, 05:32 AM
Originally posted by Jwolfe
Check your pms... I solved this.
How about sharing it with the rest of us? :)
(I'm having the same exact problem)
roxics
01-06-2003, 09:35 PM
Yeah I'm having the same problem too. Can you tell us how you fixed it?
White Knight
01-08-2003, 01:48 AM
It has something to do with Multiple SSI tags on the same html page I think. I just did a search and it seems that ssi will only call once on a page.. not twice. But I have heard there is a away around this.
Jwolfe
01-08-2003, 09:17 AM
Here is the fix...
To fix the header issue, do the following:
In the PluhNews.php file REMOVE or COMMENT OUT
require("./global.php");
In the page where you want to display your news, insert this before ANY HTML
require("./global.php");
Go to your Admin Panel in vBulletin and under vBULLETIN OPTIONS
go to the section called HTTP HEADERS AND OUTPUT .
Find this section:
Cookie Domain
The domain on which you want the cookie to have effect.
If you want this to affect all of yourhost.com rather than just forums.yourhost.com,
enter .yourhost.com here (note the 2 dots!!!). Can be left blank.
ADD
.yourhost.com to the input box; save.
Your done.
This error was a combination of a few things. The cookies generated by vBulletin were part of the culprit as they were not being applied to any pages outside of vBulletin application. The second issue was that the global.php was being called twice by the [require('./admin/config.php');] by the PluhNews.php file.
I pretty much concluded that the error was either a cookie or a cache issue since the error was being generated randomly and on different machines. After that, it was just a case of sorting it out.
The author of this script should include this in his installation instructions. Would have saved me, and I am sure many others, wasted hours trying to figure out this error.
Enjoy!
ga.net
03-25-2003, 10:00 PM
Question: How do you prevent pictures to be displayed in the thread. I already disabled the [IMG] Tag so that only the link to that picture will be displayed but when I go to Pluh News, it still displays the picture. Pictures that are too big could ruin the layout of my page
Thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.