PHP as Apache module fails after PLESK upgrade

I just upgraded PLESK from 8.6 to 9.2.1 and it seems that the PHP doesn't work as Apache module anymore - it throws the php pages for "Save as... " instead.
I'm not sure how PLESK does the configuration of Apache files, but what was strange that I couldn't find any reference on "LoadModule php5module...".
PHP sites work however if I set it to fastcgi or cgi, but I would prefer finding the cause of this bug and fixing it.

I would appreciate any help on how could I re-enable PHP as apache module. BTW, it's a Debian 4 box.
Who is Participating?
Kerem ERSOYConnect With a Mentor PresidentCommented:
BTW PHP is not run as a module. It is included to the configuration of Apache in the modules section. It is generally addes as a module later in a separate file. In my system the php configuration is found in the folder /etc/httpd/conf.d ant the contents is:

# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.

LoadModule php5_module modules/

# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php5-script .php
AddType text/html .php

# Add index.php to the list of files that will be served as directory
# indexes.
DirectoryIndex index.php

# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#AddType application/x-httpd-php-source .phps
Kerem ERSOYPresidentCommented:

As far as I understan during the CPANEL migration your main panel lost the PHP type handler in Apache configuration. This is why they it is typing the contnets as text instead of getting them running and displaying the output to you.

You can either add php thpe handler to your httpd configuration or you can locate the home directories of web folders having .php programs and edit your .htacess file in the directory to add this :

AddHandler application/x-httpd-php5 .html .php .htm

Then save it it will start to run .php files again.

akosbAuthor Commented:
Thank you very much! In the meantime I found out the same. However, this was a specific problem as PLESK tried to update the PHP version with the upgrade as well, but couldn't accomplish it for a reason.
This way, it also didn't add the LoadModule directive to the config file. A manual installation of PHP5 was needed.
Though it was an issue specifically caused by PLESK, I appreciate your input as what you described was actually the solution.
Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.