We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32075
    • 13 Posts
    as I had problems to validate the xhtml with w3c check I had a close look into the error log on the server.
    On one server I get the following entry:
    [15-Dec-2008 17:22:15] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/mekongb/public_html/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 17
    I realised that I have to write all snippets call with [[Snippet]] and never [!Snippet!] - writing it with two brackets the xhtml validations working. But I’m really worring about the error log. Getting this entry every second...

    On the other server place I’m getting following entry:
    [15-Dez-2008 16:59:22] PHP Parse error: syntax error, unexpected ’<’ in /home/webbear/public_html/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 1

    Both starting on Dec 1.

    Might be also the server configuration:
    Here the link to php info: http://www.mekong-beizli.ch/info.php
    and to the second one:http://www.webbear.ch/phpinfo.php

    Any help for this problem?

    Thanks a lot
    • Writing snippets as [[ vs [! should have no bearing on XHTML validation. Snippets are parsed by MODx and calls to them should never show up in your rendered output.

      You’ve got errors in one of your snippets, near line 17 it would appear.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 10449
        • 956 Posts
        Grüezi wohl smiley

        There’s two other possibilites imho...

        a) the logs got too big and hence - corrupted. It just cuts off in the middle of a line.
        b) You have a snippet using shorthand PHP tags: <??> instead of <?php?> and your hoster recently switched short-tags to Off in the PHP config. Some hosting companies silently change configs like that without informing their clients...

        Also look at the cache files. Once in a while, it’s a good idea to clear the modx cache (assets/cache/ folder).

        fwiw, I’m often using a little snippet to keep the log tables clean:
        depending on your site’s traffic etc., adjust the default $days parameter at will.
          • 32075
          • 13 Posts
          Hello and Grüezi!

          many thanks for your replies. I figured out that it has to be a phx - problem. Turning of the phx plugin stops the error log. Now, [! is possible again and strange enough, this sites now validates as ususal where I couldn’ t validate before because the validator told me, the server would have an internal problem (it’s with the google Maps Snippet, which one can us only [!....)