php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72180 Env variables incorrectly pretty printed in config.nice, phpinfo
Submitted: 2016-05-09 15:34 UTC Modified: -
From: lbarnaud@php.net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 7.0.6 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lbarnaud@php.net
New email:
PHP Version: OS:

 

 [2016-05-09 15:34 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-13 06:44 UTC] krakjoe@php.net
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)
 [2016-05-13 06:44 UTC] krakjoe@php.net
-Status: Open +Status: Closed
 [2016-05-13 06:44 UTC] krakjoe@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1bb8a7b0b895af4a9e6b24101fe8fab5af64f86c
Log: fix #72180 (Env variables incorrectly pretty printed in config.nice, phpinfo)
 [2016-05-16 03:22 UTC] laruence@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1bb8a7b0b895af4a9e6b24101fe8fab5af64f86c
Log: fix #72180 (Env variables incorrectly pretty printed in config.nice, phpinfo)
 [2016-07-20 11:31 UTC] davey@php.net
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)
 [2016-07-20 11:31 UTC] davey@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1bb8a7b0b895af4a9e6b24101fe8fab5af64f86c
Log: fix #72180 (Env variables incorrectly pretty printed in config.nice, phpinfo)
 [2016-11-20 08:33 UTC] krakjoe@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f67784907e2a4b39b47a4e05d8dfd315cd7ee616
Log: fix #72180, #73219
 [2016-11-20 08:34 UTC] krakjoe@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f67784907e2a4b39b47a4e05d8dfd315cd7ee616
Log: fix #72180, #73219
 [2016-11-22 13:13 UTC] krakjoe@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f67784907e2a4b39b47a4e05d8dfd315cd7ee616
Log: fix #72180, #73219
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC