On Sun, November 12, 2006 6:49 am, Tom Chubb wrote: > This is a really stupid question, but I've not been able to find an > answer for it. > I have always thought that your max upload size is limited to the > value in the php.ini file. > However I recently changed a site to a new server which had problems > with memory on one of the image resizing scripts. > I managed to work around it by inserting one line at the start of the > problem script: > > ini_set("memory_limit","32M"); > > Can a similar thing be done with the upload_max_filesize? > > Assuming that it can't, what is a good workaround? Using FTP within a > script? > This is for uploading an audio file, typically 4MB. > Thanks in advance, As I recall, the upload_max_filesize was an "oddball" in that you could never INCREASE it at any stage, but could only DECREASE it in the following order: php.ini httpd.conf .htaccess That funky INPUT in the FORM that browsers ignore, but PHP uses. So if your shared webhost set the limit to 2M in php.ini or httpd.conf, and you only have .htaccess, you cannot crank up your limit and over-ride your webhost quota/limit/cap. At least, that was how it seemed to behave when I tested it rather extensively back in PHP3.x days... Hmmm, as I look at my list, I wonder if httpd.conf wouldn't kick in before php.ini... Or maybe they "tie" and one can override the other in httpd.conf at various nesting levels such as Directory and VirtualHost. You're on your own for that level of detail in this matter. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php