[isf-wifidog] The path situation (was: CVS 05 Jan,
2005 server install fails)
Benoit Grégoire
bock at step.polymtl.ca
Dim 8 Jan 21:53:59 EST 2006
On January 7, 2006 08:29 am, Ray Gwinn wrote:
> I was able to get this done sooner than I thought. The output you
> requested follows:
>
> Component=(Smarty)
> IF isset
> IF self
> else !file_exists DOCUMENT_ROOT=(/var/www/html/wifidog
> SYSTEM_PATH=(/mine/dir- wifi/webstuff/www/html/wifidog/)
>
> NOTE that /var/www/ and /mine/dir-wifi/webstuff/www/ are the same
> directory. /var/www/ is the link.
Ouch, I don't think anyone tought that someone would want to run wifidog from
a symlinked document root.
I improved the path detection code, it should now work right on windows
(presumably). However despite scratching my head, I just don't see how to
make it work for symlinks. All the algorithms that will work will fail in
other (normal) conditions.
I tried to move all path detection code back to a central location (this
divergence in the code was an unfortunate and unavoidable accident caused by
four different developers independently adding overlapping missing path
related functionnality). At least now it will be consistent (same code
everywhere) and will tell you if it failed by throwing a fatal exception.
It also allows you to override it's detection by manually defining
SYSTEM_PATH and/or DOCUMENT_ROOT, but this is obviously far from ideal. If
someone codes an algorithm that will work in all cases, at least the code is
now centralised in include/path_defines_base.php. (Well, FCKeditor, and
possibly a few other places still do their own path detection, but this will
probably be fixed as we go on).
--
Benoit Grégoire, http://benoitg.coeus.ca/
-------------- section suivante --------------
Une pièce jointe non texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 189 octets
Desc: non disponible
Url: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20060108/a5a0b548/attachment.pgp
More information about the WiFiDog
mailing list