[pmwiki-users] update php break urls

Patrick R. Michaud pmichaud at pobox.com
Wed Jun 13 10:29:56 CDT 2007

On Wed, Jun 13, 2007 at 05:17:43PM +0200, malexism at free.fr wrote:
> >Could you set $EnableDiag = 1; on one of these sites?
> ok, on http://www.adiu.fr
> >It looks to me as though something in the server configuration
> >is not passing the PATH_INFO information to PmWiki.  
> Online support do not respond to e-mails. May be nobody pid for that :-)

Yes, it appears that the webserver is not setting the
SCRIPT_NAME variable appropriately.  As a result, PmWiki isn't
able to determine the pagename from the request url.

Try the following code in local/config.php (near the beginning):

  $pagename = @$_REQUEST['n'];
  if (!$pagename) $pagename = urldecode(substr(@$_SERVER['PATH_INFO'], 1));
  if (preg_match('/[\\x80-\\xbf]/', $pagename))
    $pagename = utf8_decode(pagename);
  $pagename = preg_replace('![^[:alnum:]\\x80-\\xff]+$!', '', $pagename);

This will get the $pagename from the server's PATH_INFO environment
variable, which _does_ appear to be working properly on your server.


More information about the pmwiki-users mailing list