The spec file for php includes parts to build the MySQL apache module, but
their commented out. In the comments section, it says to uncomment the
sections if MySQL is installed.
However, when the sections are uncommented, it fails to build the RPM.
I looked closer, and found that these two sections were missing
in the configure section.
I added my own lines to the spec file and it worked fine. You may want to
add a %package and %description section, even if they're commented out, to
make it easier to build the MySQL module.
Uh-oh. Everything is not fine.
After building and installing the php RPM with the changes I made above, httpd
will no longer start.
It begins reporting errors about duplicate mysql functions. Here is a partial
<b>Warning</b>: Module load failed - duplicate function name - mysql_connect in
<b>(null)</b> on line <b>0</b><br>
<b>Warning</b>: Module load failed - duplicate function name - mysql_pconnect i
n <b>(null)</b> on line <b>0</b><br>
Note, though, that if I install the php RPM that is distributed with RH6.2, and
install the php-mysql RPM created by my version, then everything works fine.
Created attachment 209 [details]
RPM spec file for PHP
I found the problem about duplicate functions by removing the --with-mysql flag
from the configure statement, since I saw the spec file calls gcc directly to
build the mysql.so file.
It seems to have cured the problem.
I have attached my spec file that builds PHP with MySQL database support. The
MySQL lines, though, are not commented out, as they are with the distribution
I've made the changes, but I can't enable them by default because MySQL is
not in the main distribution tree. The updated php-3.0.16-2 will be in Raw
Hide (ftp://ftp.redhat.com/pub/rawhide/SRPMS/SRPMS/) soon.
*** Bug 13141 has been marked as a duplicate of this bug. ***