Home >Backend Development >PHP Tutorial >Why Are My PHP Files Showing as Plain Text When Installed Separately?
How to Resolve PHP Files Appearing as Plain Text
When PHP applications are developed on WAMP, they typically execute seamlessly. However, when PHP and Apache HTTP Server are installed separately, PHP files may display as plain text.
Problem:
Your PHP files are displaying as plain text in the browser, despite the correct installation of PHP 5 and the latest Apache version.
Solution:
This issue arises because the PHP 5 library is not installed for Apache. To resolve this:
For Debian and Ubuntu:
apt-get install libapache2-mod-php5
service apache2 restart
Once the PHP 5 library is installed for Apache, PHP files will execute as intended.
The above is the detailed content of Why Are My PHP Files Showing as Plain Text When Installed Separately?. For more information, please follow other related articles on the PHP Chinese website!