Irin Posted January 29, 2007 Share Posted January 29, 2007 Hello, I have a problem with saving a database through Database Backup Manager. The backup process is interrupted by the following fatal error: Fatal error: Allowed memory size of 73400320 bytes exhausted (tried to allocate 15017772 bytes) in /var/www/shop/admin/backup.php on line 49 In my php.ini I have the following setting for a memory limit: Maximum amount of time each script may spend parsing request datamemory_limit = 70M Here is also case 'backupnow' from my admin/backup.php with line 49 in red: case 'backupnow': tep_set_time_limit(0); $schema = '# osCommerce, Open Source E-Commerce Solutions' . "\n" . '# http://www.oscommerce.com' . "\n" . '#' . "\n" . '# Database Backup For ' . STORE_NAME . "\n" . '# Copyright © ' . date('Y') . ' ' . STORE_OWNER . "\n" . '#' . "\n" . '# Database: ' . DB_DATABASE . "\n" . '# Database Server: ' . DB_SERVER . "\n" . '#' . "\n" . '# Backup Date: ' . date(PHP_DATE_TIME_FORMAT) . "\n\n"; $tables_query = tep_db_query('show tables'); while ($tables = tep_db_fetch_array($tables_query)) { list(,$table) = each($tables); $schema .= 'drop table if exists ' . $table . ';' . "\n" . 'create table ' . $table . ' (' . "\n"; $table_list = array(); $fields_query = tep_db_query("show fields from " . $table); while ($fields = tep_db_fetch_array($fields_query)) { $table_list[] = $fields['Field']; $schema .= ' ' . $fields['Field'] . ' ' . $fields['Type']; if (strlen($fields['Default']) > 0) $schema .= ' default \'' . $fields['Default'] . '\''; if ($fields['Null'] != 'YES') $schema .= ' not null'; if (isset($fields['Extra'])) $schema .= ' ' . $fields['Extra']; $schema .= ',' . "\n"; } $schema = ereg_replace(",\n$", '', $schema); Any help would be highly appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
♥Vger Posted January 29, 2007 Share Posted January 29, 2007 Your memory limit is 70Mbs and your backup is largr than 70Mbs. Vger Link to comment Share on other sites More sharing options...
Irin Posted January 29, 2007 Author Share Posted January 29, 2007 Your memory limit is 70Mbs and your backup is largr than 70Mbs. Vger I tried to change it to 200Mb but still getting the same fatal error. Any other suggestions? Thanks. Link to comment Share on other sites More sharing options...
davidinottawa Posted January 29, 2007 Share Posted January 29, 2007 I tried to change it to 200Mb but still getting the same fatal error. Any other suggestions? Thanks. Yes,. Use the Export utility provided by phpMyAdmin. If it still bails out, ask your host to run a backup for you. You may already have this option to back up a db in your control panel. david Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.