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