Katharina Wolkwitz a écrit :
Hi again,
I think I've found the reason, why it wouldn't work for me before. It seems that mediawiki uses a different definition of relative or absolut paths than I knew.
For example in my installation $wgScriptPath is set to "/_fhbwiki". Afaik normally (in html, shellscripts or programming-languages) that's an absolut path and points to a directory or file directly beneath the root-node of a linux-system. It seems that here this path points to a directory beneath the document-root of the same linux-system (whereever that may be).
If one sets the path for $wgLogo like this $wgLogo = "/_fhbwiki/skins/common/images/fhbwiki2.jpg"; it works, but $wgLogo = "/opt/lampp/htdocs/_fhbwiki/skins/common/images/fhbwiki2.jpg"; doesn't.
In http://www.mediawiki.org/wiki/Manual:%24wgScriptPath the value for §wgScriptPath is defined as a relative path but the example shows /wiki, which to me was an absolut path (until now).
Is this something unique to mediawiki or is it a "feature" of PHP?
Greetings Kate
/wiki is an absolute *server* path (i.e. *from the point of view of your web host*), it's like the "/" refers to the root of your domain (i.e. the http://www.domain.org), not to the root of the physical thing you also call a server (like in /home, /boot, /usr,...).
/wiki can be seen as a sort of relative path from the point of view of your web directory (/opt/lampp/htdocs/) on the physical computer.
For instance if you consider the html tag "img", you can use src="http://yourdomain/wiki/image.png" or src="/wiki/image.png" which are absolute *server* path but (normally) you shouldn't be allowed to use src="/var/www/wiki/image.png" which is absolute *computer* path
you can also use src="./image.png" or src="../../anotherfolder/image2.png" which are relative *server* path (--> again, relative to the location of the current page *from the host point of view*, not from the physical point of view)
I hope I haven't been too "unclear" nor incorrect.