Harry,
Thank you it worked, although I don't know why, in fact using "127.0.0.1"
without the port also worked. Previously I had been using "localhost" to
define the host in my connect functions.
I had another reply but this was sent to me directly. This said:
"> ./configure --with-mysql=/usr/bin --with-apxs --enable-track-vars
>
> the configuration fails giving the following error: "cannot find header
> files under /usr/bin"
>
Try: CPPFLAGS=-I/path/to/mysql.h ./configure --with-mysql=/usr/bin
As an exemple I compiled with CPPFLAGS=-I/usr/local/mysql/include/mysql
jean-michel "
I tried this but got an error indicating that my C compiler did not work
(gcc). I also tried moving the mysql.h file that came with the PHP source
to my /usr/bin/ directory (where I think mysql resides) to see if my
original ./configure statement would work, but I still get the message
saying it cannot find the "header" files. I am not sure what these are,
but I am wondering if my MySQL installation made with a Mandrake
distribution has ignored the header files. I am reluctant to rebuild
everything from source files as I think this could take me into even deeper
water! Particularly as I now have things working thanks to you, but it
would be nice to know if anybody has any ideas.
Keith
At 14:06 06/06/01 -0600, Harry Bakken wrote:
>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