diff --git a/lang/php7/Makefile b/lang/php7/Makefile
index 9af3cbdf7..c0562e47b 100644
--- a/lang/php7/Makefile
+++ b/lang/php7/Makefile
@@ -256,7 +256,8 @@ endif
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-imap),)
   CONFIGURE_ARGS+= \
 		--with-imap=shared,"$(STAGING_DIR)/usr" \
-		--with-imap-ssl
+		--with-imap-kerberos=no \
+		--with-imap-ssl="$(STAGING_DIR)/usr"
 else
   CONFIGURE_ARGS+= --without-imap
 endif