I had to do some digging to find out why ./configure --with-mysql --with-apxs2 stopped with the error.
What I had to do to resolve it: Install the httpd-devel rpm.
Note: this requires the apr-util-devel.rpm and apr-devel.rpm packages be pre-installed.
Got past the initial problem, but encountered another in the MySQL section.
I had to install the mysql-devel rpm.
The ./configure --with-mysql --with-apxs2 finally completed.
I was able to run make & make install for php 5.0.4.
One querk I ran into:
I modified the /etc/httpd/conf/httpd.conf file by adding the lines
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
AddType application/x-httpd-php .php
I tested Apache with
http://localhost in a browser
- so far so good
I tested (as a .htm) with:
<html><head><title>Web Page</title></head>
<body>The text here displays in my browser window</body></html>
- that worked
Next I tested (as a .php):
<?php
echo "Hey it worked";
?>
-- but it didn't work!
I re-checked the settings in the httpd.conf file, restarted httpd ...
... here's the quirk
I found the file /etc/httpd/conf.d/php.conf had the line:
LoadModule php4_module modules/libphp4.so
- so I commented the line and added the following line:
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
I restarted httpd and the .php code works! I have tested and retested by alternating the LoadModule lines in the /etc/httpd/conf.d/php.conf file.
MJJ