Re: [PHP] Max File Upload Size
Have a look on this page for all the ini settings.. It will also say if it is changeable http://nl2.php.net/manual/en/ini.php#ini.list 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, > > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Max File Upload Size
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, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Upload
On Tue, August 15, 2006 1:50 pm, Jeremy Privett wrote: > http://us2.php.net/manual/en/ini.core.php#ini.upload-max-filesize > > In later versions of PHP, you can't use ini_set to set > upload_max_filesize > ... The changeable option is PHP_INI_PERDIR now, meaning you can only > change > it in php.ini, .htaccess or httpd.conf ... > > http://us2.php.net/manual/en/ini.php#ini.list > > Like it says in the user contributed notes on that page, you have to > use > php_value in .htaccess to adjust the setting. > > Example: php_value upload_max_filesize 20M I do not know if it's still true, but at one time, if the upload_max_filesize had already been set in httpd.conf/php.ini, the .htaccess did not actually over-ride it, unless it was lower. IOW, the actual max size was the MINIMUM of htppd.conf/php.ini (the webhost) .htaccess (the application developer) and whatever was in that special value in the FORM (the web designer) This may have been a bug. It may have been a feature. It may no longer be true. My memory could be completely wrong, too :-) But, for sure, ini_set ain't gonna work as it's MUCH too late in the game for a file upload change. Also, I don't think '20M' will work in httpd.conf, as I don't think Apache considers '20M' to be a valid numeric value... You may need to use 2000 to get aproximately 20 Meg. You're on your own for whom to believe about what is the correct number to get exactly 20 Meg. :-) To solve the original problem, your safest bet is probably a different setting inside the VirtualHost of the httpd.conf -- I'm pretty sure that will follow the "rules" of VirtualHost inheritence and give your special customers that extra leeway. If all else fails, just crank up the number for everybody. It probably will make a lot of customers happy, and not hurt anybody very much. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Upload
http://us2.php.net/manual/en/ini.core.php#ini.upload-max-filesize In later versions of PHP, you can't use ini_set to set upload_max_filesize ... The changeable option is PHP_INI_PERDIR now, meaning you can only change it in php.ini, .htaccess or httpd.conf ... http://us2.php.net/manual/en/ini.php#ini.list Like it says in the user contributed notes on that page, you have to use php_value in .htaccess to adjust the setting. Example: php_value upload_max_filesize 20M --- Jeremy C. Privett Director of Product Development Zend Certified Engineer Completely Unique [EMAIL PROTECTED] Phone: 303.459.4819 Fax: 303.459.4821 Web:www.completelyunique.com This email may contain confidential and privileged material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. Your compliance is appreciated. -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 15, 2006 12:32 PM To: php-general@lists.php.net Subject: Re: [PHP] Max File Upload Tom Ray [Lists] wrote: > Is there anyway to overwrite the max file upload in php.ini per instant? > I'd like to have users controlled on a certain website to have more then > average uploads but the site runs on a shared hosting environment. > http://us3.php.net/ini_set -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max File Upload
Tom Ray [Lists] wrote: Is there anyway to overwrite the max file upload in php.ini per instant? I'd like to have users controlled on a certain website to have more then average uploads but the site runs on a shared hosting environment. http://us3.php.net/ini_set -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Max File Upload
Is there anyway to overwrite the max file upload in php.ini per instant? I'd like to have users controlled on a certain website to have more then average uploads but the site runs on a shared hosting environment. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php