PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

memory_get_peak_usage> <ini_set
Last updated: Fri, 01 Jun 2007

view this page in

main

(No version information available, might be only in CVS)

main — Dummy for main()

Description

There is no function named main() except in the PHP source. In PHP 4.3.0, a new type of error handling in the PHP source (php_error_docref) was introduced. One feature is to provide links to a manual page in PHP error messages when the PHP directives html_errors (on by default) and docref_root (on by default until PHP 4.3.2) are set.

Sometimes error messages refer to a manual page for the function main() which is why this page exists. Please add a user comment below that mentions what PHP function caused the error that linked to main() and it will be fixed and properly documented.

Table 259. Known errors that point to main()

Function nameNo longer points here as of
include()5.1.0
include_once()5.1.0
require()5.1.0
require_once()5.1.0

See Also

html_errors
display_errors



add a note add a note User Contributed Notes
main
albitos dot snape at gmail dot com
27-May-2007 10:24
You can't store objects in session, this is impossible.
timmiejt at xs4all dot nl
10-Apr-2007 06:43
Notice: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "clsUser" 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 <file> on line 54

I'm getting this error when im trying to store an class in a session. Something like this:

$_SESSION["clsUser"] = $this;
Maurice
01-May-2006 06:12
Notice: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "<classname>" 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 <filename> on line <line>

You get this error if you have and object in your $_SESSION array and you call session_start() before you have loaded your included classes.

memory_get_peak_usage> <ini_set
Last updated: Fri, 01 Jun 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites