WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#45446 closed defect (bug) (duplicate)

/wp-admin/setup-config.php PHP Notice: Use of undefined constant

Reported by: nextendweb Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.8
Component: Database Keywords:
Focuses: Cc:

Description

When the WordPress site already installed and you try to access the /wp-admin/setup-config.php it display a message:

The file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

Also in our error log we get a notice that there was a use of an undefined constant from require_wp_db() function. /wp-admin/setup-config.php does not load the wp-config.php, but loads wp-settings.php which tries to initialize the database with the undefined constants.

<?php
$wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );

Change History (1)

#1 @SergeyBiryukov
6 months ago

  • Component changed from General to Database
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @nextendweb, welcome to WordPress Trac!

Thanks for the report, this is already fixed in #35560.

Note: See TracTickets for help on using tickets.