Bug #69508 [Com]: When using INSTALL_ROOT, apxs is called to modify httpd.conf in the INSTALL_ROO

From: Date: Wed, 19 Dec 2018 05:50:31 +0000
Subject: Bug #69508 [Com]: When using INSTALL_ROOT, apxs is called to modify httpd.conf in the INSTALL_ROO
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218515@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69508&edit=1 ID: 69508 Comment by: tom_jay at hotmail dot com Reported by: quanah at zimbra dot com Summary: When using INSTALL_ROOT, apxs is called to modify httpd.conf in the INSTALL_ROO Status: Open Type: Bug Package: Compile Failure Operating System: Linux 2.6 PHP Version: 5.6.8 Block user comment: N Private report: N New Comment: Is there a fix for this? Previous Comments: ------------------------------------------------------------------------ [2015-04-23 00:43:06] 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. ------------------------------------------------------------------------ [2015-04-23 00:18:20] 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:16:56] 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:10:26] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69508&edit=1

« previous php.bugs (#218515) next »