Re: [PHP-DB] Problems inserting large blob

2001-09-18 Thread Heikki Tuuri

Hi!

Have you set max_allowed_packet in my.cnf big enough?
Is the type of your column LONGBLOB? A BLOB can
only store 64 kB.

Regards,

Heikki Tuuri
http://www.innodb.com

Joao Barreto wrote in message ...
>
>I forgot to say that php.ini file has 8Mb set as the maximum
>possible upload file size.
>
>Thanks for everything ... I really need some help on this!
>
>João B.
>--
>Joao Barreto - E-Business and Security Manager
>Convex - Informática e Sistemas de Comunicações Portugal, Lda
>Tagus Park, Edf. Ciência II, 2º, 2780-920 Porto Salvo Portugal
>mailto:[EMAIL PROTECTED] phone:+351 21 4229200
>
>
>
>-Original Message-
>From: Justin Buist [mailto:[EMAIL PROTECTED]]
>Sent: quinta-feira, 13 de Setembro de 2001 21:38
>To: Joao Barreto
>Cc: php-db@lists. php. net
>Subject: Re: [PHP-DB] Problems inserting large blob
>
>
>You might want to check php.ini - if memory serves the maximum filesize
>you can upload over HTTP by default is 2MB.  Bump that number up and
>restart Apache (or whatever webserver you use) and see if that fixes the
>problem.
>
>Justin Buist
>Trident Technology, Inc.
>4700 60th St. SW, Suite 102
>Grand Rapids, MI  49512
>Ph. 616.554.2700
>Fx. 616.554.3331
>Mo. 616.291.2612
>
>On Thu, 13 Sep 2001, Joao Barreto wrote:
>
>>
>> Hello all ...
>>
>> I'm having a problem uploading large files (3MBytes for examples)
>> and inserting it onto a MySQL database. No problem with smaller files.
>>
>> The code is basically this:
>>
>> > $data = addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
>> $result=MYSQL_QUERY("INSERT INTO file2download
>> (description,bin_data,filename,filesize,filetype, filecompany) ".
>> "VALUES
>>
>('$form_description','$data','$form_data_name','$form_data_size','$form_dat
a
>> _type', '$empresa')");
>> if (mysql_errno() != 0) echo mysql_error();
>> $id= mysql_insert_id();
>> ?>
>>
>> When the files are the mentioned size (I checked the whole file got there
>on
>> /tmp/something)
>> I get an error message along these lines: 'MySQL Server moved away' and
>the
>> fid is 0.
>>
>> Any ideas?
>> Is there any limitation on the size of the 'insert into' string? If so,
>how
>> can I store
>> such a big data chunk on the database?
>>
>> And please, answer directly by email as well to me. Sometimes it is
>> difficult to find
>> a message among the ones that we get each day!
>>
>> Thanks for your support,
>> João Barreto - Convex Portugal
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Problems inserting large blob

2001-09-14 Thread Joao Barreto


I forgot to say that php.ini file has 8Mb set as the maximum
possible upload file size.

Thanks for everything ... I really need some help on this!

João B.
--
Joao Barreto - E-Business and Security Manager
Convex - Informática e Sistemas de Comunicações Portugal, Lda
Tagus Park, Edf. Ciência II, 2º, 2780-920 Porto Salvo Portugal
mailto:[EMAIL PROTECTED] phone:+351 21 4229200



-Original Message-
From: Justin Buist [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 13 de Setembro de 2001 21:38
To: Joao Barreto
Cc: php-db@lists. php. net
Subject: Re: [PHP-DB] Problems inserting large blob


You might want to check php.ini - if memory serves the maximum filesize
you can upload over HTTP by default is 2MB.  Bump that number up and
restart Apache (or whatever webserver you use) and see if that fixes the
problem.

Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI  49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612

On Thu, 13 Sep 2001, Joao Barreto wrote:

>
> Hello all ...
>
> I'm having a problem uploading large files (3MBytes for examples)
> and inserting it onto a MySQL database. No problem with smaller files.
>
> The code is basically this:
>
>  $data = addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
> $result=MYSQL_QUERY("INSERT INTO file2download
> (description,bin_data,filename,filesize,filetype, filecompany) ".
> "VALUES
>
('$form_description','$data','$form_data_name','$form_data_size','$form_data
> _type', '$empresa')");
> if (mysql_errno() != 0) echo mysql_error();
> $id= mysql_insert_id();
> ?>
>
> When the files are the mentioned size (I checked the whole file got there
on
> /tmp/something)
> I get an error message along these lines: 'MySQL Server moved away' and
the
> fid is 0.
>
> Any ideas?
> Is there any limitation on the size of the 'insert into' string? If so,
how
> can I store
> such a big data chunk on the database?
>
> And please, answer directly by email as well to me. Sometimes it is
> difficult to find
> a message among the ones that we get each day!
>
> Thanks for your support,
> João Barreto - Convex Portugal
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Problems inserting large blob

2001-09-13 Thread Nagasea

I also facing this problem yesterday.
Do you want to know what i did ?
I open the file with notepad then copy & paste it.
And it's works 



--- Justin Buist <[EMAIL PROTECTED]>
> wrote:
>You might want to check php.ini - if memory serves the maximum filesize
>you can upload over HTTP by default is 2MB.  Bump that number up and
>restart Apache (or whatever webserver you use) and see if that fixes the
>problem.
>
>Justin Buist
>Trident Technology, Inc.
>4700 60th St. SW, Suite 102
>Grand Rapids, MI  49512
>Ph. 616.554.2700
>Fx. 616.554.3331
>Mo. 616.291.2612
>
>On Thu, 13 Sep 2001, Joao Barreto wrote:
>
>>
>> Hello all ...
>>
>> I'm having a problem uploading large files (3MBytes for examples)
>> and inserting it onto a MySQL database. No problem with smaller files.
>>
>> The code is basically this:
>>
>> > $data =3D addslashes(fread(fopen($form_data, "rb"), filesize($form_data))=
>);
>> $result=3DMYSQL_QUERY("INSERT INTO file2download
>> (description,bin_data,filename,filesize,filetype, filecompany) ".
>> "VALUES
>> ('$form_description','$data','$form_data_name','$form_data_size','$form_d=
>ata
>> _type', '$empresa')");
>> if (mysql_errno() !=3D 0) echo mysql_error();
>> $id=3D mysql_insert_id();
>> ?>
>>
>> When the files are the mentioned size (I checked the whole file got there=
> on
>> /tmp/something)
>> I get an error message along these lines: 'MySQL Server moved away' and t=
>he
>> fid is 0.
>>
>> Any ideas?
>> Is there any limitation on the size of the 'insert into' string? If so, h=
>ow
>> can I store
>> such a big data chunk on the database?
>>
>> And please, answer directly by email as well to me. Sometimes it is
>> difficult to find
>> a message among the ones that we get each day!
>>
>> Thanks for your support,
>> Jo=E3o Barreto - Convex Portugal
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

_
www.kaskus.com - FREE EMAIL SERVICE

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Problems inserting large blob

2001-09-13 Thread Justin Buist

You might want to check php.ini - if memory serves the maximum filesize
you can upload over HTTP by default is 2MB.  Bump that number up and
restart Apache (or whatever webserver you use) and see if that fixes the
problem.

Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI  49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612

On Thu, 13 Sep 2001, Joao Barreto wrote:

>
> Hello all ...
>
> I'm having a problem uploading large files (3MBytes for examples)
> and inserting it onto a MySQL database. No problem with smaller files.
>
> The code is basically this:
>
>  $data = addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
> $result=MYSQL_QUERY("INSERT INTO file2download
> (description,bin_data,filename,filesize,filetype, filecompany) ".
> "VALUES
> ('$form_description','$data','$form_data_name','$form_data_size','$form_data
> _type', '$empresa')");
> if (mysql_errno() != 0) echo mysql_error();
> $id= mysql_insert_id();
> ?>
>
> When the files are the mentioned size (I checked the whole file got there on
> /tmp/something)
> I get an error message along these lines: 'MySQL Server moved away' and the
> fid is 0.
>
> Any ideas?
> Is there any limitation on the size of the 'insert into' string? If so, how
> can I store
> such a big data chunk on the database?
>
> And please, answer directly by email as well to me. Sometimes it is
> difficult to find
> a message among the ones that we get each day!
>
> Thanks for your support,
> João Barreto - Convex Portugal
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]