Test Block Top

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

28 Februari 2012

Varnish Cache Install Error "Missing Dependency: libedit.so.0()" (RedHat/CentOS)

"Varnish Cache Install Error "Missing Dependency: libedit.so.0()" (RedHat/CentOS)"

Cara mengatasi, install rpm epel >> http://fedoraproject.org/wiki/EPEL

[bash collapse="false"]
[root@server5 ~]# cd /tmp
[root@server5 tmp]# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
[root@server5 tmp]# rpm -ivh epel-release-6-5.noarch.rpm
[/bash]

Kemudian jalankan command install varnish cache:

[bash collapse="false"]
[root@server5 tmp]# yum install varnish
[/bash]

Referensi Panduan Install Varnish Cache:


  1. https://www.varnish-cache.org/docs

500 Internal Server Error (Incorrect File Ownership)

Cara mengatasi 500 Internal Server Error dikarenakan ownership file ('index.php' misalnya) berbeda/tidak sama dengan ownership domain, adalah dengan cara mengganti ownership file yang error ke username domain:


  1. Buka Putty & login sebagai root

  2. Ketikkan Command Berikut ini (asumsi control panel web cPanel/sesuaikan dengan direktori error file):


    [bash collapse="false"]
    [root@localhost ~]# chown -R username:username /home/username/public_html
    [root@localhost ~]# chown username:nobody /home/username/public_html
    [/bash]

    Ganti "username" dengan aktual username.

  3. Selesai. Refresh ulang halaman yang error.

26 Februari 2012

Install PDO MySQL Pada Centos

Apa itu PDO MySQL? PDO adalah singkatan dari PHP Data Objects, berdasarkan wiki mysql.com, PDO adalah...

PDO_MYSQL is the MySQL driver for PDO (PHP Data Objects). Under the name PDO_MYSQLND a patch which allows to compile PDO_MYSQL against the MySQL native driver for PHP (mysqlnd) or the mysql client library (like ever since) has been developed.


Pada artikel tidak akan mengulas apa itu PDO, namun cara install PDO MySQL pada OS CentOS. Untuk mulai install PDO MySQL, ketikkan command:

yum install php-devel php-pear mysql-devel httpd-devel

