[Phpmyadmin-devel] ideas / concerns / problems [about|with] user settings feature
Zeeshan M.
zeeshan.jp at gmail.com
Sun Jul 19 09:43:57 CEST 2009
*If you have a look at
http://wiki.phpmyadmin.net/pma/SummerOfCode2009IdeasList#User_Preferences
you'll see that this was exactly what was asked for this project:
"Some configuration parameters do not have an impact on security or
performance; it would be interesting if each end-user of a shared PMA
installation could change them on-the-fly and store these in pmadb."
*
haha. I just can't help making more trouble for myself with nifty ideas. I
think there were crazier ideas in my initial pitch back in April, here's my
abstract:
Keeping track of past experiences to assist the user effectively manage the
MySQL database server using phpMyAdmin web interface. If a user selects a
certain database as he first logs in to the system, this user preference
will be performed automatically after the script intelligently decides that
this is user's preferred destination. Users will have options to change the
automated settings if they wish to. A set number of these automated
configurations will be designed to assist the user.
Sounds really interesting. ;)
*
> Would it not be a decent idea to simply apply user settings to relative
> vars in ./libraries/config.default.php by extracting them from db? May
> be also have a mechanism to allow sysadmins to override DB stored
settings?
Please give an example where this override would be needed.
*
I think I was confusing it with something else.
*Here are my notes on the code that I have written so far:*
- I have commented out user settings interface for "Default Language" as
only one of the languages show up in the drop down menu. And when I hit
submit that language is set to default for some weird reasons.
- The current value of a setting will be selected on page load in drop down
menu element, and it will be printed in text box input. The mechanism is a
bit confusing, and I will work on it first thing tomorrow morning. Any
suggestions to deal with this problem differently?
- need to define an additional method in sql driver class to select all of
the settings' values at once
- need to implement a sophisticated interface to handle errors
- SQL query still does not produce expected result. I am wondering I need to
link queries with server, but I was not able to figure out how to extract
link to connection server.
- I see that some of the configuration settings can simple be changed
through ./libraries/config.default.php such as PropertiesIconic. I am
wondering that these settings are directly extracted from config file. So,
in this case, may be create a new config file to set these settings.
Thanks!
P.S. Please bear with me if there is a confusion. I don't drink coffee, or
coke to keep myself awake. I am an all-time water drinker.
--------------------------------------------------
Best regards,
Zeeshan Mughal
Email: zeeshanmughal at ieee.org
Web: http://www.zixan.info
On Sat, Jul 18, 2009 at 6:07 AM, Marc Delisle <marc at infomarc.info> wrote:
> Zeeshan Mughal a écrit :
> > Hi,
> >
> > I have few things that I want to discuss.
> >
> > I see some of the settings do not have their own user interface to edit
> > them such as “PropertiesIconic”. I might have to change plans about
> > implementing separate user interfaces for each settings, as they
> > virtually do not exist for some of them. I am beginning to feel like
> > this project is not just about having a feature to store settings
> > permanently, but also providing users an interface to change those
> > settings that they were not able to do so before because of not having
> > access to config files on the server.
>
> If you have a look at
> http://wiki.phpmyadmin.net/pma/SummerOfCode2009IdeasList#User_Preferences
> you'll see that this was exactly what was asked for this project:
>
> "Some configuration parameters do not have an impact on security or
> performance; it would be interesting if each end-user of a shared PMA
> installation could change them on-the-fly and store these in pmadb."
>
>
> >
> > I see all of the settings (currently under consideration) also have
> > configuration options in ./libraries/config.default.php. Are these
> > configs only there for initial installation purpose? What would happen
> > if sysadmins change value for these options? Will these new settings
> > override those stored in DB?
>
> These configs will have to stay there )in the config.default.php +
> config.inc.php) because the userprefs feature might be not available.
>
> IMO, as the parameters chosen to be part of userprefs should not have an
> impact on security or performance, the value set by each user will
> override the one set in the general config file.
>
> >
> > Would it not be a decent idea to simply apply user settings to relative
> > vars in ./libraries/config.default.php by extracting them from db? May
> > be also have a mechanism to allow sysadmins to override DB stored
> settings?
>
> Please give an example where this override would be needed.
>
> >
> > I see there are several settings in ./libraries/config.default.php that
> > can easily be imported to permanent settings user interface. Is there a
> > limit on the number of settings that can have a place in the central
> > admin interface due to performance, or some other issues?
>
> This will have to be tested when we have an implementation prototype to
> test.
>
> >
> > /Now, some coding questions:/
> >
> > Following UPDATE query does not happen to perform any change to the
> table:
> >
> > PMA_DBI_try_query("UPDATE pma_perm_usr_pref SET maxRows = 20 WHERE
> > username = root")
>
> Here, username is a column name and root is ... a column name?
> >
> > And following SELECT query actually gives me a rather weird result:
> >
> > PMA_DBI_try_query("SELECT maxRows FROM pma_perm_usr_pref WHERE username
> > = root")
>
> Same question. I think you forgot to quote the constant you are using.
>
> >
> > results in: /Resource Id #61
> >
> > /Of course, changeable values are not hard-coded in the actual script.
> > :) Is there something wrong with the sql query?
> >
> > For the later, I tried adding $link ( =
> > PMA_DBI_select_db($cfg['Servers'][1]['pmadb']) ) parameter just to test
> > if not having it was the problem. But, no luck.
>
> Use $GLOBALS['cfg']['Server']['pmadb'].
>
> >
> > Well, this brings me to my last question. For now, I am manually
> > setting $i equal to 1. Is there a way to extract this server parameter
> > from some automatically generated script?
> >
> > Thank so much! Your help is much appreciated!
> >
>
>
>
> --
> Marc Delisle
> http://infomarc.info
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20090719/20b05281/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usr_prefs_zixan_071909.patch
Type: application/octet-stream
Size: 19355 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20090719/20b05281/attachment.obj>
More information about the Developers
mailing list