DeveloperCube - PHP Fatal Error
House M.D. fans unite at DrGregHouse.com
Username:    Password:
Remember Me?    
PHP Fatal Error

 
Post new topic   Reply to topic    DeveloperCube Forum Index -> Scripts and Programming
 See a User Guidelines violation? Please contact us.
Author Message

Triumvirate

Joined: 24 Feb 2004
Posts: 169
Location: NY, USA

PostPosted: 3/9/2006, 1:24 am    Post subject: PHP Fatal Error Reply with quote

Quote:
Fatal error: Call to a member function on a non-object in blah/blah/functions.php on line 7
Can anyone tell me, in general, what this relates to? I've been looking for exactly what it means so I can troubleshoot it but I haven't been able to find anywhere that says in general what causes this problem in the first place.

Thanks.
Back to top

Keith
Moderator

Joined: 28 Jan 2004
Posts: 427
Location: Dublin, Ireland

PostPosted: 3/9/2006, 1:26 pm    Post subject: Reply with quote

It usually means that a method (function inside a class) was not found or does not exist. It could also mean that a function (outside of a class) does not exist.
_________________
Keith McLaughlin - DeveloperCube Moderator

Web Hosting Directory - Freelance Web Design - Webmaster Resources
Back to top

Triumvirate

Joined: 24 Feb 2004
Posts: 169
Location: NY, USA

PostPosted: 3/9/2006, 10:18 pm    Post subject: Reply with quote

Alright that's kind of what I figured. My only problem is, I'm using the PEAR template package. I'm creating a function which puts things into the various $template-> things. I'm guessing I have to re-add the declaration (if that's the right word for it) of the class to the function even though it already appears in the page where I will be using the function? Or am I way off?
_________________
GamingMMO.com
Back to top

Keith
Moderator

Joined: 28 Jan 2004
Posts: 427
Location: Dublin, Ireland

PostPosted: 3/9/2006, 10:30 pm    Post subject: Reply with quote

I'm not sure. Read line 7, find out what's being called and make sure the file that contains the function or method being called is being included/required or referenced properly.
_________________
Keith McLaughlin - DeveloperCube Moderator

Web Hosting Directory - Freelance Web Design - Webmaster Resources
Back to top

Triumvirate

Joined: 24 Feb 2004
Posts: 169
Location: NY, USA

PostPosted: 3/9/2006, 11:05 pm    Post subject: Reply with quote

Thanks, yeah I got it working now...at least...that part anyway. Quick question, if I get an error on a page and I want the page to stop at that point (i.e if a user doesn't fill in a form field it should trigger an error once they hit submit and not continue and try to put what they have into the database) what would I use? I assume there is a function of some kind to stop the page processing?
_________________
GamingMMO.com
Back to top

Keith
Moderator

Joined: 28 Jan 2004
Posts: 427
Location: Dublin, Ireland

PostPosted: 3/10/2006, 11:45 am    Post subject: Reply with quote

You can use the die() or exit() function.
_________________
Keith McLaughlin - DeveloperCube Moderator

Web Hosting Directory - Freelance Web Design - Webmaster Resources
Back to top

Triumvirate

Joined: 24 Feb 2004
Posts: 169
Location: NY, USA

PostPosted: 3/10/2006, 11:17 pm    Post subject: Reply with quote

Thanks, I remembered a couple minutes after posting that it was exit() which worked.

Thanks again.
_________________
GamingMMO.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    DeveloperCube Forum Index -> Scripts and Programming All times are GMT
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Writing Scene - Readers Unbound - Literature Vault - Chrispian - Webmaster's Weekly - Writing Prompts - Programming Forum - We Heart Pets - Anita Blake - Harry Dresden - Art Schools Online

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - MarianoRivera.com - PhinsBlog.com - phpBBHacks.com - WebDevBooks.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - CommunityPromotion.com - PhotoshopForums.com - MicrosoftBlog.com - DrGregHouse.com - Bad Boy Blog - BadBoyForums.com - SodaRatings.com - Patrick O'Keefe

We Support phpBBHacks.com. Forum Icons by Daz. Privacy Policy. Powered by phpBB © phpBB Group. phpBB SEO.
Copyright © 2003-2008. DeveloperCube, iFroggy Network. All Rights Reserved.

Advertising   Contact   Links   Link To Us   Staff   User Guidelines