package/php: make sure ca-certificates can be found

If BR2_PACKAGE_CA_CERTIFICATES is present, add the ca-certificates.crt
to the php.ini, to not get SSL errors when using PHP.

Signed-off-by: Julian Vetter <julian@outer-limits.org>
Reviewed-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
Julian Vetter
2026-01-22 17:11:16 +01:00
committed by Arnout Vandecappelle
parent 66754d7f50
commit 2af78232fc

View File

@@ -353,6 +353,14 @@ endef
PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP
ifeq ($(BR2_PACKAGE_CA_CERTIFICATES),y)
define PHP_CERTIFICATES_FIXUP
$(SED) 's%;openssl.cafile=%openssl.cafile=/etc/ssl/certs/ca-certificates.crt%' \
$(TARGET_DIR)/etc/php.ini
endef
PHP_POST_INSTALL_TARGET_HOOKS += PHP_CERTIFICATES_FIXUP
endif
PHP_CONF_ENV += CFLAGS="$(PHP_CFLAGS)" CXXFLAGS="$(PHP_CXXFLAGS)"
HOST_PHP_CONF_OPTS = \