RE: Compiling an PHP 4.0 module with MySQL

2001-06-09 Thread Keith Attfield

Gabriele,

Thank you for your interest.  I am using /usr/bin/ because this is where my 
mysql file is, and my libmysqlclient.* files are in /usr/lib/.  I tried 
using just /usr (i.e. --with-mysql=/usr) as you suggest, but get the same 
results.

In fact the file mysql.h is not anywhere in my filesystem.  The MySQL 
installation was managed by the Mandrake distribution I am wondering if the 
header files have been omitted.

Any other thoughts would be appreciated, but please note that I can get my 
scripts to run by changing reference to the host in the mysql connections 
functions to 127.0.0.1 from localhost.  It works but I don't know why?

Keith

At 09:09 08/06/01 +0200, Gabriele Bartolini wrote:

 ./configure --with-mysql=/usr/bin --with-apxs --enable-track-vars

Ciao,

sorry but I just joined this mailing list, so I am not aware of any 
 previous messages.

/usr/bin ?

Why in that directory?

Can I please get to know how did you install MySQL? By RPM?

Please try these 2 find commands?

find / -name mysql.h(in my system it's under /usr/include/mysql/)
find / -name libmysqlclient.*(in my system it's under 
/usr/lib/mysql/lib/)

The latest RPM version comes with this prefix: /usr (so just put 
--with-mysql=/usr )

Let me know!

Hope this helps!
-Gabriele

-
Gabriele Bartolini - Computer Programmer
U.O. Rete Civica - Comune di Prato
Prato - Italia - Europa
e-mail: [EMAIL PROTECTED]
http://www.po-net.prato.it
-
A Supernova is the celestial
equivalent of rm -rf /* with
root permissions.
-


-
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




RE: Compiling an PHP 4.0 module with MySQL

2001-06-08 Thread Gabriele Bartolini


 ./configure --with-mysql=/usr/bin --with-apxs --enable-track-vars

Ciao,

sorry but I just joined this mailing list, so I am not aware of any 
previous messages.

/usr/bin ?

Why in that directory?

Can I please get to know how did you install MySQL? By RPM?

Please try these 2 find commands?

find / -name mysql.h(in my system it's under /usr/include/mysql/)
find / -name libmysqlclient.*(in my system it's under 
/usr/lib/mysql/lib/)

The latest RPM version comes with this prefix: /usr (so just put 
--with-mysql=/usr )

Let me know!

Hope this helps!
-Gabriele

-
Gabriele Bartolini - Computer Programmer
U.O. Rete Civica - Comune di Prato
Prato - Italia - Europa
e-mail: [EMAIL PROTECTED]
http://www.po-net.prato.it
-
A Supernova is the celestial
equivalent of rm -rf /* with
root permissions.
-


-
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




RE: Compiling an PHP 4.0 module with MySQL

2001-06-08 Thread oltra jean-michel


 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.

Bonjour,

I have  a Mandrake 7.1 (2.2.15 kernel)distribution too and get problems
compiling php with gd and pdf because it seems that the linker searches header files in
very particular directories. So I had to mkdir /usr/local/lib/gd (and same
thing with pdf) putting in .so and .h files and compilation works fine.
Could it be something similar in your case?
Can't you try with-mysql=/usr/local/mysql?


-
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




RE: Compiling an PHP 4.0 module with MySQL

2001-06-07 Thread Keith Attfield

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




RE: Compiling an PHP 4.0 module with MySQL

2001-06-06 Thread Harry Bakken

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