Package: dokuwiki
Version: 0.0.20050922-4
Severity: important
Tags: patch

When PHP in a CGI or FastCGI setup is used to run Dokuwiki, Dokuwiki
thinks that the base URI is the base URI of the PHP interpreter: The
first page is shown, but all the inline images, CSS, and relative
links are wrong. Using REQUEST_URI before or instead of SCRIPT_NAME in
inc/init.php fixes things.

I have also contacted upstream, so this might be fixed in the next
release.

Cheers,
-Hilko

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages dokuwiki depends on:
ii  debconf [debconf-2.0]         1.4.58     Debian configuration management sy
ii  php4                          4:4.4.0-3  server-side, HTML-embedded scripti
ii  ucf                           2.002      Update Configuration File: preserv

Versions of packages dokuwiki recommends:
ii  apache [httpd-cgi]            1.3.33-8   versatile, high-performance HTTP s
ii  apache2-mpm-prefork [httpd-cg 2.0.54-5   traditional model for Apache2

-- debconf information:
* dokuwiki/system/accessible: localhost only
  dokuwiki/webservers: apache
* dokuwiki/system/documentroot: /dokuwiki
  dokuwiki/system/localnet: 10.0.0.0/24
* dokuwiki/system/purgepages: true

Patch:

--- inc/init.php.orig   2005-10-11 15:17:37.000000000 +0200
+++ inc/init.php        2005-10-11 15:17:43.000000000 +0200
@@ -157,6 +157,8 @@
 
   if($conf['basedir']){
     $dir = $conf['basedir'].'/';
+  }elseif($_SERVER['REQUEST_URI']){
+    $dir = dirname($_SERVER['REQUEST_URI']).'/';
   }elseif($_SERVER['SCRIPT_NAME']){
     $dir = dirname($_SERVER['SCRIPT_NAME']).'/';
   }elseif($_SERVER['DOCUMENT_ROOT'] && $_SERVER['SCRIPT_FILENAME']){


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to