[horde] Re: [imp] VFS problem

=?big5?b?sWmofaTl?= david at tmv.gov.tw
Fri Jun 18 01:55:03 PDT 2004


I add addslash function to sql.php,then BINARY file insert into horde_vfs
OK.Here is the patch:
--- /usr/local/lib/php/VFS/sql.php.org  Fri Jun 18 16:23:38 2004
+++ /usr/local/lib/php/VFS/sql.php      Fri Jun 18 15:50:52 2004
@@ -745,7 +745,7 @@
              break;

          default:
-            $values[] =3D $data;
+            $values[] =3D addslashes($data);
          }

          /* Execute the query. */

*But* the attached binary file(an image) could not display correctly in IMP=
.
Here is the mail source:
http://210.241.49.67/~txg16/tmp/TEST_blob_insert.eml

IMP screen:
http://210.241.49.67/~txg16/tmp/imp.gif

David Chang

Quoting =B1i=A8}=A4=E5 <david at tmv.gov.tw>:

> Hi there:
> I have a VFS (MYSQL backend) problem in IMP 4.0 CVS.
> Maybe someone can help to fix it or give me a hit where to start hack it.
>
> Situation is :
> I use VFS as attachments store backend in IMP compose,everytime i try 
> to attach
> *BINARY* file then got this error message,
> DB Error: syntax error
>
> Only BINARY file cause this problem,text file is ok,In /tmp/horde.log i s=
aw
> "INSERT INTO horde_vfs ........" so i thnk during binary file encode IMP =
made
> some single quote(or double quote) in the INSERT statement and cause erro=
r.
>
> Other information/Configuration could be found here:
> http://bugs.horde.org/details.php?id=3D131
>
> Thanks you .
>
> David Chang
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org





More information about the horde mailing list