apache2, php5, phpmyadmin

So, I solved at least one of my nagging headaches. I ran into a brick wall trying to get phpmyadmin up and running on ubuntu.

The Setup

Ubuntu 7.04, Apache2.2, MySQL, PHP5, running on a VPS from slicehost.com. All installed from apt-get, all working fine. Gave MySQL root user a password, the login to MySQL from the command line works just fine.

Installed phpmyadmin from apt-get, everything’s cool, it sets up the appropriate symbolic links so that www.MYURL.com/phpmyadmin points the browser to the phpmyadmin login page.

The Problem

I go to www.MYURL.com/phpmyadmin, and I get the login page. I enter the MySQL user root + password. Sometimes it logs in. Sometimes it bounces me back to the login with no warning. Sometimes it redirects me to the login page and says “root”@”localhost” not permitted [password=YES]. Sometimes it’s the same warning, but with [password=NO], even though I have entered a password.

Sometimes, if I click login 3 or 4 times after it keeps redirecting me, I actually get let in to phpmyadmin. As soon as I do anything requiring privileges (create new user, create new database), I get bounced back to the login page again.

Troubleshooting

Here’s what I tried to fix it

1) Tried all browsers at my disposal (OSX: Firefox, Opera, Safari, Camino; Windows: IE6, IE7). Same problem with all.

2) Assumed it was a cookie issue. Dumped all cache and cookies on my browser, reset safari, relaunched apache2, tried again. Same problem.

3) Same as step 2, but also did a shutdown -r of the entire server, just in case. Old habits die hard.

3) Sacrificed male goat by the light of a full moon. Sticky fingers, but still no persistent login.

Nothing worked.

The Solution

Turns out, in order to run phpmyadmin with php5 on a 64bit ubuntu machine, you need to have a little package installed called php5-mcrypt. It’s not listed in the dependencies, so if you just use apt-get, it gets left behind.

sudo apt-get install php5-mcrypt

the conclusion

aaaarrrrrgh.

Let the record show that it was at this precise moment in time that I switched from Ubuntu to Debian for my server needs. If I wanted to shed this much stomach bile on figuring out required dependencies, I would strap on a pocket-protector and go join the gentoo geeks. At least then I know it’s up to me.

2 thoughts on “apache2, php5, phpmyadmin

  1. I hate to break it to you but pretty much all of Gentoo’s strengths lie in it’s Package management system (Portage) which has the best system every for finding/grabbing dependencies.

    Of course it’s not perfect: it can’t remove dependencies when you remove the app they depend on, which makes removing software a touch painful and every so often.

    But gotta take the good with the bad.

Leave a Reply