larger smaller normal text version of this page
Translations: es

Phplist Documentation Installation Configuring


Settings for database connection & web page locations



This is the most commonly modified portion of config.php because it tells phpList how to connect to the database and where phpList's administration web pages are located. If you experience any database connection errors, odds are it's because of a problem here.

Database connection settings
Begin with these settings:
  1. $database_host: where is the mySQL database installed (on what server)? The most common (and simple) installation has the database on the same server (computer) as the web site's server. Therefore, the default value of "localhost" is probably ok.
  2. $database_name: on the host (above) what is the name of the database where phpList's tables have been installed?
  3. $database_user: what is the name of the database user that has Insert, Update, Delete privileges on the above database?
  4. $database_password: what is this user's password?

Using a database prefix
Most people install each application's tables in their own database. That is, if you have a CMS you would have a CMS database. A photo gallery would have its own, too. If, however, for some reason you want (or need) to install multiple applications within the same database it is critical that the table names be unique.

phpList gives you the option during installation of choosing a table prefix. This means that should more than one of your applications require a table named "user" the database will not be confused by an ambiguous name; there's only one "user" table. By default phpList prefixes all of its tables: phplist_
This also makes backups easier.

Specifying the location of your phplist files
Finally, you need to specify where the phpList script files are located on your server. Both for the user and for the administrator. These two settings are : $pageroot and $adminpages, respectively. For instance, let's say you installed phplist in a subdirectory of your root directory called "lists". Then the following default settings should work:

$pageroot = '/lists';
$adminpages = '/lists/admin';

Note: Keep in mind you cannot change the name of the admin directory. However, you can change the name of the 'lists' directory.

If you configured phpList as in the above example, you should be able to browse to your subscribe page by using the following URL in your web browser: http://www.yourdomain.com/lists
To visit the admin module you would need to type this URL in your web browser: http://www.yourdomain.com/lists/admin


this block in config.php
# what is your Mysql database server
# most common is "localhost". Yahoo Small Business hosting uses "mysql"
$database_host = "localhost";

# what is the name of the database we are using
$database_name = "phplistdb";

# who do we log in as?
$database_user = "phplist";

# and what password do we use
$database_password = 'phplist';

# if you use multiple installations of phpList you can set this to
# something to identify this one. it will be prepended to email report
# subjects
$installation_name = 'PHPlist';

# if you want a prefix to all your tables, specify it here,
$table_prefix = "phplist_";

# if you want to use a different prefix to user tables, specify it here.
# read README.usertables for more information
$usertable_prefix = "phplist_user_";

# if you change the path to the phpList system, make the change here as well
# path should be relative to the root directory of your webserver (document root)
# you cannot actually change the "admin", but you can change the "lists"
# DO NOT include the file eg "index.php" because that is added when required. If you do
# it is likely to break the tracking, see http://mantis.phplist.com/view.php?id=15542
$pageroot = '/lists';
$adminpages = '/lists/admin';



Related pages:

CategoryDocumentation
Page was generated in 0.1737 seconds