Results 1 to 9 of 9

Thread: File Uploader

  1. #1

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    File Uploader

    Hello All

    I am making a file uploader, I have noticed my script will not upload the file when over a certain size, I have tried to use ini_set to set some settings to increase the maximum file size upload allowed, but I have read that because the ini_set will be within the same iteration of the upload script, and because it executes after the file upload it will not take effect in time.

    Is there a solution around this? I intend my application to be distributed over the internet therefore it would be convenient to be as simple as possible.


    Cheers

  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: File Uploader

    Do it in php.ini it's the only way to allow a larger file size.
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  3. #3

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: File Uploader

    But, what if the end user has no access to their PHP.ini file, is there a way of setting the ini temporarly for that session?

  4. #4
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Re: File Uploader

    Quote Originally Posted by I_Love_My_Vans
    But, what if the end user has no access to their PHP.ini file, is there a way of setting the ini temporarly for that session?
    That would be the ini_set function

    http://uk.php.net/ini_set

    This might work:

    PHP Code:
    ini_set("upload_max_filesize""10M"); 
    ?
    'What's this bit for anyway?
    For Jono

  5. #5
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: File Uploader

    Nope he's already said that doesn't work, it needs to be set in php.ini so that it's set as the file's uploading.
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  6. #6

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: File Uploader

    To tell the truth, me and DClamp spent an hour last night on remote assistance, changing that setting and not once did it work.

  7. #7
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: File Uploader

    There are a few other settings that could be causing your uploads to break.
    See:
    How to optimize your PHP installation to handle large file uploads

  8. #8
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: File Uploader

    we tried that last night pena. No luck. Might want to try it again though ILMV
    My usual boring signature: Something

  9. #9

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: File Uploader

    Yes I will read through it toroughly tonight

Posting Permissions

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



Click Here to Expand Forum to Full Width