php - Cannot load or save configuration -
i cannot load phpmyadmin message. i've tried creating config folder , config.inc.php
file. when ĺog on localhost/phpmyadmin/setup/
still gives me message.
error message: "cannot load or save configuration please create web server writable folder config in phpmyadmin top level directory described in documentation. otherwise able download or display it."
i have given www/html
folder full rights.
how fix this?
thanks in advance!
i have had similar issue on ubuntu 16.04. made research , in end found resolution of issue. maybe case solution else.
background: security reasons have non privileged user , group apache:apache (sudo groupadd apache | useradd -g apache apache
). preset directives (user apache; group apache
) in /etc/apache2/apache2.conf
. user apache:apache
owns apache2 main directory (sudo chown -r apache:apache /etc/apache2
) , other files, example: sudo chown -r apache:apache/etc/phpmyadmin/htpasswd.setup
in manual: http://docs.phpmyadmin.net/en/latest/setup.html - found that...
debian , ubuntu have changed way how setup enabled , disabled, in way single command has executed either of these.
to allow editing configuration invoke:
/usr/sbin/pma-configure
to block editing configuration invoke:
/usr/sbin/pma-secure
note! in content of 2 files listed above talk /var/lib/phpmyadmin/config.inc.php
instead of /etc/phpmyadmin/config/config.inc.php
. it key.
in case modified content of these scripts (see below) , can use localhost/phpmyadmin/setup properly.
/usr/sbin/pma-configure:
#!/bin/sh echo "unsecuring phpmyadmin installation..." echo "setup script can write configuration file." echo echo "do not forget run /usr/sbin/pma-secure after configuring," echo "otherwise installation might @ risk of attack." sudo sudo chown -r apache:apache /var/lib/phpmyadmin/config.inc.php chmod 0660 /var/lib/phpmyadmin/config.inc.php
/usr/sbin/pma-secure:
#!/bin/sh echo "securing phpmyadmin installation..." echo "setup script won't able write configuration." sudo sudo chown -r root:root /var/lib/phpmyadmin/config.inc.php chmod 0640 /var/lib/phpmyadmin/config.inc.php
Comments
Post a Comment