Tom_K Posted December 9, 2011 Posted December 9, 2011 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: tomkdomain: ntominator.heliohost.org
demizide Posted December 9, 2011 Posted December 9, 2011 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.
wolstech Posted December 9, 2011 Posted December 9, 2011 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.
Byron Posted December 9, 2011 Posted December 9, 2011 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
Tom_K Posted December 9, 2011 Author Posted December 9, 2011 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.
demizide Posted December 9, 2011 Posted December 9, 2011 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
Guest xaav Posted December 9, 2011 Posted December 9, 2011 Can't you use mod_rewrite to rewrite the URL to one that ends in .php?
Byron Posted December 9, 2011 Posted December 9, 2011 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.
Byron Posted December 10, 2011 Posted December 10, 2011 This support request is being escalated to our root admin.
Byron Posted December 10, 2011 Posted December 10, 2011 This support request is being escalated to our root admin.
Guest xaav Posted December 11, 2011 Posted December 11, 2011 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.
Byron Posted December 11, 2011 Posted December 11, 2011 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?
Guest xaav Posted December 11, 2011 Posted December 11, 2011 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 suPHPI'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.
Byron Posted December 11, 2011 Posted December 11, 2011 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?
demizide Posted December 11, 2011 Posted December 11, 2011 You should really switch back, because it's probably causing more problems than solving.
Recommended Posts