Menemui Pesan Error di PhpMyAdmin Setelah Upgrade?

Setelah kemarin lusa upgrade mesin, maka aplikasi database saya pun ikut terupgrade jadi versi yang lebih baik lagi. Habis upgrade saya coba jalalin phpmyadmin saya.

Screenshot from 2015-05-13 11:42:56Eng.. ing.. eng … maka muncullah pesan error

Warning in ./libraries/Util.class.php#516
file_exists(): open_basedir restriction in effect. File(doc/html/index.html) is not within the allowed path(s): (/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/)

Saya coba bertanya pada simbah, akhirnya ketemu solusinya mengubah alamat open_basedir  dalam file konfigurasi phpmyadmin. Memang, lokasi baru untuk dokumentasi tampaknya tidak dipertimbangkan.

Jadi membuka file /etc/apache2/conf-available/phpmyadmin.conf

$sudo nano /etc/apache2/conf-available/phpmyadmin.conf

dan menambahkan path ke open_basedir Online:

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php

    <IfModule mod_php5.c>
        <IfModule mod_mime.c>
            AddType application/x-httpd-php .php
        </IfModule>
        <FilesMatch ".+\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_admin_flag allow_url_fopen Off
        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
    </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authz_core.c>
        <IfModule mod_authn_file.c>
            AuthType Basic
            AuthName "phpMyAdmin Setup"
            AuthUserFile /etc/phpmyadmin/htpasswd.setup
        </IfModule>
        Require valid-user
    </IfModule>
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Require all denied
</Directory>

Ubah baris no 5 menjadi /usr/share/doc/phpmyadmin/
Kemudian restart apache:

$sudo service apache2 restart

Jreng..jreng, kesalahan telah menghilang.😀

2 thoughts on “Menemui Pesan Error di PhpMyAdmin Setelah Upgrade?

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s