outshine.com Forum Index outshine.com
feedback on the poetry, PHP code, Perl code, etc.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Please read before posting.

Including the blog on an existing page?
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Home -> Forums -> phpBB Blog & phpBB Podcast -> Including the blog on an existing page?
View previous topic :: View next topic  
Author Message
Mumblee
Drive-By Poster


Joined: 09 Aug 2004
Posts: 8

PostPosted: Saturday, 14 August 2004, 07:01    Post subject: Reply with quote

That fixes the issue of the fatal error, but now i'm back to getting:

Quote:

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\index.php:19) in C:\program files\apache group\apache\htdocs\phpBB2\includes\sessions.php on line 293

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\index.php:19) in C:\program files\apache group\apache\htdocs\phpBB2\includes\sessions.php on line 294


Because I have it added in the wrong place...
Back to top
View user's profile Send private message
Mumblee
Drive-By Poster


Joined: 09 Aug 2004
Posts: 8

PostPosted: Saturday, 14 August 2004, 07:05    Post subject: Reply with quote

Nevermind. Removing the echos that aboyt had me add while I was trying to track down the error seems to have solved the placement issues.

Looks like i'm good to go, thanks for the help.
Back to top
View user's profile Send private message
ijasont
Drive-By Poster


Joined: 14 Aug 2004
Posts: 7

PostPosted: Saturday, 14 August 2004, 07:05    Post subject: Reply with quote

yeah Headers are tricky. You can only have one Header present per page. Any more than that and you get errors.
You said you had another PHP include on your page and I am sure it has a header tag.
Not sure the fix but I will look at it.
Back to top
View user's profile Send private message
Mumblee
Drive-By Poster


Joined: 09 Aug 2004
Posts: 8

PostPosted: Saturday, 14 August 2004, 07:18    Post subject: Reply with quote

So, i've found that when I use my back to go to the page with the blog on it, I get the header errors. Refreshing makes them go away, but it's still sort of annoying.
Back to top
View user's profile Send private message
aboyd
Site Admin


Joined: 10 Jan 2004
Posts: 519
Location: USA

PostPosted: Saturday, 14 August 2004, 13:49    Post subject: You don't need me, you've figured it out. Reply with quote

