[drupal-devel] [bug] Change 'database' to 'dbname' in db_url and
INSTALL.txt
Cvbge
drupal-devel at drupal.org
Mon Aug 22 17:11:02 UTC 2005
Issue status update for
http://drupal.org/node/29324
Post a follow up:
http://drupal.org/project/comments/add/29324
Project: Drupal
Version: cvs
Component: base system
Category: bug reports
Priority: minor
Assigned to: Anonymous
Reported by: Cvbge
Updated by: Cvbge
Status: patch (code needs review)
Found the issue, http://drupal.org/node/19522
Cvbge
Previous comments:
------------------------------------------------------------------------
Sun, 21 Aug 2005 17:02:34 +0000 : Cvbge
Attachment: http://drupal.org/files/issues/dbname.diff (1.68 KB)
I've seen several times that users forgot to change the 'database' in
$db_url to their real database name when installing drupal. They have
done all other steps, set up db_url but forgot only to change the
database.
I suspect that it's because 'database' does not look as something to be
changed. So I've changed it to dbname.
------------------------------------------------------------------------
Sun, 21 Aug 2005 17:14:57 +0000 : chx
Attachment: http://drupal.org/files/issues/this_patch_is_for_dumb_users_who_can_not_read_a_proper_install_text.patch (700 bytes)
Well,I think INSTALL.txt is fine especially because users do not read
it, if they would, then they would have no problem. Now, let's see this
version for settings.php
------------------------------------------------------------------------
Sun, 21 Aug 2005 17:20:31 +0000 : killes at www.drop.org
dumb users should use civicspace installer...
------------------------------------------------------------------------
Sun, 21 Aug 2005 17:31:17 +0000 : Morbus Iff
Chx's path goes a little too far. I'm ambivalent about this one,
honestly, but if it does get switched, at least use "db_name" and not
"dbname". The "db_" follows the previously established "standard" of
"db_url".
------------------------------------------------------------------------
Sun, 21 Aug 2005 18:15:34 +0000 : Cvbge
Attachment: http://drupal.org/files/issues/dbname2.diff (1.71 KB)
This patch is not for users good, but for us. The so called "dumb" users
come to -support and waste *our* time.
Attached a patch with 'database_name' version (which is IMO better then
db_name or dbname).
But I think we should change db_url syntax and use array-like settings.
That would be clearer, easier for user, fix http://drupal.org/node/26836
and maybe fix problems with special characters in password. Sorry, I'm
not going to make a patch for it, I have other things to do.
------------------------------------------------------------------------
Sun, 21 Aug 2005 19:51:05 +0000 : Morbus Iff
I'm not fond of an array approach. The syntax we're currently using is
the "normal" way of indicating database connection information for most
database interfaces - I'd rather teach users the "normal" way of marking
up their information, such that they can use it in other applications,
than teach them PHP arrays.
------------------------------------------------------------------------
Sun, 21 Aug 2005 20:51:26 +0000 : kbahey
Users are the ones who edit this files, and they are often not
developers. What is obvious for us developers, is totally foreign to
others.
I prefer an atomic approach to this: a variable for each component, and
we combine them internally to form the database URL.
There is even no need for an array, since users can be confused by the
=> syntax.
// Database type, either 'mysql' or 'pgsql'
$db_type = 'mysql';
// Database name
$db_name = 'drupal';
// Database user name
$db_user = 'drupal';
// Database password
$db_password = 'secretthing';
// Database host name, normally 'localhost'
$db_host = 'localhost';
// Database port, normally leave it as it is
$db_port = '';
We then combine that to:
$db_url = "$db_type://$db_name:$db_password@db_host/db_name";
------------------------------------------------------------------------
Sun, 21 Aug 2005 21:07:11 +0000 : Thomas Ilsche
I would prefer arrays from anything else. The combination to some URL
that anyway needs string parsing afterwards.
$db['type'] = 'mysql'; // Database type, either 'mysql' or 'pgsql'
....
And from the users point of view, I consider this really easy and
anyone that configured phpMyAdmin before will also be used to this.
------------------------------------------------------------------------
Sun, 21 Aug 2005 21:17:32 +0000 : robertDouglass
-1 to having the database type be set in an array.
I'm with Morbus. This is what database connection strings look like.
The instructions are very clear, and if we change database to db_name,
I doubt we can do any better. I don't think setting three variables is
easier. I really don't think making a database type variable is a good
idea.
If people really can't put the values into the db connection string
they should be told to use CivicSpace. In fact, I think all new Drupal
users should be told to use CivicSpace.
------------------------------------------------------------------------
Mon, 22 Aug 2005 16:03:37 +0000 : Cvbge
First, I think array approach is more natural then the url-like syntax.
Second, I agree that drupal users need not to be programmers. You are
removing usefull features and options to make drupal easier (for the
sake of "dumb" users!), but you want to keep more complicated db_url
Third, I don't think we must "educate" users, not that teaching them
url-like syntax is benefitting them. They should think, not remember
some foo://bar:bah@blah/blop syntax
Fourth, with array syntax it'd be possibile to have multiple databases
support, I think there was a request for it, can't find it now.
Fifth, this is drupal.org, not civicspace.org. How come you ask people
to use CS?
------------------------------------------------------------------------
Mon, 22 Aug 2005 16:37:47 +0000 : robertDouglass
I hadn't considered the multiple database support aspect. Thanks for
pointing that out. If that feature can be supported and this is the
path, then I'm a convert.
As for CivicSpace, I recommend to anyone who is interested in Drupal
that they check out CivicSpace. I think it is a fantastic product and
doesn't lead to people being any less involved with Drupal, but does
lead to them being more satisfied with it.
-R
More information about the drupal-devel
mailing list