[wp-trac] [WordPress Trac] #40573: Problem with wp_guess_url() during installation

WordPress Trac noreply at wordpress.org
Wed Apr 26 10:13:39 UTC 2017


#40573: Problem with wp_guess_url() during installation
--------------------------+-----------------------------
 Reporter:  pavelevap     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 After uploading installation files, I went to `http://domain.cz` and then
 I was redirected to `http://domain.cz/domains/domain.cz/wp-admin/setup-
 config.php`, but it should be `http://domain.cz/wp-admin/setup-
 config.php`. URL `http://domain.cz/readme.html` works well. When I
 manually changed URL to `http://domain.cz/wp-admin/setup-config.php` then
 everything worked well but initial redirect caused problems for many users
 which did not notice that and installed WP with this URL.

 Popular webhoster is using `.htaccess` to allow installation more sites
 into subdirectories, but problem is probably inside `wp_guess_url()`
 function here: https://core.trac.wordpress.org/browser/tags/4.7.4/src/wp-
 includes/functions.php#L4306

 `$script_filename_dir . '/'` == `$abspath_fix` ==
 `/data/web/virtuals/160423/virtual/www/domains/domain.cz/`

 But `$_SERVER['PHP_SELF']` is `/domains/domain.cz/index.php`

 There should be `$_SERVER['REQUEST_URI']` or `$_SERVER['REQUEST_URI'] .
 'index.php'` instead?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40573>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list