SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to handle error in upload file

    Hi,

    I am making page that will upload,this is my first time to make a page that will upload just practice for me.
    when i upload picture there is nothing wrong it works perfectly but when i tried to upload movies.1.5gb it will not upload and it will not display errors.how can i manage this or handle this if my page will not accept that big size and i want to display or echo "Upload file exceed."...


    Please help me Thank you in advance.

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,129
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    To change the limit, you need to update the php.ini file and restart apache/iis.

    As for the validation, there are many php file upload validation results on google

  3. #3
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    For the record, I would NOT handle a file 1.5 GB in size through HTTP. Use a protocol designed for it, like FTP.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  4. #4
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    For the record, I would NOT handle a file 1.5 GB in size through HTTP. Use a protocol designed for it, like FTP.
    Hi StarLion, i dont know how to use the FTP in php.can i asked some help with you this.

    Thank you in advance.

  5. #5
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    To change the limit, you need to update the php.ini file and restart apache/iis.

    As for the validation, there are many php file upload validation results on google
    Hi,thank you for the reply..but how can i change the php.ini ? please guide me...

  6. #6
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,129
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Are you on a dedicated server or a shared host? If you have a dedicated server, you php.ini will be located in the apache2 conf folder. If you are on a shared server, you can't edit it. Most shared hosts do not permit you to change those settings.

  7. #7
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I am just working in my P.C localhost...so if it is in apache2 conf folder what's next thing to do?.Thank you in advance.

  8. #8
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,129
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Well working locally, it may or may not be in the apache2 conf folder, it may be in your php installation folder. You are looking for the php.ini file, then you want to open it and look for max_upload_size

  9. #9
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    Well working locally, it may or may not be in the apache2 conf folder, it may be in your php installation folder. You are looking for the php.ini file, then you want to open it and look for max_upload_size
    Hi,sorry for the late reply...Thank you so much cpradio for helping me.Okay i will try this.i will write back again if i have doubt.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •