Opened 13 years ago

Closed 13 years ago

#2015 closed patch (fixed)

Invalid use of $_SERVER['PATH_INFO']

Reported by: derek@… Owned by: xris
Priority: minor Milestone: unknown
Component: mythweb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I install mythweb on my server under a mythweb subdir, such that the URL I use is:

https://hostname/mythweb/

Using the latest svn, I'm unable to click on the column titles to sort because the generated URL is incomplete. includes/sorting.php uses $_SERVERPATH_INFO? to generate the URL, but by doing so it generated a URL that doesn't include the mythweb subdir required so when I click the sort links I get a 404 error. My fix is to use the $_SERVERREQUEST_URI? value as it includes the full path needed to generate the proper URL.

Index: sorting.php
===================================================================
--- sorting.php (revision 10364)
+++ sorting.php (working copy)
@@ -20,7 +20,7 @@
 /**/
     function get_sort_link($field, $string) {
     // Get the URL
-        $url = $_SERVER['PATH_INFO'];
+        $url = $_SERVER['REQUEST_URI'];
         if (empty($url))
             $url = str_replace('mythweb.php/', '', $_SERVER['PHP_SELF']);
     // Build the link

Change History (1)

comment:1 Changed 13 years ago by xris

Resolution: fixed
Status: newclosed

fixed in [10384]

Note: See TracTickets for help on using tickets.