Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#543 With Fedora Core 5, phpwiki 1.3.12p2 ignores PATH_INFO

open
Reini Urban
5
2012-10-11
2006-07-06
Alain Knaff
No

With Fedora Core 5, phpwiki 1.3.12p2 ignores both
PATH_INFO and pagename.
This makes it impossible to browse any wikipage
except the front page.

N.B. I do have AcceptPathInfo on for the wiki
directory in my Apache config (and also once again
globally, for good measure)

Moreover the if (@is_dir(SCRIPT_FILENAME) or
realpath(SCRIPT_FILENAME) == realpath(FILE
)) in index.php does not seem to work, I had to
uncomment that line, or otherwise I would get an
empty page, even for the homepage.

Discussion

  • Alain Knaff
    Alain Knaff
    2006-07-06

    Logged In: YES
    user_id=1000433

    Adding the following two lines

        elseif (!empty($_SERVER))
            $vars = &$_SERVER;
    

    after

    function get($key) {
        if (!empty($GLOBALS['HTTP_SERVER_VARS']))
            $vars = &$GLOBALS['HTTP_SERVER_VARS'];
    

    in lib/Request.php seems to fix the issue.

    Now I can navigate my wiki again, view Page History, etc.
    However, unfortunately Edit still doesn't work.

     
  • Alain Knaff
    Alain Knaff
    2006-07-06

    Logged In: YES
    user_id=1000433

    Ok, so Editing can be fixed by disabling the EDIT_TOOLBAR
    in config.ini

     
  • Logged In: NO

    Ehm, sorry to mention it, but the hack doesn't fix a
    thing... problem is still present after modifying the
    Request.php file so can only view the HomePage.

    A fix would be nice :)

     
  • Alain Knaff
    Alain Knaff
    2006-07-07

    Logged In: YES
    user_id=1000433

    In addition to the fix described, you need to put

    AcceptPathInfo on

    into your Apache configuration, in a place where it applies
    to the directory where your wiki is installed.

    The AcceptPathInfo instructs apache to export the relevant
    information, whereas the Request.php modification enables
    phpwiki to correctly import the info. Both changes are needed.

     
  • Reini Urban
    Reini Urban
    2006-07-23

    Logged In: YES
    user_id=13755

    Thanks for the observation.
    Strange register_long_arrays issue.
    Will be tested and fixed asap.

    The fix you mention should not be necessary.
    lib/prepend.php:33
    foreach
    (array('SERVER','REQUEST','GET','POST','SESSION','ENV','COOKIE')
    as $k) {
    if (!isset($GLOBALS['HTTP_'.$k.'_VARS']) and
    isset($GLOBALS['_'.$k]))
    $GLOBALS['HTTP_'.$k.'_VARS'] =& $GLOBALS['_'.$k];
    }
    sets all long vars.

     
  • umfan866
    umfan866
    2006-08-18

    Logged In: YES
    user_id=1565038

    I am having the same issue in Red Hat RHEL4
    using phpwiki-1.3.12p3

    Getting a blank page upon startup, which is
    fixed by commenting this line in index.php

    if (@is_dir(SCRIPT_FILENAME) or
    realpath(SCRIPT_FILENAME) == realpath(FILE
    )) in index.php

    Even once I do that, all my links and images
    are not working (still troubleshooting).

    I get a blank page

     
  • Reini Urban
    Reini Urban
    2006-12-03

    Logged In: YES
    user_id=13755
    Originator: NO

    I'll have a redhat machine next week and will test it there.