PHP and Perl
On Mac OS X Panther, MySQL support is built in to PHP. If you want PostgreSQL support, you must reinstall PHP from source.
You can install general database
support in Perl by installing the
DBI module with
the cpan
utility (see Chapter 10). After that, you can install the
DBD::mysql module for MySQL-specific
support, and DBD::Pg for PostgreSQL-specific support.
Because there are some steps to these installations that the
cpan
utility can’t handle, you
should download the latest builds of these modules from http://www.cpan.org/modules/by-module/DBD/
and install them manually. Be sure to check the README
files, since some aspects of the configuration may have
changed.
The DBD:mysql module requires a database in which to perform its
tests. You can use the database and username/password that you set up
earlier in Configuring MySQL. To install
DBD::mysql, you must first generate the
Makefile
, compile the code, test it, and then
install the module if the test run is successful. For example:
$perl Makefile.PL --testdb=
dbname
--testuser=
username
\
>--testpassword=
password
$make
$make test
$sudo make install
Warning
At the time of this writing, DBD::mysql failed to compile on Panther.
The short description of the fix is to replace all occurrences of
MACOSX
with env MACOSX
in
the Makefile
(after generating it with
perl Makefile.PL
).
For a complete description, see the Forwarding Address: OS X weblog entry at http://www.saladwithsteve.com/osx/2003_11_01_archive.html#106802251200041735 ...
Get Mac OS X Panther for Unix Geeks, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.