Configuration files
Files
pathconfig.php

There is a pathconfig.php file in the root directory of each weblog.  The purpose of this file is to define the path and URL to the LnBlog installation and to define the URL to the blog root directory.  You can edit these values with the <blogpaths.php> page.

Note that the only time you would really want to change this is when you move your LnBlog installation folder, either as part of site cleanup or because you are changing web hosts.  In either case, another easy method is to simply delete the pathconfig.php file for your blog and run an upgrade on the blog from the administration page, which will recreate it.

userconfig.cfg

This is a simple text file that is provided as a "user friendly" alternative to the userconfig.php file.  It is a text file that can be used to override configuration constants defined in blogconfig.php.

The file uses a simple key=value format, where the configuration constant name is the key and the setting you want is the value.  Comments begin with a hash (#) and must be on their own line.  Extra whitespace will be removed from keys and values.  Do not include quotes for sting values unless you want them as literal characters in the value.

When a pages loads, LnBlog will read this file and define each key as a constant with the associated value.  The values true and false will be automatically converted to boolean values, but all others will be treated as strings.  For a list of overridable configuration constants refer to blogconfig.php.  The constants with a listed default value can be changed.

userconfig.php

This file can be used to add arbitrary PHP code to be run when a page loads.  You might use this to change some of the configuration constants defined in blogconfig.php or to call ini_set() to change the PHP configuration.  This file does not exist in the default install and must be created if you want to use it.

This is a regular PHP file.  Because it is called when a page first loads, it is important that all code be enclosed in PHP tags and that there be no characters or whitespace outside the PHP tags.  If there is, then you will get errors.  Likewise, any PHP syntax errors in the file will generate errors when the file loads.  Therefore, this is recommended only for people who know what they're doing.

fsconfig.php

Note that this is a legacy config file.  It will be created automatically and should not be modified.

Format of fsconfig.php

This file is a series of constant definitions, which determine some of the system configuration.  The exact contents will depend on the particular configuration, which is defined when you set up LnBlog.  The available settings are described below.

Standard Constants
FS_PLUGIN

This determines which filesystem writing method to use.  Currently, the only supported settings is "nativefs".  Previous versions supported an "ftpfs" option in order to bypass safe-mode restrictions.  But since safe-mode has long since been removed from PHP, that feature is now deprecated.  It still exists and can be used by setting this value and the associated constants below, but it is not avialable from the configuration interface and it is not tested.

FTPFS-only Constants

These settings are only used by the now-deprecated FTPFS plugin.

FTPFS_USER

The username to use when establishing an FTP connection.  Note that this username must have write access to the relevant directories on the server, or else this obviously will not work.

FTPFS_PASSWORD

The password used to log in with FTPFS_USER.  Note that this constant currently uses a plain-text password.

FTPFS_HOST

The host and/or domain name of the FTP server to connect to.  In the fairly common case where the FTP server and web server are both running on the same machine, then you can use "localhost" for this value.  In other cases, it will probably be something like "ftp.myserver.com".

FTP_ROOT

The full path on the server to the user's FTP root.  In other words, this is the highest directory the user can access through FTP.  In some cases, it will be the root directory, or "/".  In other cases, it may be something like "/home/username/".

The purpose of this constant is to convert paths on the FTP server into path on the web server.  Because FTP servers often restrict users to a certain portion of the filesystem, these paths are not always the same, even when both servers are on the same physical machine.