Page 2 of 3

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 7:57 am
by pandabb
Yes i did sir.

Below is my file located at : /etc/phpMyAdmin/config.inc.php (centos 6.x)

Code: Select all

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 *
 * @package phpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'r*6TjsbnX4j~K)[253_*Oj6|uT=8Wm=q=N5JwO(iI'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$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';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* Storage database and tables */
// $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]['tracking'] = 'pma_tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/**
 * Defines whether a user should be displayed a "show all (records)"
 * button in browse mode or not.
 * default = false
 */
//$cfg['ShowAll'] = true;

/**
 * Number of rows displayed when browsing a result set. If the result
 * set contains more rows, "Previous" and "Next".
 * default = 30
 */
//$cfg['MaxRows'] = 50;

/**
 * Use graphically less intense menu tabs
 * default = false
 */
//$cfg['LightTabs'] = true;

/**
 * disallow editing of binary fields
 * valid values are:
 *   false  allow editing
 *   'blob' allow editing except for BLOB fields
 *   'all'  disallow editing
 * default = blob
 */
//$cfg['ProtectBinary'] = 'false';

/**
 * Default language to use, if not browser-defined or user-defined
 * (you find all languages in the locale folder)
 * uncomment the desired line:
 * default = 'en'
 */
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';

/**
 * default display direction (horizontal|vertical|horizontalflipped)
 */
//$cfg['DefaultDisplay'] = 'vertical';


/**
 * How many columns should be used for table display of a database?
 * (a value larger than 1 results in some information being hidden)
 * default = 1
 */
//$cfg['PropertiesNumColumns'] = 2;

/**
 * Set to true if you want DB-based query history.If false, this utilizes
 * JS-routines to display query history (lost by window close)
 *
 * This requires configuration storage enabled, see above.
 * default = false
 */
//$cfg['QueryHistoryDB'] = true;

/**
 * When using DB-based query history, how many entries should be kept?
 *
 * default = 25
 */
//$cfg['QueryHistoryMax'] = 100;

/*
 * You can find more configuration options in Documentation.html
 * or here: http://wiki.phpmyadmin.net/pma/Config
 */
?>


s -la /etc/phpMyAdmin/config.inc.php
-bash: s: command not found


Error inside phpmyadmin:

Code: Select all

A newer version of phpMyAdmin is available and you should consider upgrading. The newest version is 4.4.13.1, released on 2015-08-08.
 The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. 
      Or alternately go to 'Operations' tab of any database to set it up there.
Open new phpMyAdmin window
 The configuration file now needs a secret passphrase (blowfish_secret).

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:03 am
by skurudo
pandabb wrote: s -la /etc/phpMyAdmin/config.inc.php
-bash: s: command not found
copy/paste miss: ls -la

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:05 am
by pandabb
np sir.

Result:

ls -la /etc/phpMyAdmin/config.inc.php
-rw-r-----. 1 root apache 3774 Aug 11 07:32 /etc/phpMyAdmin/config.inc.php

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:08 am
by skurudo
/etc/apache2/conf.d/phpmyadmin.conf - what in this file? (apache = httpd in centos)

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:10 am
by pandabb
Here's the file

Code: Select all

# phpMyAdmin - Web based MySQL browser written in php
# 
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

<Directory /usr/share/phpMyAdmin/scripts/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<IfModule mod_security.c>
#    <Directory /usr/share/phpMyAdmin/>
#        SecRuleInheritance Off
#    </Directory>
#</IfModule>

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:20 am
by skurudo
/usr/share/phpMyAdmin - there is some config file of phpmyadmin ?

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:27 am
by pandabb
Here are all the files.

Code: Select all

 ls
