From: info at rkphoto dot co dot uk Operating system: Mac OS X PHP version: 5.3.0RC1 PHP Bug Type: Scripting Engine problem Bug description: require function fails with fatal error
Description: ------------ The require function produces a fatal error or expects arguments that have been removed from previous versions of the 'included' functions Reproduce code: --------------- Calling code: <?php require('includes/mainMenu2.php'); ?> <html> <head></head> <body><?php mainMenu(); ?></body> </html> Test Code in mainMenu2.php: function mainMenu() { echo 'mainMenu() called'; } Expected result: ---------------- mainMenu() called Actual result: -------------- Warning: require(includes/mainMenu2.php) [function.require]: failed to open stream: No such file or directory in /Library/WebServer/Documents/rk/require2.php on line 1 Fatal error: require() [function.require]: Failed opening required 'includes/mainMenu2.php' (include_path='.:/usr/local/lib/php') in /Library/WebServer/Documents/rk/require2.php on line 1 ____________________ This was the second incarnation of the problem - the first time I was working with mainMenu,php, and calling mainMenu() with one argument. I had the same error as above, but later this morphed into the error below after it dropped the fatal error and just decided to object to the argument change instead. Warning: Missing argument 1 for mainMenu(), called in /Library/WebServer/Documents/rk/require.php on line 4 and defined in /Library/WebServer/Documents/rk/includes/mainMenu.php on line 2 Matching the arguments stops this error message, but produces truncated html as the view source shows: <html> <head></head> <body> -- Edit bug report at http://bugs.php.net/?id=48029&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48029&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48029&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48029&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48029&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48029&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48029&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48029&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48029&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48029&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48029&r=support Expected behavior: http://bugs.php.net/fix.php?id=48029&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48029&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48029&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48029&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48029&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48029&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48029&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48029&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48029&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48029&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48029&r=mysqlcfg