Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 12:54 pm 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.
 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.

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.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
IIRC, you can disable the short_open_tag option in your php.ini and it would work without the "echo" workaround.

bye, Dirk
 Quote

All times are EST. The time is now 12:54 pm.

  • 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