/    Sign up×
Community /Pin to ProfileBookmark

problem accessing object´s method stored in a session variable

Hi,, I´m getting this error here:

[COLOR=”DarkGreen”]Fatal error: main() [<a href=’function.main’>function.main</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;Person&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in C:PWebwwwgrsmain.php on line 78[/COLOR]

when trying to access an object´s method through a session variable
I´m doing it just like NogDog suggested on this post here::
[url]http://www.webdeveloper.com/forum/showthread.php?t=141112&highlight=object+session[/url]

1) I have session.auto_start turned on (set to 1)
2) The class definition is being loaded before I start your session

Any ideas of what I could be doing wrong? tks

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 06.2007 — I think the session.auto_start may be messing you up, as it would be loading your session variables before you have a chance to load the the class definition.
Copy linkTweet thisAlerts:
@Marlon_BrauthorApr 06.2007 — I finally got it working, keeping the session.auto_start still set to 1 and having the session_start() coming after the [I]classes includes[/I]. I think the problem was that the method I was trying to access was never attributed a value to. But now it´s working fine.. I´m only experiencing OOP in PHP now,, and things like this happen as I try things I haven´t done before. Thanks again for the help NogDog,,
×

Success!

Help @Marlon_Br spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...