Page 1 of 1

backup error 1.3.2

Posted: Sat Aug 29, 2009 3:53 pm
by shoo002
Error: Access denied for user 'brockha1_brock'@'localhost' to database ''brockha1_ocdb'
Error No: 1044
SHOW TABLES FROM `'brockha1_ocdb`

i get this error when trying to do a backup from opencart backend

Any ideas.

Stewart

Re: backup error 1.3.2

Posted: Sun Sep 06, 2009 8:30 pm
by johnhao
I also have this problem

Error: Access denied for user

the error log and backup

Re: backup error 1.3.2

Posted: Fri Sep 11, 2009 4:24 am
by Biggen
Same problem for me. Any ideas??

Edit - Nevermind. Figured it out. The lookup had an extra single apostrophe in the backup.php file.

Re: backup error 1.3.2

Posted: Fri Sep 18, 2009 9:18 am
by kdmp
I found this problem a while back and thought I posted it to the forum...I can't find the link to it but here is the solution for those who run into it.

Edit this file:
admin/model/tool/backup.php
Edit line ~16

Code: Select all

$table_query = $this->db->query("SHOW TABLES FROM `'" . DB_DATABASE . "`");
It's hard to see but right after FROM there is ` then ' and then ". Get rid of the second one, the '

Save and away you go.

Re: backup error 1.3.2

Posted: Fri Sep 25, 2009 5:00 pm
by banane
thank you for the fix

Re: backup error 1.3.2

Posted: Wed Sep 30, 2009 2:34 am
by shoo002
Thanks For this Kev,

Helped a lot.

Stewart

Re: backup error 1.3.2

Posted: Thu Oct 15, 2009 6:31 am
by nemmon
Hello, after applying this fix, I wanted to test the restore portion... and this is what I get:
Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/home2/public_html/store/admin/controller/tool/backup.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/home2/public_html/store/admin/index.php:57) in /home/home2/public_html/store/system/engine/controller.php on line 23

Please help!

Re: backup error 1.3.2

Posted: Sat Oct 17, 2009 10:37 am
by kdmp
What I have suggested to fix the export issue does not interfere with the issue you are having. Seeing you are changing a query string in model/tool/backup.php. You will see near the top that the only thing present for restore is the public function. This merely takes what is in the file and breaks up the information contained in the CSV file you are importing.

I have tried to duplicate your issue by submitting the form without choosing a file. It states that I have imported the file successfully. So it can't be you submitting no CSV file.

I then went looking for the handler for the file upload form. I found this:
admin/controller/tool/backup.php

Code: Select all

if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {			

			$this->model_tool_backup->restore(file_get_contents(@$this->request->files['import']['tmp_name']));
The form itself is coded to upload the file directly to the server. tmp_name contains the path to the temporary file(the CSV file that was just uploaded) that resides on the server. The file should exist on the server in a temporary directory with a temporary name. This sounds to be a server configuration problem. What type of web server are you using? (Linux/Windows)

Re: backup error 1.3.2

Posted: Sat Oct 17, 2009 9:02 pm
by nemmon
I am running Linux. It is interesting, because I ran a previous install of OC and I don't have this problem. :-X

Re: backup error 1.3.2

Posted: Sun Oct 25, 2009 12:18 pm
by kdmp
But is the line I quoted the same line you have in your backup.php file?

Re: backup error 1.3.2

Posted: Tue Oct 27, 2009 9:03 am
by thenappybootique
Im having this backup error and I have doen the fix but it is still saying access denied error 1044. any suggestions?

Re: backup error 1.3.2

Posted: Tue Oct 27, 2009 9:10 am
by thenappybootique
i did it again and it worked :)

Re: backup error 1.3.2

Posted: Thu Dec 03, 2009 5:56 am
by ScottBohler
kdmp wrote:...Edit this file: admin/model/tool/backup.php
Edit line ~16...
Thank you, kdmp. Worked for me too.