1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Error !

Discussion in 'PHP' started by cynical_tear, Jul 16, 2010.

  1. #1

    While uploading a 2.4MB file of type JPG, am getting a output as -

    $_FILES['snap1']['size'] : 0
    $_FILES['snap1']['type'] :
    #_FILES['snap1']['error'] : (The uploaded file exceeds the upload_max_filesize directive in php.ini)

    Can anyone please explain this error to me and also help me fix this error????
     
    cynical_tear, Jul 16, 2010 IP
  2. caciocode

    caciocode Peon

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check your config file? ... And change maximum size allowed.

    You could also change it within the PHP script.
     
    Last edited: Jul 16, 2010
    caciocode, Jul 16, 2010 IP
  3. cynical_tear

    cynical_tear Peon

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i might sound stupid but i didn't get anything u said... configration file???

    how can i change it within my php script??
     
    cynical_tear, Jul 16, 2010 IP
  4. imperialDirectory

    imperialDirectory Peon

    Messages:
    395
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use phpinfo() and look for "Loaded Configuration File". That would be your configuration file.
    To change it in run time, set it to something like:
    
    ini_set('upload_max_filesize',  '5M');
    
    Code (markup):
    That's 5MB
     
    Last edited: Jul 16, 2010
    imperialDirectory, Jul 16, 2010 IP
  5. caciocode

    caciocode Peon

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Do you know some basics of PHP or are you an absolute beginner.

    If you know what a config.ini file is, then you should open that file and change the value of upload_max_filesize directive to a value greater than 2.4MB
     
    caciocode, Jul 16, 2010 IP
  6. cynical_tear

    cynical_tear Peon

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    the problem is solved... This thread is now closed...
     
    cynical_tear, Jul 16, 2010 IP