alzalabany / sql-buddy

Automatically exported from code.google.com/p/sql-buddy
MIT License
0 stars 0 forks source link

'Save to file' option is buggy #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Many users report that they get an error message saying that "the file
could not be opened"

Original issue reported on code.google.com by dare...@gmail.com on 30 Aug 2008 at 8:42

GoogleCodeExporter commented 9 years ago
Indeed, I also got that error.
I also get a bunch of errors exporting... (both browser & file):

Notice: Undefined index: Collation in /home/user/****/www.****.be/sqlbuddy/
export.php on line 195

Original comment by hansd...@gmail.com on 28 Sep 2008 at 12:50

GoogleCodeExporter commented 9 years ago
I am also experiencing this issue - under Apache 2.2.3/CentOS and Apache
2.2/XAMPP-Windows.

File download does not occur.

Original comment by bmhatfield on 10 Dec 2008 at 11:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Change line 195 of export.php from:

if (isset($collationList)  && $structureRow['Collation'] != "NULL" && 
!is_null($structureRow['Collation'])) {

to:

if (isset($collationList) && isset($structureRow['Collation']) && 
$structureRow['Collation'] != "NULL" && 
!is_null($structureRow['Collation'])) {

SQL Exporting still works but there is no errors if there isn't a collation.

EDIT: This is to fix the bug by hansdemu that the notice says there is no 
index: Collation

Original comment by stuart.l...@googlemail.com on 19 Dec 2008 at 12:31

GoogleCodeExporter commented 9 years ago
You can solve this by making the "exports" directory writeable (CHMOD to 777).

However, the message isn't helpful and it's unclear what file is "being opened" 
-
i.e. where SB is trying to save files to.

This method of writing SQL to a file on the filesystem for download is not very
convenient IMO and is a security risk (anyone could type
yourdomain.com/sqlbuddy/exports/export.sql into their browser and find the data 
if
you don't go into the FTP and manually delete it).

A better solution would be to serve up the file for instant download, bypassing 
the
need for local storage.

Original comment by scott.vi...@gmail.com on 5 Jul 2009 at 11:57