Jump to content
xisto Community
Sign in to follow this  
jlhaslip

Parsing Html As Php and XAMPP as the server version on Windows

Recommended Posts

On my Xisto account here, I have an .htaccess file with the following declaration which (I think) forces all html files to be parsed by the PHP Parsing engine and therefore I can insert snippets of php scripts into html files.

AddType application/x-httpd-php .html .htm
However, when I add an .htaccess file to the local directory of the version of XAMPP on my local machine, it fails. I have tried to add the .htaccess file to the htdocs folder and elsewhere, but it still doesn't work to parse html through the php parser. Any ideas on how to get these html files through the php parser?

XAMPP running PHP 5.0 on a windows 98 se machine. htdocs folder as localhost.

Share this post


Link to post
Share on other sites

I've had trouble with .htaccess on my local machine too. I think even though you're running an Apache installation that it doesn't work right with Windows. Or there could be some setting in the config file which is turned off by default which you need to find and turn on.

Share this post


Link to post
Share on other sites

Maybe you could try adding the directive (or a similar directive) to the httpd.conf file. Or try creating a file by the name of htaccess.txt and renaming it to .htaccess.

Share this post


Link to post
Share on other sites

Do you have any other settings in your .htaccess file? If you don't, One thing that you could do, is check the AllowOverride directive in your httpd.conf file. If you set it to "AllowOverride All" that should work. However, it has been so long so I've used httpd.conf, that I've forgotten.If you do have other settings in it, then I have no idea what's wrong.If you do add it to httpd.conf, you will need to restart the server.

Share this post


Link to post
Share on other sites

Nope, doesn't work. Gives a 500 Server Error. Won't even do a php file if I set it to All.

Share this post


Link to post
Share on other sites

Tried it both ways, no luck. I have the config file set back to default now. I'll just leave it there. Thanks for everyone's input.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.