SOS: File Uploading problem

Discussion in 'Programming' started by definitely, Aug 20, 2009.

  1. #1
    Hey friends,
    I have a WHM/Cpanel Reseller account.
    My PHPinfo shows that my max_post_size is 8M and max_upload_size is 9 MB.. I am making an image hosting site, where i might allow my users to upload large files and later resize them on my server. (As asking them to resize will send half my visitors back).
    How do i change the max_upload_size. I cant see the php.ini file anywhere?

    I think uploading via FTP might help, anybody got any idea how to do that using PHP?

    Please help... as the project is urgent... Regards.
     
    definitely, Aug 20, 2009 IP
  2. webmasterplace

    webmasterplace Peon

    Messages:
    802
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    On my server I can change the php.ini settings by just uploading a correct php.ini file to the root directory.
    When there is a php.ini file in the root directory, the server will use this file and ignore the default server php.ini.

    This is how it works with my hosting company. You can try it ...
     
    webmasterplace, Aug 20, 2009 IP
  3. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you could probably try changing the values with a htaccess. i know finding php.ini's for cpanel can be a bit daunting, try loading up a php with phpinfo(); and see where the various php.ini's are.
     
    szalinski, Aug 20, 2009 IP
  4. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Place this in a htaccess:

    php_value max_post_size "8M" etc.. (for your other variables)
     
    premiumscripts, Aug 20, 2009 IP
  5. definitely

    definitely Well-Known Member

    Messages:
    520
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    160
    #5
    sorry for late reply but can you give the exact code i need to post in my .htaccess file? for setting max upload to 30 MB?
    also where do i upload my php.ini file and what all should be its content.
     
    definitely, Aug 26, 2009 IP