|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60812 Makefile INSTALL_IT target ignores --exec-prefix, --libexecdir, --sysconfdir
Submitted: 2012-01-19 20:12 UTC Modified: -
Avg. Score:4.3 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:2 (40.0%)
From: david at davidfavor dot com Assigned:
Status: Open Package: *Configuration Issues
PHP Version: 5.3.9 OS: Ubuntu 11.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: david at davidfavor dot com
New email:
PHP Version: OS:


 [2012-01-19 20:12 UTC] david at davidfavor dot com
The INSTALL_IT target hardcodes apxs2 directories making it very difficult to 
install multiple versions of php or relocate php.

This also causes unexpected over writing of system php files, causing Apache to 

Fixes are a bit complex because they involve configure + Makefile.

Suggest the end result produce a Makefile which honors these setting in all 
cases. So Makefile should include...

sysconfdir=argument_passed_to_configure || /usr/lib/apache2/modules
libexecdir=${exec_prefix}/argument_passed_to_configure || /etc/apache2

INSTALL_IT target then changes to...

INSTALL_IT = $(mkinstalldirs) '$(INSTALL_ROOT)/$libexecdir' && \
             $(mkinstalldirs)  '$(INSTALL_ROOT)/$sysconfdir' && \
             /usr/bin/apxs2 -S LIBEXECDIR='$(INSTALL_ROOT)/$libexecdir' \
             -S SYSCONFDIR='$(INSTALL_ROOT)/$sysconfdir' \
             -i -a -n php5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-28 16:25 UTC] childers dot paula at epa dot gov
PHP 5.5.2 on RHEL 2.6.32-358.11.1.el6.x86_64 

Similar but not identical issue: --exec-prefix is read, but --libexecdir and --sysconfdir are not. 

For those two variables, the default configure is pulling in a path to a different installed Apache on the same server (we have 4 total), which we believe was the last thing that was built & installed using "config/make" prior to this PHP build.  

Setting the --libexecdir and --sysconfdir explicitly at configure does not change anything, the incorrect path is still used. 

Since the Apache libs are currently all the same version, we were able to move the to the correct Apache's /libexec dir and still use it, but this may not be possible in the future if one Apache is upgraded prior to the others.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jul 25 16:01:23 2021 UTC