• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP: Not being recognized as PHP in served sites

S

sritchie

Guest
Running Plesk 7.5.3 Reloaded. I have a basic domain within the server that needs PHP support. Turned PHP on via the Control Panel. The PHP Engine shows as "on" in the specific vhosts.conf file for the domain. Yet, PHP files still try to render as plain text docs when called via URL.

Is there something else that controls whether or not a given domain on a Plesk install can server up PHP?

Thanks in advance,
smr
 
Hi,
I was just trolling the forums and saw this. If the server spits PHP out as text this means there is a problem with the apache config. Here is what you need to check and try.

First thing to do is get root access to the box. once you're root try

spacebox# cat /usr/local/psa/apache/logs/error_log | grep PHP

You should see something like whats below . If you see a line like this and there in no mention of PHP then you're apache's php module is not loading. But if the line mentions PHP then ok on we go.

[Tue May 31 14:51:07 2005] [notice] Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7d mod_python/3.0.3 Python/2.2.2 FrontPage/5.0.2.2635 PHP/4.3.11 mod_webapp/1.2.0-dev configured -- resuming normal operations

Next you want to use pico,nano or vi to open the httpd.conf itself to look if PHP is properly setup. Look for the lines listed below in your httpd.conf(/usr/local/psa/apache/conf/httpd.conf)

LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php .php4 .php3
AddType application/x-httpd-php-source .phps

If you don't see those in there then just toss them in and save httpd.conf, then restart apache and do that cat and grep thing I listed above if then see the line as mentioned above then good try the site again and it should work. If it still doesn't work I suggest you login into plesk goto that domains setup and disable PHP support, save it and go back and renable it. Also restart apache after that and try the PHP again, see if it works. Well that pretty much covers anything that could be causing it. Let me know how it works out I promise to check this thread periodically over the next few days.
 
Back
Top