php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61153 phpinfo reporting incorrect Configure Command
Submitted: 2012-02-21 14:19 UTC Modified: 2012-02-21 18:39 UTC
From: 935c at itsynergy dot co dot uk Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.10 OS: Scientific Linux 6.1
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: 935c at itsynergy dot co dot uk
New email:
PHP Version: OS:

 

 [2012-02-21 14:19 UTC] 935c at itsynergy dot co dot uk
Description:
------------
I called configure as follows :
"./configure -sysconfdir=/etc/mydir --with-xmlrpc"

However phpinfo() reports the configure command as :
"'./configure'"

(i.e. no args are shown)

Test script:
---------------
<?php
phpinfo();
?>

Expected result:
----------------
Phpinfo should show "./configure -sysconfdir=/etc/mydir --with-xmlrpc"

Actual result:
--------------
'./configure'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-21 17:27 UTC] rasmus@php.net
I am pretty sure you are not running the php that you built with that configure 
line then. I don't see how it could end up having a different configure line in 
phpinfo() the way the code is written. Please triple-check by looking at the 
"Build Date" near the top of the phpinfo() output.
 [2012-02-21 17:27 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-02-21 17:30 UTC] 935c at itsynergy dot co dot uk
-Status: Feedback +Status: Open
 [2012-02-21 17:30 UTC] 935c at itsynergy dot co dot uk
Do you seriously think I'm that stupid ?

(1) I am only running one version of PHP on that server
(2) Before, phpinfo stated 5.3.9, now it states 5.3.10 ... thus I am running the 
right version
(3) The build date is Feb 21 2012 14:02:25, which you see correlates to the time 
I opened this ticket.
 [2012-02-21 17:36 UTC] 935c at itsynergy dot co dot uk
Whilst you're in the mood for not believing me, why not check out the hard facts 
in my QA Report ?

http://qa.php.net/reports/details.php?
version=5.3.10&signature=30a4793560ae3e5862c1d5f16d5fa5fc&idreport=1519#phpinfo
 [2012-02-21 17:46 UTC] rasmus@php.net
Ok, since you are not stupid, track down why it isn't working on your system.
ext/standard/info.c shows that it prints the contents of the CONFIGURE_COMMAND 
#define. This is defined in main/build-defs.h which gets generated from 
main/build-defs.h.in at configure time. It also gets put into the top-level 
Makefile. So check these files. If you don't see it in main/build-defs.h it would 
mean that the configure VAR_SUBST stuff isn't working which should have caused 
your entire build to fail badly, or the configure shell script isn't doing the 
right thing on your system for some reason.
 [2012-02-21 17:52 UTC] rasmus@php.net
Ah, I see your mistake. It is --sysconfigdir not -sysconfigdir
I think you will find it will magically work when you fix that.
 [2012-02-21 17:54 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 [2012-02-21 17:54 UTC] rasmus@php.net
Forgot to close
 [2012-02-21 18:35 UTC] 935c at itsynergy dot co dot uk
In  main/build-defs.h


#define PHP_SYSCONFDIR          "/etc/mydir"

and yet 

#define CONFIGURE_COMMAND " './configure' "


PHP_SYSCONFDIR would not show /etc/mydir unless CONFIGURE_COMMAND was called 
with sysconfdir.


My default shell is bash :
$ ps -p $$
  PID TTY          TIME CMD
16040 pts/0    00:00:00 bash
$ bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
 [2012-02-21 18:39 UTC] rasmus@php.net
Yes, odd autoconf quirk that -sysconfdir sets it still. File a bug with the 
autoconf folks. There isn't anything we can do about that. But despite that, 
"./configure --help" clearly shows that the correct way to set it is by using --
sysconfdir
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 16:01:33 2025 UTC