Ticket #4853 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Changeset 5889 broke my blog

Reported by: Nazgul Assigned to: anonymous
Priority: high Milestone: 2.3
Component: General Version: 2.3
Severity: critical Keywords: has-patch
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

4853.diff (0.6 kB) - added by Nazgul on 08/29/07 00:09:57.
wp-setting2.diff (0.8 kB) - added by snakefoot on 09/03/07 18:18:21.
4853.003.diff (0.6 kB) - added by markjaquith on 09/06/07 23:19:32.

Change History

08/29/07 00:09:57 changed by Nazgul

  • attachment 4853.diff added.

08/29/07 00:11:15 changed by Nazgul

  • keywords set to has-patch needs-testing.

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

08/29/07 17:57:29 changed by markjaquith

Can you provide us with more data points?

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

08/29/07 18:12:59 changed by markjaquith

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?

09/03/07 18:08:08 changed by snakefoot

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.

09/03/07 18:18:21 changed by snakefoot

  • attachment wp-setting2.diff added.

09/04/07 16:47:12 changed by markjaquith

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.

09/06/07 19:54:58 changed by Nazgul

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/

09/06/07 23:19:32 changed by markjaquith

  • attachment 4853.003.diff added.

09/06/07 23:21:18 changed by markjaquith

How's 4853.003.diff looking?

09/06/07 23:26:31 changed by Nazgul

  • keywords changed from has-patch needs-testing to has-patch.

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

09/07/07 02:43:00 changed by markjaquith

  • status changed from new to closed.
  • resolution set to fixed.

(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