Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: maximum upload

  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,457
    Thanks
    15
    Thanked 0 Times in 0 Posts

    maximum upload

    is there anyway to change the maximum upload except in the php.ini?

    if i'm on a shared hosting does it help to just upload a php.ini to the root?

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,044
    Thanks
    2
    Thanked 316 Times in 308 Posts
    The parameters that limit the maximum upload can be set in a .htaccess file.

    If your hosting allows a local php.ini, then the net effect of putting the settings in a local php.ini would be the same as putting them into a .htaccess file.

    Both of the above assume that the hosting company permits modifying the upload settings in a .htaccess file or a local php.ini file.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,457
    Thanks
    15
    Thanked 0 Times in 0 Posts
    is there anyway to override this setting on a specific file?
    where and how do i change a htaccess file?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to create the .htaccess file. Logon to your server via ftp. Go to the public_html folder (usually where you put your files) and look for a file called .htaccess, and download it. Open it up in notepad and add this to it
    Code:
    php_value upload_max_filesize 200M
    php_value post_max_size 200M
    save it as .htaccess WITHOUT the extension or it won't work. Change 200M to whatever you like. The M represents megabytes.

    If no .htaccess file exists on your server then you will have to create it. Open notepad and put this in it.
    Code:
    php_value upload_max_filesize 200M
    php_value post_max_size 200M
    Save the file as htaccess.txt > Upload the file to your webhost via ftp > Rename the file to .htaccess again no extension using your ftp program. If done correctly the upload_max_filesize and post_max_size should be larger.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    php has a function names INI_SET() in which you can set values to attributes in the php.ini


  •  

    Posting Permissions

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