Re: [PHP] Re: Can't upload files > then 400K to MySQL

2004-01-01 Thread ahmetax
You're right Jeremy. I found that the limitation was because of default
max_packet_size of MySQL.
It was limited to 1MB by default. Also I found that 400K of data reached the
1MB boundary, when I applied
urlencode function to it.
Maybe, Chris has a similar limitation problem.
--
Ahmet Aksoy
www.axtelsoft.com

"Jeremy Johnstone" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Might want to check the MySQL configuration. The max allowed packet size
> might be set extremely low.
>
> -Jeremy
>
> On Mon, 2003-12-29 at 15:25, Chris wrote:
> > Have you taken a look at the post below: Can't upload files Greater than
> > 11KB?
> > We may have the same problem.
> >
> >
> > "Ahmetax" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi,
> > >
> > > I have the following PHP code to upload files to a MySQL table.
> > >
> > > It works fine, but, I can't upload any files greater then 400K.
> > >
> > > What might be the problem?
> > >
> > > TIA
> > >
> > > ahmet
> > >
> > >  > > if (isset($_POST["submit"]))
> > > {
> > > $fname= $_FILES["user_file"]["name"];
> > > $tmp= addslashes($_FILES["user_file"]["tmp_name"]);
> > > $size= $_FILES["user_file"]["size"];
> > > $type=$_FILES["user_file"]["type"];
> > > $tanim=$_FILES["user_file"]["file_desc"];
> > > $fd=fopen($tmp,"r") or die("Can't open file!");
> > > $fdata=urlencode(fread($fd,filesize($tmp)));
> > > $size=filesize($tmp);
> > > $tanim=$descript;
> > > include("baglan.inc");
> > >
> > > mysql_select_db("dosyalar");
> > > $sql="INSERT INTO files
(name,file_type,file_desc,file_data,file_size)".
> > > " VALUES('$fname','$type','$descr','$fdata','$size')";
> > > mysql_query($sql);
> > > }
> > > ?>
> > > 
> > > 
> > > 
> > > AxTelSoft-Uploading a file 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > " method="post">
> > > 
> > >
> > > Send this file: 
> > > Explanations :  > > echo($descr);
> > > ?>
> > > 
> > > 
> > >
> > > 
> > > 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Can't upload files > then 400K to MySQL

2003-12-28 Thread ahmetax
Hi,

I have the following PHP code to upload files to a MySQL table.

It works fine, but, I can't upload any files greater then 400K.

What might be the problem?

TIA

ahmet





AxTelSoft-Uploading a file 









" method="post">


Send this file: 
Explanations : 






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php