CodeIgniter Forums
Uploaded File exceeds the maximum allowed size - 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: Uploaded File exceeds the maximum allowed size (/showthread.php?tid=9438)

Pages: 1 2


Uploaded File exceeds the maximum allowed size - El Forum - 11-13-2008

[eluser]Chris Newton[/eluser]
In the past I've put some PHP.ini overrides in the root .htaccess and they've worked fine. Basically wherever your script is running from (in this case the index.php file) at that level or above, up to the root level.


Uploaded File exceeds the maximum allowed size - El Forum - 11-13-2008

[eluser]Adam :: Envise[/eluser]
[quote author="SitesByJoe" date="1226617875"]Where would you put the .htaccess file?[/quote]

Most likely in the root directory of CI.

Quote:Would you use the same .htaccess file that removes the index.php etc?

Yes, thats probably the best spot.


Uploaded File exceeds the maximum allowed size - El Forum - 08-07-2013

[eluser]Unknown[/eluser]
[quote author="Chris Newton" date="1214411160"]You may have a problem changing the upload max size on a shared host. Some give you easy access to the php.ini or allow you to override it with an .htaccess file, but it just depends on the server.[/quote]

What would the syntax be to post this script in the .htaccess file?

I ask because popping
Code:
upload_max_filesize = 10M
into the .htaccess file instantly causes the whole site to crap out with a 500 internal server error.

Cheers.


Uploaded File exceeds the maximum allowed size - El Forum - 08-08-2013

[eluser]Chris Newton[/eluser]
In an HTACESS file:

php_value post_max_size 30M
php_value upload_max_filesize 30M

The server may still throw an error. Some servers don't allow changing PHP values in the HTACESS file.