Closed GoogleCodeExporter closed 9 years ago
Let's assume your actual doc root is this:
'/home/nordhaug/www'
Add this to config:
$min_symlinks = array(
'//~nordhaug' => '/home/nordhaug/www'
);
What's $_SERVER['DOCUMENT_ROOT'] in this setup?
Original comment by mrclay....@gmail.com
on 5 Mar 2009 at 9:31
Very close - it's "/home/nordhaug/html" ;-)
Adding the lines you suggested to config.php almost fixed the issue - I now get
"~nordhaug/css/menu_bg.jpg". The leading slash is missing. (I read about
symlinks,
but didn't see that it could be used like this.)
$_SERVER['DOCUMENT_ROOT'] is /home/httpd/html
PS! Thanks for the quick replies.
Original comment by hansfn@gmail.com
on 5 Mar 2009 at 9:49
Hmm, make sure that your docRoot doesn't end with a slash; that will cause
missing
leading slashes.
Or it's possible my symlink code has an off-by-one bug. I need to write a unit
test
for it.
The symlinks feature just allows the URI rewriter to "unresolve" real file
paths
(e.g. /home/nordhaug/html/myFile) back into fake ones (e.g. /home/nordhaug/html/
~nordhaug/myFile), so then when you strip off the leading docRoot, you get the
correct root-relative URI (/~nordhaug/myFile).
Original comment by mrclay....@gmail.com
on 6 Mar 2009 at 12:24
Then it must be a off-by-one bug, because I did double-check the trailing
slash. I
have symlinked config.php to config.phps so you can verify for yourself:
http://home.himolde.no/~nordhaug/minify/config.phps
Original comment by hansfn@gmail.com
on 6 Mar 2009 at 12:39
It's a off-by-one bug.
http://code.google.com/p/minify/source/browse/tags/release_2.1.2/min/lib/Minify/
CSS/
UriRewriter.php#55
Line 55 should be:
$link = str_replace('//', realpath(self::$_docRoot) . '/', $link);
Does this fix for you?
Original comment by mrclay....@gmail.com
on 6 Mar 2009 at 1:14
No, because the symlink is apperently already expanded at this point. I added
some
echo statements to display the value of $link in that foreach loop - see
http://home.himolde.no/~nordhaug/minify/?f=css/layout.css
(I inserted a die() after the loop - if you wondered why the CSS didn't
display.)
Original comment by hansfn@gmail.com
on 6 Mar 2009 at 1:42
Oops. You need both these changes:
http://code.google.com/p/minify/source/detail?r=302
Original comment by mrclay....@gmail.com
on 6 Mar 2009 at 2:44
Thx, that did the trick. It wasn't a UserDir issues, but at least we got
another bug
fixed.
Hans
Original comment by hansfn@gmail.com
on 6 Mar 2009 at 6:18
Original comment by mrclay....@gmail.com
on 19 Mar 2009 at 4:46
Original comment by mrclay....@gmail.com
on 19 Mar 2009 at 4:48
Original issue reported on code.google.com by
hansfn@gmail.com
on 5 Mar 2009 at 9:05