[PATCH] Fix qb on lighttpd (=Fix my blog)

1 view
Skip to first unread message

Uli

unread,
May 1, 2008, 1:47:43 PM5/1/08
to qb user discussion list
I just noticed that on my blog, no matter what you click, you always get to the
front page which means *every* *single* *link* to some article was broken.

With some echo debugging I found out that $_SERVER['PATH_INFO'] is set, but
empty. Yay for lighttpd.

And no, I don't know nor do I care since when this is broken. But if you find it
out, tell me :).

diff --git a/lib/qbURL.php b/lib/qbURL.php
index 6f3e96f..2903367 100644
--- a/lib/qbURL.php
+++ b/lib/qbURL.php
@@ -154,7 +154,7 @@ class qbURL {
public static function getVFile() {
$path = QB_URIPATH;
// PATH_INFO is set for Apache's "Alias" directive, it has precedence.
- if (isset($_SERVER['PATH_INFO']))
+ if (isset($_SERVER['PATH_INFO']) && !empty($_SERVER['PATH_INFO']))
$path = $_SERVER['PATH_INFO'];
else if (qbString::startsWith(self::getHandler(), $path))
$path = substr($path, strlen(self::getHandler()));
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
G d- s:- a--- C+++>$ UL++>$ P L++>$ !E W++ !N o? K? w-- !O !M V? PS+ PE Y+
PGP++>+++ !t 5? !X !R-* tv+>- b+ DI->+ !D G e h+ r? y
------END GEEK CODE BLOCK------

Reply all
Reply to author
Forward
0 new messages