Welcome to Geeklog, Anonymous Monday, February 09 2026 @ 03:57 am EST
Geeklog Forums
Geeklog tries to parse <?xml ... ?> as PHP
Status: offline
idonthack
Forum User
Newbie
Registered: 09/11/05
Posts: 14
I'm making a new theme and using XHTML to write the template files. To be compliant, I need a line that says <?xml version="1.0" encoding="UTF-8"?> in the header.thtml file. Geeklog keeps trying to parse this as PHP. (See lib-common.php, about line 970) Since header.thtml is at the top of every page, it breaks all of the pages on my site.
Is there an easy way to circumvent this? I tried removing the section of code, but apparently I didn't do it right because that just broke the page even more. I would like to keep it in there in case I need to use PHP in the template files in the future.
Is there an easy way to circumvent this? I tried removing the section of code, but apparently I didn't do it right because that just broke the page even more. I would like to keep it in there in case I need to use PHP in the template files in the future.
19
19
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
I believe what you want to do is to write a simple line in PHP that echos your xhtml line.
And this isn't really a Geeklog issue at all. It's an issue with the PHP parser used in your webserver. I've had similar things happen in plain PHP pages.
Text Formatted Code
<?php echo '<?xml version="1.0" encoding="UTF-8"?>';?>And this isn't really a Geeklog issue at all. It's an issue with the PHP parser used in your webserver. I've had similar things happen in plain PHP pages.
24
18
Quote
All times are EST. The time is now 03:57 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content