WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#19651 closed defect (bug) (fixed)

Fatal error for new installs after r19602

Reported by: greuben Owned by:
Milestone: 3.4 Priority: normal
Severity: critical Version: 3.3
Component: General Keywords: has-patch
Focuses: Cc:

Description

PHP Warning:  require(/Library/WebServer/Documents/WPINC/option.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/wp-includes/functions.php on line 8

Attachments (2)

fix1.diff (1.1 KB) - added by greuben 10 years ago.
fix2.diff (403 bytes) - added by greuben 10 years ago.

Download all attachments as: .zip

Change History (9)

@greuben
10 years ago

@greuben
10 years ago

#1 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.4

#2 @SergeyBiryukov
10 years ago

Confirmed fatal error in current trunk when installing from scratch.

Last edited 10 years ago by SergeyBiryukov (previous) (diff)

#3 @ryan
10 years ago

There are probably still some plugins that load wp-config.php instead of wp-load.php. Perhaps define WPINC in the else condition in wp-load.php and leave the definition in wp-settings.php?

#4 @nacin
10 years ago

I think we might need to go to dirname() to be fully compatible. Otherwise there's little point in including option.php from functions.php if it doesn't work out of the box in the current setup.

#5 @nacin
10 years ago

In [19633]:

Define WPINC in wp-load when wp-config does not exist. see #19651.

#6 @emiluzelac
10 years ago

  • Cc emil@… added

This is what I got upon wp-config.php removal:

Warning: require(/WPINC/option.php) [function.require]: failed to open stream: No such file or directory in /wp-includes/functions.php on line 8

and

Fatal error: require() [function.require]: Failed opening required '/WPINC/option.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /wp-includes/functions.php on line 8

Not sure if this is related or if it will help you guys. Mine was purposely removed and stumbled upon this ticket by an accident.

Once I added on line 49

define( 'WPINC', 'wp-includes' );

Voila, all works great. Thanks Nacin and greuben for reporting!

Emil

#7 @nacin
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.