This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: PHP3/Apache support for MySQL From: Jason Costomiris <jcostom@jasons.org> Date: Thu, 4 Nov 1999 17:38:07 -0500 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii On Thu, Nov 04, 1999 at 03:55:20PM -0500, Gene Wilburn wrote: : : I've just spent a few months in FreeBSD (very nice BTW) and had no : problems using Apache/PHP3/MySQL. Now I'm back at Red Hat 6.1 and I've : returned to Red Hat's RPM weirdness regarding MySQL. What's so weird? : Is there an easy recipe for getting MySQL to work with RedHat RPMs for : Apache/PHP3 or should I just rpm -e all this stuff and roll from tarballs? It's actually VERY simple. rpm -e php-imap rpm -e php-ldap rpm -e php-pgsql rpm -e php-manual rpm -e php wget http://www.mysql.com/Downloads/MySQL-3.22/MySQL-3.22.27-1.src.rpm wget ftp://ftp.redhat.com/pub/redhat/redhat-6.1/SRPMS/SRPMS/php-3.0.12-6.src.rpm rpm --rebuild MySQL-3.22.27-1.src.rpm rpm -i (or -Uvh) the resulting mysql RPMs (in /usr/src/redhat/RPMS/$(ARCH) ) rpm -i php-3.0.12-6.src.rpm cd /usr/src/redhat/SPECS (This part assumes you've installed openldap and openldap-devel) I modified the .spec file to get rid of pgsql and replace it with mysql. Attached to this email is a diff you should be able to apply with: cd /usr/src/redhat/SPECS ; patch < php.spec.diff Then, rpm -ba php.spec, and install the resulting RPMs. : Footnote question: why does Red Hat always make this highly popular combo : hard to put together? Many of us were using MySQL on Red Hat long before : RH decided to endorse Postgres. This Postgres bias is almost as irritating : as RH's GNOME bias, but at least if offers KDE (somewhat grudgingly) as an : option. MySQL, at least in the more useful version(s) are not freely distributable. You need to download it. It's not like it's hard or anything though. While it's a minor inconvenience, it's not like they're putting deliberate roadblocks in front of you! If you need to do an SSL web server, instead of the stock apache, get the apache-mod_ssl SRPM from ftp.replay.com. wget ftp://ftp.replay.com/pub/crypto/redhat/SRPMS/apache-mod_ssl-1.3.6.2.3.0-0.src.rpm If you're in the US, you'll need to satisfy the RSA license. You can do that by purchasing the RH secure server, or some other server that gives you a license to use the RSA code. I can't wait until September of next year, when we won't have to abide by that stupid rule any longer... If you go the mod_ssl route, you'll also need to install the OpenSSL code, obtainable from the same directory as the apache-mod_ssl above... --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="php.spec.diff" --- php.spec.orig Thu Nov 4 17:20:19 1999 +++ php.spec Thu Nov 4 17:22:13 1999 @@ -44,20 +44,6 @@ Comprehensive documentation for PHP3, viewable through any web browser. -%package pgsql -Group: System Environment/Daemons -Requires: php -Prereq: /usr/bin/perl -Provides: php_database -Obsoletes: mod_php3-pgsql -Summary: PostgreSQL database module for PHP3. -BuildPrereq: postgresql-devel - -%description pgsql -This is a dynamic shared object (DSO) for Apache that will add PostgreSQL -database support to PHP3. If you need back-end support for PostgreSQL, -you should install this package in addition to the main php package. - %package imap Group: System Environment/Daemons Requires: php @@ -106,6 +92,7 @@ --with-system-regex \ --disable-debug \ --with-zlib \ + --with-mysql=/usr \ --enable-debugger \ --enable-magic-quotes \ --enable-track-vars @@ -113,11 +100,6 @@ make make -C convertor -# PostgreSQL module -gcc -shared -fPIC -DCOMPILE_DL=1 -DHAVE_PQCMDTUPLES -I. -I/usr/include/apache \ - -I/usr/include/pgsql -o pgsql.so \ - ./functions/pgsql.c -lpq -lc - # IMAP module perl -pi -e 's/HAVE_IMAP 0/HAVE_IMAP 1/g' config.h gcc -shared -fPIC -DCOMPILE_DL=1 -I. -I/usr/include/apache \ @@ -136,7 +118,6 @@ mkdir -p $RPM_BUILD_ROOT/home/httpd/icons mkdir -p $RPM_BUILD_ROOT/usr/bin install -m 755 -s libphp3.so $RPM_BUILD_ROOT/usr/lib/apache -install -m 755 -s pgsql.so $RPM_BUILD_ROOT/usr/lib/apache install -m 755 -s imap.so $RPM_BUILD_ROOT/usr/lib/apache install -m 755 -s ldap.so $RPM_BUILD_ROOT/usr/lib/apache install -m 644 php3.ini-dist $RPM_BUILD_ROOT/etc/httpd/php3.ini @@ -162,14 +143,6 @@ perl -pi -e 's|^extension=imap.so|;extension=imap.so|g' /etc/httpd/php3.ini fi -%post pgsql -perl -pi -e 's|^;extension=pgsql.so|extension=pgsql.so|g' /etc/httpd/php3.ini - -%postun pgsql -if [ $1 = 0 ]; then - perl -pi -e 's|^extension=pgsql.so|;extension=pgsql.so|g' /etc/httpd/php3.ini -fi - %post ldap perl -pi -e 's|^;extension=ldap.so|extension=ldap.so|g' /etc/httpd/php3.ini @@ -187,10 +160,6 @@ %doc INSTALL* %doc convertor/README.convertor -%files pgsql -%defattr(-,root,root) -/usr/lib/apache/pgsql.so - %files imap %defattr(-,root,root) /usr/lib/apache/imap.so @@ -204,6 +173,9 @@ /home/httpd/html/manual/mod/mod_php3 %changelog +* Thu Nov 4 1999 Jason Costomiris <jcostom@clearlogic.com> +- got rid of pgsql, replaced with mysql + * Fri Sep 24 1999 Preston Brown <pbrown@redhat.com> - --with-apxs --> --with-apxs=/usr/sbin/apxs (# 5094) - ldap support (# 5097) --fUYQa+Pmc3FrFX/N--