ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#44943 [Opn->Bgs]: Failed opening required
by felipe other posts by this author
May 8 2008 5:20PM messages near this date
#44943 [NEW]: Failed opening required | #16820 [Com]: hangs in multithreded environment (ZTS)
ID:               44943
 Updated by:       felipe@[...].net
 Reported By:      krzysin at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      4.4.8
 New Comment:

There is no bug here...

The '1' occurs because the expression '("2") || print "dd"' results in
TRUE. The require isn't a function, it's statement and thus, the '()'
did confuse you.


Previous Comments:
------------------------------------------------------------------------

[2008-05-08 08:50:42] krzysin at gmail dot com

Description:
------------
Failed opening required file, php 4, 5, ...

Reproduce code:
---------------
<?
require("2") || print "dd";
?> 


Expected result:
----------------
PHP Warning:  require(1): failed to open stream: No such file or
directory in /root/test.php on line 3

Warning: require(1): failed to open stream: No such file or directory
in /root/test.php on line 3
PHP Fatal error:  require(): Failed opening required '1'
(include_path='.:/usr/local/lib/php') in /root/test.php on line 3

Fatal error: require(): Failed opening required '1'
(include_path='.:/usr/local/lib/php') in /root/test.php on line 3


Actual result:
--------------
#0  0x37b62373 in fprintf () from /lib/libc.so.6
#1  0x08368ff9 in sapi_cli_log_message (
    message=0x37ad8ef8 "PHP Fatal error:  require(): Failed opening
required '1' (include_path='.:/usr/local/lib/php') in /root/test.php on
line 3")
    at /build/www/php5/php/sapi/cli/php_cli.c:313
#2  0x08278a18 in php_log_err (
    log_message=0x37ad8ef8 "PHP Fatal error:  require(): Failed opening
required '1' (include_path='.:/usr/local/lib/php') in
/root/krzysin/test.php on line 3")
    at /build/www/php5/php/main/main.c:505
#3  0x082794d3 in php_error_cb (type=64, error_filename=0x37ad8a38
"/root/test.php", error_lineno=3, format=0x8575e4c "%s",
args=0x3fd23b9c)
    at /build/www/php5/php/main/main.c:904
#4  0x0817b5af in soap_error_handler (error_num=64,
error_filename=0x37ad8a38 "/root/test.php", error_lineno=3,
format=0x8575e4c "%s", args=0x3fd23b9c)
    at /build/www/php5/php/ext/soap/soap.c:2178
#5  0x082b9dbe in zend_error (type=64, format=0x8575e4c "%s") at
/build/www/php5/php/Zend/zend.c:967
#6  0x08279083 in php_verror (docref=0x8576231 "function.require",
params=0x8575c8e "", type=64, format=0x8576200 "Failed opening required
'%s' (include_path='%s')",
    args=0x3fd23c60) at /build/www/php5/php/main/main.c:721
#7  0x082790cb in php_error_docref0 (docref=0x8576231
"function.require", type=64, format=0x8576200 "Failed opening required
'%s' (include_path='%s')")
    at /build/www/php5/php/main/main.c:733
#8  0x08279c6e in php_message_handler_for_zend (message=2,
data=0x37ad8cb8) at /build/www/php5/php/main/main.c:1119
#9  0x082b9c50 in zend_message_dispatcher (message=2, data=0x37ad8cb8)
at /build/www/php5/php/Zend/zend.c:894
#10 0x0829960d in compile_file (file_handle=<incomplete type> , type=8)
at /build/www/php5/php/Zend/zend_language_scanner.c:3410
#11 0x082997a8 in compile_filename (type=8, filename=0x3fd24e7c) at
/build/www/php5/php/Zend/zend_language_scanner.c:3465
#12 0x082e5b6e in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER
(execute_data=0x3fd24efc) at
/build/www/php5/php/Zend/zend_vm_execute.h:4583
#13 0x082d5c0e in execute (op_array=0x37ad896c) at
/build/www/php5/php/Zend/zend_vm_execute.h:92
#14 0x082ba242 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /build/www/php5/php/Zend/zend.c:1134
#15 0x0827afa1 in php_execute_script (primary_file=0x3fd27264) at
/build/www/php5/php/main/main.c:2005
#16 0x0836a404 in main (argc=2, argv=0x3fd272f4) at
/build/www/php5/php/sapi/cli/php_cli.c:1140



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44943&edit=1
Thread:
Krzysin At Gmail Dot Com
felipe

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved