HTH-C.com - Forum
Latest News Latest Threads
Neuerung: Persönliche Galerie
Informationen zur Übernahme der Erweite..
HTH Blog - Version 2.0
#HTH.Systems - Betatester gesucht
Neueröffnung - PHPKit-Award.de
HTH Webchat v3
Letzter Beitrag Happy Birthday Bottyline Weiblicher Benutzer Heute, 0:00 Zeit der letzten Antwort
Letzter Beitrag Gibt es eigentlich noch jemand der PHPki.. Myrddin Männlicher Benutzer 19.04.2025 - 02:37 Zeit der letzten Antwort
Letzter Beitrag Herzlich Willkommen Botty Männlicher Benutzer 22.11.2024 - 21:45 Zeit der letzten Antwort
Letzter Beitrag PHPKit 1.6.6 WEBI Männlicher Benutzer 24.06.2024 - 13:58 Zeit der letzten Antwort
Letzter Beitrag PHPKit 1.6.6 ohne ASCE auf PHP8x Myrddin Männlicher Benutzer 22.03.2023 - 13:36 Zeit der letzten Antwort
 56.399 Posts & 4.945 Themen in 78 Foren
Forenübersicht » Support / Hilfe » PHPKit 1.6.03 & 1.6.1 » Support » Problem bein Backup der Seite

Problem bein Backup der Seite
5 Beiträge in diesem Thema
 Seiten (1):    1  
02.12.2006 - 19:07 Uhr
Beitrag: #1
Hallo

Ich wollte mal wieder ein Backup der Datenbank von meiner Clanseite erstellen (sollte öfter sein) und bekomme folgende Fehlermeldung:
Fatal error: Allowed memory size of 26214400 bytes exhausted (tried to allocate 4703476 bytes) in /webs/0/2/76/00/6720/web1/admin/database.php on line 86

Weiss jemand eine Lösung?

MFG

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Nueschtmanescht - 02.12.2006 - 19:07 Uhr
 
Zum Anfang der Seite
03.12.2006 - 07:37 Uhr
Beitrag: #2
Wie machst du das Backup?
Durch Admin Menü?

Führe es doch direkt über die MySQL aus oder so:

http://www.script-test.de/anleitungen/Datenbank/phpscripte/db_backup_anlegen_email.html

 
Zum Anfang der Seite
03.12.2006 - 21:09 Uhr
Beitrag: #3
Habe da ein Script was bislang funzte.

Schickte mir jeden abend ein Backup.
Nun scheint es plötzlich nicht mehr zu gehen.
Habe das selbe Script auf meiner privaten Page und da geht es. Komisch
Hier mein Script:




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328

Quellcode


