summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS8
-rw-r--r--ext/mysql/config.m423
-rwxr-xr-xext/pdo_mysql/config.m469
3 files changed, 48 insertions, 52 deletions
diff --git a/NEWS b/NEWS
index 14c642e453..f6c3066704 100644
--- a/NEWS
+++ b/NEWS
@@ -12,12 +12,10 @@ PHP NEWS
- Added ReflectionMethod::setAccessible() for invoking non-public methods
through the Reflection API. (Sebastian)
- Added Collator::getSortKey for intl extension. (Stas)
-
-- Implemented FR #49571 (CURLOPT_POSTREDIR not implemented). (Sriram Natarajan)
-- Implemented FR #49253 (added support for libcurl's CERTINFO option).
+- Added support for CURLOPT_POSTREDIR. FR #49571. (Sriram Natarajan)
+- Added support for CURLOPT_CERTINFO. FR #49253.
(Linus Nielsen Feltzing <linus@haxx.se>)
-- Fixed the m4 scripts to support autoconf-2.64+. (Rasmus)
- Fixed error_log() to be binary safe when using message_type 3. (Jani)
- Fixed unnecessary invocation of setitimer when timeouts have been disabled.
(Arvind Srinivasan)
@@ -36,6 +34,8 @@ PHP NEWS
(Felipe)
- Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't used
if it is empty). (foutrelis at gmail dot com, Ilia)
+- Fixed bug #50231 (Socket path passed using --with-mysql-sock is ignored when
+ mysqlnd is enabled). (Jani)
- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
(Pierrick)
- Fixed bug #50212 (crash by ldap_get_option() with LDAP_OPT_NETWORK_TIMEOUT).
diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4
index 8de15e8bbb..2babcee827 100644
--- a/ext/mysql/config.m4
+++ b/ext/mysql/config.m4
@@ -58,18 +58,6 @@ if test "$PHP_MYSQL" = "mysqlnd"; then
PHP_MYSQLND_ENABLED=yes
elif test "$PHP_MYSQL" != "no"; then
-
- AC_MSG_CHECKING([for MySQL UNIX socket location])
- if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
- MYSQL_SOCK=$PHP_MYSQL_SOCK
- AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
- AC_MSG_RESULT([$MYSQL_SOCK])
- elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
- PHP_MYSQL_SOCKET_SEARCH
- else
- AC_MSG_RESULT([no])
- fi
-
MYSQL_DIR=
MYSQL_INC_DIR=
@@ -152,6 +140,17 @@ fi
dnl Enable extension
if test "$PHP_MYSQL" != "no"; then
+ AC_MSG_CHECKING([for MySQL UNIX socket location])
+ if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
+ MYSQL_SOCK=$PHP_MYSQL_SOCK
+ AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
+ AC_MSG_RESULT([$MYSQL_SOCK])
+ elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
+ PHP_MYSQL_SOCKET_SEARCH
+ else
+ AC_MSG_RESULT([no])
+ fi
+
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared)
PHP_SUBST(MYSQL_SHARED_LIBADD)
diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4
index fc5fc8102a..b1ae1eec3a 100755
--- a/ext/pdo_mysql/config.m4
+++ b/ext/pdo_mysql/config.m4
@@ -28,46 +28,42 @@ if test "$PHP_PDO_MYSQL" != "no"; then
done
])
+ if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
+ PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
+ elif test "$PHP_PDO_MYSQL" != "yes"; then
+ if test -d "$PHP_PDO_MYSQL" ; then
+ if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
+ PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
+ else
+ PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
+ fi
+ fi
+ else
+ for i in /usr/local /usr ; do
+ if test -x "$i/bin/mysql_config" ; then
+ PDO_MYSQL_CONFIG="$i/bin/mysql_config"
+ break;
+ fi
+ if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
+ PDO_MYSQL_DIR="$i"
+ break;
+ fi
+ done
+ fi
+
if test "$PHP_PDO_MYSQL" = "mysqlnd"; then
dnl enables build of mysqnd library
PHP_MYSQLND_ENABLED=yes
AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd])
else
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
- AC_MSG_CHECKING([for mysql_config])
- if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
- PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
- elif test "$PHP_PDO_MYSQL" != "yes"; then
- if test -d "$PHP_PDO_MYSQL" ; then
- if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
- PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
- else
- PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
- fi
- else
- AC_MSG_RESULT([$PHP_PDO_MYSQL is not a directory])
- AC_MSG_ERROR([can not find mysql under the "$PHP_PDO_MYSQL" that you specified])
- fi
- else
- for i in /usr/local /usr ; do
- if test -x "$i/bin/mysql_config" ; then
- PDO_MYSQL_CONFIG="$i/bin/mysql_config"
- break;
- fi
- if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
- PDO_MYSQL_DIR="$i"
- break;
- fi
- done
- fi
-
- if test -n "$PDO_MYSQL_CONFIG" && test -x "$PDO_MYSQL_CONFIG" ; then
+ AC_MSG_CHECKING([for mysql_config])
+ if test -n "$PDO_MYSQL_CONFIG"; then
AC_MSG_RESULT($PDO_MYSQL_CONFIG)
if test "x$SED" = "x"; then
AC_PATH_PROG(SED, sed)
fi
-
if test "$enable_maintainer_zts" = "yes"; then
PDO_MYSQL_LIBNAME=mysqlclient_r
PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs_r | $SED -e "s/'//g"`
@@ -76,11 +72,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"`
fi
PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"`
- PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
- elif test -z "$PDO_MYSQL_DIR"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Cannot find MySQL header files under $PDO_MYSQL_DIR])
- else
+ elif test -n "$PDO_MYSQL_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_CHECKING([for mysql install under $PDO_MYSQL_DIR])
if test -r $PDO_MYSQL_DIR/include/mysql; then
@@ -103,10 +95,11 @@ if test "$PHP_PDO_MYSQL" != "no"; then
PHP_ADD_INCLUDE($PDO_MYSQL_INC_DIR)
PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([Unable to find your mysql installation])
fi
- AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
-
PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query,
[
PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE)
@@ -159,6 +152,10 @@ if test "$PHP_PDO_MYSQL" != "no"; then
AC_MSG_RESULT($pdo_inc_path)
])
+ if test -n "$PDO_MYSQL_CONFIG"; then
+ PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
+ AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
+ fi
dnl fix after renaming to pdo_mysql
PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path -I)