backup to variable don't work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: backup to variable don't work (/showthread.php?tid=8676) |
backup to variable don't work - El Forum - 05-27-2008 [eluser]Chalda Pnuzig[/eluser] Hi all, I have this code: Code: function backup(){ The problem is the function don't create the file, but do a "force download" to a empty file called like the url... Why? This is the log: Code: DEBUG - 2008-05-26 01:57:32 --> Database Forge Class Initialized backup to variable don't work - El Forum - 05-27-2008 [eluser]gtech[/eluser] nevermind next post makes more sense. backup to variable don't work - El Forum - 05-27-2008 [eluser]gtech[/eluser] reading the code a bit more if the format is txt, all that dbutil->backup($prefs); returns is a string.. you could echo that string to see if you are getting anything back Code: $prefs = array( if you are then the problem is with the write_file, you could do a check to see if you have write permissions to the folder.. The problem is the backup code does not appear to log anything so you will not see any error message, so its worth doing the check. you could also check write_file as follows Code: ... backup to variable don't work - El Forum - 05-27-2008 [eluser]Chalda Pnuzig[/eluser] Uh... I try it after lunch and it's working... :bug: Mmm... Bizarre :exclaim: backup to variable don't work - El Forum - 05-27-2008 [eluser]gtech[/eluser] cool a self code fixing computer, I want one, where did you get it from? backup to variable don't work - El Forum - 05-27-2008 [eluser]Chalda Pnuzig[/eluser] Top secret Thanks anyway! backup to variable don't work - El Forum - 06-26-2008 [eluser]Chalda Pnuzig[/eluser] I found the problem: Too low memory! :roll: I put this in the function and all works great Code: ini_set('memory_limit', '64M'); |