php.net |  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: -
Votes:6
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-01-19 20:12 UTC] david at davidfavor dot com
Description:
------------
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 
segfault.

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 libphp5.la


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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 libphp5.so 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-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 19:01:26 2019 UTC