Recent Topics

1 May 14, 2007 09:09    

My b2evolution Version: 1.9.x

Hi All... I have just installed b2evo for my website and was looking at how to put a summary on a page on my main site.

I did what was recommended here...
http://forums.b2evolution.net/viewtopic.php?t=10797&highlight=summary

And I'm now getting this error on the blogs.php page I created.

Warning: require(blogs/blogs/summary.php) [function.require]: failed to open stream: No such file or directory in /home/*my_site*/public_html/blogs.php on line 91

Warning: require(blogs/blogs/summary.php) [function.require]: failed to open stream: No such file or directory in /home/*my_site*/public_html/blogs.php on line 91

Fatal error: require() [function.require]: Failed opening required 'blogs/blogs/summary.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*my_site*/public_html/blogs.php on line 91

I have no idea what this means and would appreciate any and all help.
I have no concept of php, and very little css knowledge, so please be as simple and basic as possible with any answers. ;)

I am pretty sure it has to do with this line...

(blogs/blogs/summary.php)

As the summary is in "public_html/blogs/summary.php"
But why or where is it getting it wrong?

T.I.A

2 May 14, 2007 09:39

post the code from your blogs.php ;)

¥

3 May 14, 2007 11:21

:oops: well I was playing at fixing it and now it's changed to...

Warning: require(/blogs/summary.php) [function.require]: failed to open stream: No such file or directory in /home/*my_site*/public_html/blogs.php on line 8

Fatal error: require() [function.require]: Failed opening required '/blogs/summary.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*my_site*/public_html/blogs.php on line 8

At the top (before the html)...

<?php
 /**
 * Check this: we are requiring _main.inc.php INSTEAD of _blog_main.inc.php because we are not
 * trying to initialize any particular blog
 */
 require('/blogs/summary.php'); ;
 ?>

Then where I want to show the summary...

 <?php 
  for( $blog=blog_list_start('stub'); $blog!=false; $blog=blog_list_next('stub') )
  { # by uncommenting the following lines you can hide some blogs
        // if( $blog == 1 ) continue; // Hide blog 1...
        // if( $blog == 2 ) continue; // Hide blog 2...
        // if( $blog == 3 ) continue; // Hide blog 3...
        // if( $blog == 4 ) continue; // Hide blog 4...
  ?>

  <h3><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>" title="<?php blog_list_iteminfo  ( 'shortdesc', 'htmlattr'); ?>"><?php blog_list_iteminfo( 'name', 'htmlbody'); ?></a></h3>
	<ul>
 	 <?php	// Get the 3 last posts for each blog:
	$BlogBList = & new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', 3, '', '', '', '', '', '', '', 'posts' );
	 while( $Item = $BlogBList->get_item() )
	 { ?>
	   <li>	   
	   <a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>(<?php $Item->issue_date() ?>)
	   </li>
	 <?php } ?>
	   <li><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>"><?php echo T_('More posts...') ?></a></li>
	</ul>
 <?php
  }  ?>

I shouls probably add I added a "testing" post so there was something to show, but there aren't any other posts there yet (not that I think that matters, but hey?!?!)

:( I have been working on it all, reading the forums, choosing a skin etc. etc. for about 10 days now and I just wanna get posting... the link on my site to the actual blogs is the last thing I need to get working

4 May 14, 2007 11:26

SanityQuest wrote:

I am pretty sure it has to do with this line...

(blogs/blogs/summary.php)

:lol: I just realised too in between my first and second posts that when I look in code view of dreamweaver line 91 was the line with that in it... so when it tells me error in "line whatever" it is referring to the line in the code.

WOOHOO... I learnt something new...hahaha

5 May 14, 2007 11:45

<?php
 /**
 * Check this: we are requiring _main.inc.php INSTEAD of _blog_main.inc.php because we are not
 * trying to initialize any particular blog
 */
 require dirname(__FILE__).'/blogs/summary.php';
 ?>

Should work ;)

¥

6 May 15, 2007 04:29

:D Thanks for that...it kinda worked...

8| I have a whole new list of errors now

Where my normal site headers should be it has....

Warning: Cannot modify header information - headers already sent by (output started at /home/*my_site*/public_html/blogs.php:3) in /home/*my_site*/public_html/blogs/inc/MODEL/sessions/_session.class.php on line 201

It previews the test post I put up, and is then followed by my site headers.

Then, in the bit where the text goes (don't ask me to remember what it's called...LOL, this is doing my head in) it says...

