Bug #14493: MySQL socket detection
| From: | philip at p6m7g8 dot com | Date: | Thu, 13 Dec 2001 20:53:50 +0000 |
| Subject: | Bug #14493: MySQL socket detection | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-73617@lists.php.net to get a copy of this message | ||
From: philip@p6m7g8.com
Operating system: Unix (FreeBSD)
PHP version: 4.0.6
PHP Bug Type: *Configuration Issues
Bug description: MySQL socket detection
----------------------------START---------------------------
#!/bin/sh
$VER_PHP=4.0.6
$PREFIX=/usr/home/src
LD_LIBRARY_PATH=$PREFIX/mm/lib:$PREFIX/openssl/lib
fetch -mva http://download.php.net/distributions/php-$VER_PHP.tar.gz
gtar -xvzof php-$VER_PHP.tar.gz
cd php-$VER_PHP
./configure --with-apxs=$PREFIX/apache/bin/apxs \ --enable-safe-mode
--enable-calendar \
--enable-filepro --enable-ftp --enable-trans-sid \ --enable-sockets
--enable-inline-optimization \
--with-openssl=$PREFIX/openssl --with-mysql=$PREFIX/mysql \
--with-iodbc=$PREFIX/iodbc --with-mm=$PREFIX/mm \
------------------------END---------------------------------
configure output:
[snipped]
checking for MySQL support... yes
checking for MySQL UNIX socket... /tmp/mysql.sock
patched configure output:
checking for MySQL support... yes
checking for MySQL UNIX socket... /usr/home/src/mysql/mysql.sock
Patch:
sduwebship# diff -crN configure.old configure
*** configure.old Thu Dec 13 15:43:37 2001
--- configure Thu Dec 13 15:44:53 2001
***************
*** 29538,29554 ****
echo $ac_n "checking for MySQL UNIX socket""... $ac_c" 1>&6
echo "configure:29541: checking for MySQL UNIX socket" >&5
! MYSQL_SOCK=/tmp/mysql.sock
! for i in \
! /var/run/mysqld/mysqld.sock \
! /var/tmp/mysql.sock \
! /var/lib/mysql/mysql.sock \
! /var/mysql/mysql.sock \
! ; do
! if test -r $i; then
! MYSQL_SOCK=$i
! fi
! done
cat >> confdefs.h <<EOF
#define MYSQL_UNIX_ADDR "$MYSQL_SOCK"
EOF
--- 29538,29544 ----
echo $ac_n "checking for MySQL UNIX socket""... $ac_c" 1>&6
echo "configure:29541: checking for MySQL UNIX socket" >&5
! MYSQL_SOCK=
$MYSQL_DIR/bin/mysql_config --socket
cat >> confdefs.h <<EOF
#define MYSQL_UNIX_ADDR "$MYSQL_SOCK"
EOF
--
Edit bug report at: http://bugs.php.net/?id=14493&edit=1