ispCP - Board - Support
[solved] Problem interpreter php / html - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: [solved] Problem interpreter php / html (/thread-4597.html)



[solved] Problem interpreter php / html - mikee mike - 10-03-2008 08:39 AM

Hello @ all Smile
I've got a server running ispCP.
For a web project I need to parse some .html files trough the php.
Please don't start a discussion if this is a good idea or not. I know that every file is send through php, but this website isn't very big. I just need to do this.

So normaly I can use a .htaccess file with following in it:

AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html

On many servers this works fine for me. So I can use some <?php ?> in .html files and everything is good. But with this server, running ispCP, I can't figure out, what's wrong.

For example, if I want to reach index.html the server either shows me a download box (so the .html file is'nt parsed with php interpreter), or does nothing with my <?php code ?> in the .html file and just shows the <?php > like a font.

So do you have any ideas what I could do ? I think I had to edit something in the apache config to get this to work ...

Thank you for your help !

Michael
Got it !!!! Smile

AddHandler php-fastcgi .html

was the solution !


RE: [solved] Problem interpreter php / html - frankwth - 06-07-2010 04:25 PM

Hallo,

I have the same problem. I also need to parse some html-files through php. I have tried the solutions suggested above but still receive the "download file" box when I call the file.

The following things I did:
1) I put 'AddHandler php-fastcgi .html' into a .htaccess in document root
2) I put this in /etc/apache2/ispcp/<tld>.conf:
Code:
<Directory /var/www/virtual/<tld>/htdocs>
     Options -Indexes Includes FollowSymLinks MultiViews
     AllowOverride All
     Order allow,deny
     Allow from all
     AddType text/html .shtml
     AddHandler php-fastcgi .html
     AddHandler server-parsed .shtml
     AddType application/x-httpd-php .phtml .htm .html .php
     DirectoryIndex index.html index.htm index.php index.html.var index.shtml
</Directory>

In php.ini for the domain I took out the exec ristriction.

Still no success.

Any help would be great.
Kind regards
Frank


RE: [solved] Problem interpreter php / html - walkermore - 10-29-2010 08:30 PM

Each time a description of the change, there are always lots of talk about it anywhere. These are not exempt. A statement usually find is the following: "I have to change versions almost immediately, so I do not get up to date I'll keep waiting target ..







----------------------------------
MB2-185
MB2-186
MB2-421
MB2-422


RE: [solved] Problem interpreter php / html - kilburn - 10-30-2010 03:01 AM

Just for the record, see this post for info on how this can be done in various situations.