how did you install PHP
rhel5.4 is a bit old ( the current rhel5 is rhel5.7
and the php & php-mysql installed in 5 and last updated for 5.7 is php-5.1.6-27.el5_7.4.i386.rpm
the MediaWiki install docs state to use 5.2.3 or newer except for "PHP 5.3.1 is incompatible with MediaWiki due to a bug."
I'm guessing mediawiki is looking for MySQL in an area that MySQL would occupy if it were installed from scratch
no i am guessing apache is not set up for php5 and not connecting to mysql
are the document roots all set ?
seeing as this is NOT the default location you MUST set everything
the folder location for " apache2" is normally /var/www/apache
with musql & php in the standard " /usr " install location
you might want to build from scratch EVERYTHING
or use yum and "localinstall" to install the rhn rpm's you download and transfer to this machine
off line installing of a Server stack is a VERY BIG pain in the " ??? "
and is very difficult .