phtml question

Carsten Aulbert carsten at welcomes-you.com
Tue Jan 30 07:41:23 UTC 2007


Dieter Schicker wrote:

> I have to install a php-based application on a server. Most files have
> the extension *.phtml. Now my problem is that apache2 doesn't execute
> them but delivers the files to the browser "as is", so that a download
> dialog pops up.
> => Question: How can I get apache2 to execute those files?

> Of course I have installed libapache2-mod-php4 and enabled it in the
> apache configuration.

There are two issues here.

(1) Have you enabled the php4 modules?
	Try running a2enmod php4 and force-reload the server

You can check if that succeeded if the php4 files are symlinked in the
/etc/apache/mods-enabled directory

(2) In /etc/apache2/mods-available/php4.conf there should be a line like
this:
	AddType application/x-httpd-php .php .phtml .php3

Please check that it is there.

HTH

Carsten

PS: My lines are from php5 so it might vary slightly.




More information about the ubuntu-users mailing list