[bash]
[root@linggih ~]# yum install php-devel php-pear mysql-devel httpd-devel
...
...
--> Processing Dependency: libapr-1.so.0()(64bit) for package: apr-devel-1.3.9-3.el6_1.2.x86_64
---> Package apr-util-devel.x86_64 0:1.3.9-3.el6_0.1 will be installed
--> Processing Dependency: apr-util = 1.3.9-3.el6_0.1 for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: openldap-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: db4-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: expat-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
---> Package mysql.x86_64 0:5.1.61-1.el6_2.1 will be installed
---> Package openssl-devel.x86_64 0:1.0.0-20.el6_2.4 will be installed
--> Processing Dependency: zlib-devel for package: openssl-devel-1.0.0-20.el6_2.4.x86_64
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.0-20.el6_2.4.x86_64
---> Package php.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Processing Dependency: php-common = 5.3.3-3.el6_2.8 for package: php-5.3.3-3.el6_2.8.x86_64
---> Package php-cli.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Processing Dependency: libedit.so.0()(64bit) for package: php-cli-5.3.3-3.el6_2.8.x86_64
---> Package pkgconfig.x86_64 1:0.23-9.1.el6 will be installed
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package db4-devel.x86_64 0:4.7.25-16.el6 will be installed
--> Processing Dependency: db4-cxx = 4.7.25-16.el6 for package: db4-devel-4.7.25-16.el6.x86_64
--> Processing Dependency: libdb_cxx-4.7.so()(64bit) for package: db4-devel-4.7.25-16.el6.x86_64
---> Package expat-devel.x86_64 0:2.0.1-9.1.el6 will be installed
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package krb5-devel.x86_64 0:1.9-22.el6_2.1 will be installed
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.9-22.el6_2.1.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.9-22.el6_2.1.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.9-22.el6_2.1.x86_64
---> Package libedit.x86_64 0:2.11-4.20080712cvs.1.el6 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
---> Package openldap-devel.x86_64 0:2.4.23-20.el6 will be installed
--> Processing Dependency: cyrus-sasl-devel >= 2.1 for package: openldap-devel-2.4.23-20.el6.x86_64
---> Package php-common.x86_64 0:5.3.3-3.el6_2.8 will be installed
---> Package zlib-devel.x86_64 0:1.2.3-27.el6 will be installed
--> Running transaction check
---> Package cyrus-sasl-devel.x86_64 0:2.1.23-13.el6 will be installed
---> Package db4-cxx.x86_64 0:4.7.25-16.el6 will be installed
---> Package keyutils-libs-devel.x86_64 0:1.4-3.el6 will be installed
---> Package libcom_err-devel.x86_64 0:1.41.12-11.el6 will be installed
---> Package libselinux-devel.x86_64 0:2.0.94-5.2.el6 will be installed
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.2.el6.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.2.el6.x86_64
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
httpd-devel x86_64 2.2.15-15.el6.centos.1 updates 147 k
mysql-devel x86_64 5.1.61-1.el6_2.1 updates 127 k
php-devel x86_64 5.3.3-3.el6_2.8 updates 506 k
php-pear noarch 1:1.9.4-4.el6 base 393 k
Installing for dependencies:
apr x86_64 1.3.9-3.el6_1.2 base 123 k
apr-devel x86_64 1.3.9-3.el6_1.2 base 176 k
apr-util x86_64 1.3.9-3.el6_0.1 base 87 k
apr-util-devel x86_64 1.3.9-3.el6_0.1 base 69 k
apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k
cyrus-sasl-devel x86_64 2.1.23-13.el6 base 302 k
db4-cxx x86_64 4.7.25-16.el6 base 590 k
db4-devel x86_64 4.7.25-16.el6 base 6.6 M
expat-devel x86_64 2.0.1-9.1.el6 base 119 k
httpd x86_64 2.2.15-15.el6.centos.1 updates 813 k
httpd-tools x86_64 2.2.15-15.el6.centos.1 updates 70 k
keyutils-libs-devel x86_64 1.4-3.el6 base 28 k
krb5-devel x86_64 1.9-22.el6_2.1 updates 1.2 M
libcom_err-devel x86_64 1.41.12-11.el6 base 31 k
libedit x86_64 2.11-4.20080712cvs.1.el6 base 74 k
libselinux-devel x86_64 2.0.94-5.2.el6 base 136 k
libsepol-devel x86_64 2.0.41-4.el6 base 64 k
mailcap noarch 2.1.31-2.el6 base 27 k
mysql x86_64 5.1.61-1.el6_2.1 updates 881 k
openldap-devel x86_64 2.4.23-20.el6 base 1.1 M
openssl-devel x86_64 1.0.0-20.el6_2.4 updates 1.1 M
php x86_64 5.3.3-3.el6_2.8 updates 1.1 M
php-cli x86_64 5.3.3-3.el6_2.8 updates 2.2 M
php-common x86_64 5.3.3-3.el6_2.8 updates 522 k
pkgconfig x86_64 1:0.23-9.1.el6 base 70 k
zlib-devel x86_64 1.2.3-27.el6 base 44 k

Transaction Summary
================================================================================
Install 30 Package(s)

