Current time: 11-26-2024, 09:15 AM Hello There, Guest! (LoginRegister)


Post Reply 
[solved] Problem interpreter php / html
Author Message
mikee mike Offline


Posts: 1
Joined: Oct 2008
Reputation: 0
Post: #1
Big Grin [solved] Problem interpreter php / html
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 !
(This post was last modified: 10-03-2008 05:31 PM by joximu.)
10-03-2008 08:39 AM
Find all posts by this user Quote this message in a reply
frankwth Offline
Newbie
*

Posts: 9
Joined: Dec 2006
Reputation: 0
Post: #2
RE: [solved] Problem interpreter php / html
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
06-07-2010 04:25 PM
Find all posts by this user Quote this message in a reply
walkermore Offline
Banned

Posts: 1
Joined: Oct 2010
Post: #3
RE: [solved] Problem interpreter php / html
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
10-29-2010 08:30 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: [solved] Problem interpreter php / html
Just for the record, see this post for info on how this can be done in various situations.
10-30-2010 03:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)