The reason that the help.txt file says to include settings.php at the very beginning of the page (rather than in the same spot that you include blog.php) is because settings.php tries to send headers back to the browser. Headers are not HTML and need to be sent before the HTML. They're sort of invisible commands that tell the browser what to do. You can have multiple headers, but they all have to be at the top of the page. If you include a file at the top of the page that sets a header AND returns some HTML, that would screw it up for any other headers that come after it. I don't know if settings.php is bad like that (it's not my file) but I don't think so. So if you have multiple files to include, and a bunch of 'em will set headers, get them all at the top and keep rearranging their order until you get no errors.

In this case, settings.php uses headers to get or set up a session. It's how it knows I'm logged in or not. It then uses your phpBB settings to "help" it decide how to format the blog entries. The main thing is that without this, BBCode doesn't work.

As for the other problem, which causes the $db line to fail, I think you guys have nailed it. "db" and "sql" are very common names for variables. If you're using other PHP code, it's possible it uses the same variable names. That would throw everything off. And there are a lot of other variables in use that have common-ish names. One of the things that phpbb_fetch_all (a competing app) does well is that it put everything possible into a single array. So you only have to worry about the name of that one array. I will try to do the same thing in a future release. However, I can't change $db or sql_query, as that's coming from phpBB, not phpBB Blog.

_________________
Publisher Database - tools & forums for writers
Back to top
View user's profile Send private message Visit poster's website AIM Address
ron
Repeat Customer


Joined: 19 Aug 2004
Posts: 15
Location: Salem, NH

PostPosted: Thursday, 19 August 2004, 13:39    Post subject: Reply with quote

Aboyd could I have some help. I read that jason fixed his by putting require_once('blog/settings.php') on the top of his page. But what page is he talking about???

And you guys mentioned something about an already defined variable, so do I need to change variables too?

Because I'm getting that weird error on line 104 for blog.php. Please help me.

~Ron Razz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mumblee
Drive-By Poster


Joined: 09 Aug 2004
Posts: 8

PostPosted: Thursday, 19 August 2004, 23:36    Post subject: Reply with quote

yeah, the reason is that you're using other PHP scripts on the same page. The process goes like this:

settings.php is loaded, variables are defined to do what is needed for phpbb blog.

other php script is loaded, same variables are used, and are redefined to do something else (whatever is needed for THAT script).

blog.php is loaded, phpbb blog tries to use variables from the beginning, but they don't do what they're supposed to anymore.
Back to top
View user's profile Send private message
ron
Repeat Customer


Joined: 19 Aug 2004
Posts: 15
Location: Salem, NH

PostPosted: Friday, 20 August 2004, 17:17    Post subject: Reply with quote

Yes yes, I understand what you're saying.

My point was: How would I go about fixing my problem?

Solution: I had to move blog folder out of my forum folder and into my main index folder and set the settings properly. But thanks anyways for trying to help me. Razz

Now I have a new question. How would I insert blog.php (or is it index.php...whatever) onto my main page? I know I have to do an include, but I'm a little lost. Please help. Sad

~Ron
Back to top
View user's profile Send private message Send e-mail Visit poster's website
aboyd
Site Admin


Joined: 10 Jan 2004
Posts: 519
Location: USA

PostPosted: Saturday, 21 August 2004, 13:53    Post subject: possible Reply with quote

Ron, try the help.txt file. About halfway through it is a question about how to include the blog on your main page. It outlines the solution.

_________________
Publisher Database - tools & forums for writers
Back to top
View user's profile Send private message Visit poster's website AIM Address
ron
Repeat Customer


Joined: 19 Aug 2004
Posts: 15
Location: Salem, NH

PostPosted: Wednesday, 25 August 2004, 05:04    Post subject: Reply with quote

I did exactly what the help.txt told me to do. But it doesn't work.

That's why I'm posting here in this topic. I read what everyone else was saying but I still couldn't fix it. I got the same error as mumblee...

I don't know how to fix it though, I tried Jason's tip. But that didn't work either. I got rid of the echo sql thing you talked about erlier.

No dice.

I keep getting the "are you feeling helpful" thing and nothing else on my front page show up. Can you help me?

~Ron
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ron
Repeat Customer


Joined: 19 Aug 2004
Posts: 15
Location: Salem, NH

PostPosted: Wednesday, 25 August 2004, 05:07    Post subject: Reply with quote

Oh yeah I forgot.

If I do Jsason't seccond thing a new error pops up. But surprisingly my site show up too!

It gives me this error..

Unable to open extension.inc. Feeling helpful? Send an email to the webmaster.

Can you help me please?

~Ron
Back to top
View user's profile Send private message Send e-mail Visit poster's website
aboyd
Site Admin


Joined: 10 Jan 2004
Posts: 519
Location: USA

PostPosted: Wednesday, 25 August 2004, 10:16    Post subject: OK Reply with quote

Ron,

If you really have the same problem as mumblebee, then you've got conflicting variables that are overwriting each other. The only fix for that is to start renaming variables. That's difficult, because it requires some programming know-how, and it requires you to be sure you change the names properly in all places. If you really have this problem and don't know how to rename conflicting variables, you should try a different product for now. For example, try phpbb_fetch_all.

But if everything is working except for extension.inc, your problem might be a little different. That's just the $phpbb_root_path variable being wrong. Easy to correct. In the settings.php file, it's line 94 (or so):

Code:
$phpbb_root_path = '../phpBB/';


Change that to be absolute (instead of relative). Let's say your phpBB installation is in a folder titled phpBB2. And let's say that folder is in your public_html folder, which is in your home directory. OK. Find out the absolute path (using PWD if you're Unix-savvy, or else maybe use an FTP client to find out the path). It may be something like this:

/home/r/ron/public_html/phpBB2/

Once you have the absolute path, starting from the root level on down, enter that into your $phpbb_root_path variable, like this:

Code:
$phpbb_root_path = '/home/r/ron/public_html/phpBB2/';


If you still have problems, you can email me privately at webmaster |at| outshine |dot| com. Send me a username and password for FTP or a shell, and I'll login and fix it for you. However, you should know up front that you should never send anyone your username and password, so hopefully you can resolve it independently.

-Anthony

_________________
Publisher Database - tools & forums for writers
Back to top
View user's profile Send private message Visit poster's website AIM Address
ron
Repeat Customer


Joined: 19 Aug 2004
Posts: 15
Location: Salem, NH

PostPosted: Thursday, 26 August 2004, 19:46    Post subject: its okay Reply with quote

Thanks Anthony.

But After all the trouble I caused I still can't fix it. The blog/index.php thing works perfectly!

But when I include the header it says it can't find the extension.inc. I have one of the problems mentioned. I just don't know how to fix it.

No prob man. I'll try to get the script from php-nuke.

They have one integrated but I don't want all that other crap they have. Lol. Thanks anyways Wink

~Ron
Back to top
View user's profile Send private message Send e-mail Visit poster's website
godbringer
Drive-By Poster


Joined: 29 Sep 2004
Posts: 2

PostPosted: Wednesday, 29 September 2004, 20:04    Post subject: Reply with quote

Hey guys,

I get this Embarassed :

Hacking attemptHacking attempt
Fatal error: Call to undefined function: session_pagestart() in /blog/settings.php on line 344

...

I knew this was an error on my behalf, but have NO IDEA why.

I launched the createable.php to start, and got "Hacking attemptHackingattempt" Embarassed

I AM trying to add this to a pre-existing page, and I DID add the:
Code:
<?php include_once('blog/settings.php'); ?>

at the very top and
Code:
<?php include_once('blog/blog.php'); ?>

where I wanted the blog inserted... but I did something drastically wrong somewhere I suppose..

I know this is probly a huge error, but if anyone knows what is happening, I would be much obliged.

Thx.
Back to top
View user's profile Send private message
aboyd
Site Admin


Joined: 10 Jan 2004
Posts: 519
Location: USA

PostPosted: Saturday, 02 October 2004, 02:49    Post subject: I don't know. Reply with quote

It's not a big error. But I'm not sure how to fix it.

Basically, on each phpBB page, there is a variable that gets set. If that variable is not set, then phpBB knows that something is funny. Thus you get, "hacking attempt!"

The thing is, if you're including the settings file and then later in the page you include the blog.php file, everything should be fine. Those files contain the proper variable.

My only guess would be that if you're using some really old or super-new phpBB version, maybe the hack variable got changed. That would probably break a lot of mods, so I'm fairly sure they didn't do that.

For now, I would only say to review the help.txt file, and re-try the installation. If anyone else has a better suggestion, please let godbringer know.

_________________
Publisher Database - tools & forums for writers
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Home -> Forums -> phpBB Blog & phpBB Podcast -> Including the blog on an existing page? All times are GMT - 8 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3


Jump to:  
Login or register to post new topics
Login or register to reply to topics
Login or register to edit your posts
Login or register to delete your posts
Login or register to vote in polls

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../ad_network_ads_441.txt) is not within the allowed path(s): (/home/outshine:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/outshine/private_html/digitalpoint_ad_network.php on line 38

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../../../ad_network_ads_441.txt) is not within the allowed path(s): (/home/outshine:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/outshine/private_html/digitalpoint_ad_network.php on line 38

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../../../../../ad_network_ads_441.txt) is not within the allowed path(s): (/home/outshine:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/outshine/private_html/digitalpoint_ad_network.php on line 38

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../../../../../../../ad_network_ads_441.txt) is not within the allowed path(s): (/home/outshine:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/outshine/private_html/digitalpoint_ad_network.php on line 38
You must set the ad_network_ads_441.txt file to be writable (check file name as well).


Powered by phpBB © 2001, 2005 phpBB Group