Discussion:
[PHP-INSTALL] PHP 5.2.9 + Apache 1.3 Darwin 6.8 MAC OS X 10.2.8 + MYSQL
ruben
2009-08-31 10:47:19 UTC
Permalink
Hello everybody
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
the php module for apache with this configuration:

../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock

The configure script runs with no problems, but then 'make' fails with
this message:

ld: Undefined symbols:
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1

I'm really stuck with this...

Please help and thank u in advance!!
Keith Roberts
2009-08-31 13:15:47 UTC
Permalink
Subject: [PHP-INSTALL] PHP 5.2.9 + Apache 1.3 Darwin 6.8 MAC OS X 10.2.8 +
MYSQL
Hello everybody
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
I'm really stuck with this...
Please help and thank u in advance!!
Hi Ruben.

It looks as though the mysql development header files might
not be detected correctly.

Have you installed the mysql client development package?

See if you can find out where the header files for the mysql
library are.

Then point configure to them with a command-line option.

I'm on Fedora 10, so I can't tell you where they are.

Maybe in /usr/include, or /usr/lib/include.

You could also try searching through the config.log file.
That may give you more details of why make failed.

Try looking for any of the strings that appeared in the make
error message, or whatever you might think is causing make
to fail.

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
ruben
2009-08-31 20:04:47 UTC
Permalink
Post by Keith Roberts
Subject: [PHP-INSTALL] PHP 5.2.9 + Apache 1.3 Darwin 6.8 MAC OS X 10.2.8 +
MYSQL
Hello everybody
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
I'm really stuck with this...
Please help and thank u in advance!!
Hi Ruben.
It looks as though the mysql development header files might not be
detected correctly.
Have you installed the mysql client development package?
See if you can find out where the header files for the mysql library are.
Then point configure to them with a command-line option.
I'm on Fedora 10, so I can't tell you where they are.
Maybe in /usr/include, or /usr/lib/include.
You could also try searching through the config.log file. That may give
you more details of why make failed.
Try looking for any of the strings that appeared in the make error
message, or whatever you might think is causing make to fail.
Kind Regards,
Keith Roberts
-----------------------------------------------------------------
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
Have you installed the mysql client development package?

I have installed mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg

Doing some google research I found that what seems to fail is that it
looks like the functions _mysql_create_db _mysql_drop_db have been
removed from mysqlclient.a because they are deprecated. In the mysql
webpage it says about these functions "This function is deprecated. It
is preferable to use mysql_query() to issue an SQL CREATE DATABASE
statement instead". But I don't know how to do so.

You think that with the development package I will be able to build the
mysqlclient library again, instead of using the bundled, right?

Thank you very much for your time, this issue is driving me crazy.
Ryan Schmidt
2009-08-31 14:55:33 UTC
Permalink
Post by ruben
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
What version of MySQL is installed, and where? Did you compile it
yourself or install it from some binary distribution?

Is this on Mac OS X Server or the regular Mac OS X client version?

Are you really installing PHP in /user or was that a typo of /usr?
ruben
2009-08-31 20:12:24 UTC
Permalink
Post by Ryan Schmidt
Post by ruben
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
What version of MySQL is installed, and where? Did you compile it
yourself or install it from some binary distribution?
Is this on Mac OS X Server or the regular Mac OS X client version?
Are you really installing PHP in /user or was that a typo of /usr?
This is mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg, binary dist.
The OS is MAC OS X 10.2.8 regular client version.
The PHP is in /user, up and running and I've been working with it for
months without any trouble. The problem is to add the mysql support to
the Apache's PHP module.

Thank you very much, hope this info will help u to guess something I
could do to solve this issue.
Best regards
Ryan Schmidt
2009-09-01 00:30:21 UTC
Permalink
Post by ruben
Post by Ryan Schmidt
Post by ruben
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-
compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
Now that I spend a little time on Google, I see a few reports of this
problem before; unfortunately none of them seem to end with a
resolution:

http://bugs.php.net/bug.php?id=28810

http://lists.apple.com/archives/web-dev/2004/Mar/msg00086.html

