php.net |  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: -
Votes:3
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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: quanah at zimbra dot com
New email:
PHP Version: OS:

 

 [2015-04-23 00:10 UTC] quanah at zimbra dot com
Description:
------------
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/instdso.sh SH_LIBTOOL='/opt/zimbra/common/build-1/libtool' libphp5.la /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 libphp5.la /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/
libtool: install: install .libs/libphp5.so /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /home/build/p4/zimbra/main/ThirdParty/php/php-5.6.7-tmppkg/opt/zimbra/common/modules/libphp5.la
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/libphp5.so
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.

Patches

Pull Requests

History

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

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: Thu Oct 31 22:01:27 2024 UTC