mirror of
https://github.com/php/php-src.git
synced 2025-01-20 18:53:37 +08:00
- Use myslqnd by default when MySQL extensions are activated but no path given
This commit is contained in:
parent
59614b05c4
commit
70561e9a6d
3
NEWS
3
NEWS
@ -15,6 +15,9 @@ PHP NEWS
|
||||
sort functions (sort, rsort, ksort, krsort, asort, arsort and
|
||||
array_multisort). FR#55158 (Arpad)
|
||||
|
||||
- Improved MySQL extensions:
|
||||
. ext/mysql, mysqli and pdo_mysql now use mysqlnd by defalt. (Johannes)
|
||||
|
||||
- Improved mbstring extension:
|
||||
. Added Shift_JIS/UTF-8 Emoji (pictograms) support. (Rui)
|
||||
. Added JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004)
|
||||
|
@ -297,6 +297,9 @@ UPGRADE NOTES - PHP X.Y
|
||||
|
||||
c. with changed behaviour
|
||||
|
||||
- The MySQL extensions (ext/mysql, mysqli and PDO_mysql) use mysqlnd
|
||||
as defalt library now. It is still possible to use libmysql by
|
||||
specifying a path to the configure options.
|
||||
- The session extension now can hook into the file upload feature
|
||||
in order to provide upload progress information through session
|
||||
variables.
|
||||
|
@ -41,8 +41,8 @@ AC_DEFUN([PHP_MYSQL_SOCKET_SEARCH], [
|
||||
|
||||
PHP_ARG_WITH(mysql, for MySQL support,
|
||||
[ --with-mysql[=DIR] Include MySQL support. DIR is the MySQL base
|
||||
directory. If mysqlnd is passed as DIR,
|
||||
the MySQL native driver will be used [/usr/local]])
|
||||
directory, if no DIR is passed or the value is
|
||||
mysqlnd the MySQL native driver will be used])
|
||||
|
||||
PHP_ARG_WITH(mysql-sock, for specified location of the MySQL UNIX socket,
|
||||
[ --with-mysql-sock[=DIR] MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
|
||||
@ -53,7 +53,7 @@ if test -z "$PHP_ZLIB_DIR"; then
|
||||
[ --with-zlib-dir[=DIR] MySQL: Set the path to libz install prefix], no, no)
|
||||
fi
|
||||
|
||||
if test "$PHP_MYSQL" = "mysqlnd"; then
|
||||
if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then
|
||||
dnl enables build of mysqnd library
|
||||
PHP_MYSQLND_ENABLED=yes
|
||||
|
||||
@ -61,17 +61,15 @@ elif test "$PHP_MYSQL" != "no"; then
|
||||
MYSQL_DIR=
|
||||
MYSQL_INC_DIR=
|
||||
|
||||
for i in $PHP_MYSQL /usr/local /usr; do
|
||||
if test -r $i/include/mysql/mysql.h; then
|
||||
MYSQL_DIR=$i
|
||||
MYSQL_INC_DIR=$i/include/mysql
|
||||
if test -r $PHP_MYSQL/include/mysql/mysql.h; then
|
||||
MYSQL_DIR=$PHP_MYSQL
|
||||
MYSQL_INC_DIR=$PHP_MYSQL/include/mysql
|
||||
break
|
||||
elif test -r $i/include/mysql.h; then
|
||||
MYSQL_DIR=$i
|
||||
MYSQL_INC_DIR=$i/include
|
||||
elif test -r $PHP_MYSQL/include/mysql.h; then
|
||||
MYSQL_DIR=$PHP_MYSQL
|
||||
MYSQL_INC_DIR=$PHP_MYSQL/include
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$MYSQL_DIR"; then
|
||||
AC_MSG_ERROR([Cannot find MySQL header files under $PHP_MYSQL.
|
||||
@ -155,7 +153,7 @@ if test "$PHP_MYSQL" != "no"; then
|
||||
PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared)
|
||||
PHP_SUBST(MYSQL_SHARED_LIBADD)
|
||||
|
||||
if test "$PHP_MYSQL" = "mysqlnd"; then
|
||||
if test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then
|
||||
PHP_ADD_EXTENSION_DEP(mysql, mysqlnd)
|
||||
AC_DEFINE([MYSQL_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
|
||||
fi
|
||||
|
@ -4,24 +4,20 @@ dnl config.m4 for extension mysqli
|
||||
|
||||
PHP_ARG_WITH(mysqli, for MySQLi support,
|
||||
[ --with-mysqli[=FILE] Include MySQLi support. FILE is the path
|
||||
to mysql_config. If mysqlnd is passed as FILE,
|
||||
the MySQL native driver will be used [mysql_config]])
|
||||
to mysql_config. If no value or mysqlnd is passed
|
||||
as FILE, the MySQL native driver will be used])
|
||||
|
||||
PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support,
|
||||
[ --enable-embedded-mysqli MYSQLi: Enable embedded support
|
||||
Note: Does not work with MySQL native driver!], no, no)
|
||||
|
||||
if test "$PHP_MYSQLI" = "mysqlnd"; then
|
||||
if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
|
||||
dnl This needs to be set in any extension which wishes to use mysqlnd
|
||||
PHP_MYSQLND_ENABLED=yes
|
||||
|
||||
elif test "$PHP_MYSQLI" != "no"; then
|
||||
|
||||
if test "$PHP_MYSQLI" = "yes"; then
|
||||
MYSQL_CONFIG=`$php_shtool path mysql_config`
|
||||
else
|
||||
MYSQL_CONFIG=$PHP_MYSQLI
|
||||
fi
|
||||
|
||||
MYSQL_LIB_NAME='mysqlclient'
|
||||
if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
|
||||
@ -82,7 +78,7 @@ if test "$PHP_MYSQLI" != "no"; then
|
||||
PHP_SUBST(MYSQLI_SHARED_LIBADD)
|
||||
PHP_INSTALL_HEADERS([ext/mysqli/php_mysqli_structs.h])
|
||||
|
||||
if test "$PHP_MYSQLI" = "mysqlnd"; then
|
||||
if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
|
||||
PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd)
|
||||
AC_DEFINE([MYSQLI_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
|
||||
fi
|
||||
|
@ -4,8 +4,8 @@ dnl vim: se ts=2 sw=2 et:
|
||||
|
||||
PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO,
|
||||
[ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory
|
||||
If mysqlnd is passed as DIR, the MySQL native
|
||||
native driver will be used [/usr/local]])
|
||||
If no value or mysqlnd is passed as DIR, the
|
||||
MySQL native driver will be used])
|
||||
|
||||
if test -z "$PHP_ZLIB_DIR"; then
|
||||
PHP_ARG_WITH(zlib-dir, for the location of libz,
|
||||
@ -28,9 +28,10 @@ if test "$PHP_PDO_MYSQL" != "no"; then
|
||||
done
|
||||
])
|
||||
|
||||
if test "$PHP_PDO_MYSQL" != "yes" && test "$PHP_PDO_MYSQL" != "mysqlnd"; then
|
||||
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
|
||||
else
|
||||
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"
|
||||
@ -38,20 +39,10 @@ if test "$PHP_PDO_MYSQL" != "no"; then
|
||||
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
|
||||
if test "$PHP_PDO_MYSQL" = "yes" || 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])
|
||||
|
Loading…
Reference in New Issue
Block a user