WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#4853 closed defect (bug) (fixed)

Changeset 5889 broke my blog

Reported by: Nazgul Owned by:
Milestone: 2.3 Priority: high
Severity: critical Version: 2.3
Component: General Keywords: has-patch
Focuses: Cc:

Description

The IIS changes made in changeset [5889] broke my IIS test-blog.

If I dump $_SERVER['REQUEST_URI'] after that piece of code it returns /blogsvn/index.php/blogsvn/index.php instead of the expected /blogsvn/index.php.

It appears that on line 44 both $_SERVER['SCRIPT_NAME'] and $_SERVER['PATH_INFO'] contain /blogsvn/index.php.

ENV: PHP 4.4.5 on IIS, running r5966

Attachments (3)

4853.diff (614 bytes) - added by Nazgul 8 years ago.
wp-setting2.diff (848 bytes) - added by snakefoot 7 years ago.
4853.003.diff (595 bytes) - added by markjaquith 7 years ago.

Download all attachments as: .zip

Change History (12)

@Nazgul8 years ago

comment:1 @Nazgul8 years ago

  • Keywords has-patch needs-testing added

Attached patch fixed it for me, but could use some testing (preferably also by other IIS users)

comment:2 @markjaquith8 years ago

Can you provide us with more data points?

For example, with PATHINFO permalinks on, what are REQUEST_URI, SCRIPT_NAME, and PATH_INFO?

comment:3 @markjaquith8 years ago

Let me try that again:

For example, with PATHINFO permalinks on, what are REQUEST_URI, SCRIPT_NAME, and PATH_INFO on an is_single() URL?

comment:4 @snakefoot7 years ago

I'm running Wordpress on IIS and had the same problem as these people, where WP-Cache wouldn't work because the REQUEST_URI generated by IIS + PHP was missing PATHINFO:

http://www.cpuidle.de/blog/?p=30

Without PATHINFO then it was only script name without the actual post-path:

*/blog/index.php*/my-post/

Guess one should change it so if the PATH_INFO is the same as SCRIPT_NAME, then ignore PATH_INFO.

@snakefoot7 years ago

comment:5 @markjaquith7 years ago

Still need to know what SCRIPT_NAME and PATH_INFO look like on an is_single() URL. They might not be the same there -- and then the comparison wouldn't be true.

comment:6 @Nazgul7 years ago

Both $_SERVER['SCRIPT_NAME'] and $_SERVER['PATH_INFO'] contain the same on an is_single() URL, while $_SERVER['REQUEST_URI'] is unset before the IIS fix code an contains those two concatenated afterwards.

For example:
$_SERVER['SCRIPT_NAME']: /blogSVN/index.php/2007/07/11/gcrqzk
$_SERVER['PATH_INFO']: /blogSVN/index.php/2007/07/11/gcrqzk
$_SERVER['REQUEST_URI']: /blogSVN/index.php/2007/07/11/gcrqzk//blogSVN/index.php/2007/07/11/gcrqzk/

@markjaquith7 years ago

comment:7 @markjaquith7 years ago

How's 4853.003.diff looking?

comment:8 @Nazgul7 years ago

  • Keywords needs-testing removed

I tried 4853.003.diff and it fixed it for me.

comment:9 @markjaquith7 years ago

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

(In [6058]) Correctly set REQUEST_URI for IIS setups that put that info into SCRIPT_NAME as well as PATH_INFO. props snakefoot and Nazgul. fixes #4853

Note: See TracTickets for help on using tickets.