Fix symlinks/php

Ok, so I did an update and had the messages come up to fix symlinks and php for each domain…I clicked them…now I seem to have a problem with php and was wondering if anybody might know why.

I’m a bit tired, haven’t been getting enough sleep, so please forgive me if I’ve missed something simple.

I have this line in my httpd.conf to be able to do a little embedded php in an existing html file without having to go through and change links everywhere.

AddType application/x-httpd-php .htm .html

It seems, with that line in there, it’s now having me download the files instead of just opening them in the browser. If I comment out that line, it loads them as html again, but the php parts don’t work.

Any ideas?

Thanks,
Jeff

Howdy,

Yeah, the update you just applied makes several changes that close a fairly sizable security issue…

The problem is that the line you’re using above relies on mod_php to function, regardless of what your PHP Execution Mode is set to.

And the problem with that, is that using mod_php on a multi-user system has some pretty significant security issues.

I believe you could use something like this in order to use FCGID/CGI for processing your .html files:

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

That works, because the “application/x-httpd-php5” type is defined in your Apache config to run the FCGID/CGI PHP wrapper script.

Let us know if that helps!

-Eric

Ok, so I added that line, which is the same as what I had but the “5” added, and it’s still doing the same thing. Could I be missing something somewhere else?

If it helps, here’s some system info.

CentOS 6.3 64bit

kernel.x86_64 2.6.32-279.22.1.el6

httpd.x86_64 1:2.2.15-15.el6.vm.1 (it’s on a vps)

php.x86_64 5.3.3-14.el6_3

Jeff