Increasing File Upload Limit Using .htaccess
As PHP limits maximal file upload into 2 (two) megabytes, sometimes we need to increase the value to upload bigger files.
Editing php.ini is the easiest way, but it is impossible when our scripts are in a shared hosting. The only few choice is by using .htaccess file. It will rewrite php.ini’s configuration.
I’ve tried this method and worked as I expected: Here’s the .htaccess content:
RewriteEngine On
php_value upload_max_filesize 30M
Last words, there’s manything we can do using .htaccess to overide server’s default configuration ^_*
February 6th, 2007 at 7:20 pm
Good tricks :D, udah aku praktekin.. tp lum tau cara buktiin nya
Nanya Jeng. kalo kita mau file php nya di namakan *.pas tapi tetep bisa di execute as php gimana?
aku lihat di salah satu web, dia pake extension .pas di semua file php nya.
February 7th, 2007 at 12:56 am
Duh, so last year bgt sih tutorialnya. Hehheheee…
@starboard,
tambahin ini jeng,
AddType application/x-httpd-php .pas .linoxs
February 7th, 2007 at 6:59 am
di kasih dimana jeng linoxs?
di bawah sendiri bisa?
Jeng Yeni, commentnya buawat diskusi
February 7th, 2007 at 5:45 pm
selama ga ada kata “admin” nya, setting php.ini bisa di override ( + php jalan sbg module apache
).
@kiyat a.k.a starboard
di .htaccess ? bisa aja jeng.
http://id2.php.net/configuration.changes
February 8th, 2007 at 5:18 am
gua..kalo cuma buat sendiri mah mending pake http://ftp..kenapa? gila aja ngupload file yang gedenya ampe belasan MB liwat script PHP..bisa2timeout server gue :p
February 11th, 2007 at 2:54 am
Jeng, punya script php yang buat upload zip trus dia bisa de-compress otomatis gak?
aku biasanya upload pake web2ftp.com cuman skg dia deactive
padahal enak klo upload file pake itu, tinggal di zip dah decompress otomatis.