Total download size: 19 M
Installed size: 64 M
Is this ok [y/N]: y
Downloading Packages:
http://centos.biz.net.id/6.2/os/x86_64/Packages/apr-1.3.9-3.el6_1.2.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
(1/30): apr-1.3.9-3.el6_1.2.x86_64.rpm | 123 kB 00:00
(2/30): apr-devel-1.3.9-3.el6_1.2.x86_64.rpm | 176 kB 00:00
(3/30): apr-util-1.3.9-3.el6_0.1.x86_64.rpm | 87 kB 00:00
(4/30): apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm | 69 kB 00:00
(5/30): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm | 15 kB 00:00
(6/30): cyrus-sasl-devel-2.1.23-13.el6.x86_64.rpm | 302 kB 00:01
(7/30): db4-cxx-4.7.25-16.el6.x86_64.rpm | 590 kB 00:02
(8/30): db4-devel-4.7.25-16.el6.x86_64.rpm | 6.6 MB 00:29
(9/30): expat-devel-2.0.1-9.1.el6.x86_64.rpm | 119 kB 00:00
(10/30): httpd-2.2.15-15.el6.centos.1.x86_64.rpm | 813 kB 00:03
(11/30): httpd-devel-2.2.15-15.el6.centos.1.x86_64.rpm | 147 kB 00:00
(12/30): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm | 70 kB 00:00
(13/30): keyutils-libs-devel-1.4-3.el6.x86_64.rpm | 28 kB 00:00
(14/30): krb5-devel-1.9-22.el6_2.1.x86_64.rpm | 1.2 MB 00:05
(15/30): libcom_err-devel-1.41.12-11.el6.x86_64.rpm | 31 kB 00:00
(16/30): libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm | 74 kB 00:00
(17/30): libselinux-devel-2.0.94-5.2.el6.x86_64.rpm | 136 kB 00:00
(18/30): libsepol-devel-2.0.41-4.el6.x86_64.rpm | 64 kB 00:00
(19/30): mailcap-2.1.31-2.el6.noarch.rpm | 27 kB 00:00
(20/30): mysql-5.1.61-1.el6_2.1.x86_64.rpm | 881 kB 00:03
(21/30): mysql-devel-5.1.61-1.el6_2.1.x86_64.rpm | 127 kB 00:00
(22/30): openldap-devel-2.4.23-20.el6.x86_64.rpm | 1.1 MB 00:04
(23/30): openssl-devel-1.0.0-20.el6_2.4.x86_64.rpm | 1.1 MB 00:05
(24/30): php-5.3.3-3.el6_2.8.x86_64.rpm | 1.1 MB 00:04
(25/30): php-cli-5.3.3-3.el6_2.8.x86_64.rpm | 2.2 MB 00:09
(26/30): php-common-5.3.3-3.el6_2.8.x86_64.rpm | 522 kB 00:02
(27/30): php-devel-5.3.3-3.el6_2.8.x86_64.rpm | 506 kB 00:02
(28/30): php-pear-1.9.4-4.el6.noarch.rpm | 393 kB 00:01
(29/30): pkgconfig-0.23-9.1.el6.x86_64.rpm | 70 kB 00:00
(30/30): zlib-devel-1.2.3-27.el6.x86_64.rpm | 44 kB 00:00
--------------------------------------------------------------------------------
Total 228 kB/s | 19 MB 01:23
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:pkgconfig-0.23-9.1.el6.x86_64 1/30
Installing : apr-1.3.9-3.el6_1.2.x86_64 2/30
Installing : apr-util-1.3.9-3.el6_0.1.x86_64 3/30
Installing : apr-devel-1.3.9-3.el6_1.2.x86_64 4/30
Installing : php-common-5.3.3-3.el6_2.8.x86_64 5/30
Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 6/30
Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64 7/30
Installing : zlib-devel-1.2.3-27.el6.x86_64 8/30
Installing : libcom_err-devel-1.41.12-11.el6.x86_64 9/30
Installing : libsepol-devel-2.0.41-4.el6.x86_64 10/30
Installing : libselinux-devel-2.0.94-5.2.el6.x86_64 11/30
Installing : expat-devel-2.0.1-9.1.el6.x86_64 12/30
Installing : cyrus-sasl-devel-2.1.23-13.el6.x86_64 13/30
Installing : openldap-devel-2.4.23-20.el6.x86_64 14/30
Installing : libedit-2.11-4.20080712cvs.1.el6.x86_64 15/30
Installing : php-cli-5.3.3-3.el6_2.8.x86_64 16/30
Installing : mailcap-2.1.31-2.el6.noarch 17/30
Installing : httpd-2.2.15-15.el6.centos.1.x86_64 18/30
Installing : php-5.3.3-3.el6_2.8.x86_64 19/30
Installing : db4-cxx-4.7.25-16.el6.x86_64 20/30
Installing : db4-devel-4.7.25-16.el6.x86_64 21/30
Installing : apr-util-devel-1.3.9-3.el6_0.1.x86_64 22/30
Installing : mysql-5.1.61-1.el6_2.1.x86_64 23/30
Installing : keyutils-libs-devel-1.4-3.el6.x86_64 24/30
Installing : krb5-devel-1.9-22.el6_2.1.x86_64 25/30
Installing : openssl-devel-1.0.0-20.el6_2.4.x86_64 26/30
Installing : mysql-devel-5.1.61-1.el6_2.1.x86_64 27/30
Installing : httpd-devel-2.2.15-15.el6.centos.1.x86_64 28/30
Installing : php-devel-5.3.3-3.el6_2.8.x86_64 29/30
Installing : 1:php-pear-1.9.4-4.el6.noarch 30/30

