logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: htacces file & PHP parsing problem
Author
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Thu 15 Sep '16 13:20    Post subject: htacces file & PHP parsing problem Reply with quote

There is a problem with PHP parsing the html files on my site.

I've been using php in html files, together with the directive
AddHandler application/x-httpd-php5 .html .htm
in the .htaccess file, without any problem for 5 years.

Since a couple of days ago, suddenly it doesn't work anymore.
Only the .php files are parsed properly and the html files are not, anymore
(the actual php code is displayed instead of the result of the execution!)

I contacted the host service but they say they can't offer support.

I thought that for some reason the .htaccess file is not read anymore by the server,
but I tested it with a redirect directive and it worked.

Then I thought that they modified something in the php engine and beside the above mentioned directive I've tried each of the following directives:
AddHandler application/x-httpd-php .html .htm
AddType application/x-httpd-php5 .html .htm
AddType application/x-httpd-php .html .htm
AddHandler x-mapp-php5 .html .htm
but no success.

So html file are not php parsed anymore, but I've noticed someting interesting about the index.html file:
if I access mydomain.com/index.html the result is bad,
HOWEVER, if I access just mydomain.com then it displays properly !!
(And of course, there is no index.php file). That means the index.html file is actually parsed, in this case.
BUT, the situation stays the same even if the .htaccess file is deleted.

For this particular file (index.html), the behavior is the same in any of the subdirectories.

As the hosting service is not helpful with checking their server configuration settings,
I wonder if there is anything I can try on my side, as I'm stuck with this.
And any hints would be welcome.
Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 19 Sep '16 14:23    Post subject: Reply with quote

Is it your own server? Which apache version do you use? How is the vhost config?
Back to top
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Tue 20 Sep '16 9:57    Post subject: Reply with quote

No, I don't have control over the server, I'm just using a hosting service.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 20 Sep '16 16:29    Post subject: Reply with quote

So your provider doesn't allow that anymore. Please ask your proiver how to change that.
Back to top


Reply to topic   Topic: htacces file & PHP parsing problem View previous topic :: View next topic
Post new topic   Forum Index -> Apache