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, 16 May 2008

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.

Known errors that point to main()
Function name No longer points here as of
include() 5.1.0
include_once() 5.1.0
require() 5.1.0
require_once() 5.1.0



memory_get_peak_usage> <ini_set
Last updated: Fri, 16 May 2008
 
add a note add a note User Contributed Notes
main
deryckchan [ATT] gmail D0T C0M
21-Feb-2008 03:10
To put it simple: main() refers to anything running in the current PHP script file that isn't part of any function.
drchanchal2002 at yahoo dot co dot in
20-Feb-2008 04:57
I,Dr.Chanchal Bhattacharya,graduated from veterinary faculty,Kharkov zoo veterinary Institue in1989.I had a diplomnaya rabota under Dr.Pustovar.A.I.in Department of Microbiology,Virology and Fundamentals of Veterinary Medicine.My co-guide was Dr.Boris Abramovich Lichtman of Department of Epizootology.
  I desperetely wanted to find out some of my very close friends in the same course.I was a student of group no-5.From group no-7,I wanted to find out Sobina Irina Ivanovna,a resident of Prospect Ludviga Svobodi,Aleksievka,Kharkov.Is it possible to find out her whereabouts?I shall be really grateful if you can help me in this regard.I am also very keen to get in touch with my prepadavacheli of above names.
  Please help.
  Thanking you.
  Yours sincerely,
  Dr.Chanchal Bhattacharya
  Tel-+91-11-26897042
  Mob-+91-9810594861
drchanchal2002 at yahoo dot co dot in
19-Feb-2008 05:35
I am a graduate from veterinary faculty in 1989.I was the only Indian student studied in this institute during 1984-1989.Right now,i have been working as a senior veterinary surgeon in Government of Delhi,India.I am an executive member of Veterinary Council,Delhi state,India.Iam one of the leading dog practitioner in Delhi and holding responsibility as a Nodal Officer,Avian Influenza.I desperately wanted to reestablish contact with the Institute for last couple of years but could not get any response.I sent thousend of emails but in vein.
  I am writing my address and hope that I can establish contact.I wanted to find out Dr.A.I.Pustovarand Dr.Boris Abramovich Lichtman.
   Thanks.Proud to be a Graduate of KZVA.
    Dr.Chanchal Bhattacharya
    Veterinary Hospital Complex,Masudpur,Vasant Kunj,
    New Delhi-110070
    Phone-DOM-+91-11-26897042
    Rabochi-+91-11-26892731
    Mobilni-+91-9810594861
    India
MagicalTux at kinoko dot fr
28-Nov-2007 06:31
Additional note about what Maurice said: you can also use an __autoload function which will get called as the session/var is unserialized.

This will allow you to not preload all possible classes before loading a session, and let them be loaded dynamically. Check http://php.net/oop5.autoload for more details about this magic function.
Maurice
01-May-2006 07: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, 16 May 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites