Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#11523 closed defect (bug) (fixed)

wp-config-sample.php inconsistency

Reported by: joshtime's profile joshtime Owned by: nacin's profile nacin
Milestone: 3.0 Priority: normal
Severity: trivial Version: 2.2
Component: Upgrade/Install Keywords: has-patch tested
Focuses: Cc:

Description

In wp-config-sample, there is a minor inconsistency.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');

/** MySQL database username */
define('DB_USER', 'usernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');

DB_NAME says "put"
DB_USER says only "here"
DB_PASSWORD has "your". Password is not personal

Should be:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'dbnamehere');

/** MySQL database username */
define('DB_USER', 'usernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'passwordhere');

Attachments (3)

11523.patch (659 bytes) - added by joshtime 15 years ago.
Patch file
11523.2.patch (899 bytes) - added by joshtime 15 years ago.
The patch for setup-config.php
11523.3.patch (1.6 KB) - added by hakre 15 years ago.
Consolidated patch (merged 2 prior patches into one)

Download all attachments as: .zip

Change History (20)

@joshtime
15 years ago

Patch file

#1 @joshtime
15 years ago

  • Keywords has-patch added

@joshtime
15 years ago

The patch for setup-config.php

#2 @joshtime
15 years ago

Also added a patch for setup-config.php because setup-config.php searches the values to replace.

#3 @miqrogroove
15 years ago

  • Severity changed from normal to trivial
  • Version set to 2.2

see also [5001]

@hakre
15 years ago

Consolidated patch (merged 2 prior patches into one)

#4 @hakre
15 years ago

  • Keywords tested added
  • Milestone changed from Unassigned to 3.0

Tested by running a new install from current trunk with patch applied. Worked.

#5 @hakre
15 years ago

  • Component changed from Comments to Upgrade/Install

#6 @hakre
15 years ago

Worth to commit or close as wontfix?

#7 follow-up: @miqrogroove
15 years ago

IMO, wontfix. The inconsistency actually helps me see the difference between code-pattern and string literals.

#8 in reply to: ↑ 7 @joshtime
15 years ago

Replying to miqrogroove:

IMO, wontfix. The inconsistency actually helps me see the difference between code-pattern and string literals.

We actually could have the difference between code-pattern and string literals but a fix in the inconsistency would also be good. We actually could have:

/** The name of the database for WordPress */
define('DB_NAME', 'putdbnamehere');

/** MySQL database username */
define('DB_USER', 'putusernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'putpasswordhere');

#9 @dd32
15 years ago

This gets a +1 from me, "Put Your Password Here" doesnt really specify what password, Whilst to a coder, being in the Database area givs us context, many users do not understand the way in which database connections work, and may expect the user password, rather than the mysql password.

Whitespace in the phrases would also be nice, "Database Name Here" for example.

#10 @nacin
15 years ago

  • Owner set to nacin
  • Status changed from new to assigned

#11 @nacin
15 years ago

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

(In [13837]) Standardize db config-sample values. fixes #11523

#12 @nbachiyski
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The WordPress convention is to use dashes over underscores whenever we can. In this case we can.

Also, whenever you change placeholders, could you send a mail to wp-hackers/wp-polyglots -- there are people, who replace these with meaningful values, like we do in core.

#13 @nacin
15 years ago

I was actually going to go with spaces, but imo I found that to be counter-intuitive for two reasons -- one, you won't normally find spaces in these values, and two, double-clicking the value would then only select a single word. In many editors, dashes don't handle the latter any differently than spaces. Hence the underscores.

#15 in reply to: ↑ 14 @nacin
15 years ago

Replying to nbachiyski:

Another place to be synced: http://core.trac.wordpress.org/browser/branches/iis/parameters.xml

We also need to add some salts there, possibly some other things.

#16 @nacin
14 years ago

(In [14542]) Update IIS parameters.xml to reflect new config-sample values. also add salts. see #11523.

#17 @nacin
14 years ago

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

Email dispatched to wp-hackers and wp-polyglots. I think we've changed everything we need to do here.

Note: See TracTickets for help on using tickets.