Seeing } ?>, But Don't See Where to Fix

On this page I’m seeing

but do not see where to fix it. I ran the code through the HTML Markup Validation and the only thing I’m seeing is:

PHP code is as follows:

code.txt (8.9 KB)

I’m not seeing any closure issues with the PHP code, so I don’t know where else to look.

Check all your PHP files. It seems to be coming from a different page if it’s not in your snippet.


Try this:

  1. copying all content between the <body> and </body>

  2. save contents to “BODY-CONTENTS.php”

  3. create new file “TEST.php” with content below

  4. open “TEST.php” in your browser which will render Works OK Up to here :slight_smile:

  5. gradually include blocks until error re-appears.


    // file: TEST.php

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="<?php echo $gantry->language; ?>" lang="<?php echo $gantry->language;?>" >
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" /> 
        if (!$gantry->get('rotator-enabled'))
                window.addEvent('domready', function() {
                    var content = $$('#rt-rotator .rotator-desc'), overlay = $$('.rotator-overlay');
                    if (!content.length) { if (overlay.length) overlay.setStyle('display', 'none'); } 

        if ($gantry->get('articledetails') == 'layout3' && $gantry->browser->engine == 'trident') 
 <link type="image/x-icon" rel="shortcut icon" href="/templates/rt_panacea_j15/images/favicon.ico" />
<h1> Works OK Up to here :) </h1>

    <?php # require 'BODY-STUFF.php'; ?>

    <?php # gantry->finalize();?>


1 Like

If it matters, I used and didn’t come across any errors with any of my PHP code. Is there no other analysis method that I can use to determine the issue?

The code that is causing the problem comes even before your <!doctype> is being sent.

Unless you have an auto_prepend_file (not likely, but possibly) that error is most likely in a file that is included /required.

If you know how that page is put together I think checking for those should help

What I meant to say is even before the doctype is being sent! - which means it’s not in the code you attached.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.