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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Kerem ERSOYPresidentCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.