#35176 [Fbk->Opn]: include()/require()/*_once() produce wrong error messages about main()

From: Date: Wed, 09 Nov 2005 21:06:48 +0000
Subject: #35176 [Fbk->Opn]: include()/require()/*_once() produce wrong error messages about main()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87959@lists.php.net to get a copy of this message
ID: 35176 User updated by: subscription at nazarenko dot net Reported By: subscription at nazarenko dot net -Status: Feedback +Status: Open Bug Type: PHP options/info functions Operating System: SuSE Linux 10.0 PHP Version: 5CVS-2005-11-09 (CVS) New Comment: A sample script: <?php require_once('nonexisting'); ?> Produces this HTML (html_errors=on): <b>Warning</b>: main(fake) [<a href='http://www.php.net/manual/en/function.main.php'>function.main.php</a>]: failed to open stream: No such file or directory in <b>x.php</b> on line <b>2</b><br /> </span> <b>Fatal error</b>: main() [<a href='http://www.php.net/manual/en/function.require.php'>function.require.php</a>]: Failed opening required 'fake' (include_path='.:/usr/lib/php') in <b>x.php</b> on line <b>2</b><br /> This illustrates both points: the erroneous main() function as well as the wrong html link (should be funtion.require-once.php) Previous Comments: ------------------------------------------------------------------------ [2005-11-09 21:56:51] tony2001@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-11-09 21:50:35] subscription at nazarenko dot net Description: ------------ According to this page: http://www.php.net/manual/en/function.main.php the misbehaviour was stopped in PHP 4.3.2, however it is still present in the latest 5.1.x snapshot. In addition when require_once() or include_once() call fails and "html_errors" is "On" the error message HTML link points to the same function "require()" or "include()", without the _once() part in it. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35176&edit=1

« previous php.bugs (#87959) next »