I had the same problem, though I did not know the cause. The
work-around I used was to use "127.0.0.1:3306" as the hostname for
connecting in the script.
Harry
-----Original Message-----
From: Keith Attfield [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 11:39 AM
To: [EMAIL PROTECTED]
Subject: Compiling an PHP 4.0 module with MySQL
I need some help upgrading to PHP 4.0 (version 4.0.5) on my Linux web
server running Apache containing a PHP module configured with MySQL.
I am trying to install PHP from the source tar downloaded from
www.php.net. I am following the installation instructions that say
that I
can get away without recompiling Apache. The steps in the instructions
are:
1 check all library locations are listed in /etc/ld.so.conf and
then
run ldconfig
2 unpack the php tar, configure then make and install
3 amend the httpd.conf file to: 1) verify the paths, 2) check the
Module and Type lines are in place, and 3) remove lines referring to the
previous PHP 3.0 installation.
At step two above I am running the following to configure the PHP
module:
./configure --with-mysql=/usr/bin --with-apxs --enable-track-vars
the configuration fails giving the following error: "cannot find header
files under /usr/bin"
I am using the path /usr/bin/ because this contains the file "mysql",
and I
also tried /usr/sbin/, because this contains "mysqld", but with the same
results.
If I configure without specifying a path in the --with-mysql option I
can
make and install and run a PHP script. However, when I run a script
containing a MySQL connection statement I get the following error
displayed
in my browser:
"can't connect to local MySQL server through socket '/tmp/mysql.sock'
The Linux kernel is 2.2.13 and has been installed from a Mandrake
distribution. This is also the source of Apache, PHP 3 and MySQL. The
distribution puts files in non-standard places so I am wondering if the
solution to my problem is to find the right base directory to use in the
--with-mysql=/path/ syntax, and/or the "header" files are in the wrong
place. I have searched and tried many option but with no success.
Can anybody help me please?
Thanks for any help.
Keith Attfield (UK)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php