Jump to content


Corporate Sponsors


Latest News: (loading..)

k_coreonegig

Member Since 26 Apr 2008
Offline Last Active Jun 23 2011, 04:43
-----

Posts I've Made

In Topic: Contribution: Auto Backup Database

23 June 2011, 00:49

View Postk_coreonegig, on 22 June 2011, 21:20, said:

I usually copy original code and then copy it out. That is the code you see below.
Try the following (should work, but I didn't test):

//$at_entry = eregi_replace(DB_DATABASE . '[_-]', '', $at_entry);
//$at_entry = eregi_replace('[.a-z]', '', $at_entry);
$at_entry = preg_replace(DB_DATABASE . '/[_-]/', '', $at_entry);
$at_entry = preg_replace('/[.a-z]/', '', $at_entry);
$at_last = strstr($at_last, DB_DATABASE);
//$at_last = eregi_replace(DB_DATABASE . '[_-]', '', $at_last);
//$at_last = eregi_replace('[.a-z]', '', $at_last);
$at_last = preg_replace(DB_DATABASE . '[_-]', '', $at_last);
$at_last = preg_replace('/[.a-z]/', '', $at_last);


Actually it appears I was wrong because I am getting errors.
Instructions can be found here by Spooks:
http://forums.oscommerce.com/topic/303380-contribution-auto-backup-database/page__st__100

I tried it, I am not getting errors now.

In Topic: Contribution: Auto Backup Database

22 June 2011, 21:20

View Postmodem2.0, on 18 May 2011, 10:04, said:

Can someone help?

Thanks!


I usually copy original code and then copy it out. That is the code you see below.
Try the following (should work, but I didn't test):

//$at_entry = eregi_replace(DB_DATABASE . '[_-]', '', $at_entry);
//$at_entry = eregi_replace('[.a-z]', '', $at_entry);
$at_entry = preg_replace(DB_DATABASE . '/[_-]/', '', $at_entry);
$at_entry = preg_replace('/[.a-z]/', '', $at_entry);
$at_last = strstr($at_last, DB_DATABASE);
//$at_last = eregi_replace(DB_DATABASE . '[_-]', '', $at_last);
//$at_last = eregi_replace('[.a-z]', '', $at_last);
$at_last = preg_replace(DB_DATABASE . '[_-]', '', $at_last);
$at_last = preg_replace('/[.a-z]/', '', $at_last);