<?php
if ($_GET['password'] == "****************************") {

// DATABASE-BACKUP
// ==================
$content ="#############################################\n";
$content.="#\n";
$content.="# PHPKIT Database Backup ".formattime(time())."\n";
$content.="# Database ".$database."@".$_ENV['SERVER_NAME']."\n";
$content.="#\n";
$content.="#############################################\n";
$content.="\n\n";

$list_tables=$DB->list_tables();
while (
$tables=$DB->fetch_row($list_tables)) {
$tab $tables[0];
if(
$tab!="plz_data") {
$content.="###########\n";
$content.="# Table ".$tab."\n";
$content.="#\n";
$content.="\n";

$content.="CREATE TABLE ".$tab." (\n";
$getinfo=$DB->query("DESCRIBE ".$tab."");
$count=$DB->num_rows($getinfo);
$c=0;
while(
$info=$DB->fetch_array($getinfo)) {
$tab_name=$info['Field'];
$tab_type=" ".$info['Type'];
if (
$info['Null']==''$tab_null=" NOT NULL";
else 
$tab_null=" NULL";
if (
$info['Default']==''$tab_default='';
else 
$tab_default=" DEFAULT '".$info['Default']."'";
if (
$info['Extra']==''$tab_extra='';
else 
$tab_extra=" ".$info['Extra'];
$c++;
if(
$c<$count$tab_komma=",\n";
else 
$tab_komma='';
$content.=" ".$tab_name.$tab_type.$tab_null.$tab_default.$tab_extra.$tab_komma."";
}

unset(
$keyarray);
$getinfo=$DB->query("SHOW KEYS FROM ".$tab."");
while(
$info=$DB->fetch_array($getinfo)) {
$keyname=$info['Key_name'];
$comment=(isset($info['Comment'])) ? $info['Comment'] : "";
$sub_part=(isset($info['Sub_part'])) ? $info['Sub_part'] : "";

if(
$keyname!="PRIMARY" && $info['Non_unique']==0$keyname="UNIQUE|$keyname";
if(
$comment=="FULLTEXT"$keyname="FULLTEXT|$keyname";

if(!isset(
$keyarray[$keyname])) $keyarray[$keyname]=array();
if(
$sub_part>1$keyarray[$keyname][]=$info['Column_name']."(".$sub_part.")";
else 
$keyarray[$keyname][]=$info['Column_name'];
}

if (
is_array($keyarray)) {
foreach(
$keyarray as $keyname => $columns) {
$content.=",\n";
if(
$keyname=="PRIMARY"$content.="PRIMARY KEY (";
elseif(
substr($keyname06) == "UNIQUE"$content.="UNIQUE ".substr($keyname7)." (";
elseif(
substr($keyname08) == "FULLTEXT"$content.="FULLTEXT ".substr($keyname9)." (";
else 
$content.="KEY ".$keyname.' (';
$content.=implode($columns,", ").")";
}
}
$content.=");\n";
$content.="\n";


$queryresult=$DB->query("SELECT * FROM ".$tab);
while(
$info=$DB->fetch_assoc($queryresult)) {
unset(
$values);
unset(
$fieldnames);
foreach(
$info as $field) {
if(
$values$values.=",".formatfield($field);
else 
$values=formatfield($field);
}
$content.="INSERT INTO ".$tab." VALUES (".$values.");\n";
}
$content.="\n";
$DB->free_result($queryresult);
}
}

$db_backup $content;

$newzip = new zipwrite();
$newzip->add_file($db_backup"db_auto_".date("dmy").".sql");
$zipcontent $newzip->file();

$Files = array($zipcontent);
$FileNames = array("db_auto_".date("dmy").".zip");

SendMail("web@nueschtmanescht.lu""\"DB-Backup\" <noreply@nueschtmanescht.net>""DB-Backup_N ".date("d.m.Y"), "Datenbankbackup vom ".date("d.m.Y"), $Files$FileNames);

// ==================

eval ("\$site_body.= \"<table class='standard' cellspacing='1' cellpadding='4' width='100%'><tr><td class='heads'>Backup</td></tr><tr><td class='standard'>Gesendet - ".date("d.m.Y - H:i"time())."!</td></tr></table>\";");
}
else {
$event=1; include("admin/config/event.php");}


// ============================================================
// ............................................................
// ============================================================

class zipwrite {

var 
$datasec;
var 
$ctrl_dir;
var 
$eof_ctrl_dir;
var 
$old_offset;
var 
$prepend;

function 
zipwrite($sfxprepend 0) {
$this->datasec = array();
$this->ctrl_dir = array();
$this->eof_ctrl_dir "\x50\x4b\x05\x06\x00\x00\x00\x00";
$this->prepend $sfxprepend;
$this->old_offset $this->prepend;
}

function 
add_file($data$name)
{
$name str_replace('\\''/'$name);

$fr "\x50\x4b\x03\x04";
$fr .= "\x14\x00"// ver needed to extract
$fr .= "\x00\x00"// gen purpose bit flag
$fr .= "\x08\x00"// compression method
$fr .= "\x00\x00\x00\x00"// last mod time and date

$unc_len strlen($data);
$crc crc32($data);
$zdata gzcompress($data);
$zdata substr(substr($zdata0strlen($zdata) - 4), 2); // fix crc bug
$c_len strlen($zdata);
$fr .= pack('V'$crc); // crc32
$fr .= pack('V'$c_len); // compressed filesize
$fr .= pack('V'$unc_len); // uncompressed filesize
$fr .= pack('v'strlen($name)); // length of filename
$fr .= pack('v'0); // extra field length
$fr .= $name;

// "file data" segment
$fr .= $zdata;

// "data descriptor" segment (optional but necessary if archive is not
// served as file)
// $fr .= pack('V', $crc); // crc32
// $fr .= pack('V', $c_len); // compressed filesize
// $fr .= pack('V', $unc_len); // uncompressed filesize

// add this entry to array
$this -> datasec[] = $fr;
$new_offset $this->prepend strlen(implode(''$this->datasec));
// now add to central directory record
$cdrec "\x50\x4b\x01\x02";
$cdrec .= "\x00\x00"// version made by
$cdrec .= "\x14\x00"// version needed to extract
$cdrec .= "\x00\x00"// gen purpose bit flag
$cdrec .= "\x08\x00"// compression method
$cdrec .= "\x00\x00\x00\x00"// last mod time & date
$cdrec .= pack('V'$crc); // crc32
$cdrec .= pack('V'$c_len); // compressed filesize
$cdrec .= pack('V'$unc_len); // uncompressed filesize
$cdrec .= pack('v'strlen($name) ); // length of filename
$cdrec .= pack('v'); // extra field length
$cdrec .= pack('v'); // file comment length
$cdrec .= pack('v'); // disk number start
$cdrec .= pack('v'); // internal file attributes
$cdrec .= pack('V'32 ); // external file attributes - 'archive' bit set

$cdrec .= pack('V'$this -> old_offset ); // relative offset of local header
$this -> old_offset $new_offset;

$cdrec .= $name;

// optional extra field, file comment goes here
// save to central directory
$this -> ctrl_dir[] = $cdrec;
// end of the 'add_file()' method

function file($comment '')
{
$data implode(''$this -> datasec);
$ctrldir implode(''$this -> ctrl_dir);

return
$data .
$ctrldir .
$this -> eof_ctrl_dir .
pack('v'sizeof($this -> ctrl_dir)) . // total # of entries "on this disk"
pack('v'sizeof($this -> ctrl_dir)) . // total # of entries overall
pack('V'strlen($ctrldir)) . // size of central dir
pack('V'strlen($data) + $this->prepend) . // offset to start of central dir
pack('v'strlen($comment)) . // .zip file comment length!
$comment;

// end of the 'file()' method

// end of the 'zipfile' class

function SendMail($ToReceiver$FromSender$Subject$MsgText$IFile="none"$IFileName="none")
{
global 
$mimetype$mime_boundary;

$mime_boundary "--==================_846811060==_" ;
$mimetype "application/octet-stream" ;
define("XNL","\r\n") ; // CONSTANT Newline CR

if (!is_array($IFile)) // check for array (multiple attachments)
{
$File[0] = $IFile ;
$FileName[0] = $IFileName ;
}
else
{
for (
$i=0;$i<count($IFile);$i++)
{
$File[$i] = $IFile[$i] ;
$FileName[$i] = $IFileName[$i] ;
}
}

$attCount count($File) ;

$attExists FALSE // check if there is really an attachment
for ($i=0;$i<$attCount;$i++)
{
if (
$File[$i] != "none")
{
$attExists TRUE ;
}
}

$txtheaders "From: ".$FromSender."\n" // build header for text
//$txtheaders .= "To: ".$ToReceiver."\n" ;
//$txtheaders .= "Reply-To: ".$FromSender."\n" ;
//$txtheaders .= "X-Mailer: PHP\n" ;
//$txtheaders .= "X-Sender: ".$FromSender."\n" ;

if ($attExists// is there an attachment
{

// build header for attachment
$attheaders "MIME-version: 1.0\n" ;
$attheaders .= 'Content-type: multipart/mixed; boundary="'.$mime_boundary.'"'."\n" ;
$attheaders .= "Content-transfer-encoding: 7BIT\n" ;
$attheaders .= "X-attachments: " ;
$firstAtt TRUE ;
for (
$i=0;$i<$attCount;$i++)
{
if (
$File[$i] != "none")
{
if (
$firstAtt)
{
$firstAtt FALSE ;
}
else
{
$attheaders .= "," ;
}
$attheaders .= $FileName[$i] ;
}
}
$attheaders .= ";\n\n" ;

// build attachment itself
$attach "" ;
for (
$i=0;$i<$attCount;$i++)
{
if (
$File[$i] != "none")
{
$attach .= "--".$mime_boundary."\n" ;
$attach .= "Content-type:".$mimetype.'; name="'.$FileName[$i].'";'."\n" ;
$attach .= "Content-Transfer-Encoding: base64\n" ;
$attach .= 'Content-disposition: attachment; filename="'.$FileName[$i].'"'."\n\n" ;
$attach .= TextEncode($File[$i])."\n" ;
}
}
// build message itself
$message "--".$mime_boundary."\n" ;
$message .= 'Content-Type. text/plain; charset="us-ascii"'."\n\n" ;
$message .= $MsgText."\n" ;
}
else 
// no attachment
{
$attheaders "" ;
$attach "" ;
$message $MsgText."\n" // send text only
}
// send email
mail($ToReceiver$Subject$message.$attach$txtheaders.$attheaders) ;

}

//
// build attachment as text conforming RFC2045 (76 char per line, end with \r\n)
//
function TextEncode ($cont)
{
$contents base64_encode($cont) ;
$len strlen($contents) ;
$str "" ;
while(
$len 0)
{
if (
$len >= 76)
{
$str .= substr($contents,0,76).XNL ;
$contents substr($contents76) ;
$len $len 76 ;
}
else
{
$str .= $contents.XNL ;
$contents "" ;
$len ;
}
}


return 
$str ;
}
?>


Kann es sein das die DB zu gross geworden ist?

 
Zum Anfang der Seite
03.12.2006 - 21:09 Uhr
Beitrag: #4
und zwar kennt Ihr MySLDumper ?
also ich bin Anfänger und bin damit voll klar gekommen-

hier der Link

 
Zum Anfang der Seite
03.12.2006 - 21:14 Uhr
Beitrag: #5
Das wäre natürlich auch ne Lösung.  verwirrt
Danke.  lachend

 
Zum Anfang der Seite
 Seiten (1):    1  

Ähnliche Themen
 
Support Support » Backup - Letzte Antwort von FagorBrow am 12.05.07, 19:14 Backup  (12.05.07, 19:14)
Support Support » Backup der Datenbank - Letzte Antwort von WEBI am 23.07.07, 12:36 Backup der Datenbank  (23.07.07, 12:36)
PHP/MySQL PHP/MySQL » Datenbank Backup - Letzte Antwort von DHH am 22.02.19, 11:33 Datenbank Backup  (22.02.19, 11:33)
Support Support » Linkübersicht und MySQL-Backup - Letzte Antwort von WEBI am 16.08.06, 23:32 Linkübersicht und MySQL-Backup  (16.08.06, 23:32)
Support Support » 404 Seite - Letzte Antwort von DHH am 19.10.16, 12:44 404 Seite  (19.10.16, 12:44)

HTH-C.com - Webmedien & Community