Symptoms
When attempting to view a PHP page in a web browser, the page will download instead of being displayed in the browser.
Description
The most common cause of PHP pages downloading instead of displaying in the browser is an incorrect AddHandler or SetHandler value in the site's .htaccess file.
Workaround
The .htaccess file can be edited directly to correct the values, or it can be moved out of the way and replaced with a new .htaccess file.
To move the .htaccess file out of the way, rename the .htaccess file in File Manager or run the following command.
mv -v /home/$username/public_html/.htaccess{,.bak}
To replace the .htaccess file:
- Open MultiPHP Manager in the Software section of cPanel.
- Select the domain that needs the new .htaccess file.
- Select the correct PHP version for the site from the PHP Version drop-down menu.
- Click the "Apply" button.
Comments
0 comments
Article is closed for comments.