[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Running phpmyadmin in debian

Posted on 2009-02-09
26
Medium Priority
?
1,576 Views
Last Modified: 2013-12-06
Hi,

I have installed phpmyadmin through command line in debian.
 But when i try to access it through following url: http://67.223.233.252/phpmyadmin/
it shows following error:You don't have permission to access /phpmyadmin/ on this server.
Apache/2.2.3 (Debian) Server at 67.223.233.252 Port 80

Please guide me as i am newbie.

Thanks in advance,
0
Comment
Question by:iilv
  • 13
  • 12
26 Comments
 
LVL 29

Expert Comment

by:fosiul01
ID: 23588279
HI yah

where did you put the phpmyadmin ??

can you show me path and permission by doing

ls command
0
 

Author Comment

by:iilv
ID: 23588508
Hi,
Phpmyadmin can be found in the following directories:

/usr/share/phpmyadmin with following drwxrwxrwx   permission. I have also phpmyadmin shortcut in var/www/.



Thanks
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23588520
shortcut would not work, and

you are just looking at permission for phpmyadmin directory wh ich is 777

but before that directory there us /usr/share so you need to check permission on those aswell

best option i would of say,

copy the phpmyadmin directory and put in in /var/www/html    -: Redhat

but for debain , do you have html in www folder, if not then i guess you will have to pu www, but if there is /var/www/html then put in on html file

it will work
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

Author Comment

by:iilv
ID: 23588689
Hi,

I have checked the permission on  /usr/share folder and copied phpmyadmin and pasted in the /var/www directory but it opens window for downloading file.

I have attached the image for your reference.

Please help


Thanks
phpmyadmin.png
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23588695
Ok do you have php installed on this mechine ??

can you open a php page ??
0
 

Author Comment

by:iilv
ID: 23588726
Hi,

Yes i have php installed through command line it is in /usr/share/php5
but after checking php page is not opening.
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23588739
so if you try to open a php page like this

http://youripc/index.php

if this dows not work then you didnot configure php properly, and withotu the php, phpmyadmin would not work ..
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23588748
have a look htis one for how to setup php mysql in debain

http://www.howtoforge.com/ubuntu_debian_lamp_server
0
 

Author Comment

by:iilv
ID: 23588877
Hi,

When i try to run the php page through command line it displays the desired result  as i have installed it through command line command apt-get install php5-cli.

May be i have to install for windows version also.


Please guide


Thanks
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23588900
you should runt his

apt-get install apache2 php5 libapache2-mod-php5

since you have apache2 already install so

apt-get install php5 libapache2-mod-php5
0
 

Author Comment

by:iilv
ID: 23589005
Hi,

Thanks for your help php is now working but phpmyadmin is stiil displaying errors.

I have attached screenshots for the same.

Please guide


Thanks
phpmyadmin-new.png
phpmyadmin-new2.png
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23589023
good, now

ok show me the output of

config.inc.php from phpmyadmin directory ..
0
 

Author Comment

by:iilv
ID: 23589056
Hi,

I have attached the code of  /var/lib/phpmyadmin/config.inc.php


Pls help


Thanks
<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 2.8.0.1 setup script by Michal ihaY <michal@cihar.com>
 * Version: $Id: setup.php,v 1.23.2.2 2006/02/06 11:01:48 nijel Exp $
 * Date: Sun, 08 Feb 2009 21:41:33 -0800
 */
 
/* Servers configuration */
$i = 0;
 
/* Server localhost (cookie) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
 
/* End of servers configuration */
 
$cfg['blowfish_secret'] = 'dEMeXygQYjBmZ1vuqNDXzMnA';
?>

Open in new window

0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23589071
why your phpmyadmin in
/var/lib/phpmyadmin/config.inc.php ??

its should be on /var/www/phpmyadmin  [ as you mentioned before]
0
 

Author Comment

by:iilv
ID: 23589112
Hi, this is the code in /var/www/phpmyadmin/config.inc.php

Please help


Thanks
<?php
/**
 * Please, do not edit this file. The configuration file for Debian system
 * is located at /etc/phpmyadmin directory.
 */
 
// Load secret generated on postinst
include('/etc/phpmyadmin/blowfish_secret.inc.php');
 
// Load autoconf local config
include('config/config.inc.php');
 
// Load user's local config
include('/etc/phpmyadmin/config.inc.php');
 
// Set the default server if there is no defined
if (!isset($cfg['Servers'])) {
    $cfg['Servers'][1]['host'] = 'localhost';
}
 
// Set the default values for $cfg['Servers'] entries
for ($i=1; (!empty($cfg['Servers'][$i]['host']) || (isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++) {
    if (!isset($cfg['Servers'][$i]['host'])) {
        $cfg['Servers'][$i]['host'] = '';
    }
    if (!isset($cfg['Servers'][$i]['port'])) {
        $cfg['Servers'][$i]['port'] = '';
    }
    if (!isset($cfg['Servers'][$i]['socket'])) {
        $cfg['Servers'][$i]['socket'] = '';
    }
    if (!isset($cfg['Servers'][$i]['connect_type'])) {
        $cfg['Servers'][$i]['connect_type'] = 'tcp';
    }
    if (!isset($cfg['Servers'][$i]['extension'])) {
        $cfg['Servers'][$i]['extension'] = 'mysql';
    }
    if (!isset($cfg['Servers'][$i]['compress'])) {
        $cfg['Servers'][$i]['compress'] = FALSE;
    }
    if (!isset($cfg['Servers'][$i]['controluser'])) {
        $cfg['Servers'][$i]['controluser'] = '';
    }
    if (!isset($cfg['Servers'][$i]['controlpass'])) {
        $cfg['Servers'][$i]['controlpass'] = '';
    }
    if (!isset($cfg['Servers'][$i]['auth_type'])) {
        $cfg['Servers'][$i]['auth_type']  = 'cookie';
    }
    if (!isset($cfg['Servers'][$i]['user'])) {
        $cfg['Servers'][$i]['user'] = 'root';
    }
    if (!isset($cfg['Servers'][$i]['password'])) {
        $cfg['Servers'][$i]['password'] = '';
    }
    if (!isset($cfg['Servers'][$i]['only_db'])) {
        $cfg['Servers'][$i]['only_db'] = '';
    }
    if (!isset($cfg['Servers'][$i]['verbose'])) {
        $cfg['Servers'][$i]['verbose'] = '';
    }
    if (!isset($cfg['Servers'][$i]['pmadb'])) {
        $cfg['Servers'][$i]['pmadb'] = '';
    }
    if (!isset($cfg['Servers'][$i]['bookmarktable'])) {
        $cfg['Servers'][$i]['bookmarktable'] = '';
    }
    if (!isset($cfg['Servers'][$i]['relation'])) {
        $cfg['Servers'][$i]['relation'] = '';
    }
    if (!isset($cfg['Servers'][$i]['table_info'])) {
        $cfg['Servers'][$i]['table_info'] = '';
    }
    if (!isset($cfg['Servers'][$i]['table_coords'])) {
        $cfg['Servers'][$i]['table_coords'] = '';
    }
    if (!isset($cfg['Servers'][$i]['pdf_pages'])) {
        $cfg['Servers'][$i]['pdf_pages'] = '';
    }
    if (!isset($cfg['Servers'][$i]['column_info'])) {
        $cfg['Servers'][$i]['column_info'] = '';
    }
    if (!isset($cfg['Servers'][$i]['history'])) {
        $cfg['Servers'][$i]['history'] = '';
    }
    if (!isset($cfg['Servers'][$i]['verbose_check'])) {
        $cfg['Servers'][$i]['verbose_check'] = TRUE;
    }
    if (!isset($cfg['Servers'][$i]['AllowRoot'])) {
        $cfg['Servers'][$i]['AllowRoot'] = TRUE;
    }
    if (!isset($cfg['Servers'][$i]['AllowDeny'])) {
        $cfg['Servers'][$i]['AllowDeny'] = array ('order' => '',
                                                  'rules' => array());
    }
}
 
?>

Open in new window

0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23589136
this is wired, I never seen this kind of config.inc.php!!

from where did you download this phpmyadmin ??

also can you show me the output of

/etc/phpmyadmin/config.inc.php'
0
 

Author Comment

by:iilv
ID: 23589279
Hi, this is the code of

/etc/phpmyadmin/config.inc.php and we have just executed the command

apt-get install phpmyadmin


Thanks,

<?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.default.php.gz
 *
 * 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++;
 
// Uncomment to override the default configuration
//$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
//$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
//$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
//$cfg['Servers'][$i]['connect_type']  = 'socket';    // How to connect to MySQL server ('tcp' or 'socket')
//$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
//$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
//                                                    // (requires PHP >= 4.3.0)
//$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
//                                                    // (this user must have read-only
//$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
//                                                    // and "mysql/db" tables).
//                                                    // The controluser is also
//                                                    // used for all relational
//                                                    // features (pmadb)
//$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
//$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
//$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
//                                                    // with 'config' auth_type)
//$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only
//                                                    // this db is displayed in left frame
//                                                    // It may also be an array of db-names, where sorting order is relevant.
//$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname
//
//$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin';// Database used for Relation, Bookmark and PDF Features
//                                                    // (see scripts/create_tables.sql)
//                                                    //   - leave blank for no support
//                                                    //     DEFAULT: 'phpmyadmin'
//$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';// Bookmark table
//                                                    //   - leave blank for no bookmark support
//                                                    //     DEFAULT: 'pma_bookmark'
//$cfg['Servers'][$i]['relation']      = 'pma_relation';// table to describe the relation between links (see doc)
//                                                    //   - leave blank for no relation-links support
//                                                    //     DEFAULT: 'pma_relation'
//$cfg['Servers'][$i]['table_info']    = 'pma_table_info';// table to describe the display fields
//                                                    //   - leave blank for no display fields support
//                                                    //     DEFAULT: 'pma_table_info'
//$cfg['Servers'][$i]['table_coords']  = 'pma_table_coords';// table to describe the tables position for the PDF schema
//                                                    //   - leave blank for no PDF schema support
//                                                    //     DEFAULT: 'pma_table_coords'
//$cfg['Servers'][$i]['pdf_pages']     = 'pma_pdf_pages';// table to describe pages of relationpdf
//                                                    //   - leave blank if you don't want to use this
//                                                    //     DEFAULT: 'pma_pdf_pages'
//$cfg['Servers'][$i]['column_info']   = 'pma_column_info';// table to store column information
//                                                    //   - leave blank for no column comments/mime types
//                                                    //     DEFAULT: 'pma_column_info'
//$cfg['Servers'][$i]['history']       = 'pma_history';// table to store SQL history
//                                                    //   - leave blank for no SQL query history
//                                                    //     DEFAULT: 'pma_history'
//$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
//                                                    // are up to date. This prevents compatibility
//                                                    // checks and thereby increases performance.
//$cfg['Servers'][$i]['AllowRoot']     = TRUE;        // whether to allow root login
//$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
//                                     = '';
//$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
//                                     = array();
 
?>

Open in new window

0
 

Author Comment

by:iilv
ID: 23589349
Hi,

I have attached the code above.

Please guide me on this


Thanks
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23589350
hi alow me 1 and half hour, i will have to go out

after back i will look in to this ..
0
 

Author Comment

by:iilv
ID: 23589358
ok

thanks
0
 
LVL 6

Expert Comment

by:dzamfir
ID: 23589449
iilv:

Read this, and see if helps. If you say you've installed via apt-get, everything should be fine, except those Warning messages:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Installation/Q_23083561.html
0
 
LVL 29

Accepted Solution

by:
fosiul01 earned 1500 total points
ID: 23589930
Canot modify the header information: I have seen this problem while doing programming with session,

but while trying to access phpmyadmin, it should be happended.

if you look at my config.inc.php

$cfg['Servers'][$i]['auth_type'] = 'config'; /*cookie
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'xxxx';
$cfg['Servers'][$i]['connect_type'] = 'tcp';  ---------

but your one is reading as soket ....


Can you try a alternative way [ easy way ]??
download phpmyadmin from here
http://www.phpmyadmin.net/home_page/downloads.php

phpMyAdmin-3.1.2-english.tar.gz

unzip this one at /var/www/
folder
then i will tell tell you to modify config.inc.php as General

0
 

Author Comment

by:iilv
ID: 23597488
Hi,

Thanks for your help

I have downloaded phpMyAdmin-3.1.2-english.tar.gz and unzip this one at /var/www
but when i try to login it shows following errors.

I have attached screenshot for the same. Please guide me


Thanks
phpmyadminlogin.png
phpmyadmin2.png
phpmyadmin3.png
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23598394
after instaling php5-mcrypt, did you restart apache ??
0
 

Author Comment

by:iilv
ID: 23598413
Hi,

yes i have executed following command /etc/init.d# apache2 restart
Please guide


Thanks
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23601553
Since your problem has been solved, you should of close this question..
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Users are often faced with high disk consumption without really knowing where the largest amount of data resides. Disk Usage Analyzer (aka Baobab) is is a graphical, menu-driven application to analyse disk usage in any Gnome environment and can e…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Screencast - Getting to Know the Pipeline
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question