WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#31266 closed defect (bug) (duplicate)

Cannot install WP to domain with open_basedir

Reported by: azurit Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

WordPress cannot by installed to domain which has it's DocumentRoot in open_basedir, for example:
DocumentRoot = /var/www/www.example.com/
PHP open_basedir = /var/www/www.example.com/

This error is printed:

Warning: file_exists(): open_basedir restriction in effect. File(/var/www/wp-config.php) is not within the allowed path(s): (/var/www/www.example.com/:/tmp/:/usr/share/php/:.) in /var/www/www.example.com/wp-load.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home/testtest/djangoproject.sk/wp-load.php:31) in /var/www/www.example.com/wp-load.php on line 56

This is because WP is searching for wp-config.php also in one level above the DocumentRoot. I suggest to remove this feature or make it configurable (and disabled by default) or count with open_basedir and continue with installation as if file_exists returns false.

Change History (1)

#1 @SergeyBiryukov
6 years ago

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

Duplicate of #29680.

Note: See TracTickets for help on using tickets.