简体   繁体   中英

Warning in ./libraries/classes/Config.php#1681 mkdir(): Permission denied

I just updated php and phpmyamdin and got these errors.

Warning in ./libraries/classes/Config.php#1681
 mkdir(): Permission denied

Backtrace

Config.php#1681: mkdir(
string '/usr/share/webapps/phpMyAdmin/tmp/twig',
integer 504,
boolean true,
)
Template.php#60: PhpMyAdmin\Config->getTempDir(string 'twig')
Theme.php#103: PhpMyAdmin\Template->__construct()
Theme.php#174: PhpMyAdmin\Theme->__construct()
ThemeManager.php#306: PhpMyAdmin\Theme::load(
string './themes/metro',
string '/usr/share/webapps/phpMyAdmin/./themes/metro/',
)
ThemeManager.php#89: PhpMyAdmin\ThemeManager->loadThemes()
ThemeManager.php#129: PhpMyAdmin\ThemeManager->__construct()
ThemeManager.php#397: PhpMyAdmin\ThemeManager::getInstance()
common.inc.php#315: PhpMyAdmin\ThemeManager::initializeTheme()
index.php#23: require_once(./libraries/common.inc.php)

Warning in ./libraries/classes/Config.php#1681
 mkdir(): Permission denied

Backtrace

Config.php#1681: mkdir(
string '/usr/share/webapps/phpMyAdmin/tmp/twig',
integer 504,
boolean true,
)
HomeController.php#479: PhpMyAdmin\Config->getTempDir(string 'twig')
HomeController.php#254: PhpMyAdmin\Controllers\HomeController->checkRequirements()
index.php#119: PhpMyAdmin\Controllers\HomeController->index()

The $cfg['TempDir'] (/usr/share/webapps/phpMyAdmin/tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

Warning in ./libraries/classes/Config.php#1681
 mkdir(): Permission denied

Backtrace

Config.php#1681: mkdir(
string '/usr/share/webapps/phpMyAdmin/tmp/twig',
integer 504,
boolean true,
)
Template.php#60: PhpMyAdmin\Config->getTempDir(string 'twig')
Theme.php#103: PhpMyAdmin\Template->__construct()
Theme.php#174: PhpMyAdmin\Theme->__construct()
ThemeManager.php#306: PhpMyAdmin\Theme::load(
string './themes/metro',
string '/usr/share/webapps/phpMyAdmin/./themes/metro/',
)
ThemeManager.php#89: PhpMyAdmin\ThemeManager->loadThemes()
ThemeManager.php#129: PhpMyAdmin\ThemeManager->__construct()
ThemeManager.php#397: PhpMyAdmin\ThemeManager::getInstance()
common.inc.php#315: PhpMyAdmin\ThemeManager::initializeTheme()
version_check.php#20: require_once(./libraries/common.inc.php)

I've tried making the directory and it didn't work and changing the permissions to 777 is a terrible fix and I don't wanna do that. Also I am on linux Manjaro gnome

Fix it with this simple fix. https://stackoverflow.com/a/66016297/11251368

Also how do I tag as anwsered?

I made this directory: /usr/share/webapps/phpMyAdmin/tmp/twig and worked for me

I solved this problem by giving permission 777 (rwx) to tmp directory:

  1. go to tmp:

cd /var/lib/phpmyadmin/tmp

or as you have here:

cd /usr/share/webapps/phpMyAdmin/tmp

  1. and do this:

sudo chmod 777.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM