Jump to content

[Solved] [Solved] Problem With Apache Handlers


Tom_K

Recommended Posts

The last few days a problem started with php code which is inside html documents. The problem is that they won't get parsed. Of course I have the line "AddHandler application/x-httpd-php5 .html .htm" in my .htaccess document (I also tried with "AddHandler application/x-httpd-php .html .htm"). You can see the problem in this page http://ntominator.he...rg/liapisfrost/ .

 

Thanks for your help (and sorry for my english)!

 

username: tomk

domain: ntominator.heliohost.org

Link to comment
Share on other sites

You could also try "AddType application/x-httpd-php .html .htm" and "AddHandler x-httpd-php .html .htm"

But why can't you just use .php?

 

BTW, I'm not sure you can use php inside a src attribute..

 

Edit: not sure, but maybe there's something wrong with the apache config of htaccess files, since byron isn't able to set TZ in .htaccess either.

Link to comment
Share on other sites

Yeah there seems to be a problem with htaccess directives. Hopefully xaav can figure it out when he comes back online. This is the correct line your looking for to parse html pages:

 

AddHandler application/x-httpd-php5 .html .htm

 

This should say "Hello World" when it's working.

http://byrondallas.heliohost.org/parse_html.html

 

 

 

 

@xaav: Seems Johnny has the same problem. This should show the date and time:

 

http://dallas.heliohost.org/time.html

 

Link to comment
Share on other sites

You probably could use a rewrite but Apache should be set up to parse html pages using that directive. Also I'm thinking if this directive isn't working and the other directive I posted about that changes the time zone, then we've got problems some where.

Link to comment
Share on other sites

Okay, the problem is recompiling apache switched the PHP handler to mod_fcgid.

 

Change the line in your .htaccess file to this:

 

 

AddHandler fcgid-script .html .htm

 

This won't work for other file extensions; let me know if you need others added.

Link to comment
Share on other sites

What do we need to do to correct it to accept the original handler? Allot of people have that directive to parse html pages. What about the timezone directive?

 

Also I see a problem with doing that in the future when Apache gets recompliled again. Is it going to get set back to the correct handler?

Link to comment
Share on other sites

What do we need to do to correct it to accept the original handler? Allot of people have that directive to parse html pages. What about the timezone directive?

 

WHM >> PHP and suexec configuration >> Change it to suPHP

I'm afraid it won't work anymore if I mess with the settings.

 

 

 

 

Also I see a problem with doing that in the future when Apache gets recompliled again. Is it going to get set back to the correct handler?

 

 

 

I don't know. All I know is that the handler ended up being different after I recompiled apache.

Link to comment
Share on other sites

I honestly think that we should go back and recompile it back to the way it was. I really think this is going to cause more problems leaving it this way. For instance the equivilent to this:

 

<Files portal.html>
ForceType application/x-httpd-php5
</Files>

 

isn't working:

 

<Files portal.html>
ForceType fcgid-script
</Files>

 

djbob, what do you think?

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...