browse_foreigners.php    server_import.php
changelog.php            server_plugins.php
chk_rel.php              server_privileges.php
composer.json            server_replication.php
db_central_columns.php   server_sql.php
db_create.php            server_status_advisor.php
db_datadict.php          server_status_monitor.php
db_designer.php          server_status.php
db_events.php            server_status_processes.php
db_export.php            server_status_queries.php
db_import.php            server_status_variables.php
db_operations.php        server_user_groups.php
db_printview.php         server_variables.php
db_qbe.php               setup
db_routines.php          show_config_errors.php
db_search.php            sql
db_sql_autocomplete.php  sql.php
db_sql_format.php        tbl_addfield.php
db_sql.php               tbl_change.php
db_structure.php         tbl_chart.php
db_tracking.php          tbl_create.php
db_triggers.php          tbl_export.php
doc                      tbl_find_replace.php
error_report.php         tbl_get_field.php
export.php               tbl_gis_visualization.php
favicon.ico              tbl_import.php
file_echo.php            tbl_indexes.php
gis_data_editor.php      tbl_operations.php
import.php               tbl_printview.php
import_status.php        tbl_recent_favorite.php
index.php                tbl_relation.php
js                       tbl_replace.php
libraries                tbl_row_action.php
license.php              tbl_select.php
locale                   tbl_sql.php
navigation.php           tbl_structure.php
normalization.php        tbl_tracking.php
phpinfo.php              tbl_triggers.php
phpmyadmin.css.php       tbl_zoom_select.php
phpunit.xml.hhvm         themes
phpunit.xml.nocoverage   themes.php
prefs_forms.php          transformation_overview.php
prefs_manage.php         transformation_wrapper.php
print.css                url.php
schema_export.php        user_password.php
server_binlog.php        version_check.php
server_collations.php    view_create.php
server_databases.php     view_operations.php
server_engines.php       webapp.php
server_export.php
I think there's no conf file here.

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:37 am
by arafatx
skurudo wrote:
arafatx wrote: Ok I found it. The owner of the phpmyadmin is root. I try to fix the blowfish part, but it failed to remove the message:
"The configuration file now needs a secret passphrase (blowfish_secret)."
https://wiki.archlinux.org/index.php/Ph ... passphrase
Yup I followed the link before. But just take note, I have to change the folder owner to 'admin' to make it work. Basically, on CentOS 6.6 with the current VestaCP, the config.inc.php does nothing due to permission problem. Problem solved.

pandabb wrote:Here are all the files.

Code: Select all

 ls
browse_foreigners.php    server_import.php
changelog.php            server_plugins.php
chk_rel.php              server_privileges.php
composer.json            server_replication.php
db_central_columns.php   server_sql.php
db_create.php            server_status_advisor.php
db_datadict.php          server_status_monitor.php
db_designer.php          server_status.php
db_events.php            server_status_processes.php
db_export.php            server_status_queries.php
db_import.php            server_status_variables.php
db_operations.php        server_user_groups.php
db_printview.php         server_variables.php
db_qbe.php               setup
db_routines.php          show_config_errors.php
db_search.php            sql
db_sql_autocomplete.php  sql.php
db_sql_format.php        tbl_addfield.php
db_sql.php               tbl_change.php
db_structure.php         tbl_chart.php
db_tracking.php          tbl_create.php
db_triggers.php          tbl_export.php
doc                      tbl_find_replace.php
error_report.php         tbl_get_field.php
export.php               tbl_gis_visualization.php
favicon.ico              tbl_import.php
file_echo.php            tbl_indexes.php
gis_data_editor.php      tbl_operations.php
import.php               tbl_printview.php
import_status.php        tbl_recent_favorite.php
index.php                tbl_relation.php
js                       tbl_replace.php
libraries                tbl_row_action.php
license.php              tbl_select.php
locale                   tbl_sql.php
navigation.php           tbl_structure.php
normalization.php        tbl_tracking.php
phpinfo.php              tbl_triggers.php
phpmyadmin.css.php       tbl_zoom_select.php
phpunit.xml.hhvm         themes
phpunit.xml.nocoverage   themes.php
prefs_forms.php          transformation_overview.php
prefs_manage.php         transformation_wrapper.php
print.css                url.php
schema_export.php        user_password.php
server_binlog.php        version_check.php
server_collations.php    view_create.php
server_databases.php     view_operations.php
server_engines.php       webapp.php
server_export.php
I think there's no conf file here.
This is the correct path: /etc/phpMyAdmin/config.inc.php, make sure it is writeable to the correct group owner. In my case, it uses 'admin' as the owner (from VestaCP installation).

Re: PhpMyAdmin BlowFish

Posted: Wed Aug 12, 2015 8:55 am
by pandabb
^ Thanks for the reply, I also use admin for vesta or the default setup. So i tried to chown the file. Currently its set to root:apache

I did the folowing and restarted the service, but no luck.
admin:apache
admin:admin
root:root

also tried importing the config file to usr/share/phpmyadmin. then restart service.

Still no luck.

What else am i missing... ?

Also note the permission when i check the file is : it says 640

Thanks!

Re: PhpMyAdmin BlowFish

Posted: Sat Aug 15, 2015 12:23 am
by pandabb
bump , anyone got any suggestions?

Thank you