Bug #71127 [NEW]: Define in auto_prepend_file is overwrite

From: Date: Tue, 15 Dec 2015 14:23:45 +0000
Subject: Bug #71127 [NEW]: Define in auto_prepend_file is overwrite
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197904@lists.php.net to get a copy of this message
From:             g dot hue14 at gmail dot com
Operating system: Debian 8
PHP version:      7.0.0
Package:          *General Issues
Bug Type:         Bug
Bug description:Define in auto_prepend_file is overwrite

Description:
------------
Tested with wordpress and apache 2.4 / php-fpm

Define('ABSPATH','mypath') in an auto_prepend_file

When wp-load.php do "define( 'ABSPATH', dirname(__FILE__) . '/' );",
my
personnal ABSPATH is overwrite with that new ABSPATH.

if i put "get_defined_constants();" in wp-load.php just before "define(
'ABSPATH', dirname(__FILE__) . '/' );", ABSPATH is not overwrite.

Tip:
if i put "get_defined_constants();" in the auto_prepend_file just after
my first define,  ABSPATH is  overwrite when wp-load.php do the define
function.

if i put "get_defined_constants();" in a file include between the
auto_prend_file and wp-load.php (like index.php or wp-blog-header.php) 
ABSPATH is  overwrite when wp-load.php do the define function.

Expected result:
----------------
Normally (in php 5.4, php 5.6), a file cannot redefine a constante
defined in an auto_prepend_file. 



Actual result:
--------------
Constantes defined in an auto_prepend_file can be redefined


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



Thread (5 messages)

« previous php.bugs (#197904) next »