diff mbox

[2/2] package/php: Set MySQL socket path

Message ID 1473345222-10563-2-git-send-email-bos@je-eigen-domein.nl
State Changes Requested
Headers show

Commit Message

Floris Bos Sept. 8, 2016, 2:33 p.m. UTC
If the buildroot MySQL server is being build set the
PHP default MySQL socket path to match what the server is using.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
 package/php/php.mk | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox

Patch

diff --git a/package/php/php.mk b/package/php/php.mk
index deaf56e..86a8ca0 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -210,6 +210,13 @@  PHP_DEPENDENCIES += unixodbc
 endif
 endif
 
+ifneq ($(BR2_PACKAGE_PHP_EXT_MYSQLI)$(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),)
+ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
+# Set default MySQL unix socket to what the MySQL server is using by default
+PHP_CONF_OPTS += --with-mysql-sock=$(MYSQL_SOCKET)
+endif
+endif
+
 define PHP_DISABLE_PCRE_JIT
 	$(SED) '/^#define SUPPORT_JIT/d' $(@D)/ext/pcre/pcrelib/config.h
 endef