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 ^_*
kiyat
06/02/2007 — 19:20
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.
linoxs
07/02/2007 — 00:56
Duh, so last year bgt sih tutorialnya. Hehheheee…
@starboard,
tambahin ini jeng,
AddType application/x-httpd-php .pas .linoxs
agung
07/02/2007 — 17:45
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
kiyat
07/02/2007 — 06:59
di kasih dimana jeng linoxs?
di bawah sendiri bisa?
Jeng Yeni, commentnya buawat diskusi 😀
ronggur
08/02/2007 — 05:18
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
kiyat
11/02/2007 — 02:54
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. 🙂