Computer Science Canada My little script |
Author: | JSBN [ Fri Mar 26, 2004 11:35 pm ] | ||
Post subject: | My little script | ||
ok, the first part of my script works well (but that's probly because i stole alot of it out of my resources) but now, i'm making my own script from scratch, w/o the resources i had b4(to explain a bit more, i'm making a script for my site that reads out of a file, which is made in the admin area of my phpbb forum [that part works well]) So, i'm getting the error: Quote: Fatal error: Call to a member function on a non-object in /homepages/43/d87567952/htdocs/Postrec.php on line 4
Here's my code
As i'm sure you will notice, there are many similarities to my code and that of some phpbb scripts, and that could be part of my problem. |
Author: | wtd [ Fri Mar 26, 2004 11:55 pm ] |
Post subject: | |
From the rror message, I'd say look at the point in the code where $template is initialazed. It's not becoming an object. |
Author: | JSBN [ Sat Mar 27, 2004 8:44 am ] |
Post subject: | |
yea..... how would i do that? as i am unsure of how i should initalize the $template variable |
Author: | wtd [ Sat Mar 27, 2004 10:05 am ] |
Post subject: | |
Well, what class is $template supposed to be an object of? |
Author: | JSBN [ Sat Mar 27, 2004 11:28 am ] |
Post subject: | |
ok, because i am an uber newb at PHP, i will put it simply as: i am trying to use $template as it is used throughout phpBB |
Author: | Amailer [ Sat Mar 27, 2004 3:16 pm ] | ||
Post subject: | |||
JSBN wrote: ok, because i am an uber newb at PHP, i will put it simply as: i am trying to use $template as it is used throughout phpBB '
hmm your missing the important file for your script to work.
|
Author: | JSBN [ Sat Mar 27, 2004 3:51 pm ] | ||
Post subject: | |||
yea.. i should probly have updated my code for you guys to help me with. what i have now is:
but now i get: Quote: Fatal error: Call to undefined function: session_pagestart() in C:\Documents and Settings\James\My Documents\Backup1\Web Site\Postrec.php on line 7
|
Author: | Amailer [ Sat Mar 27, 2004 4:24 pm ] | ||||
Post subject: | |||||
JSBN wrote: yea.. i should probly have updated my code for you guys to help me with. what i have now is:
but now i get: Quote: Fatal error: Call to undefined function: session_pagestart() in C:\Documents and Settings\James\My Documents\Backup1\Web Site\Postrec.php on line 7
go to Postrec.php remove
|
Author: | JSBN [ Sat Mar 27, 2004 5:42 pm ] |
Post subject: | |
Removed it, but now i get: Quote: Fatal error: Call to a member function on a non-object in /homepages/43/d87567952/htdocs/Postrec.php on line 9 |
Author: | Amailer [ Sat Mar 27, 2004 6:33 pm ] |
Post subject: | |
JSBN wrote: Removed it, but now i get:
Quote: Fatal error: Call to a member function on a non-object in /homepages/43/d87567952/htdocs/Postrec.php on line 9 show us the code in Postrec.php |
Author: | JSBN [ Sat Mar 27, 2004 6:36 pm ] | ||
Post subject: | |||
|
Author: | Amailer [ Sat Mar 27, 2004 6:40 pm ] | ||
Post subject: | |||
god, i got confused (looks same) i ment Poster.php, sry also
you don't need / before news.tpl |
Author: | JSBN [ Sat Mar 27, 2004 6:53 pm ] | ||
Post subject: | |||
Poster.php
|
Author: | wtd [ Sat Mar 27, 2004 7:37 pm ] |
Post subject: | |
Amailer wrote: you don't need / before news.tpl
He certainly does. "./News.tpl" is the same as "News.tpl", but "/News.tpl" indicates that News.tpl must be at the server's root directory. |
Author: | Amailer [ Sat Mar 27, 2004 7:44 pm ] |
Post subject: | |
wtd wrote: Amailer wrote: you don't need / before news.tpl
He certainly does. "./News.tpl" is the same as "News.tpl", but "/News.tpl" indicates that News.tpl must be at the server's root directory. if you look at the phpBB template classes, it's no need they do everything already. And, i don't know what's wrong... either something wrong with your common.php or.. or idk .. put that file in the same place as the common.php |
Author: | JSBN [ Sat Mar 27, 2004 8:59 pm ] |
Post subject: | |
idk? |
Author: | Amailer [ Sat Mar 27, 2004 9:14 pm ] |
Post subject: | |
idk = i don't know |
Author: | JSBN [ Sun Mar 28, 2004 6:09 pm ] |
Post subject: | |
after changeing my phpbb root path to the correct one ('Forum/') i now get a new error Quote: Parse error: parse error in /homepages/43/d87567952/htdocs/Forum/includes/template.php(127) : eval()'d code on line 152 |
Author: | wtd [ Sun Mar 28, 2004 6:38 pm ] |
Post subject: | |
Ok, if phpBB is using eval then it's no wonder you're getting errors. I know, I sound like an elitist ivory tower academic programmer, but eval is just evil. |
Author: | JSBN [ Sun Mar 28, 2004 7:25 pm ] |
Post subject: | |
so..... how do i fix it? |
Author: | Amailer [ Sun Mar 28, 2004 7:41 pm ] |
Post subject: | |
JSBN wrote: so..... how do i fix it?
well, first off all check your news.tpl see if you got anything messed up in there... phpBB template system is the best, nothing should be wrong with it. (in the news.tpl or w/e its called, check if you missed <!-- BEGIN bla bla or something like that, and for {text bla} see if their messed up) |
Author: | JSBN [ Sun Mar 28, 2004 8:04 pm ] |
Post subject: | |
are there certain things that i cannot have on my .tpl page(tags)? I've encluded a copy of my .tpl file... actually supposedly i've reached my quota, so i'll just link it: www.boelen.ca/Cary/News.zip |
Author: | Amailer [ Sun Mar 28, 2004 8:11 pm ] |
Post subject: | |
Ooo, k some mistakes here.. <!-- START ::: SERVER_STATUS --> and <!-- END ::: SERVER_STATUS --> is wrong.. it's not start it's BEGIN, also i don't think you can have/need ::: <!-- BEGIN SERVER_STATUS --> ... <!-- END SERVER_STATUS --> then everything in between <!-- BEGIN SERVER_STATUS --> and <!-- END SERVER_STATUS -->, all the {L_POST1} like that have to be like this {SERVER_STATUS.L_POST1} *Edit: don't need to worie about the {SERVER_STATUS.L_POST1}, because it's not in the SERVER_STATUS... it's case sensitive remember that. |
Author: | JSBN [ Sun Mar 28, 2004 9:05 pm ] |
Post subject: | |
ok, i found the problem. It was that i had <Head> </head> tags. I gues php doesn't like them. Thanks for all ur help guys! |
Author: | JSBN [ Tue Mar 30, 2004 10:38 pm ] |
Post subject: | |
Ok, I'm having a REALLY weird problem. I changed one thing in a script of mine and as soon as i uploaded it, none of the label variables would pass onto my template, but the actuall script works. I know it's not the lang file or the template, because they both work fine with other scripts. I need someone's help to find this bug because i can't. I have included: -The lang. file -the template -the script -A SS http://www.boelen.ca/Cary/Web%20Site.ace |
Author: | Amailer [ Tue Mar 30, 2004 11:29 pm ] |
Post subject: | |
first try putting all your lang variables in the lang_main.php see if it works. also, what's $no_page_header = TRUE; ? phpbb admin files don't have any headers either way... :S |
Author: | JSBN [ Wed Mar 31, 2004 1:49 pm ] |
Post subject: | |
Here's the thing, it was working fine (with both of those) yesterday, then i changed something ![]() |