PDA

View Full Version : Fatal error: Call to a member function on a non-object in /h


Terrell
01-04-2006, 11:27 PM
I was installing a blog on my site

I think this may have effect my directory? I clicked on the link to my directory and this is the messages I recieved:


"Fatal error: Call to a member function on a non-object in /home/costa/public_html/directory/include/functions.php on line 47"



I don't know much about php but here is info for lines 40-51 I checked with dreamweaver
Content visible to registered users only.Here is the whole code
How can this be fixed?

tarheit
01-11-2006, 04:47 PM
I was able to fix it in my case by adding the following line to the beginning of index.php, submit.php, etc.
Content visible to registered users only.I think for some reason when the files .php files are included inside the blog (or cms in my case) they simply don't get recognized as global and can't be found by various functions that expect them.

This might vary depending on what you are trying to plug in to your cms/blog. Another real-estate system I had to plug in required the global statements to be added to the index.php of the cms rather than just the index.php of application I was trying to add on. So if the first doesn't work, then try the other.

I should add that if your cms/blog already uses those variables elsewhere you could end up with a conflict requiring you to rename all references to the variable in the phpLD code.

(I suspect the orginal poster didn't get it quite working yet as it appears it hasn't been pluged into the blog, at least in the link he posted.)

My directory isn't quite finished yet. It works, but I haven't setup categories, etc. Just a few for testing. And I'm still working on the appearance. I also reworked the templates to have SEO links that fit within my current CMS. You can see it here (http://www.honeyrunapiaries.com/bee_links.phtml)

-Tim