Alex Vincent
11-02-2002, 11:44 PM
Well, I'm trying to put together a nice little ZIP for Firepages to add to his phpdev server, to support XML files themselves going through the PHP interpreter. ("Assimilate this!", Simon)
I have a workaround that lets PHP set the mimetype without having a character in front of the XML declaration tag <?xml version="1.0" ?> (if there were a character in front, that would violate XML 1.0 well-formedness). It involves "prepending" a special PHP script when the Apache server retrieves the XML document.
There's one problem, though: it uses the auto_prepend_file feature -- and you can only prepend one file. Meaning a deeper .htaccess file with a "php_value auto_prepend_file" will override my own prepend and disable the mime-type script.
I'm wondering if anyone here has ideas that might help me avoid or improve upon the auto-prepend, still include the file, and still keep the XML declaration intact as the very first characters in the document. I'll even take suggestions from mod_perl if I have to...
I have a workaround that lets PHP set the mimetype without having a character in front of the XML declaration tag <?xml version="1.0" ?> (if there were a character in front, that would violate XML 1.0 well-formedness). It involves "prepending" a special PHP script when the Apache server retrieves the XML document.
There's one problem, though: it uses the auto_prepend_file feature -- and you can only prepend one file. Meaning a deeper .htaccess file with a "php_value auto_prepend_file" will override my own prepend and disable the mime-type script.
I'm wondering if anyone here has ideas that might help me avoid or improve upon the auto-prepend, still include the file, and still keep the XML declaration intact as the very first characters in the document. I'll even take suggestions from mod_perl if I have to...