phtml files

  • Hi,


    So I got a customer that is using phtml files and is asking if he could use those to parse PHP.
    The situation now is that is is parsed by apache as HTML and shows the PHP code just written out.
    How could we add this? I opened a ticket, but maybe it should not be part of an i-MSCP release, but just enabled on a per-user basis.


    Adding a .htaccess clause like this didn't work:

    Code
    1. AddType application/php-script .phtmlAddHandler php-script .phtml


    or

    Code
    1. AddHandler application/x-httpd-php .phtmlAddType application/x-httpd-php .phtml

    or


    Code
    1. AddHandler proxy:fcgi://php5-fpm .phtml
    2. AddType proxy:fcgi://php5-fpm .phtml

    (this causes the file to be offered as a download, instead of executing it or just showing it to the browser)


    i-MSCP 1.2.2
    Debian 7 Wheezy
    PHP 5.4.39-0+deb7u2

  • Hello


    .phtml files are generally not called directly. Many framework such as ZF2 use them as template files which are included and processed by the view layer using ob_start(). I'll not add such change in i-MSCP apache templates. You can always create a listener for that purpose.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206