ispCP - Board - Support
parsing html as php - 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: parsing html as php (/thread-11209.html)



parsing html as php - taluma - 07-20-2010 01:56 PM

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


RE: parsing html as php - kilburn - 07-20-2010 08:39 PM

See this old parsing html as php thread.


RE: parsing html as php - taluma - 07-21-2010 03:07 PM

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)


RE: parsing html as php - kilburn - 07-21-2010 04:09 PM

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.


RE: parsing html as php - taluma - 07-21-2010 04:37 PM

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
------------------------