PHP Headliner

PHP Headliner - Quick Start guide

Quick Start

The following provides minimal installation details.


  • Extract the downloaded PHP Headliner archive into a directory on your webserver
  • Locate the file MyConfig.php and edit the following variables:
    • $this->mysqlServer - The MySQL server that you will use for storing data (usually localhost)
    • $this->mysqlUsername, $this->mysqlPassword - The username and password for this MySQL connection
    • $this->mysqlDb - The database where you have installed the Headliner schema
    • $this->nntpServer - The NNTP server that you will read messages from and post messages to
    • $this->nntpUsername, $this->nntpPassword - The username/password for this news server. If anonymous access is permitted to this news server, leave both of these as empty strings
    • $this->rootURL - the fully-qualifed URL for your PHP Headliner installation (no trailing slash), e.g.

Scheduled tasks

PHP Headliner needs to be able to periodically load articles from the news server. Also, the cache and read-articles lists need to be purged periodically. The two PHP files in the tasks directory should be executed periodically, this is best done through a cron job, for example:

# Every five minutes, query the news server
*/5 * * * * /usr/bin/php ???/headliner/tasks/synchronise.php

# Every night purge the caches
0 1 * * * /usr/bin/php ???/headliner/tasks/purge.php

Your must of course replace the '???' above with the installed location of PHP Headliner.

A cron job is a scheduled task that is created by inserting an entry into a crontab. Access to the crontab in order to create cron jobs is a typical feature of most commercial Linux/Unix hoting packages. If you do not have access to this facility, you should ask your service provider whether they can provide it.

If you do not have access to a crontab or other means of scheduling the above scripts, you can edit 'index.php' at the commented lines so that the news server is querried each time the page is loaded. However, this is not an ideal solution as it will make your site run a bit slower.

Configure groups

The next installation step is to configure the groups which you wish to provide a portal for. Within MyConfig.php edit the $this-groups array to include your desired groups. Take care to read what the 'posting' and 'type' fields are for.

Construct Schema

Once the groups have been configured, you must run a script whcih will generate the required database schema. Simply execute the file ???/headliner/setup/createschema.php, either through a console, or from your browser.


You should now be able to navigate to your installation directory of Headliner and see the list of groups which you configured. In order to populate these groups perform an initial run of the schedule task headliner/tasks/synchronise.php (if you are using scheduled tasks for this purpose).


Take great care before creating a portal for an existing USENET newsgroup. You should ensure that the current users of the group are happy for you to create a web-based portal for their group. Take even more care if you permit anonymous posting.