Today I did a dist-upgrade from Lenny to Squeeze (I've done this before on many other servers without much trouble), and most everything seems to work except for PHP. Sites that use PHP just show the PHP files instead of the server generating them. As far as I can tell, the Apache server is actually running properly with PHP according to the error log, but it's just acting as if it's not running at all.
An odd thing that I've caught in the troubleshooting is that /etc/asterisk/mods-enabled/php5.conf seems to refer to a file that doesn't exist; namely mod_php.c. That doesn't sound like a compiled module to me though, and at the same time, mod_php.c and mod_php.so do not exist on the system, in spite of how the Debian dpkg system seems to think it is.
Here's the contents of php5.conf:
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_value engine Off
</Directory>
</IfModule>
</IfModule>
I get the following error messages when restarting apache:
[Tue Apr 26 15:46:42 2011] [notice] caught SIGTERM, shutting down
[Tue Apr 26 15:46:43 2011] [warn] No JkLogFile defined in httpd.conf. Using default /var/log/apache2/mod_jk.log
[Tue Apr 26 15:46:43 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Tue Apr 26 15:46:43 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Apr 26 15:46:44 2011] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 26 15:46:44 2011] [notice] Digest: done
[Tue Apr 26 15:46:44 2011] [warn] No JkLogFile defined in httpd.conf. Using default /var/log/apache2/mod_jk.log
[Tue Apr 26 15:46:44 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Tue Apr 26 15:46:44 2011] [error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'.
[Tue Apr 26 15:46:44 2011] [error] python_init: Python executable found '/usr/bin/python'.
[Tue Apr 26 15:46:44 2011] [error] python_init: Python path being used '/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'.
[Tue Apr 26 15:46:44 2011] [notice] mod_python: Creating 8 session mutexes based on 110 max processes and 0 max threads.
[Tue Apr 26 15:46:44 2011] [notice] mod_python: using mutex_directory /tmp
[Tue Apr 26 15:46:44 2011] [notice] Apache/2.2.16 (Debian) DAV/2 SVN/1.6.12 mod_fcgid/2.3.6 mod_jk/1.2.26 PHP/5.3.3-7+squeeze1 with Suhosin-Patch mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.16 OpenSSL/0.9.8o mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations