Cannot send attachment > 1Mb with VFS + attachment size bug (Was:
[imp] VFS attachments not working)
Son Truong
svt at st-andrews.ac.uk
Tue Mar 18 16:43:22 PST 2003
Hello
So, in my further investigations to why this VFS for attachments isn't
working, I have found the answer - but have come across more problems.
The vfs.sql script that I said I found in horde/scripts/db doesn't come
with the 2.2.1 release - I found it (searching for docs) at
http://lists.horde.org/archives/gollem/Week-of-Mon-20020715/000359.html
It looks like:
________________________________________________________________
CREATE TABLE horde_vfs (
vfs_id BIGINT NOT NULL,
vfs_folder BOOL NOT NULL,
vfs_path VARCHAR(255) NOT NULL,
vfs_name VARCHAR(255) NOT NULL,
vfs_data LONGBLOB,
-- Or, on some DBMS systems:
-- vfs_data IMAGE,
PRIMARY KEY (vfs_id)
);
CREATE INDEX vfs_path_idx ON horde_vfs (vfs_path);
CREATE INDEX vfs_name_idx ON horde_vfs (vfs_name);
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_vfs TO horde;
________________________________________________________________
And is WRONG. The structure of the table should be:
CREATE TABLE horde_vfs (
vfs_id BIGINT NOT NULL,
vfs_type INT NOT NULL,
vfs_path VARCHAR(255) NOT NULL,
vfs_name VARCHAR(255) NOT NULL,
vfs_modified INT NOT NULL,
vfs_owner VARCHAR(255) NOT NULL,
vfs_data LONGBLOB,
PRIMARY KEY (vfs_id)
);
(the vfs_type could be SMALLINT).
Using the proper datastructures for the table, attachments now work with
the VFS php classes and for the attachments.
The problem experiencing now is that I can not sent attachments greater
than 1Mb. This is nothing to do with the php.ini limitation or system memory
to process the file. The attachment never appears in the database vfs table.
The vfs_data is of type LONGBLOB and in mysql that's 2^32 Bytes so
it is not a problem with mysql.
Can anyone shed some light on this problem?
I have also noticed that IMP reports the size of attachments wrongly.
Webmail always report the size of the attachment to be larger than
it is. For example, I sent a zip file at 1,026,108 bytes (1002KB) and
Webmail reports 1373.19 KB when the info is displayed next to
the disk icon. Has anyone encounter this problem?
Thanks for any help.
Please also tell me if you find any of my info useful - I will not be so
verbose in my emails otherwise.
Son
PS. I turned on debugging for mysql and horde but no error
messages ever appears - even on inserting into columns
which aren't there! Why?
Chuck Hagenbuch wrote:
> Quoting Son Truong <svt at st-andrews.ac.uk>:
>
> > Nothing ever gets stored in the horde_vfs table and a table called
> > horde_vfs_seq is created (with a single column called 'id' which is
> > filled with a number).
>
> Sounds like you're having trouble inserting into the horde_vfs table. Are
> you getting any messages or errors in your Horde or Mysql logs?
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck at horde.org>
> "... It is not more light we need, but more warmth! We die of cold, not of
> darkness. It is not the night that kills, but the frost." - Miguel de Unamuno
>
> --
> IMP mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
--
Son V Truong * Systems Programmer
IT Services * University of St Andrews
svt at st-andrews.ac.uk * 01334 462373
More information about the imp
mailing list