0

I need to upload a large file (up to 190mb) Here is server details for limit:

memory_limit = 50M post_max_size = 192M file_uploads = On upload_max_filesize = 192M max_execution_time = 1800 sec max_input_time = 1800 sec 

Here is my code:

 $query="update tbl_Cards set CardName='$cardname',Description='$Description'"; if($cardvideo) { if($_FILES["cardvideo"]["type"] == "video/quicktime"||$_FILES["cardvideo"]["type"] == "video/mov"||$_FILES["cardvideo"]["type"] == "video/mp4"||$_FILES["cardvideo"]["type"] == "video/mpv"||$_FILES["cardvideo"]["type"] == "video/3gp") { if($_FILES["cardvideo"]["size"]<=10485760) { $cardvideo=$date."card.mp4"; $tmppath3="services/video/".$cardvideo; if(move_uploaded_file($_FILES['cardvideo']['tmp_name'],$tmppath3)) { $thumb=$date.".jpg"; $thumbDirectory="services/VideoCapturePic/"; exec("convert \"{$tmppath3}[0]\" -colorspace RGB -geometry 200 $thumbDirectory$thumb"); $query.=",Video='$cardvideo',CapturePic='$thumb'"; } $query.="where CardId='$card'"; $result=mysql_query($query); if($result) { } else { echo mysql_error(); } 

But when I upload 10 mb files they upload successfully but when I try to upload large files (20 or 30 or 40 or 50) I get this response:

Column count doesn't match value count at row 

What am I doing wrong?

5
  • Column count doesn't match value count at row this my error message Commented Jan 12, 2012 at 5:10
  • 1
    That error has no relation with the file size but with ONE query that is going out with an empty field, so it goes short by one field... must depurate your file (sorry but that's it). Split it into parts so you can isolate the defective data... maybe something with an apostrophe (') that ends prematurely the query Commented Jan 12, 2012 at 5:14
  • ok just i am posting sample code but i when i upload 10 mb file upload successfully upload lagre file i get this problem so i think time expire to upload file then script terminate Commented Jan 12, 2012 at 5:24
  • @Alfabravo: How does one "depurate" a file? Commented Jan 12, 2012 at 6:40
  • @Gabe Being a bulk update, the idea is to have appropiate data (in a ETL-like process), rightly formatted. A script validating data being inserted could help, for example. The responsability goes over the one who produces the file. Commented Jan 12, 2012 at 14:45

1 Answer 1

1

Its not just the php.ini, but server also can restrict your request size. Though by default in apache its not set to limit the file size, but I think you should check for that once. LimitRequestBody directive is used to restrict the request size. Check for the directive in all your configuration files (I am assuming that you are using apache) and change the value for your directory. Sample usage:

<Directory "/var/www/vhost/mydir/uploads"> LimitRequestBody 204444344 </Directory> 
Sign up to request clarification or add additional context in comments.

7 Comments

i am using ftp for server connect
how can i check ftp details limit in ftp
HI i am using linux server how can i check limitRequestBody in my server
this is not about the OS on your server, its about the we server you are using. e.g. apache/ weblogic etc. So you need to check configuration there.
yes..i am using Apache server so how can i change limitRequestBody in my server please tell me clearly
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.