[mythtv-commits] Ticket #2015: Invalid use of $_SERVER['PATH_INFO']

MythTV mythtv at cvs.mythtv.org
Mon Jul 3 17:19:04 UTC 2006


#2015: Invalid use of $_SERVER['PATH_INFO']
------------------------------+---------------------------------------------
 Reporter:  derek at battams.ca  |       Owner:  xris
     Type:  patch             |      Status:  new 
 Priority:  minor             |   Milestone:      
Component:  mythweb           |     Version:  head
 Severity:  medium            |  
------------------------------+---------------------------------------------
 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
 $_SERVER['PATH_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
 $_SERVER['REQUEST_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
 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2015>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list