php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #23609 require_once() error complained about main()
Submitted: 2003-05-13 09:55 UTC Modified: 2003-05-13 17:03 UTC
From: metalgeargleeb at hotmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.1 OS: Windows 2000 Server
Private report: No CVE-ID: None
 [2003-05-13 09:55 UTC] metalgeargleeb at hotmail dot com
Using PHP 4.3.1, the line:

require_once("config.php");

caused the following error:

<br />
<b>Warning</b>:  main(config.php) [<a href='http://www.php.net/function.main'>function.main</a>]: failed to create stream: No such file or directory in <b>c:\intranet\common.php</b> on line <b>15</b><br />
<br />
<b>Fatal error</b>:  main() [<a href='http://www.php.net/function.main'>function.main</a>]: Failed opening required 'config.php' (include_path='.;c:\php4\pear') in <b>c:\intranet\common.php</b> on line <b>15</b><br />

http://www.php.net/manual/en/function.main.php specifies that in 4.3.1, this problem has been fixed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-13 16:20 UTC] sniper@php.net
Manual is wrong, it should say 4.3.2.

 [2003-05-13 16:20 UTC] sniper@php.net
reclassify.

 [2003-05-13 16:53 UTC] alindeman@php.net
Are you sure the documentation is wrong?  The docs say that in 4.3.1 (which is what he is using), errors with require_once point to main().  The original ''bug'' seems more like a misinterpretation of the docs...
 [2003-05-13 17:01 UTC] alindeman@php.net
Uhhh...it seems that it's my bad interpretation of the docs.  Disregard the last comment...
 [2003-05-13 17:03 UTC] philip@php.net
I wrote the dummy main() page before 4.3.1 became the CGI fix distro, these fixes should actually be listed as 4.3.2.

This is now fixed in CVS with the wording slightly modified to avoid confusion, thanks for the report.

http://cvs.php.net/cvs.php/phpdoc/en/reference/info/functions/main.xml
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 20:00:02 2026 UTC