View Full Version : maximum upload

06-05-2007, 02:08 PM
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?

06-05-2007, 02:25 PM
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.

06-05-2007, 02:28 PM
is there anyway to override this setting on a specific file?
where and how do i change a htaccess file?

06-05-2007, 08:21 PM
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

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.

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.

06-06-2007, 03:26 AM
php has a function names INI_SET() (http://php.net/ini-set) in which you can set values to attributes in the php.ini