greasemonkey Posted September 18, 2013 Share Posted September 18, 2013 Hey everyone, I've been playing around on my dev site trying to get another addon to work with 2.3.3.2 and ran into a couple problems restoring a backup. 1)I received the following error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/flournet/public_html/sandbox/snuffle_upagus/includes/functions/db_backup.php on line 1661065 - Query was empty I notice line 166 is $create_table_result = mysql_fetch_array($create_table_query, MYSQL_NUM); And, I believe (I'm not a coder) this should be changed for 2.3.3.2 to $create_table_result = tep_db_fetch_array($create_table_query, MYSQL_NUM); I've changed in my dev site and tested and now works... 2)When restoring, leaving the Do you want to empty the tables sessions and whos_online (advisable when doing a complete restore, will also reset the date and file used for last restore)? defaulted "checked" It seems to be deleting these tables completely... Not emptying... When I leave the box "upchecked' I receive the following error Error: no tables selected for restore Can anyone confirm??? Quote Link to comment Share on other sites More sharing options...
newburns Posted December 4, 2013 Share Posted December 4, 2013 I am having the hardest time installing this into a 2.3.3.4 store. I upload all of the files, overwriting the files in the store, then I run the auto_backup_setup.php Afterwards, Everything looks ok, and I get the green bar across the top, however, when I try to run a new backup, I get a server error PHP Fatal error: Call to undefined function tep_db_fetch_array_num() in /var/www/*******/*******/backup.php on line 184, referer: http://mtrosemedia.org/*******/*******/backup.php?action=backup I reverted back to my backed up copy of backup.php, but nothing runs automatically. And now, I can't backup with compression, only uncompressed. Quote Link to comment Share on other sites More sharing options...
Cheloki Posted May 25, 2014 Share Posted May 25, 2014 I tried installing in oscommerce 2.3.3.4, but it gives me errors and not updated it to this version, right? Quote Link to comment Share on other sites More sharing options...
Patty Posted August 30, 2014 Share Posted August 30, 2014 (edited) I'm running into the same issues as in the last 3 posts in my local install using Xampp and oscommerce v2.3.4. I'm using what I believe is the latest version by Snoopy: http://addons.oscommerce.com/info/8902/v,23 When I try to restore a backup, I get the error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in xampp/mylocalstore/includes/functions/db_backup.php on line 166 So I changed the two instances of mysql_fetch_array to tep_db_fetch_array in the db_backup.php file, but when I try to restore the backup, now I get this error: 1146 - Table 'mystore.whos_online' doesn't exist show create table `whos_online` [TEP STOP] Does anyone know how to fix this and update the addon to work with v2.3.4? @@greasemonkey and @@Snoopy10, could you guys please help out? TIA! :) In time: when I uncheck the "Do you want to empty the tables sessions and whos_online" box, I'm able to restore the backup. Edited August 30, 2014 by Patty Quote Patty Link to comment Share on other sites More sharing options...
greasemonkey Posted August 30, 2014 Share Posted August 30, 2014 @@Patty that is as far as I've got. So when you restore just be sure to leave the "who's online and sessions option" UN-checked. It sounds like that works for you? It does for me. Quote Link to comment Share on other sites More sharing options...
Dj-Viper Posted September 17, 2014 Share Posted September 17, 2014 Hi, Question.. I have set auto backup every 10 minutes when i'm working in admin. All good. Set Backup delete for 200 hours, but every time it's makes a backup the last backup made of 10 minutes ago is getting deleted. ? Where is the problem. Greetings, Anne Quote Link to comment Share on other sites More sharing options...
Patty Posted September 25, 2014 Share Posted September 25, 2014 @@Patty that is as far as I've got. So when you restore just be sure to leave the "who's online and sessions option" UN-checked. It sounds like that works for you? It does for me. Hi there. Sorry I didn't reply before, just read this now. Tks for replying. It works that way, but it seems to me it's a bug that should be fixed. ;) Quote Patty Link to comment Share on other sites More sharing options...
PiLLaO Posted January 20, 2018 Share Posted January 20, 2018 Uploaded new update, replace mysql functions by mysqli functions to works with v2.3.4 https://apps.oscommerce.com/1F1Uz&autobackup-database-in-admin altoid and frankl 1 1 Quote Link to comment Share on other sites More sharing options...
PiLLaO Posted April 15, 2020 Share Posted April 15, 2020 Uploaded new update: WARNING: auto_backup_setup.php don't upgraded, I DON'T KNOW IF WORKS, DON'T USE IN LIVE STORE. - Bootstraped Page - Bootstraped Buttons - Replaced array() to [] - Replaced require('file-path') to require 'file-path' - Replaced require('file-path') to require 'file-path' - Replaced XHTML Tags to HTML Tags - Added Spanish translations (partially) Quote Link to comment Share on other sites More sharing options...
Patty Posted April 18, 2020 Share Posted April 18, 2020 (edited) On 4/15/2020 at 1:40 PM, PiLLaO said: Uploaded new update: WARNING: auto_backup_setup.php don't upgraded, I DON'T KNOW IF WORKS, DON'T USE IN LIVE STORE. - Bootstraped Page - Bootstraped Buttons - Replaced array() to [] - Replaced require('file-path') to require 'file-path' - Replaced require('file-path') to require 'file-path' - Replaced XHTML Tags to HTML Tags - Added Spanish translations (partially) Unfortunately this is not working for Phoenix 1.0.56 I'm getting errors like Notice: Undefined index: listing in C:\xampp\htdocs\phoenix\admin\backup.php on line 41 And when I try to restore a back up, it created an uncompressed back up file, but neither back ups can be restored: Error: no tables selected for restore Can someone please help making this addon compatible with Phoenix latest versions? This one should be made part of the project. TIA! Edited April 18, 2020 by Patty Quote Patty Link to comment Share on other sites More sharing options...
PiLLaO Posted April 18, 2020 Share Posted April 18, 2020 For this error, replace line 41 $listing = $_GET['listing']; with this: $listing = $_GET['listing'] ?? ''; Patty 1 Quote Link to comment Share on other sites More sharing options...
Patty Posted April 18, 2020 Share Posted April 18, 2020 Thank you! That fixed the Notice error. But the addon still doesn't restore the database. Any fix for this? Quote Patty Link to comment Share on other sites More sharing options...
PiLLaO Posted April 18, 2020 Share Posted April 18, 2020 Sorry but I'm still upgrading into Phoenix, you can make the backups with the original backup tools until someone can fix this Quote Link to comment Share on other sites More sharing options...
Patty Posted April 18, 2020 Share Posted April 18, 2020 Yeah, but the point is to be able to use the automated backup. I also just started with Phoenix and I'm trying some useful addons. Thanks anyway. Quote Patty Link to comment Share on other sites More sharing options...
PiLLaO Posted April 19, 2020 Share Posted April 19, 2020 On 4/18/2020 at 6:45 PM, Patty said: And when I try to restore a back up, it created an uncompressed back up file, but neither back ups can be restored: Error: no tables selected for restore Can you check the backup file have data? Uncompress the file and look at the sql file, please. Patty 1 Quote Link to comment Share on other sites More sharing options...
Patty Posted April 19, 2020 Share Posted April 19, 2020 Yes, it does. Both compressed and uncompressed files look fine. Quote Patty Link to comment Share on other sites More sharing options...
PiLLaO Posted April 19, 2020 Share Posted April 19, 2020 Seems to never works this function, at least as I can see on code, was mixing $_GET and $_POST at same time. You must to find on catalog/admin/backup.php this line: // end if ($buInfo->table_list != TEXT_INFO_NO_INFORMATION) $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_RESTORE, 'fas fa-file-upload', tep_href_link('backup.php', 'file=' . $buInfo->file . '&action=restorenow'), null, null, 'btn-warning mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('backup.php', 'file=' . $buInfo->file), null, null, 'btn-light')]; and replace by this: // end if ($buInfo->table_list != TEXT_INFO_NO_INFORMATION) $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_RESTORE, 'fas fa-file-upload', tep_href_link('backup.php', 'file=' . $buInfo->file . '&action=restorenow&restore_all=1'), null, null, 'btn-warning mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('backup.php', 'file=' . $buInfo->file), null, null, 'btn-light')]; it's a dirty fix to make it works temporarily. Quote Link to comment Share on other sites More sharing options...
Patty Posted April 19, 2020 Share Posted April 19, 2020 Thank you! That worked! Uncompressed back up was restored! But it won't restore the compressed back up file. Also it's forcing the restoring of all tables, not just the selected ones. Like you said, it's just a temporary fix, but the code should be reviewed to make it work as it's supposed too. In any case, thank you for your help with this! Have a great week and stay safe! 😙 Quote Patty Link to comment Share on other sites More sharing options...
PiLLaO Posted April 20, 2020 Share Posted April 20, 2020 I make the test with a gzip backup and it was restored correctly. Can you choose the tables to restore? can you share a screenshot and put the url without without your data? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.