Edit report at https://bugs.php.net/bug.php?id=69199&edit=1
ID: 69199
Updated by: demon@php.net
Reported by: pegasus at vaultwiki dot org
Summary: require_once doesn't require ./ files
-Status: Open
+Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Centos 6 64-bit
PHP Version: master-Git-2015-03-07 (Git)
Block user comment: N
Private report: N
New Comment:
It seems that include_path causes the issue. When you are running the script, "./xxxx.php"
will be searched in the current directory and include_path.
e.g. The scriptname that you are going to run is /a/b/c.php.
1. cd /a/b
2. php c.php
Could you please check if the issue is fixed?
Previous Comments:
------------------------------------------------------------------------
[2015-03-07 15:29:11] pegasus at vaultwiki dot org
Description:
------------
After trying to run vBulletin under Master, I've found that I get Fatal Error: undefined
function for a lot of functions which are normally included under PHP 5.6.
After investigating more closely, the affected functions are all included using the format:
require_once('./includes/filename.php');
If I dump the results of get_included_files(), I find that this file never gets included.
However, if I modify the line like so:
require_once('includes/filename.php');
Then all the functions are included as expected. It seems to me that require_once just skips
anything starting with ./
If my include paths were configured incorrectly, I would expect a Fatal Error due to
file-not-being-found.
Expected result:
----------------
Functions in ./ includes should be included.
Actual result:
--------------
Functions in ./ includes are not included.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69199&edit=1