Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

There's no reason you can't. If he changed the extension to .php, it should work fine assuming photos exist and there's no coding mistakes.

Posted

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

 

Posted

Just to inform you, the same happened on another server that I have (with cpanel too). So I was wondering if there was a cpanel update that broke the configuration.

Posted

Just to inform you, the same happened on another server that I have (with cpanel too). So I was wondering if there was a cpanel update that broke the configuration.

 

Probably, a lot of problems recently have been at the fault of cP

Posted

Can't you use mod_rewrite to rewrite the URL to one that ends in .php?

Posted

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.

Posted

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.

Posted

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?

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

Posted

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?

 

 

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