Bug #72180 [NEW]: Env variables incorrectly pretty printed in config.nice, phpinfo

From: Date: Mon, 09 May 2016 15:34:59 +0000
Subject: Bug #72180 [NEW]: Env variables incorrectly pretty printed in config.nice, phpinfo
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200964@lists.php.net to get a copy of this message
From:             lbarnaud
Operating system: 
PHP version:      7.0.6
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:Env variables incorrectly pretty printed in config.nice, phpinfo

Description:
------------
The ./configure command used to configure php is pretty printed in
multiple places; at least in config.nice and in phpinfo / php -i. This
includes arguments and environment variables like CFLAGS.

The config.nice file is created by ./configure, and is super-useful as
it allows to quickly re-run configure with additional arguments or
modified environment variables. 

Environment variables are not properly pretty-printed. As a result,
running the pretty-printed command doesn't give the same result as the
original command.

Test script:
---------------
$ CFLAGS="-O0 -ggdb -Wall" ./configure --enable-debug
$ cat config.nice

Expected result:
----------------
#! /bin/sh
#
# Created by configure

CFLAGS='-O0 -ggdb -Wall' \
'./configure' \
'--enable-debug' \
"$@"


The command is correctly pretty-printed, and running it gives the same
result as the original command.

Actual result:
--------------
#! /bin/sh
#
# Created by configure

CFLAGS='-O0 -ggdb -Wall' \
'./configure' \
'--enable-debug' \
'CFLAGS=-O0 \
'-ggdb' \
'-Wall'' \
"$@"

Running the command results in the following error:

configure: error: C compiler cannot create executables
See `config.log' for more details
configure: WARNING: cache variable ac_cv_env_CFLAGS_value contains a
newline

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



Thread (2 messages)

« previous php.bugs (#200964) next »