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- compilethe 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-sockThe configure script runs with no problems, but then 'make' fails withthis 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.