Current time: 04-20-2024, 10:35 AM Hello There, Guest! (LoginRegister)


Post Reply 
parsing html as php
Author Message
taluma Offline
Newbie
*

Posts: 8
Joined: Jul 2010
Reputation: 0
Post: #1
parsing html as php
HI
I very hapy with finding this forum Smile
I has Debian server with ispCP Omega.
Now, I want to set parsing a file .htm as php
I have try config in system and .htaccess but I don't get any success.
I will be moved and fired by brother helps
07-20-2010 01:56 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: #2
RE: parsing html as php
See this old parsing html as php thread.
07-20-2010 08:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
taluma Offline
Newbie
*

Posts: 8
Joined: Jul 2010
Reputation: 0
Post: #3
RE: parsing html as php
OH,
Glad to here that
But, I can't follow it, it have many method. I have tried all menthod but I don't get any success.

You can say clearly about menthod which is best.
Thanks very much
(I am newly with ISPCP and Debian)
07-21-2010 03:07 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: parsing html as php
There is no "best" method. The one you must use depends on wheter you chose to run with fastcgi or fcgid. As fcgid is the default, I'll assume that you are using it. Hence, you should use the Under fcgid method from this post.

Comments about the method:
- On the first step, notice that you have to edit three files.
- To complete the second step, look at howto regenerate the config files. Don't forget to restart apache (/etc/init.d/apache2 restart) after regenerating.
- For the third step, .htaccess is supposed to live inside the domain's "htdocs" folder.
07-21-2010 04:09 PM
Visit this user's website Find all posts by this user Quote this message in a reply
taluma Offline
Newbie
*

Posts: 8
Joined: Jul 2010
Reputation: 0
Post: #5
RE: parsing html as php
Hi
I am sorry for after question!
How to know if fastcgi or fcgid is used on my server,
Another staff has setup my server previous so I can't control
You are very kind
Thanks for this support
Oh, I think I have get OK
Thanks Kilburn
I has follow your help:
-----------
Under fcgid
You're out of luck, as the default configuration doesn't allow you to do this (at least I've been unable to). Now, I enabled this possibility by following these steps:

1. Replace the "<IfModule mod_fcgid.c>....</IfModule>" block from the files /etc/ispcp/apache2/parts/{als,dmn,sub}_php2_entry.tpl by the following one:
Code:
<IfModule mod_fcgid.c>
Alias /fcgi/ {STARTER_DIR}/{DMN_NAME}/
<Directory "{STARTER_DIR}/{DMN_NAME}/">
AllowOverride None
SetHandler fcgid-script
Options +ExecCGI
</Directory>
AddHandler php{PHP_VERSION}-script .php .php{PHP_VERSION}
Action php{PHP_VERSION}-script /fcgi/php{PHP_VERSION}-fcgi-starter
AddType application/x-httpd-php .php
</IfModule>

2. Regenerate domain configurations and restart apache.

3. Insert the following in your .htaccess:
Code:
# Enable php for html-files
AddHandler php5-script .htm .html

Similarly, you can...
Code:
# Disable php in this folder and it's childs (unles re-enabled by another .htaccess)
RemoveHandler .php .php5
------------------------
(This post was last modified: 07-21-2010 05:07 PM by taluma.)
07-21-2010 04:37 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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