Uploading liles biger than 10mb

Discussion in 'PHP' started by vitalytis, Nov 23, 2011.

  1. #1
    Hi,
    i'm stuck at creating an upload system in my site. I'm creating a site, where all the users can upload flash games. I created the system, and i found a bug. Users can't upload files biger than 10mb... I read that i can fix that by changing something in php.ini , but i can't find how to change it in my host, and i dont actualy like that way... Can i somehow fix it by adding a script to my upload.php?? If that's imposible, please explain me more about php.ini changing :)
     
    vitalytis, Nov 23, 2011 IP
  2. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #2
    The max upload values can only be set within php.ini, .htaccess or httpd.conf. If you don't want to, or don't have access to the php.ini, try this within a root .htaccess:

    php_value upload_max_filesize 50M
    php_value post_max_size 50M
     
    mfscripts, Nov 23, 2011 IP
  3. Qarizma

    Qarizma Member

    Messages:
    55
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    45
    #3
    You need to edit the lines that mfscript suggested.

    However, on todays servers it's not possible to set the max file upload using .htaccess.

    And PHPSuexec is required to run local php.ini.
     
    Qarizma, Nov 23, 2011 IP
  4. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    #4
    Uh, yes it is. If you're using Apache, just set AllowOverride to yes.
     
    Alex Roxon, Nov 23, 2011 IP
  5. vitalytis

    vitalytis Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    what's PHPSuexec? Where can i find it?
     
    vitalytis, Nov 23, 2011 IP
  6. vitalytis

    vitalytis Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    can you drop a link to a tutorial doing that, because i'm kinda confused
     
    vitalytis, Nov 23, 2011 IP
  7. vitalytis

    vitalytis Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i'm using XAMPP 1.7.4 [PHP: 5.3.5]
     
    vitalytis, Nov 23, 2011 IP
  8. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
  9. vitalytis

    vitalytis Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i cant create .htaccess in my server can anyone drop a link with the php.ini?
     
    vitalytis, Dec 2, 2011 IP