Installed:
httpd-devel.x86_64 0:2.2.15-15.el6.centos.1
mysql-devel.x86_64 0:5.1.61-1.el6_2.1
php-devel.x86_64 0:5.3.3-3.el6_2.8
php-pear.noarch 1:1.9.4-4.el6

Dependency Installed:
apr.x86_64 0:1.3.9-3.el6_1.2
apr-devel.x86_64 0:1.3.9-3.el6_1.2
apr-util.x86_64 0:1.3.9-3.el6_0.1
apr-util-devel.x86_64 0:1.3.9-3.el6_0.1
apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
cyrus-sasl-devel.x86_64 0:2.1.23-13.el6
db4-cxx.x86_64 0:4.7.25-16.el6
db4-devel.x86_64 0:4.7.25-16.el6
expat-devel.x86_64 0:2.0.1-9.1.el6
httpd.x86_64 0:2.2.15-15.el6.centos.1
httpd-tools.x86_64 0:2.2.15-15.el6.centos.1
keyutils-libs-devel.x86_64 0:1.4-3.el6
krb5-devel.x86_64 0:1.9-22.el6_2.1
libcom_err-devel.x86_64 0:1.41.12-11.el6
libedit.x86_64 0:2.11-4.20080712cvs.1.el6
libselinux-devel.x86_64 0:2.0.94-5.2.el6
libsepol-devel.x86_64 0:2.0.41-4.el6
mailcap.noarch 0:2.1.31-2.el6
mysql.x86_64 0:5.1.61-1.el6_2.1
openldap-devel.x86_64 0:2.4.23-20.el6
openssl-devel.x86_64 0:1.0.0-20.el6_2.4
php.x86_64 0:5.3.3-3.el6_2.8
php-cli.x86_64 0:5.3.3-3.el6_2.8
php-common.x86_64 0:5.3.3-3.el6_2.8
pkgconfig.x86_64 1:0.23-9.1.el6
zlib-devel.x86_64 0:1.2.3-27.el6

Complete!
[root@linggih ~]#
[/bash]

yum install php-pdo

[bash]
[root@linggih ~]# yum install php-pdo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: centos.idrepo.or.id
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-pdo x86_64 5.3.3-3.el6_2.8 updates 73 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 73 k
Installed size: 168 k
Is this ok [y/N]: y
Downloading Packages:
php-pdo-5.3.3-3.el6_2.8.x86_64.rpm | 73 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-pdo-5.3.3-3.el6_2.8.x86_64 1/1

Installed:
php-pdo.x86_64 0:5.3.3-3.el6_2.8

Complete!
[root@linggih ~]#
[/bash]

PHP_PDO_SHARED=1 yum install php-pdo_mysql

[bash]
[root@linggih ~]# PHP_PDO_SHARED=1 yum install php-pdo_mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: centos.idrepo.or.id
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-mysql x86_64 5.3.3-3.el6_2.8 updates 79 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 79 k
Installed size: 215 k
Is this ok [y/N]: y
Downloading Packages:
php-mysql-5.3.3-3.el6_2.8.x86_64.rpm | 79 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-mysql-5.3.3-3.el6_2.8.x86_64 1/1

Installed:
php-mysql.x86_64 0:5.3.3-3.el6_2.8

Complete!
[root@linggih ~]#
[/bash]

Restart Apache

service httpd restart atau /etc/init.d/httpd restart

