MySQL Forums
Forum List  »  General

Re: config ulimit with a large file upload
Posted by: Bastien Koert
Date: November 12, 2004 10:18AM

max allowed packet at 32M. We ended up getting it in, by looping thru and appending chunks of the file to the field. Now we can't get it out. File size is 17.1M or so.

below is the php code to get it out.

$sql = "select filename, evidence from evidence where Ref_Number = 'Source_File'";

$result = conn($sql);

if (($result)&&(mysql_errno() == 0)){
$rows = mysql_fetch_array($result);
$data = $rows['evidence'];
$filename = $rows['filename'];
header("Content-Disposition: attachment; filename=$filename");
header("Content-Description: PHP Generated Data");
echo $data;

}else{
echo "Somethings wrong:".mysql_error() ;
}

I have left out the function 'conn' which contains the query and connection info. It works fine as there is no error shown there. Only an 'exceeded max_allowed_packets' message on the attempt to select from the field.

Is there something that we need to tune, like the sort_area or something of that nature?

Bastien

cat, the other other white meat

Options: ReplyQuote


Subject
Written By
Posted
Re: config ulimit with a large file upload
November 12, 2004 10:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.