ArticleTrader.com
  

 Main Menu

  Home
  Member Login
  Forum
  Submit Article
  Membership
  RSS Feeds
  Contact Us
  About

 Services

  Article Distribution
  Link Building

 Tools

  ArticleMS
  Directory Tracker

 Categories

  Automotive
  Business
  Computers
  » Games
  » Hardware
  » Software
  Entertainment
  Finance
  Food
  Health
  Home and Family
  Internet
  Legal
  Science
  Self Improvement
  Shopping
  Society
  Sports
  Technology
  Travel
  Writing

187 users online.



 
  » Category Sponsors
  Get Your Link Here - Limited Time Bargain at only $11/month!

Home » Computers » Software » How to upload large file in php?

semaphore06
Article written by semaphore06

View Full Profile
Get Html Code
PDF | Print View | Post to your Site

How to upload large file in php?

Submitted by semaphore06
Thu, 15 Feb 2007

Make Money With Your Site!
Sell Links off your
site at ReverseLinks.
Buy Permenant Links
Get Permanent Text Links
for cheap.
I have one form Mmy aim was to upload big files from local disk to server.

but when i click on upload button it does not upload the file without showing any error. then Ii searched for a solution from web site and for this solution

then i found solution by changing environment variable of php.ini

To find ound where php.ini file, is located run this small code

and search "Configuration File (php.ini) Path " row , there will be an in output window and this which will contain path of php.ini file in your PC

and in this php.ini file, change the variable size as per requirement

upload_max_filesize = (size)M

post_max_size = (size)M

new in php 5

max_input_time = (value) //in second

max_input_time variable which sets a time limit in seconds for receiving input data through POST, GET, and PUT. If your application is running over a slow link,

it is sometimes worthwhile to explore increasing this value to allow the script more time to receive input data. or you can change this variable at run time through programme

example

ini_set('post_max_size','9M')

now post_max_size variable is 9 MB set.

using

string ini_set ( string varname, string newvalue )

now i added client side validation for restricting user to upload more than particular file size.

use this hidden variable and its value contain how many bytes allow to be upload.

if you want store file in mysql Long blog data type.

set the variable

max_allowed_packet = (byte)

The above steps solved my problem and i can upload big file without any hurdle..

--

 

Author:

By Jayesh Sorathia

Jayesh Sorathia is working as a Jr. Programmer at Semaphore Infotech Pvt. Ltd, India. He has 8 months Experience. You can contact on email: jayesh@semaphore-software.com.


Source: ArticleTrader.com
Creative Commons License

Comments

No comments posted.

Add Comment

You do not have permission to comment. If you log in, you may be able to comment.

 Top Authors

 1 Stebee (3270)
 2 limalan88 (2920)
 3 alien82 (2756)
 4 kajuba (2508)
 5 sverdlow (1712)
 6 juliet (1691)
 7 jamiehanson (1690)
 8 MarkeD (1296)
 9 AnthonyF (1244)
 10 robertoms2003 (1206)
 11 articles (1205)
 12 artavia.seo (1148)
 13 spinxwebdesign (1112)
 14 gprather (1071)
 15 cj (1069)

 Distribution

Article Distribution

  
  Affiliate Program 2Checkout.com, Inc. is an authorized retailer of ArticleTrader.com

0.04s