安裝完的 phpMyAdmin 在首頁都會顯示.
The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
無法存取 $cfg['TempDir'] (./tmp/)。phpMyAdmin 會無法快取模版,並且會因為此原因變得很慢。
測試環境為 CentOS 8 x86_64
主要 phpMyAdmin 會使用一個資料夾當作暫存資料的快取,不設定也可以(會影響 phpMyAdmin 效能),照下面的方式來設定.
[root@localhost ~]# cd /var/www/html/phpMyAdmin [root@localhost phpMyAdmin]# mkdir tmp [root@localhost phpMyAdmin]# chmod 777 tmp
還需在 config.inc.php 加入以下的設定.
[root@localhost phpMyAdmin]# vi config.inc.php $cfg['TempDir'] = 'tmp';
請重新登入 phpMyAdmin 以載入新設定並使其生效.
如果還不行請先把 SELinux disable 試試看 (預設為 enforcing ).我們只能調整開機後不要啟動 selinux 功能.所以必須重新開關機.
[root@localhost ~]# vi /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled #SELINUX=enforcing # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted [root@localhost ~]# reboot
[root@localhost ~]# sestatus SELinux status: disabled
沒有解決問題,試試搜尋本站其他內容