Fatal error: Call to undefined method Item::permalink() in /home/*my_site*/public_html/blogs.php on line 113

The code for line 113 is:

<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>(<?php $Item->issue_date() ?>)
	   </li>
	 <?php } ?>

Maybe I need to learn some php before I do this blogging stuff as it may as well all be in Greek to me :-/

7 May 15, 2007 05:25

http://i66.photobucket.com/albums/h276/DianneOnly/clap2.gif I have managed to get it all below the headershttp://img99.exs.cx/img99/8577/yupi3ti.gif

Only now it says error in line 114.

Actually... just checked... line 113 from before is now line 114...LOL
And now it has another "preview" next to the b2evolution button 8|

Oh well...I'll keep playing while I wait ;)

T.I.A again :)

8 May 15, 2007 10:16

<a href="<?php $Item->permanent_link() ?>

;)

¥

9 May 15, 2007 10:48

No idea what that just did, but it fixed the permalink error...thanks heaps Yabba

:oops: Now any ideas from anyone re: the header error?

I thought moving it all below the header would fix it... I have looked through all the code and can't see any reference to headers.

I tried searching the forums today and found so many threads relating to that _session.class.php ...thing is none of them made any sense to me at all :(

10 May 16, 2007 08:38

:'( I have been googling this error all day and all I can find is stuff about "whitespace"
I scoured the code in notepad and there is no whitespace.

Soooo... back to google... and I found something about having html function before the header creating an output error.

In looking at line 11, which is where apparently the warning is being created,

<meta name="author" content="*my_name*/Original design: Andreas Viklund-http://andreasviklund.com/"/>

Is this line causing it???
Well it must be... the error says it is... but can I remove this line?
What does it do?

Any and all help appreciated... I am getting desperate here ;)

11 May 16, 2007 08:54

Whitespace is an error that occurs if there is whitespace (a space character or a blank line / line feed character) before the first <?php on the page or after the last closing ?>. Dreamweaver might have added it.

The line:

<meta name="author" content="*my_name*/Original design: Andreas Viklund-http://andreasviklund.com/"/>


doesn't do anything, you can remove it, but it doesn't create an error either. The metatags are a method to send information that is not primarily visible. In this case it tells us that Andreas Viklund designed your skin.

12 May 16, 2007 09:10

:-/ That's what I thought... I went over the code in notepad so many times... there's definately no whitespace

Warning: Cannot modify header information - headers already sent by (output started at /home/muslimh/public_html/blogs.php:11) in /home/muslimh/public_html/blogs/inc/MODEL/sessions/_session.class.php on line 210

Now from what I read, blogs.php:11 refers to line 11 of that page causing an output error???

Hmmm... maybe I will delete it for now and just see.... if it doesn't fix it i'll be back ;)

13 May 16, 2007 09:55

Blogs.php is something else than ../blogs/skins/nautica_2gl/main.php. I think blogs.php is part of your stub setup.

I think you're best off with a start from a point where there are no errors. Try uploading a fresh copy of the skin. Does another skin give the error, like the custom skin?

Good luck

14 May 16, 2007 10:06

LOL... blogs.php is a page on my site which I created to show the summaries and to put the links to the blogs.

The error only started after I did what Yabba suggested earlier...

¥åßßå
PostPosted: Mon May 14, 2007 4:45

If I undo that I am back to the original error :(

15 May 16, 2007 10:54

:( I deleted line 11 and the error is still there, and it still says php:11

16 May 16, 2007 11:27

You cannot output anything to the browser before attempting to send the headers, including any html.

¥

17 May 16, 2007 11:55

:-/ Well now I am completely lost...
If I move the first bit of php code to the top then it pushes all the headers down and puts the previews at the top of the page again... but hey... the errors are gone...LOL

Arrgghh... how can I stop the previews from being on top of my website headers when the headers contain html, so they have to come first...this is all so confusing!?!?!?

18 May 16, 2007 12:01

Add your header html to summary.php ;)

¥

19 May 16, 2007 12:11

;) Thanks...I'll try that now and get back to ya

20 May 16, 2007 13:20

Woohoo... thankyou so much... I copied all the html to the summary.php and the whole page came up twice, but with no errors, so I took all the html off the blogs.php and (I assume) it is just calling it from the summary.php now... showing up once, and with no errors.

I am so happy... that was the last thing needed to work so we can actually use the blogs now... thanks so much to you both for your help :)


Form is loading...