Last Modified 2009-08-14 by Jan Schneider

Horde Configuration (Global Configuration)


This is the file where all global, server-wide settings go. It is supposed to be generated through the web interface.



There are different ways to pass parameters to a PHP script:

  1. foo/script.php?arg=value (by GET parameter)
  2. foo/script.php/arg/value (or similar, by PATH_INFO)
  3. foo/arg/value (or similar, by mod_rewrite)

The first one always works, on any web server.

The second is prettier, but only works on web servers that support PATH_INFO. PATH_INFO basically means that the web server recognizes that there is a script in the URL path, and anything that's appended to that URL will be available in that script file. I.e. it doesn't consider "value" a file in the directory foo/script.php/arg/, but recognizes foo/script.php as a script files, and passes the remainder of the URL (/arg/value) to that script.

The second is the prettiest because it looks like a static file, is short and recognizable. But it only works on web servers that support URL rewriting. Since there is no script file in that path at all,the rewrite rules have to map this URL internally to an existing script. In this example it would map foo/arg/value to foo/script.php?arg=value, without the user noticing anything about that.

On the PHP side, the first one has to be supported anyway, the second one (path info) has to handled separately. That's why it doesn't work in all scripts, but only in certain. The third one is never seen by PHP, since the webserver is internally calling the rewritten URL instead.

In horde/rpc.php for example we support all 3 versions. If they actually work depend on whether PATH_INFO and mod_rewrite is enabled on the server. Since this can't be detected from PHP, we have this "pretty_url" configuration that tells Horde which kind of URLs to use. This is only used for displaying the URLs to the user. It doesn't have any influence on whether they actually work or not. The adminstrator has to take care that the configuration matches the capabilities of the web server.