Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2007, 09:27 AM
Authorized User
 
Join Date: Feb 2007
Location: IIT Kanpur, UP, India.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Uplad txt field of size greater than 12 mb

Hi Everybody..

I have to upload .txt file in mysql table. This data is to be displayed by using mysql qureries. I have use upload .txt file by code shown below


$destinationdir = "/var/www//html/telephone/uploadfiles/";
 $destinationfile = $destinationdir . $_FILES['myfile']['name'];
 if(move_uploaded_file($_FILES['myfile']['tmp_name'],$destinationfile))
 {
  $bloadquery="load data local infile '$destinationfile' into table billtable fields terminated by '|' enclosed by '' lines terminated by '\\r\\n'";

   if(execute_query($bloadquery))
   {
      header("Location: uploadsuccess.php");
      exit;
      }
.......
......
}


This code working well for uploadding 150000 (approx) lines means file of size in 50 kb but it fails for for uploading file having size 12 mb or more than 12 mb.

So please suggest me what should i change so that full file having more than 12 mb can be upladed
Thanks




 
Old October 24th, 2007, 06:36 PM
Authorized User
 
Join Date: Sep 2007
Location: , , .
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

Your php.ini file controls the max upload. By default it is set to 2mb.

You need to edit this variable in your php.ini file

upload_max_filesize


http://mynameissteve.com
 
Old October 25th, 2007, 04:43 AM
Authorized User
 
Join Date: Feb 2007
Location: IIT Kanpur, UP, India.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by sdi126
 Your php.ini file controls the max upload. By default it is set to 2mb.

You need to edit this variable in your php.ini file

upload_max_filesize


http://mynameissteve.com

Oh Thanx sir ...!
I am realy thankfull for your this help...And would like to credit to you to reslove my problem....

Thanx once agian...
Bye..

 
Old October 28th, 2007, 09:36 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

there's a possibility your host will not allow you to upload a file of over 5MB or so. i would check first, mine for example limits at 3MB.

www.crmpicco.co.uk
www.ie7.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload .txt file of size 15 mb or more rapraj PHP Databases 1 October 24th, 2007 06:34 PM
Importing date field in a large txt file CongoGrey Access 2 July 10th, 2007 06:44 AM
Date Conversion from txt field darrenb Access VBA 2 April 6th, 2007 07:04 AM
Upload Files of Greater Size (>5Mb) saravananedu ASP.NET 1.0 and 1.1 Basics 1 May 4th, 2005 12:07 AM
Getting Field Size in DataSet kasie ADO.NET 1 June 30th, 2003 02:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.