Anyone got any pointers how I increase this from 2MB Ive tried the .htaccess route and php.ini - I m hosted on site5 nothing seems to work

any ideas
M

Comments

alihammad’s picture

You can alter this in drupal via administer section. Administer> File Upload. Change Default maximum file size per upload: , Default total file size per user:. Remember that this setting if set beyond the htaccess limit is useless. If your htaccess and drupal setting are set to your desired level and the problem persists then your host provider (shared hosting) most likely doesn't allow a higher limit.

Ali Hammad Raza
WordsValley

WorldFallz’s picture

I'm on site5, see these threads:

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

somes’s picture

This is what worked for me

remember to change
$defaultPath = '/usr/local/php4/lib/php.ini';
AND
$customPath = "/home/*******/public_html/php.ini";

[php
// Put all the php.ini parameters you want to change below. One per line.
// Follow the example format $parm[] = "parameter = value";
$parm[] = "register_globals = Off";
$parm[] = "session.use_trans_sid = 0";
$parm[] = "post_max_size = 10M";
$parm[] = "upload_max_filesize = 40M"; // user specified max file upload size
$parm[] = "post_max_size = 250M"; // user specified post max size

// user specified post max size
// full unix path - location of the default php.ini file at your host
// you can determine the location of the default file using phpinfo()
$defaultPath = '/usr/local/php4/lib/php.ini';
// full unix path - location where you want your custom php.ini file
$customPath = "/home/*******/public_html/php.ini";
// nothing should change below this line.
if (file_exists($defaultPath)) {
$contents = file_get_contents($defaultPath);
$contents .= "\n\n; USER MODIFIED PARAMETERS FOLLOW\n\n";
foreach ($parm as $value) $contents .= $value . " \n";
$handle = fopen($customPath, 'w');
if (fwrite($handle, $contents)) {
fclose($handle);
if (chmod($customPath,0600)) $message = "The php.ini file has been modified and copied";
else $message = "Processing error - php.ini chmod failed";
} else {
$message = "Processing error - php.ini write failed";
}
} else {
$message = "Processing error - php.ini file not found";
}
echo $message;
]

alf_frommars’s picture

Hi all, just a newbie. trying to get a max upload size from 100 mb. have to change a php.ini file. do not know how and where to find it. can anyone help me?
tnx a lot

WorldFallz’s picture

This will vary depending on your host-- if you're on site5 as mentioned in the OP, you can find the instructions at the links i provided above. If not you'll have to check with your hosting provider.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz