2

I have tried to install and/or updated phpMyAdmin three times under a Linux Amazon AMI image with Apache server in Amazon EC2, and I don't get to have the last version installed.

This is what I have done to install version 4.1.14:

  1. cd /var/www/html
  2. wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.1.14/phpMyAdmin-4.1.14-all-languages.tar.gz
  3. tar -xzvf phpMyAdmin-4.1.14-all-languages.tar.gz -C /var/www/html
  4. mv phpMyAdmin-4.1.14-all-languages phpmyadmin
  5. rm -rf phpMyAdmin-4.1.14-all-languages.tar.gz
  6. adduser phpmyadmin
  7. passwd phpmyadmin
  8. chown -R phpmyadmin.apache phpmyadmin/
  9. cd phpmyadmin
  10. mkdir config
  11. chmod o+rw config
  12. sudo cp config.sample.inc.php config/config.inc.php

    Note: Before re-installing I copy the config.inc.php in a directory,and after the installation I restore it from /config.inc.php config/config.inc.php) sudo chmod o+w config/config.inc.php service

  13. httpd restart

When opening http:///phpmyadmin/, I'm always getting: Version 2.11.11.3 and an old style main page of phpmyadmin.

How can I update phpMyAdmin to the last version (in this case, 4.1.14, last stable version)?

5
  • Did you clear your browser cache? Did you try from different browser? Commented May 9, 2014 at 1:20
  • Why do you think you need phpmyadmin? Commented May 9, 2014 at 1:36
  • I cleared the browser cache. JakeGould: I also have tried in Chrome, Firefox and IE. I don't think I need phpmyadmin, I just like it. Commented May 9, 2014 at 2:17
  • @villamejia, try to rename phpmyadmin directory to another name (for example php-my-admin), then try to go http://your.web.site/php-my-admin/. Commented May 9, 2014 at 2:22
  • @JakeGould. The only reference I see in Apache config is in the file /etc/httpd/conf.d/phpmyadmin.conf: <Directory "/usr/share/phpmyadmin">Allow from 127.0.0.1</Directory> Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin /usr/share/phpmyadmin Alias /mysqladmin /usr/share/phpmyadmin But even commenting all the lines in this file, and clearing my browser cache, nothing seems to change. Commented May 9, 2014 at 2:30

1 Answer 1

1

The original poster shared this Apache config this in the comments:

<Directory "/usr/share/phpmyadmin"> # Order Deny,Allow # Deny from all Allow from 127.0.0.1 </Directory> Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin /usr/share/phpmyadmin Alias /mysqladmin /usr/share/phpmyadmin 

That’s your problem. You are trying to install phpMyAdmin manually in the main /var/www/html directory. But this Apache config has three aliases that would override that. The phpMyAdmin in /usr/share/phpmyadmin is actually the standard RPM package install location.

So if you want to you can just comment out those Alias lines like this. Heck, comment out the <Directory> stuff as well:

# <Directory "/usr/share/phpmyadmin"> # Order Deny,Allow # Deny from all Allow from 127.0.0.1 # </Directory> # Alias /phpmyadmin /usr/share/phpmyadmin # Alias /phpMyAdmin /usr/share/phpmyadmin # Alias /mysqladmin /usr/share/phpmyadmin 

Restart Apache and then go to your URL of:

http://the_url_of_your_site/phpmyadmin/ 

And now the upgraded version you installed should load as expected.

The other alternative is to rename /var/www/html/phpmyadmin to something like /var/www/html/phpmyadmin4 to get around that Alias. But you don’t need the Alias if you are installing directly into the web root of your server.

EDIT: And if you want to upgrade the version of phpmyadmin in /usr/share, then keep those Alias directives in place but use the following modified instructions. Please double-check these before running:

  1. cd /usr/share
  2. sudo mv phpmyadmin phpmyadmin-OLD NOTE: This is a backup of your old phpmyadmin just in case. Feel free to delete this phpmyadmin-OLD when you are sure you are in good shape with the new phpmyadmin.
  3. sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.9.1/phpMyAdmin-4.9.1-all-languages.tar.gz
  4. sudo tar -xzvf phpMyAdmin-4.9.1-all-languages.tar.gz -C /usr/share
  5. sudo mv phpMyAdmin-4.9.1-all-languages phpmyadmin
  6. sudo rm phpMyAdmin-4.9.1-all-languages.tar.gz
  7. sudo adduser phpmyadmin
  8. sudo passwd phpmyadmin
  9. sudo chown -R phpmyadmin:apache phpmyadmin/
  10. cd phpmyadmin
  11. mkdir config
  12. chmod o+rw config
  13. sudo cp config.sample.inc.php config/config.inc.php NOTE: Before re-installing I copy the config.inc.php in a directory,and after the installation I restore it from /config.inc.php config/config.inc.php) sudo chmod o+w config/config.inc.php service
  14. sudo httpd restart

Just please note, there are a few things that are “wonky” but not dangerous about your instructions. For example, there was no sudo set before many commands. Maybe that was because it was in /var/www/html but I added sudo. Also your chown was 100% wrong with chown -R phpmyadmin.apache when that should be chown -R phpmyadmin:apache.

2
  • Understood. So for solving this issue, I will delete the /var/www/html/. What do I have to do to update phpmyadmin in /usr/share/phpmyadmin? Commented May 9, 2014 at 2:38
  • 1
    I had not realized these two places where phpmyadmin could be installed. As the answer says, /usr/share is the standard RPM package install location; the other /var/www/http/ is the location where the user can install it manually without using YUM. Now, when you try to update phpmyadmin using YUM, it says that no updates are available. I think this is the reason why JakeGould proposes a manual installation in /user/share. Commented May 9, 2014 at 3:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.