Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#43609 closed defect (bug) (fixed)

Fatal error: Cannot redeclare wptexturize() (during installation)

Reported by: kkarpieszuk's profile kkarpieszuk Owned by: johnbillion's profile johnbillion
Milestone: 5.1 Priority: normal
Severity: critical Version: 5.1
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

Hi guys, I see this issue in the current trunk for three days now.

Steps:

  • download the current version of WordPress from the svn
  • install as usual (the famous 5 minutes installation)
  • after the step where you provide DB access data, you will see a fatal error:
( ! ) Fatal error: Cannot redeclare wptexturize() (previously declared in /var/www/html/bridge98/wp-includes/formatting.php:51) in /var/www/html/bridge98/wp-includes/formatting.php on line 313
Call Stack
#	Time	Memory	Function	Location
1	0.0007	396096	{main}( )	.../index.php:0
2	0.0014	450944	require_once( '/var/www/html/bridge98/wp-admin/admin.php' )	.../index.php:10
3	0.0014	451592	require_once( '/var/www/html/bridge98/wp-load.php' )	.../admin.php:34
4	0.0016	464040	require_once( '/var/www/html/bridge98/wp-config.php' )	.../wp-load.php:37
5	0.0017	467000	require_once( '/var/www/html/bridge98/wp-settings.php' )	.../wp-config.php:89
6	0.0388	3376184	wp_not_installed( )	.../wp-settings.php:143

Attachments (1)

43609.patch (415 bytes) - added by ocean90 7 years ago.

Download all attachments as: .zip

Change History (10)

#1 @kkarpieszuk
7 years ago

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

sorry, my bad, I see i have some formatting_conflict....php file and now I think it was an issue during cvn co

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted

#3 @johnbillion
7 years ago

  • Keywords needs-patch added
  • Milestone set to 5.0
  • Resolution invalid deleted
  • Severity changed from normal to critical
  • Status changed from closed to reopened

I'm seeing this too. The fatal error occurs when you have a wp-config.php file in place, but an empty database. You can get to this situation by running wp db reset.

It doesn't appear to happen during a fresh installation, though.

@ocean90
7 years ago

#4 @ocean90
7 years ago

  • Keywords has-patch added; needs-patch removed

Since [42835] formatting.php is loaded before wp_not_installed() runs which means wp_not_installed() longer needs to require the file by itself.

#5 @nezhar
7 years ago

This is right. The formatting.php is already loaded before wp_not_installed is called.

#6 @corvannoorloos
7 years ago

After 42835 I've also started to receive above error.

As mentioned I'm trying a new install using an existing wp-config.php file and an empty database.

Aside from this I'm using WordPress from within a subdirectory, which might be why this issue is reappearing?

#7 @johnbillion
7 years ago

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

In 42988:

Upgrade/Install: Don't include wp-includes/formatting.php twice during installation.

This avoids a fatal error caused by function redeclaration.

Props ocean90, kkarpieszuk

Fixes #43609

#8 @johnbillion
6 years ago

  • Milestone changed from 5.0 to 5.1

#9 @tungnv6699
6 years ago

Thank you so much guys. This help me a lot.

Note: See TracTickets for help on using tickets.