#41855 [Opn->Bgs]: Problem with require()

From: Date: Sun, 01 Jul 2007 13:40:23 +0000
Subject: #41855 [Opn->Bgs]: Problem with require()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114508@lists.php.net to get a copy of this message
ID: 41855 Updated by: sniper@php.net -Summary: Problem with require function Reported By: siegler at boskage dot com -Status: Open +Status: Bogus -Bug Type: Filesystem function related +Bug Type: Scripting Engine problem Operating System: Windows Server 2003 (IIS 6) PHP Version: 5.2.3 New Comment: FYI: require / include are not functions, they are language constructs. And something like 'require() or foo()' isn't gonna work since require exits if file is not found. Previous Comments: ------------------------------------------------------------------------ [2007-06-29 18:32:22] siegler at boskage dot com Description: ------------ I am having problems using a require statement and getting very odd results. The link of code is: require("util.php"); util.php does exist in the same directory as the executing script (I have even run getcwd() to insure my path is getting interpreted correctly). Initially I was getting no error output from this, and for some reason when I change the code to read: require("util.php") or die("blah"); I will get my error, except require is throwing a notice instead of a fatal error so I need this die statement to actually get an error to show, and die never shows the text I pass to the function. Reproduce code: --------------- Any require statement may or may not reproduce this issue (for the most part it seems pretty random). I can temporarily fix this by switching my require to an include, run the script, switch back to require and rerun the script. It will work then for a short period of time. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41855&edit=1

« previous php.bugs (#114508) next »