Bug #69199 [NEW]: require_once doesn't require ./ files

From: Date: Sat, 07 Mar 2015 15:29:12 +0000
Subject: Bug #69199 [NEW]: require_once doesn't require ./ files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191232@lists.php.net to get a copy of this message
From:             pegasus at vaultwiki dot org
Operating system: Centos 6 64-bit
PHP version:      master-Git-2015-03-07 (Git)
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:require_once doesn't require ./ files

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 bug report at https://bugs.php.net/bug.php?id=69199&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69199&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69199&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69199&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69199&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69199&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69199&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69199&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69199&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69199&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69199&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69199&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69199&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69199&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69199&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69199&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69199&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69199&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69199&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69199&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69199&r=mysqlcfg



Thread (21 messages)

« previous php.bugs (#191232) next »