Ryan Schmidt escribió:
On Aug 31, 2009, at 15:12, ruben wrote:
Ryan Schmidt escribió:
On Aug 31, 2009, at 05:47, ruben wrote:
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
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
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
[Index of Archives]
[PHP Users]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[Postgresql]
[PHP Books]
[PHP Databases]
[PHP SOAP]