Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 9 years ago

#3127 closed defect (bug) (worksforme)

Wordpress's installation fails when the PHP-option magic_quotes_runtime is enabled.

Reported by: Gertjan Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.4
Component: Administration Keywords: installation magic_quotes_runtime has-patch
Focuses: Cc:


When a user enters his or her database settings, the entire wp-config-sample.php is read. This file is then searched for certain strings, which will then be replaced with the strings the user supplied. However, wp-config-sample.php contains quotes, which are automatically quoted because magic_quotes_runtime is enabled. To add more confusion: the installation doesn't even complain! Before these replacements are made, the databaseconnection is tested using the user-supplied strings. These of course are correct, but strings in wp-config.php are not!


  • wp-admin/setup-config.php should check for magic_quotes_runtim
  • wp-admin/setup-config.php should use the variables from wp-config.php to test the connection (after they have been replaced)
  • wp-admin/setup-config.php should use a better way to create this config, this is really ugly!

Attachments (1)

3127.diff (1022 bytes) - added by Nazgul 12 years ago.

Download all attachments as: .zip

Change History (4)

12 years ago

#1 @Nazgul
12 years ago

  • Keywords installation magic_quotes_runtime has-patch added
  • Milestone set to 2.1

I created a small patch which turns magic_quotes_runtime off before editing the file and restores it to it's previous value afterwards, which should fix the described behaviour.

#2 @matt
11 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

#3 @Nazgul
11 years ago

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.