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)