Forum Moderators: phranque
AddHandler myXML .xml
Action myXML xmlParser.php
<?php
$id = getenv("REQUEST_URI");
$parser = xslt_create();
$html = xslt_process($parser, $id,
"template.xsl");
xslt_free($parser); echo $html;
?>
Except, it doesn't work. I've never tried anything like this before. I get a "400 Bad Request: Your browser sent a request that this server could not understand."
I thought it might be simple, but it looks like it might not be. Could someone do one of the following:
A) Show me my mistake
B) Do it for me
C) Point me to some good tutorials on how to do what I want to do.
?
The problem I am having is NOT the php file. My trouble is
A) Associating it with every XML file
B) Not sure, but I think the php script should technically be classified as cgi-script?
The ideas is that every XML file gets converted on the server, and I cannot install things such as mod-xslt(2) because pcre-config isn't installed on my server, and after two hours of tech support with my hosting provider taught me that after two hours the answer is always, "No, we can't add that functionality at this time on shared hosting packages." What a bummer.
It seemed like to me this approach should work... I just don't know HOW to make it work with apache.
[edited by: Blue_Jeans at 10:29 pm (utc) on May 15, 2008]