http://www.hotscripts.com/forums/php/7359-cant-make-php5-mac-osx-10-2-a.html
Post by ruben
Post by Ryan Schmidt
What version of MySQL is installed, and where? Did you compile it
yourself or install it from some binary distribution?
Is this on Mac OS X Server or the regular Mac OS X client version?
Are you really installing PHP in /user or was that a typo of /usr?
This is mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg, binary dist.
The OS is MAC OS X 10.2.8 regular client version.
The PHP is in /user, up and running and I've been working with it
for months without any trouble. The problem is to add the mysql
support to the Apache's PHP module.
If I remember correctly, the binary distributions of MySQL from MySQL
AB install into a prefix like "/usr/local/mysql-standard-4.0.26-apple-
darwin6.8-powerpc" and there is a symlink at "/usr/local/mysql"
pointing to it. So you would seem to need "--with-mysql=/usr/local/
mysql" instead of "--with-mysql=/usr". One of the posts above shows
the user doing this and it still failing, but I'm not sure I believe
that. It seems plausible to me that the failure is caused by PHP's
configure script finding its bundled copy of MySQL 3.23.x (which
contains those old functions) but then at make time trying to link
with your installed MySQL 4.0.26 (which doesn't).

If the above does not help, I have a G4 set up with Mac OS X 10.2.8
and could possibly try to reproduce the issue here, but MySQL AB no
longer offers binary downloads of MySQL 4.0.x. If you still have the
mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg installer package
and could make it available to me (perhaps by putting it on a web
server or FTP server and sending me the URL), I could give it a try.

Of course you know, though, that you're using very outdated versions
of things. You may experience less frustration (or, at least,
different frustration) by using Mac OS X 10.5.8 (which might require a
newer Mac) or Mac OS X 10.6.0 (which definitely would) and using the
current version of MySQL (5.1.37), Apache (2.2.13) and PHP (5.3.0).
There are many ways to install these packages on recent versions of
Mac OS X, but the method I like to use is MacPorts.

http://www.macports.org/

MacPorts currently requires Mac OS X 10.4.11 or later, though Mac OS X
10.4 support will probably be gone within a year too.
ruben
2009-09-01 05:29:02 UTC
Permalink
Post by Ryan Schmidt
Post by ruben
Post by Ryan Schmidt
Post by ruben
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
Now that I spend a little time on Google, I see a few reports of this
http://bugs.php.net/bug.php?id=28810
http://lists.apple.com/archives/web-dev/2004/Mar/msg00086.html
http://www.hotscripts.com/forums/php/7359-cant-make-php5-mac-osx-10-2-a.html
Post by ruben
Post by Ryan Schmidt
What version of MySQL is installed, and where? Did you compile it
yourself or install it from some binary distribution?
Is this on Mac OS X Server or the regular Mac OS X client version?
Are you really installing PHP in /user or was that a typo of /usr?
This is mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg, binary dist.
The OS is MAC OS X 10.2.8 regular client version.
The PHP is in /user, up and running and I've been working with it for
months without any trouble. The problem is to add the mysql support to
the Apache's PHP module.
If I remember correctly, the binary distributions of MySQL from MySQL AB
install into a prefix like
"/usr/local/mysql-standard-4.0.26-apple-darwin6.8-powerpc" and there is
a symlink at "/usr/local/mysql" pointing to it. So you would seem to
need "--with-mysql=/usr/local/mysql" instead of "--with-mysql=/usr". One
of the posts above shows the user doing this and it still failing, but
I'm not sure I believe that. It seems plausible to me that the failure
is caused by PHP's configure script finding its bundled copy of MySQL
3.23.x (which contains those old functions) but then at make time trying
to link with your installed MySQL 4.0.26 (which doesn't).
If the above does not help, I have a G4 set up with Mac OS X 10.2.8 and
could possibly try to reproduce the issue here, but MySQL AB no longer
offers binary downloads of MySQL 4.0.x. If you still have the
mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg installer package and
could make it available to me (perhaps by putting it on a web server or
FTP server and sending me the URL), I could give it a try.
Of course you know, though, that you're using very outdated versions of
things. You may experience less frustration (or, at least, different
frustration) by using Mac OS X 10.5.8 (which might require a newer Mac)
or Mac OS X 10.6.0 (which definitely would) and using the current
version of MySQL (5.1.37), Apache (2.2.13) and PHP (5.3.0). There are
many ways to install these packages on recent versions of Mac OS X, but
the method I like to use is MacPorts.
http://www.macports.org/
MacPorts currently requires Mac OS X 10.4.11 or later, though Mac OS X
10.4 support will probably be gone within a year too.
THAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANK YOUUUUUUUUU

:D :D :D :D :D :D

Your 'forensic' science about the compilation 'fatality' worked
amazingly!!! It made sense and it depicted accurately the problem!!! I
just added --with-mysql=/usr/local/mysql and the whole damn thing went
smooth as silk (at least this is what it looks like, now I'll have to
test it in depth). So I owe you a truck packed of beers.

Just for the record, I'd say that in fact I own a MacBook with the
beautiful Leopard on it (When winter comes, maybe I'll upgrade it to the
snowish one..) and Apache 2.2.x and the whole set (MySQL, PHP, etc...)
up to date. The problem is that as a freelance developer, in my work I
have to cope with harware/software scenarios which are not very nice
indeed. An this is the case. Upgrading the equipment would be the last
resort. It's all a matter of budget.

Because of this, I had to work hard finding old versions and even more
hard to make new things run in an old machine. For example, to get the
old MySQL package after having noticed that they just erased MySQL 4.0.x
from the downloads list in MySQL.com, I browsed to a mirror as chances
were that they hadn't erased the file from it. And fortunately I was
right. All the new and old versions are in
ftp://ftp.rediris.es/mirror/mysql/Downloads/

One more time, thank you very very much

I'll report when I end the tests

Best regards,

Ruben B.
http://www.flickr.com/rubenlaspalmas

ruben
2009-08-31 20:25:07 UTC
Permalink
Post by Ryan Schmidt
Post by ruben
After been using PHP 5.2.9 on a MAC OS 10.2.8 with Apache 1.3 without
problems, I decided to add support for MYSQL so I tried to re-compile
../configure --prefix=/user --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --with-apxs --without-sqlite
--without-pdo-sqlite --with-zlib --without-iconv --enable-sockets
--with-openssl --with-kerberos --with-mysql=/usr --with-mysql-sock
The configure script runs with no problems, but then 'make' fails with
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
What version of MySQL is installed, and where? Did you compile it
yourself or install it from some binary distribution?
Is this on Mac OS X Server or the regular Mac OS X client version?
Are you really installing PHP in /user or was that a typo of /usr?
This is mysql-standard-4.0.26-apple-darwin6.8-powerpc.pkg, binary dist.
The OS is MAC OS X 10.2.8 regular client version.
The PHP is in /user, up and running and I've been working with it for
months without any trouble. The problem is to add the mysql support to
the Apache's PHP module.

Thank you very much, hope this info will help u to guess something I
could do to solve this issue.
Best regards
Loading...