How do you set phtml files to execute as php

  • Answered
How do you set phtml files to be executed as php?
I've tried adding handler in Cpanel using "SetHandler application/x-httpd-php .phtml" and "AddHandler php-script .php"
I've tried adding custom Mime "AddType application/x-httpd-php .phtml"

Any suggestions?
Scott
Hello,

Sorry to hear you are having issues with phtml files. The phtml file extension should run by default. I tested on my own server to confirm this. Then I ran the same test file on your server and it did not run correctly at first. Then I disabled the Addhandler and Addtype lines you had in the .htaccess file and the .phtml file ran as it should.

So simply removing the extraneous lines for Addhandlers and Addtypes for phtml allowed the default configuration to run. That should work fine for you.

Kindest Regards,
Scott M