ID:               48029
 Comment by:       info at rkphoto dot co dot uk
 Reported By:      info at rkphoto dot co dot uk
 Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Mac OS X
 PHP Version:      5.3.0RC1
 New Comment:

No, same thing with PHP 5.3.0RC2-dev


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

[2009-04-20 18:23:44] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



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

[2009-04-20 18:20:19] info at rkphoto dot co dot uk

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 this bug report at http://bugs.php.net/?id=48029&edit=1

Reply via email to