![]() |
Increase server upload limit - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Increase server upload limit (/showthread.php?tid=30807) Pages:
1
2
|
Increase server upload limit - El Forum - 05-26-2010 [eluser]vaxis[/eluser] Hi guys, In my current project i have a page where i can upload images, but i have problems with file bigger than 8Mb because my server ini.php file is set like that... I tried to use this code in index.php file: Code: set_time_limit(0); But upload size doesn't change. I also tried to use a .htaccess file with this rows: Code: php_value upload_max_filesize 20M But i get a Server Internal Error. Someone knows a good method to increase server upload limit? Thanks all. Increase server upload limit - El Forum - 05-26-2010 [eluser]ranjudsokomora[/eluser] [quote author="vaxis" date="1274908521"]Hi guys, In my current project i have a page where i can upload images, but i have problems with file bigger than 8Mb because my server ini.php file is set like that... I tried to use this code in index.php file: Code: set_time_limit(0); [/quote] The first thing I would do is try and change the php.ini file. However if you can't changed that, here would be my settings in php Code: ini_set('post_max_size','50M'); Increase server upload limit - El Forum - 05-26-2010 [eluser]vaxis[/eluser] [quote author="ranjudsokomora" date="1274909474"] The first thing I would do is try and change the php.ini file. However if you can't changed that, here would be my settings in php Code: ini_set('post_max_size','50M'); Hi ranjudsokomora, thanks for reply. I just tried with that rows but it doesn't solve my problem ![]() I also tried to create a ini.php file in my root folder but i also get a Internal 500 error. There is a different way for doing this? Thanks again. Increase server upload limit - El Forum - 05-26-2010 [eluser]ranjudsokomora[/eluser] vaxis What type of server environment are you on? Increase server upload limit - El Forum - 05-26-2010 [eluser]danmontgomery[/eluser] 5 minutes spent on google reveals: http://bytes.com/topic/php/answers/11666-file-upload-max-size Quote:post_max_size and upload_max_filesize aren't settable at runtime, because And php.net confirms: http://www.php.net/manual/en/ini.list.php Quote:post_max_size "8M" PHP_INI_PERDIR PHP_INI_SYSTEM in PHP <= 4.2.3. Available since PHP 4.0.3. http://php.net/manual/en/configuration.changes.modes.php Quote:PHP_INI_PERDIR 6 Entry can be set in php.ini, .htaccess or httpd.conf Increase server upload limit - El Forum - 05-26-2010 [eluser]cahva[/eluser] And as you cannot set those in .htaccess(you get an internal server error by using php_value), you must ask your host to set them. If you're on a shared server, its quite understandable that those cannot be set by user(althought its strange that you cant use php_value at all as there are many other settings user usually can set). BTW, if you get an internal server error, you can find the error in the logs(http-error_log or similar). Increase server upload limit - El Forum - 05-26-2010 [eluser]vaxis[/eluser] I'm on a shared linux server, but this project is a cms and i don't know on which server it will run... So there isn't a way to allow file upload that are bigger than 8Mb without contacting my host? Thanks for answers ![]() Increase server upload limit - El Forum - 05-26-2010 [eluser]cahva[/eluser] Just contact your host ![]() ![]() Increase server upload limit - El Forum - 05-27-2010 [eluser]Crimp[/eluser] It depends on how your provider/server runs PHP. If under FastCGI, they may allow php.ini to be set and changed per user. But it would likely be advertised as a feature up front. Shared hosting does not lend itself to special applications. Saved myself a lot of headaches when I moved on to manage servers. Instead of having to troubleshoot and deal with support, you could simply have logged on, changed the values and moved on with your coding. Shared hosts will for many reasons not welcome large file uploads by users. Increase server upload limit - El Forum - 05-27-2010 [eluser]cahva[/eluser] [quote author="Crimp" date="1274961393"] Shared hosts will for many reasons not welcome large file uploads by users.[/quote] Name one reason? ![]() |