Page 1 of 2
PHPMyAdmin no longer working
Posted: Mon Dec 15, 2014 9:50 am
by Tralapo
Hello, I was following this guide to secure phpmyadmin:
viewtopic.php?f=10&t=5271&p=16831
I changed the /phpmyadmin alias like stated in that guide and forced the use of SSL in the config.inc.php. The other things in the guide I didn't do.
The new alias is indeed working and it's indeed sending me to the SSL version, but then I get an empty white page. It just does nothing and the page stays blank, also after several refreshes.
When I look at my errorlogs, I see:
Code: Select all
phpmyadmin: Failed to load /var/lib/phpmyadmin/blowfish_secret.inc.php Check group www-data has read access and open_basedir restrictions.
phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.
phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php Check group www-data has read access and open_basedir restrictions.
PHP Fatal error: require_once(): Failed opening required './libraries/php-gettext/gettext.inc' (include_path='.') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 395
I tried the following to fix it because that seemed to be te problem. But after that, I keep getting the white page and the same errors.
Code: Select all
sudo chown -R www-data:www-data /usr/share/phpmyadmin
sudo chown -R www-data:www-data /var/lib/phpmyadmin
sudo chown -R www-data:www-data /etc/phpmyadmin
What am I doing wrong, did I miss something? Anybody had this before and know how to do it? I find it strange it just happens. I also tried re-installing PHPMyAdmin and downloading the config files from Vesta, but I keep getting that error?
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 4:30 pm
by Tralapo
Nobody?
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 6:09 pm
by saosangmo
Did you care uppercase letters when use phpMyAdmin string?
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 6:11 pm
by Tralapo
saosangmo wrote:Did you care uppercase letters when use phpMyAdmin string?
What do you mean? In Ubuntu none of the phpmyadmin folders uses uppercase letters.
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 6:23 pm
by saosangmo
But PHP cares uppercase and lowercase letters.
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 6:28 pm
by Tralapo
saosangmo wrote:But PHP cares uppercase and lowercase letters.
I don't know where you're going?
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 7:02 pm
by saosangmo
Do you review and try to edit step 2,3 in that post?
phpMyAdmin is written in PHP language and I think you have some missing typo.
Code: Select all
phpmyadmin: Failed to load /var/lib/phpmyadmin/blowfish_secret.inc.php Check group www-data has read access and open_basedir restrictions.
phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.
phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php Check group www-data has read access and open_basedir restrictions.
The above lines means your system try to search files in the shared system folders which PHP usually uses.
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 7:09 pm
by Tralapo
saosangmo wrote:Do you review and try to edit step 2,3 in that post?
phpMyAdmin is written in PHP language and I think you have some missing typo.
Code: Select all
phpmyadmin: Failed to load /var/lib/phpmyadmin/blowfish_secret.inc.php Check group www-data has read access and open_basedir restrictions.
phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.
phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php Check group www-data has read access and open_basedir restrictions.
The above lines means your system try to search files in the shared system folders which PHP usually uses.
I'm sorry, but I seriously don't understand what you're saying. Is it possible for you to use more words? Step 2,3??
To be clear: from the guide I linked in my first post, I only did the "Change the default /phpmyadmin alias to something like /phpmyadmin-vcn0vgu02j0239f" and "Force SSL Connection on phpmyadmin" parts,
NOT the other things, like editing /etc/apache2/conf.d/phpMyAdmin.conf
And, like I also said: I installed phpMyadmin again and downloaded the Vesta config files from the Vesta server. That didn t help and means a typo can't be the problem. Because if it was, it would have been solved by downloading the original config files again.
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 7:20 pm
by saosangmo
Could you post the content of /home/admin/conf/web/shttpd.conf file?
You MUST edit 2 files:
/etc/httpd/conf.d/phpMyAdmin.conf and /home/admin/conf/web/shttpd.conf
Before creating config.inc.php file in /usr/share/phpMyAdmin with the content
https://vipsedan.vn dell xps
Re: PHPMyAdmin no longer working
Posted: Tue Dec 16, 2014 7:34 pm
by Tralapo
saosangmo wrote:Could you post the content of /home/admin/conf/web/shttpd.conf file?
You MUST edit 2 files:
/etc/httpd/conf.d/phpMyAdmin.conf and /home/admin/conf/web/shttpd.conf
Before creating config.inc.php file in /usr/share/phpMyAdmin with the content
/home/admin/conf/web has no files. I do not host any website with the admin account.
I was wondering, in the guide I see in the other step it says:
edit /etc/httpd/conf.d/phpMyAdmin.conf (centos 6) and delete the following (see below) and save
Code: Select all
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from All
</Directory>
<Directory /usr/share/phpMyAdmin/scripts/>
Order Deny,Allow
Deny from All
Allow from All
</Directory>
I did not do that, because /etc/apache2/conf.d/phpmyadmin.conf looks completely different. It doesn't even name the same directories. Mine looks like this:
Code: Select all
Alias /mynewphpalias /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
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/$
</IfModule>
</Directory>
# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>
# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>