Bug #72180 [Opn->Csd]: Env variables incorrectly pretty printed in config.nice, phpinfo

From: Date: Fri, 13 May 2016 06:44:17 +0000
Subject: Bug #72180 [Opn->Csd]: Env variables incorrectly pretty printed in config.nice, phpinfo
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201059@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72180&edit=1 ID: 72180 Updated by: krakjoe@php.net Reported by: lbarnaud@php.net Summary: Env variables incorrectly pretty printed in config.nice, phpinfo -Status: Open +Status: Closed Type: Bug Package: Unknown/Other Function PHP Version: 7.0.6 Block user comment: N Private report: N New Comment: Automatic comment on behalf of krakjoe Revision: http://git.php.net/?p=php-src.git;a=commit;h=1f52a03082b2816826bc5bd8c241f5d016d15395 Log: fix #72180 (Env variables incorrectly pretty printed in config.nice, phpinfo) Previous Comments: ------------------------------------------------------------------------ [2016-05-09 15:34:58] lbarnaud@php.net 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 this bug report at https://bugs.php.net/bug.php?id=72180&edit=1

« previous php.bugs (#201059) next »