Crisis - help needed - site down 16 hours with 500 Internal Server Error.
Our site is locked out with a 500 Internal Server Error. And at the worst possible time with a paid advertising campaign just launched. Our host provider Gator after spending 1 1/2 hours on the phone with me says it is a Zen problem.
There first response was that our image attributes were set to 777 instead of 664. Then they said they were 'working on it'. Then we received an email that says:
[error] [client 216.110.94.227] malformed
>>header from script. Bad header=Content-type:
>>/public_html/shop/index.php
They asked if we edited this file... we did not! The tech checked the file and did not find anything wrong with it.
There were two files we edited in the includes/languages/english folder prior to this crash. One was checkout_shipping.php because free shipping was being displayed and triggered at 99.99 instead of 149.99. An error was made and a syntax error was displayed when testing. The error was corrected immediately and testing seemed fine. During the brief time of the syntax error a customer tried to place an order and it was not completed, from the syntax error? We contacted the customer to try again but shortly after the site went into this 500 Internal Server error lockout.
In the meantime with everything seeming to be fine and believing the customer would come back to place her order we edited the meta_tags.php file to change tagline and keywords. It is believed the site was still loading fine after that but I can't be certain.
The tech at Gator said the error was not being generated from the directory where these files are and saw nothing wrong with index.php. After another 1 1/2 on the phone he referred me here saying it is a ZEN problem. Suggested trying the upgrade to 1.3.8 and said there was a patch on here for this particular problem, if there is I can't find it.
Definitely not feeling the ZEN right now! :frusty:
Now down for 16 hours PLEASE HELP!!
Re: Crisis - help needed - site down 16 hours with 500 Internal Server Error.
Resolved...
The problem was that
Content type header was being sent again in the file
\includes\functions\extra_functions\.wysiwygPro_edit_index_html.php
Here is the code
can someone tell me what can be done. Right now I am not including this file
Code:
<?php header("Content-type","text/html; charset=iso-8859-1"); ?>
<?php ob_start() ?>
<?php
if ($_GET['randomId'] != "CXECLAXpEOXpimlx1BnvHnvKXKQtbTH9cnV7mKiJ2wVV_bpxEJIetRCTDsrOLeRWb4aZgmrTCIxGrUrTN0XZ09UDwkmLvw6BO0wj2l06t4DaeaR4HwLBbHYn7sidYjPMxPtSgxFclBWpJK1eg0FJD7GhIRus4BgX6v2TgermZJjjikTmjTgIcFCvvID9wFSdRHN_OuIZe9iJ5YkW1rMi0obQ171PymDYZStllhLAozJqyva39Etl9EgCnNkRB1uG") {
echo "Access Denied";
exit();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Editing index.html</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">body {background-color:threedface; border: 0px 0px; padding: 0px 0px; margin: 0px 0px}</style>
</head>
<body>
<div align="center">
<script language="javascript">
<!--//
// this function updates the code in the textarea and then closes this window
function do_save() {
var code = htmlCode.getCode();
document.open();
document.write('<html><form METHOD="POST" name=mform action="http://bellastoystore.com:2082/frontend/x/files/savehtmlfile.html"><input type="hidden" name="udir" value="/home/bella78/public_html/shop/includes/functions/extra_functions"><input type="hidden" name="ufile" value="index.html"><input type="hidden" name="dir" value="%2fhome%2fbella78%2fpublic_html%2fshop%2fincludes%2ffunctions%2fextra_functions"><input type="hidden" name="file" value="index.html"><input type="hidden" name="doubledecode" value="1">Saving ....<br /><br ><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><textarea name=page rows=1 cols=1></textarea></form></html>');
document.close();
document.mform.page.value = code;
document.mform.submit();
}
function do_abort() {
var code = htmlCode.getCode();
document.open();
document.write('<html><form METHOD="POST" name="mform" action="http://bellastoystore.com:2082/frontend/x/files/aborthtmlfile.html"><input type="hidden" name="dir" value="/home/bella78/public_html/shop/includes/functions/extra_functions"><input type="hidden" name="file" value="index.html">Aborting Edit ....</form></html>');
document.close();
document.mform.submit();
}
//-->
</script>
<?php
// make sure these includes point correctly:
include_once ('/usr/local/cpanel/base/3rdparty/WysiwygPro/editor_files/config.php');
include_once ('/usr/local/cpanel/base/3rdparty/WysiwygPro/editor_files/editor_class.php');
// create a new instance of the wysiwygPro class:
$editor = new wysiwygPro();
// add a custom save button:
$editor->addbutton('Save', 'before:print', 'do_save();', WP_WEB_DIRECTORY.'images/save.gif', 22, 22, 'undo');
// add a custom cancel button:
$editor->addbutton('Cancel', 'before:print', 'do_abort();', WP_WEB_DIRECTORY.'images/cancel.gif', 22, 22, 'undo');
$body = '<html>
<head>
<title></title>
<meta content="">
<style></style>
</head>
<body></body>
</html>';
$editor->set_code($body);
// add a spacer:
$editor->addspacer('', 'after:cancel');
$editor->set_charset('iso-8859-1');
// print the editor to the browser:
$editor->print_editor('100%','450');
?>
</div>
</body>
</html>
<?php ob_end_flush() ?>
Re: Crisis - help needed - site down 16 hours with 500 Internal Server Error.
Simple answer: don't include that file.
If you need things from that file to be loaded, make sure you're only loading functions, not stuff that outputs HTML.
The more important question is: "why" was that file even there in the first place?
Re: Crisis - help needed - site down 16 hours with 500 Internal Server Error.
Good question!
bellascorner should be the right person to answer that question!
Re: Crisis - help needed - site down 16 hours with 500 Internal Server Error.
Actually we have no clue. The site was developed for us after having to move away from a host provider who does not play nice. Since we could not move the files over we had to hire someone to recreate the site. It worked perfectly until the 6th when we found ourselves (and the customers) locked out. Is this the file that caused the error that locked us out? My daughter manages the site through the Zencart back office and I am only beginning to look at the code so I can help her. We really don't understand what happened here.
Re: Crisis - help needed - site down 16 hours with 500 Internal Server Error.
We do really want to thank Superprg for helping us get the site back up and running!
Re: Crisis - help needed - site down 16 hours with 500 Internal Server Error.