Test Block Top

The Blog...
Articles, Tips & Trick and Other Interesting Information...

09 Februari 2012

Upload Error: File Size Melebihi Batas Upload Maksimal

Upload Error: File Melebihi Batas Upload Maksimal. Berikut peringatan yang muncul ketika execute tombol upload:

"The uploaded file exceeds the upload_max_filesize directive in php.ini"

[caption id="" align="alignnone" width="700" caption="Upload Error WordPress"]The uploaded file exceeds the upload_max_filesize directive in php.ini[/caption]

Error di atas muncul jika file yang diimport melebihi ukuran batas maksimal, misal; 2 MB. Solusinya adalah dengan meningkatkan batas upload maksimal ke nilai (value) yang lebih tinggi, caranya seperti berikut:

» Buka File "php.ini" (/etc/php.ini) → asumsi, OS menggunakan CentOS.

» Edit value upload_max_filesize ke nilai yang lebih besar (misalnya; upload_max_filesize = 50M).

[apache collapse="false"]
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M
[/apache]

» Restart apache webserver

Command:

service httpd restart

[bash collapse="false"]
[root@linggih ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@linggih ~]#
[/bash]

Atau jika anda tidak punya akses ke direktori file /etc/php.ini (menggunakan shared hosting account), cari atau buat file baru pada direktori root website (public_html atau htdocs) → edit/buat baru file .htaccess atau php.ini. Kemudian tambahkan code seperti di bawah:

php_value upload_max_filesize 50M

Simpan file & coba upload ulang.

Tidak ada komentar:

Posting Komentar

Loncat ke Atas ↑