|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69508 When using INSTALL_ROOT, apxs is called to modify httpd.conf in the INSTALL_ROO
Submitted: 2015-04-23 00:10 UTC Modified: -
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: quanah at zimbra dot com Assigned:
Status: Open Package: Compile Failure
PHP Version: 5.6.8 OS: Linux 2.6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-04-23 00:10 UTC] quanah at zimbra dot com
For some broken reason, PHP calls apxs to modify httpd.conf. Given that httpd.conf is seldom even used anymore, the utility in this is extremely questionable.  Regardless of that, when using INSTALL_ROOT with php, apxs is called to incorrectly modify httpd.conf in the INSTALL_ROOT location, which, of course, it won't actually exist in

make[1]: Entering directory `/home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-srcpkg'
Installing PHP SAPI module:       apache2handler
/opt/zimbra/data/httpd/build/ SH_LIBTOOL='/opt/zimbra/common/build-1/libtool' /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules
/opt/zimbra/common/build-1/libtool --mode=install install /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/
libtool: install: install .libs/ /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/
libtool: install: install .libs/libphp5.lai /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/
libtool: install: warning: remember to run `libtool --finish /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-srcpkg/libs'
chmod 755 /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/
apxs:Error: Config file /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/conf/httpd.conf not found.
make[1]: *** [install-sapi] Error 1
make[1]: Leaving directory `/home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-srcpkg'
make: *** [build-pkg] Error 2

Expected result:
apxs is not called at all, as most apache installations don't even use httpd.conf anymore

Actual result:
apxs is called against an incorrect location, causing build failure.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-23 00:16 UTC] quanah at zimbra dot com
Problem appears to be here:

INSTALL_IT = $(mkinstalldirs) '$(INSTALL_ROOT)/opt/zimbra/common/modules' && $(mkinstalldirs) '$(INSTALL_ROOT)/opt/zimbra/common/conf' && /opt/zimbra/common/bin/apxs -S LIBEXECDIR='$(INSTALL_ROOT)/opt/zimbra/common/modules' -S SYSCONFDIR='/opt/zimbra/common/conf' -i -a -n php5

There is a very invalid assumption that apache is in the PHP INSTALL_ROOT
 [2015-04-23 00:18 UTC] quanah at zimbra dot com
Ugh, don't cut and paste after modifying a file.

Makefile has:

-S SYSCONFDIR='$(INSTALL_ROOT)/opt/zimbra/common/conf'
 [2015-04-23 00:43 UTC] quanah at zimbra dot com
Confirmed, adjusting the SYSCONFDIR in the makefile to point to the location of apache httpd.conf resolved the problem.  PHP should not assume httpd is in the PHP-specific INSTALL_ROOT.  It entirely breaks the concept of safely separated chroot'd building.
 [2018-12-19 05:50 UTC] tom_jay at hotmail dot com
Is there a fix for this?
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 08:01:28 2024 UTC