Ticket #2277 (closed enhancement: fixed)

Opened 2 years ago

Last modified 16 months ago

PMA - Update configuration file

Reported by: nuxwin Owned by: nuxwin
Priority: normal Milestone: ispCP ω 1.0.7
Component: Tools Version: ispCP ω 1.0.5
Severity: Medium Keywords:
Cc:

Description

Currently, when we update the PMA configuration file, we use the preview version of it. But, what about the possible new configuration settings provided by the new PMA version ?

I think we should rebuilt the PMA file from the new for each update. What do you think about this ?

@Benedikt: I've not checked but when you update the PMA version, you rebuild the configuration template too ?

Change History

comment:1 Changed 2 years ago by nuxwin

  • Status changed from new to assigned

comment:2 Changed 2 years ago by benedikt

Actually we should. The reason why we are saving the existing file is to prevent passwords, usernames, table names and the Blowfishkey to be overwritten. If you know a better way (e.g. parsing) we can implement this.

comment:3 Changed 20 months ago by gOOvER

There are nor many changes. The only change i see is

$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';


And we should add some tables:

 http://web01.7x24web.de/pma/Documentation.html#pmadb  http://web01.7x24web.de/pma/Documentation.html#linked-tables
This should not be a Problem ;)

comment:4 Changed 20 months ago by gOOvER

<?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>.
 *
 * @version $Id$
 * @package phpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = ''; /* 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;

/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';

/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* 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]['tracking'] = 'pma_tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/* 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'] = '';

?>

Config from 3.3.3

comment:5 follow-up: ↓ 7 Changed 20 months ago by benedikt

  • Type changed from defect to enhancement

I updated pma in 3.3.3 in r2985. We should include the execution of scripts/upgrade_table_mysql_4_1_2+.sql on every update.

The update of the ini-file could be done by parsing. I hope I find the time to write the parser. PHP has already tools to save us work.

comment:6 Changed 20 months ago by nuxwin

  • Milestone changed from ispCP ω 1.0.6 to ispCP ω 1.0.7

comment:7 in reply to: ↑ 5 Changed 19 months ago by nuxwin

  • Milestone changed from ispCP ω 1.0.7 to ispCP ω 1.0.6

Replying to benedikt:

The update of the ini-file could be done by parsing. I hope I find the time to write the parser. PHP has already tools to save us work.

The ini-file ? Hu, where is the ini-file ? for the parsing, see the following example:

#/usr/bin/perl

use strict;
use warnings;

my $file = '/var/www/ispcp/gui/tools/pma/config.inc.php';

open(FP, '<', $file);
my @fcontent = <FP>;
close(FP);

my $fileContent = join('', @fcontent);

{
	no strict qw /refs vars/;
	no warnings 'once';

	foreach (qw /blowfish_secret host controluser controlpass/) {
		$fileContent =~ /\['$_'\]\s*=\s*'(.*)';/;
		${"$_"} = $1;
	}

	print $blowfish_secret, "\n";
	print $host, "\n";
	print $controluser, "\n";
	print $controlpass, "\n";
}

I'll close this ticket today.

comment:8 Changed 18 months ago by nuxwin

  • Milestone changed from ispCP ω 1.0.7 to ispCP ω 1.0.8

comment:9 Changed 16 months ago by nuxwin

  • Milestone changed from ispCP ω 1.0.8 to ispCP ω 1.0.7

Needed changes are in my working copy.

comment:10 Changed 16 months ago by nuxwin

Update: Little note about the scripts/upgrade_table_mysql_4_1_2+.sql:

For now, we don't create the related database 'phpmyadmin'. So, for now, I'll shift this part.

comment:11 Changed 16 months ago by nuxwin

  • Status changed from assigned to closed
  • Resolution set to fixed

See r3422

Note: See TracTickets for help on using tickets.