LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-11-2011, 01:15 AM   #1
mowestusa
Member
 
Registered: May 2005
Distribution: Bodhi
Posts: 44
Blog Entries: 11

Rep: Reputation: 23
New Install of Phpmyadmin on Ubuntu 11.04 won't accept log in


I seem to have a working install of Ubuntu Server 11.04 (Samba running without issue on same machine). The lamp stack seems to be running fine as well. (Apache index.html page works, phpinfo() works, mysql works from the mysql command line.)

I have installed phpmyadmin. After install I had to reboot the server (restarting Apache still said error in PHP and couldn't start). After reboot, the welcome screen comes up, but using root with password doesn't work. Using an admin user that I created with privileges in *.* doesn't work either. There are no errors on the screen, it just simply loops back to the beginning screen.

There is an error in apache2 error.log saying that it can't find the page http://server/phpmyadmin/ind" which seems strange because you can bring up the welcome page, you just can't log into phpmyadmin with any of the created users that I made from the mysql commandline.

I don't see any php errors in syslog (which is where the php errors are being directed) except a notice that CRON is running for some purpose for PHP.

I'm a newbie server admin trying to set up a server for a small office to create an office Intranet for employees to use.
 
Old 06-11-2011, 04:46 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

How did you configure the config.inc.php?
Also if you want php errors to appear on screen, use:
Code:
display_errors = On
in php.ini

Regards
 
Old 06-11-2011, 12:31 PM   #3
mowestusa
Member
 
Registered: May 2005
Distribution: Bodhi
Posts: 44

Original Poster
Blog Entries: 11

Rep: Reputation: 23
bathory,
Good question. I have copied the config.inc.php file below. I also made the change you suggested in the php.ini file it was off before, now it is "On". Will this give me php errors right in the browser window? I'm concerned that I have something messed up in the configuration of phpmyadmin. When I first installed it in Ubuntu it asked if I wanted to configure it using dbconfig-common, I chose yes because it was the suggested default. Then I read a "How To" LAMP install for Ubuntu 11.04 and they suggested not choosing yes for that option. So I did an apt-get purge mysql-server and phpmyadmin (since it wasn't working at this point and I was having the same issues as described above. Did an apt-get install mysql-server and phpmyadmin and noticed that I didn't have to give mysql-server a root password like I did during the first install (used the one from the first install). Phpmyadmin didn't ask me anything about passwords and users like it did during the first install, but I noticed that phpmyadmin did not create a phpmyadmin user or database when it installed like it did the first time. So I created a user "admin" granting privileges on *.* , but I still can't log into phpmyadmin.

I am wondering if my PHP install is working right since I have tried installing tikiwiki and it stalls during the install after you make a database connection and put into the install screen your user name and password to the database it dumps you back at the beginning of the install and never completes the installation. I thought that perhaps it was a database issue that is why I have been trying to install phpmyadmin, but perhaps I have something else wrong.

Code:
<?php
/**
 * Debian local configuration file
 *
 * This file overrides the settings made by phpMyAdmin interactive setup
 * utility.
 *
 * For example configuration see
 *   /usr/share/doc/phpmyadmin/examples/config.sample.inc.php
 * or
 *   /usr/share/doc/phpmyadmin/examples/config.manyhosts.inc.php
 *
 * NOTE: do not add security sensitive data to this file (like passwords)
 * unless you really know what you're doing. If you do, any user that can
 * run PHP or CGI on your webserver will be able to read them. If you still
 * want to do this, make sure to properly secure the access to this file
 * (also on the filesystem level).
 */

/**
 * Server(s) configuration
 */
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;

/**
 * Read configuration from dbconfig-common
 * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin
 */
if (is_readable('/etc/phpmyadmin/config-db.php')) {
    require('/etc/phpmyadmin/config-db.php');
} else {
    error_log('phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php.'
        . ' Check group www-data has read access.');
}

/* Configure according to dbconfig-common if enabled */
if (!empty($dbname)) {
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    if (empty($dbserver)) $dbserver = 'localhost';
    $cfg['Servers'][$i]['host'] = $dbserver;

    if (!empty($dbport) || $dbserver != 'localhost') {
        $cfg['Servers'][$i]['connect_type'] = 'tcp';
        $cfg['Servers'][$i]['port'] = $dbport;
    }
    //$cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    /* Optional: User for advanced features */
    $cfg['Servers'][$i]['controluser'] = $dbuser;
    $cfg['Servers'][$i]['controlpass'] = $dbpass;
    /* Optional: Advanced phpMyAdmin features */
    $cfg['Servers'][$i]['pmadb'] = $dbname;
    $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma_relation';
    $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    $cfg['Servers'][$i]['tracking'] = 'pma_tracking';

    /* Uncomment the following to enable logging in to passwordless accounts,
     * after taking note of the associated security risks. */
    // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

    /* Advance to next server for rest of config */
    $i++;
}

/* Authentication type */
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
//$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
//$cfg['Servers'][$i]['extension'] = 'mysql';
/* Optional: User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Optional: Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/* Uncomment the following to enable logging in to passwordless accounts,
 * after taking note of the associated security risks. */
// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

/*
 * End of servers configuration
 */
/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
 
Old 06-11-2011, 12:40 PM   #4
mowestusa
Member
 
Registered: May 2005
Distribution: Bodhi
Posts: 44

Original Poster
Blog Entries: 11

Rep: Reputation: 23
I just found the following strange error that relates to PHP in the apache2 error.log:

Code:
[Sat Jun 11 11:12:44 2011] [error] [client 192.168.1.114] File does not exist: /var/www/favicon.ico
[Sat Jun 11 11:13:19 2011] [error] [client 192.168.1.114] File does not exist: /usr/share/phpmyadmin/index
[Sat Jun 11 11:13:19 2011] [error] [client 192.168.1.114] File does not exist: /var/www/favicon.ico
[Sat Jun 11 11:13:20 2011] [error] [client 192.168.1.114] File does not exist: /usr/share/phpmyadmin/inde
[Sat Jun 11 11:13:20 2011] [error] [client 192.168.1.114] File does not exist: /var/www/favicon.ico
[Sat Jun 11 11:28:59 2011] [notice] caught SIGTERM, shutting down
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
[Sat Jun 11 11:29:30 2011] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu7.2 with Suhosin-Patch configured -- resuming normal operations
[Sat Jun 11 11:32:52 2011] [error] [client 192.168.1.114] File does not exist: /var/www/favicon.ico
You see a couple of times the "File does not exist: /usr/share/phpmyadmin/index" or "inde" which seems to coincide with when I see the welcome screen for phpmyadmin and try to log in. Then after the reboot notice the strange error messages about PHP, I don't know what they mean.
 
Old 06-11-2011, 01:34 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Quote:
[Sat Jun 11 11:13:19 2011] [error] [client 192.168.1.114] File does not exist: /usr/share/phpmyadmin/index
All these logs are strange. Seems like something went wrong during phpMyadmin installation. The installer should create an Alias in apache like:
Code:
Alias /phpmyadmin/ /usr/share/phpmyadmin
Anyway check these instructions about installing the whole stuff in ubuntu and see what went wrong

Regards
 
Old 06-11-2011, 06:20 PM   #6
mowestusa
Member
 
Registered: May 2005
Distribution: Bodhi
Posts: 44

Original Poster
Blog Entries: 11

Rep: Reputation: 23
bathory,
That is the tutorial that I followed except that I used apt-get instead of aptitude which should not have made a difference, I saw all of the same options as were spoken about in the How-To. There is actually an updated on for Ubuntu 11.04 with the same instructions. I got no errors when I followed that How-To and all of the checks that they suggest in the How-To turned out like anticipated, except that I am not able to log into phpmyadmin with "root" or with "admin" the user that I created. Does a special database need to be created first before you can log into phpmyadmin?

The set up did create an alias in /etc/apache2/conf.d/phpmyadmin.conf

Except it did not include the one backslash in your example it had:

Code:
Alias /phpmyadmin /usr/share/phpmyadmin
 
Old 06-12-2011, 04:07 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

The backslash was a mistake. Anyway I don't see some other error, so cannot tell what's wrong.
You can uninstall the phpmyadmin package and download the latest archive from their site.
Extract it under /var/www, rename the directory to something easy for you to remember, but difficult for others to guess, e.g
Code:
mv /var/www/phpMyAdmin-X.Y.Z /var/www/mowestusa
chown -R www-data:www-data /var/www/mowestusa
Then rename config.sample.inc.php to config.inc.php, open it with you favorite editor, find the "blowfish_secret" line and add some random characters, like:
Code:
$cfg['blowfish_secret'] = 'sdfdfsghjhjgdarxvtvmjjh'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Visit http://localhost/mowestusa and hopefully you should be fine

Regards
 
Old 09-15-2011, 12:04 PM   #8
elundmark
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
Always use localhost/phpmyadmin to access phpmyadmin on a default (x)Ubuntu installation.
I used dev . com / phpmyadmin and had this problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] phpMyAdmin can not log. But the URL works. linuxlover.chaitanya Linux - Software 7 06-03-2011 02:27 PM
Sendmail won't accept mail Zmyrgel Linux - Server 8 05-25-2010 04:12 AM
PHPMYADMIN Won't Load Up sefarlow Linux - Server 0 06-09-2009 09:01 PM
x11 won't accept connections jbeiter Red Hat 1 12-15-2005 03:41 AM
proFTPd won't accept logins Harry Hunt Linux - Software 4 08-18-2005 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration