Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32311 closed defect (bug) (wontfix)

Incorect redirection on install when including wp-load.php from an external script

Reported by: selnomeria Owned by:
Priority: normal Milestone:
Component: Upgrade/Install Version:
Severity: normal Keywords: 2nd-opinion close
Cc: Focuses:

Description

Hello.
if i include('wp-load.php') from an external MYFILE.php .
when I open this url:

http://mysite.com/wp/MYDIR/MYFILE.php?query=bla&smt=\wp\dir\

but Wordpress is not installed yet, then from that URL, instead of:

​http://mysite.com/wp/MYDIR/wp3/wp-admin/install.php
i am redirected to:
​http://mysite.com/wp/MYDIR/MYFILE.php?query=bla&smt=\wp\dir/wp-admin/install.php

Change History (4)

#1 @SergeyBiryukov
11 years ago

  • Component General → Upgrade/Install
  • Summary incorect redirection → Incorect redirection on install when including wp-load.php from an external script

#2 @dd32
11 years ago

This is one of the many edge cases that I don't think we can/should really support. We guess the url based on the $_SERVER variables and the current __DIR__, working in when we're included from an external script feels like it's going to add further complexity that isn't actually useful in most cases.

#3 @dd32
11 years ago

  • Keywords 2nd-opinion close added

#4 @johnbillion
11 years ago

  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → closed

Agreed that this is outside of the scope of WordPress to handle. If you're including wp-load.php from an external script, it's sane to assume that you're implementing some sort of custom integration that relies on WordPress already being installed.

Note: See TracTickets for help on using tickets.