Jump to content
Sign in to follow this  
aradhya

uploadinf file above 800kb

Recommended Posts

ok, so here is the problem....whenever i try to upload a file that is larger than say 700-800kb , the file doesnt upload...i checked my php.ini file n upload size is set to 20Mb...can anybody tell me the problem...here is my script if(!chkfilexists()) { $filename=$_FILES['file']['name']; $filetype=$_FILES['file']['type']; $filesize=$_FILES['file']['size']; echo"<script type='text/javascript'>alert($filesize)</script>"; $filetemp=$_FILES['file']['tmp_name']; $fsub=$_POST["file_sub"]; $filecat=$_POST['file_category']; if($_POST['exist_group']==null) { $fgroup=$_POST["new_group"]; } else { $fgroup=$_POST["exist_group"]; } $fp=fopen($filetemp,'rb'); $user_id=$_SESSION['username']; $content=fread($fp,filesize("$filetemp")); $encoded = chunk_split(base64_encode($content)); fclose($fp);$fquery="INSERT INTO assign_files(user_id,file_name,file_type,file_size,file_content,file_group,file_subject,file_category)VALUES('$user_id','$filename','$filetype','$filesize','$encoded','$fgroup','$fsub','$filecat')";mysql_query($fquery);

Share this post


Link to post
Share on other sites

i edited my above code n addedmysql_query($fquery) or die(mysql_error());this is the error that i am getting-checking:Mysql server has gone away

Share this post


Link to post
Share on other sites

edit: wrong thread

Edited by thescientist

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...