[bash collapse="false"]
[root@linggih ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using linggih.sytes.net for ServerName
[ OK ]
[root@linggih ~]#
[/bash]

Cek php extention. pdo_mysql (lihat pada baris ke-26)

php -me

[bash highlight="26"]
[root@linggih ~]# php -me
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
zip
zlib

[Zend Modules]

[root@linggih ~]#
[/bash]

Semoga bermanfaat...
:D

Install Litespeed Webserver

Berikut Panduan Tutorial Singkat Command Line Install Litespeed Webserver

General Install:

Latest Version Download Link:
http://www.litespeedtech.com/litespeed-web-server-downloads.html

Command:

[bash collapse="false"]
[root@localhost ~]# wget http://www.litespeedtech.com/packages/4.0/lsws-4.0.20-ent-x86_64-linux.tar.gz
[root@localhost ~]# tar zxvf lsws-4.0.20-ent-x86_64-linux.tar.gz
[root@localhost lsws-4.0.20]# cd lsws-4.0.20
[root@localhost lsws-4.0.20]# sh install.sh
[root@localhost lsws-4.0.20]# cd ..
[/bash]

WHM Plugin Install Command

Command:

[bash collapse="false"]
[root@localhost ~]# cd /usr/src
[root@localhost src]# wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh
[root@localhost src]# sh ./lsws_whm_plugin_install.sh
[root@localhost src]# rm -f lsws_whm_plugin_install.sh
[/bash]

Referensi:


  1. http://www.litespeedtech.com/docs/webserver/admin/ServerStat_Help.html

  2. http://www.litespeedtech.com/docs/webserver/install/config.html

  3. http://www.litespeedtech.com/docs/webserver/install/

25 Februari 2012

Install Nginx Webserver Webmin Plugin

Tutorial Install Nginx Webserver Webmin Plugin



» Buka link 'Webmin' → 'Webmin Configuration' → 'Webmin Modules'

[caption id="attachment_1291" align="alignnone" width="150" caption="Webmin Modules"]Install Nginx Webmin Plugin[/caption]

» Pada halaman 'Install Module', silahkan pilih mode instalasi (local file, uploaded file, ftp/http url). Pada artikel ini akan menggunakan type instalasi ftp/http url. Klik checkbox 'From ftp or http URL', kemudian isikan dengan alamat url download.

Contoh: https://github.com/downloads/vixh/nginx-webmin/nginx0.0.2.wbm.gz (dapat dilihat pada alamat url https://github.com/vixh/nginx-webmin/downloads).

» Klik tombol Install Module


[caption id="attachment_1292" align="alignleft" width="150" caption="Install Module"]Install Nginx Webmin Plugin 2[/caption][caption id="attachment_1293" align="alignleft" width="150" caption="Module Installed"]Install Nginx Webmin Plugin 3[/caption]


Selesai. Manage Nginx di menu "Servers" > "Nginx Webserver".

[caption id="attachment_1294" align="alignnone" width="150" caption="Webmin Nginx Webserver"]Install Nginx Webmin Plugin 4[/caption]
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.

Website Tidak Bisa Dibuka Meskipun Modul mod_rewrite On

Beberapa hari yang lalu saya coba installkan blog wordpress teman pada vps. Setting permalink saya set ke "Custom Structure → /%category%/%postname%/", file .htaccess baru sudah otomatis tersetup namun ketika test buka halaman posting website error (Not Found).

Berikut Solusinya:

Cek dulu apakah modul mod_rewrite sudah aktif pada webserver apache, login ssh & ketikkan command:

apachectl -M

[bash highlight="6"]
[root@victor ~]# apachectl -M
Loaded Modules:
...
...
alias_module (shared)
rewrite_module (shared)
...
...
cgi_module (shared)
version_module (shared)
...
...
python_module (shared)
ssl_module (shared)
Syntax OK
[/bash]

Jika modul rewrite sudah aktif (rewrite_module (shared))baris ke-6 pada code di atas, kemungkinan AllowOverride pada file konfigurasi apache (httpd.conf) masih di set ke "None" (AllowOverride None).

Edit value "AllowOverride None" ke "AllowOverride All" pada file httpd.conf (/etc/httpd/conf/httpd.conf) untuk semua dokumen root direktori (biasanya "/var/www/html") → lihat baris ke-17 pada code di bawah.

[apache highlight="17"]
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
[/apache]

Restart apache daemon:

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

Selesai, refresh halaman yang tadinya tidak bisa di buka (Not Found).
Loncat ke Atas ↑