473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What does "PHP_Incomplete_Class" mean?

I have a class "Form" that I instantiate then put in the SESSION in
order to use it on another page. When I get to the new page, I can't
access any of the fields of the class because they're all NULL. The
weird thing is, in my debugger $_SESSION['myFormInstance'] shows as
having fields not null -- they are filled with the appropriate values.
But when I do

$foo = $_SESSION['myFormInstance'];

then

$foo->someField is NULL.

Also, in the listing of SESSION variables in the debugger, under "Type"
myFormInstance has a type of "object(__PHP_Incomplete_Class)".

Any insight into this would be greatly appreciated.

Thanks,

E

Jul 17 '05 #1
3 12916

"elektrophyte" <el**********@yahoo.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I have a class "Form" that I instantiate then put in the SESSION in
order to use it on another page. When I get to the new page, I can't
access any of the fields of the class because they're all NULL. The
weird thing is, in my debugger $_SESSION['myFormInstance'] shows as
having fields not null -- they are filled with the appropriate values.
But when I do

$foo = $_SESSION['myFormInstance'];

then

$foo->someField is NULL.

Also, in the listing of SESSION variables in the debugger, under "Type"
myFormInstance has a type of "object(__PHP_Incomplete_Class)".

Any insight into this would be greatly appreciated.

Thanks,

E


OK, I'll ask the obvious: Do you have session_start() right at the top?

Shelly
Jul 17 '05 #2
Shelly wrote:

OK, I'll ask the obvious: Do you have session_start() right at the top?

Shelly


Yes.

E

Jul 17 '05 #3
elektrophyte wrote:
....
Also, in the listing of SESSION variables in the debugger, under "Type"
myFormInstance has a type of "object(__PHP_Incomplete_Class)".


I found out the answer. It's that the class declaration has to be
available before you call session_start(). If your class is defined in
an included file, you have to call include() (include_once(),
require(), require_once()) before you call session_start().

E

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrey Mishenin | last post by:
While accessing MySQl data base by means of perl the value of variable $! sometimes equals " Resource temporarily unavailable". At the mean time everything works correct. What does that mean?...
2
by: pembed2003 | last post by:
Hi all, I recently saw a piece of code that looks like: class one{public: one(){} }; class two : public virtual one{public: two(){} }; class three : virtual public one{public: three(){} }; ...
4
by: pete | last post by:
I found it in the view source of a corporate website. <script Language="Javascript"> <!-- var keyMacro= ]; //--> </script>
6
by: **Developer** | last post by:
What does this mean: External component has thrown an exception. My program crashes after it leaves a subroutine. What I see during debugging is when I press F11 at the End Sub statement
2
by: tony | last post by:
Hello!! I know what an abstract class is which mean that the one of the derived class must define the abstract methods in the abstract class. So all the abstract methods in the abstarct class...
10
by: tony | last post by:
Hello!! I have some demo programs written in C# and they have this construction "" see below. I haven't seen this before so what does it mean ? public bool ShowDropDownButtons { get {...
9
by: JoeC | last post by:
m_iWidth = (int)pBitmapInfo->bmiHeader.biWidth; m_iHeight = (int)pBitmapInfo->bmiHeader.biHeight; What does this mean? I have seen v=&var->member.thing; but what does it mean when you...
0
by: steve | last post by:
What does it mean to set a value or April fools all year long :) http://beyondsql.blogspot.com/2008/03/sql-what-does-it-mean-to-set-value.html
14
by: Tony | last post by:
Hello! It says "Another limitation that you need to be aware of is that using the operator == and != are only permitted when comparing a value of a type supplied to a generic type to null....
1
by: rasmidas | last post by:
Hi, Could anyone please let me know what does it mean by the following statement in solaris shell scripting. $PROMPT " Select an option: " read ans db_option=${ans:=0} I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.