So some cowboy (not me I promise) was trying to do all these updates with up2date on our box (CentOS4) and it somehow pooched everything. I had to reinstall mySQL, and took the time to upgrade our version of mySQL to 5.0.37. All references to php were messed up somehow too, so I upgraded that too (PHP 5.1.6 (cli) )
this was all installed using the yum function of CentOS. Here are all the CentOS rpm's installed regarding mySQL and php(although I haven't even gotten to testing php-->mysql yet. I just want php running):
php-pdo-5.1.6-3.el4s1.5
php-common-5.1.6-3.el4s1.5
php-5.1.6-3.el4s1.5
php-cli-5.1.6-3.el4s1.5
php-mysql-5.1.6-3.el4s1.5
mysql-5.0.27-1.el4.centos
mysql-server-5.0.27-1.el4.centos
mysqlclient10-3.23.58-9.2.c4
libdbi-dbd-mysql-0.6.5-10.RHEL4.1
php-mysql-5.1.6-3.el4s1.5
MySQL-devel-community-5.0.37-0.rhel4
MySQL-python-1.2.1_p2-1.el4s1.1
this is my test.php which I load, which produces a blank page (view source shows this):
<?php phpinfo(); ?>
This is what I think are relevant lines in /etc/php.ini that should include debugging info in why nothing happens:
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
display_startup_errors = On
Here is my php.conf in conf.d Apache/2.0.59
LoadModule php5_module modules/libphp5.so (the file is there...no errors on httpd restart)
AddHandler php5-script .php
AddType application/x-httpd-php .php
DirectoryIndex index.php
What else can I do to get some debugging info to help figure out why I can't get it working, or any suggestions?
Thanks.
<edit> Additionally, Some other pages I have that produce server status reports using php print the php code to the screen instead of displaying the server stats. I thought it may be because php4 to php5 certain code upgrades had to happen. but since both phpinfo() and the original php pages don't work....
I also deleted the php from /usr/local/bin before installing this php, and I believe the correct include & libs directories. THEN, I installed the above rpms via yum. I added two lines for the LoadModule php5 to see if it was loading properly, and the /var/log/messages says this:
[warn] module php5_module is already loaded, skipping
<edit2>
here was my final solution
Change this:
AddType text/html php
to:
AddType application/x-httpd-php .php
Where do these crazy mixed up schemes I do come up with? 🙁