We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19298
    • 76 Posts
    MichaelHarringtonDesigns Reply #1, 16 years, 7 months ago
    Hi I am having some strange error message from my MODx site, and I am unsure how to fix them

    When I try and use W3C CSS validation service I get this error message

    CSS Validator Error I/O Error: http://mywebsite/: Internal Server Error

    So I contacted my hosting company and they said

    I’ve checked the "error_log" in your public_html and found the following error message there:
    [15-Mar-2010 08:42:47] PHP Parse error: syntax error, unexpected ’<’ in /home/michae49/public_html/manager/includes/document.parser.class.inc.php(746) : eval()’d code on line 1

    I am not sure if the file parser.class.inc.php is the cause of the problem. Does anyone have any suggestions on how to fix this problem? thanks in advance
      • 19298
      • 76 Posts
      MichaelHarringtonDesigns Reply #2, 16 years, 7 months ago
      When I use W3C Markup Validation service I get a 500 Internal Server Error
      After looking in some previous post I am going to try and change the permissions on the files to 644 and 755 for directories and see what happens
        • 22303 MODX Staff
        • 10,725 Posts
        It appears as if you have a broken Plugin that is causing that error and the 500 Internal Server Error response.
          • 19298
          • 76 Posts
          MichaelHarringtonDesigns Reply #4, 16 years, 7 months ago
          That is true the only snippet I have installed which uses a Plugin In the last week has been MaxiGallery its working fine on my site, I will try uninstalling it tom and then reinstalling it and see if the error still appears.
            • 19298
            • 76 Posts
            MichaelHarringtonDesigns Reply #5, 16 years, 7 months ago
            Ok so i have narrowed it down to this PHP code which causes the 500 Internal Server Error response.

            <?php

            $output = &$modx->documentOutput; // get a reference to the output

            // ----------------------------------------------
            // Use mootools based library via litebox
            // ----------------------------------------------
            $gallery_js .= "\n".’
            <link rel="stylesheet" href="/assets/js/litebox-1.0/css/lightbox.css" type="text/css" media="screen" />
            <script type="text/javascript" src="/assets/js/litebox-1.0/prototype.lite.js"></script>
            <script type="text/javascript" src="/assets/js/litebox-1.0/moo.fx.js"></script>
            <script type="text/javascript" src="/assets/js/litebox-1.0/litebox-1.0.js"></script>

            <script type="text/javascript" charset="utf-8">
            window.addEvent(\’domready\’, function(){
            initLightbox();
            });
            </script>
            ’."\n";

            // Catch the event
            $e = $modx->Event;

            // Make the update
            switch ($e->name) {
            case "OnWebPagePrerender":
            $galleryize = ($modx->isFrontEnd() && $modx->documentObject[’contentType’]==’text/html’);
            if ($galleryize) {
            $modx->documentOutput = preg_replace("/(<\/head>)/i", $gallery_js."\n\\1", $modx->documentOutput);
            }
            break;
            default :
            return; // stop here - this is very important.
            break;
            }
            ?>

            Does anyone know what I need to change to stop this error from appearing?
              • 22303 MODX Staff
              • 10,725 Posts
              You likely accidentally pasted the <?php ?> tags into the plugin editor, which doesn’t appear to work properly if you do that. Just copy the code in between the PHP tags and all should work.