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); > > } > > ?> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > > <html> > > <head> > > <title>AxTelSoft-Uploading a file </title> > > <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> > > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> > > <meta http-equiv="Content-Language" content="tr"> > > <meta http-equiv="description" content="axtelsoft, indir, download, > delphi, > > source code, kaynak kod"> > > <meta http-equiv="Pragma" content="no-cache"> > > <meta name="Generator" content="Ahmet Aksoy"> > > </head> > > <body> > > > > <form enctype="multipart/form-data" action="<?php echo > > $SERVER["PHP_SELF"];?>" method="post"> > > <input type="hidden" name="MAX_FILE_SIZE" value="16777215"> > > > > Send this file: <input name="user_file" type="file"> > > Explanations : <TEXTAREA NAME="descript" ROWS=10 COLS=45 WRAP><?php > > echo($descr); > > ?></TEXTAREA> > > <P><input type="submit" value="Send File" name="submit"> > > </form> > > > > </body> > > </html> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php