Forums / General Questions / Backup - Internal Server Error 400

Backup - Internal Server Error 400

Locked
Results 1 to 11 of 11
This thread is locked. New replies are disabled.
04 Nov 2006, 14:43
#1
tiger avatar

tiger

New Zenner

Join Date:
Oct 2006
Posts:
56
Plugin Contributions:
0

Backup - Internal Server Error 400

Hello :smile:
I'm hoping someone can help me! I installed the following contribution on v1.3.5 of ZenCart: BACKUP_MYSQL_ADMIN_PLUGIN-1.2.0.10a.

I have always used the following settings to backup:
- No compression (Pure SQL)
- Download without storing on server.
I have created many backups successfully with these settings until today! Now when I try I get the following message:

INTERNAL SERVER ERROR

An internal server error has occured!
Please try again later.


In the title of the page in says: Error 400!



Its worth mentioning that I have previously backed up without ticking the "Download without storing on server" box but was unable to successfully restore from the file created.


Can anyone help me. I am trying to install another contribution but can't risk doing it until i can successfully backup the current database. :down:


Thanks in advance!
04 Nov 2006, 14:50
#2
tiger avatar

tiger

New Zenner

Join Date:
Oct 2006
Posts:
56
Plugin Contributions:
0

Re: Backup - Internal Server Error 400

I reckon I should also mention that I did wait and try again later but repeatedly get the same result. :D

Thanks again to anyone taking the time to read this.
04 Nov 2006, 14:51
#3
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Posts:
1,065
Plugin Contributions:
1

Re: Backup - Internal Server Error 400

You might want to ask your host if they've tightened security on the server recently or made any other changes since you last backed up that may be relevant to you receiving that error.

From Dr. Byte's readme file for that mod:

NOTE: uses exec() function calls to run mysqldump and mysql binaries. Sometimes exec() is restricted from use in shared-hosting environments. Also, doesn't work in safe mode or on servers where the mysqldump or mysql binaries have restricted access.
04 Nov 2006, 15:03
#4
tiger avatar

tiger

New Zenner

Join Date:
Oct 2006
Posts:
56
Plugin Contributions:
0

Re: Backup - Internal Server Error 400

Hey Pixxi

Thanks for getting back to me. I'll give my host a call and check to see if they've changed anything.

Fingers crossed!

:smile:
05 Nov 2006, 05:13
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Backup - Internal Server Error 400

While it shouldn't be an issue with this mod, you might also ask about "mod_security" changes they might have made recently.
05 Nov 2006, 11:25
#6
tiger avatar

tiger

New Zenner

Join Date:
Oct 2006
Posts:
56
Plugin Contributions:
0

Re: Backup - Internal Server Error 400

Hi Dr Byte

Thanks for your reply.

I have spoken to my host and they say no changes have been made to any of the points you and pixxi mentioned. They suggested my user name, password or database settings may be wrong but i don't think i have changed any files that would have affected these settings. The guy i spoke to can't help me further and so has forwarded the problem to the server experts who will get back to me by email.... Hopefully that won't take too long - better not hold my breath though!

I'll update this thread as soon as i hear back from them or if anything changes!

Thanks again.
05 Nov 2006, 14:29
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Backup - Internal Server Error 400

If you have access to your server's errorlog, you might get more detailed information there.
05 Nov 2006, 18:20
#8
tiger avatar

tiger

New Zenner

Join Date:
Oct 2006
Posts:
56
Plugin Contributions:
0

Re: Backup - Internal Server Error 400

Hey. I checked this out and apparently my host doesn't provide access to Apache error logs on shared hosting packages. It does say that I can create my own error logs for debugging PHP Scripts by inserting the following code into my PHP script (or by creating a separate file and adding the code in it. It mentions to include the file using "include()")

Script : PHP error logging
error_reporting(0);
$old_error_handler = set_error_handler("userErrorHandler");

function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars)
{
$time=date("d M Y H:i:s");
// Get the error type from the error number
$errortype = array (1 => "Error",
2 => "Warning",
4 => "Parsing Error",
8 => "Notice",
16 => "Core Error",
32 => "Core Warning",
64 => "Compile Error",
128 => "Compile Warning",
256 => "User Error",
512 => "User Warning",
1024 => "User Notice");
$errlevel=$errortype[$errno];

//Write error to log file (CSV format)
$errfile=fopen("errors.csv","a");
fputs($errfile,"\"$time\",\"$filename:
$linenum\",\"($errlevel) $errmsg\"\r\n");
fclose($errfile);

if($errno!=2 && $errno!=8) {
//Terminate script if fatal errror
die("A fatal error has occured. Script execution has been aborted");
}
}

Does this make sense to you? If so do you know which file i
should insert it into?

Thanks heaps!
05 Nov 2006, 22:59
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Backup - Internal Server Error 400

Sounds like the new Mod you installed will not work with the Server you are on.

Error 400 Bad Request
The request could not be processed by the server due to invalid syntax. The
request should not be repeated until after, the required modifications have first
been completed by the site owner.

Although access to Apache Error logs may not be available, every Control Panel provided with a Hosting account will usually provide access to errors related to your Hosting account.

For example, in Cpanel: Web/FTP Stats > Error Log
gives all kinds of information on errors that happened within the account

You are best off to either contact the creator of the Module or go back to your previous Backup method.
06 Nov 2006, 06:34
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Backup - Internal Server Error 400

Your original reason for posting was that you were trying to backup your database in order to install another mod.
You can still do a database-backup if you have access to phpMyAdmin as part of your hosting account. Here are the instructions:
http://www.zen-cart.com/wiki/index.php/LocalCopySite#TO_BACKUP_THE_DATABASE
06 Nov 2006, 12:53
#11
tiger avatar

tiger

New Zenner

Join Date:
Oct 2006
Posts:
56
Plugin Contributions:
0

Re: Backup - Internal Server Error 400

Hi Website Rob

Thanks for getting in touch. The backup mod worked on my server before so that one definitely was compatible with my server. I haven't installed any new mods since the backup mod stopped working as I want to be able to backup the store first. I'll have a look through my mod history to see if any of the other mods i've installed look like they could have affected anything.

Thanks for the tip on the Control Panel access to the error logs - i'll also have a dig around in there and see what i can find!

Hi Dr Byte

Thanks for the advice on how to backup my database via phpmyadmin. I'll get right on to that. At least i can still move forward with developing the website while i try to figure out what happened!

Wish me luck! :D