> Agents can also search and read this documentation through its [MCP server](https://documentation.opencats.org/~gitbook/mcp).

# Current release: 0.12.0

This documentation explains how to install, enhance and use OpenCATS, the free open-source applicant tracking system available at opencats.org.

## Release information

The current OpenCATS application release documented here is **0.12.0**. The latest release packages are published at <https://github.com/opencats/OpenCATS/releases>.

## Supported platform baseline

OpenCATS requires **PHP 8.4.1 or later within PHP 8**. Project CI currently tests **PHP 8.4.27** and **PHP 8.5.12** on Linux/Unix with **MariaDB 10.7** for Docker-backed integration and Behat testing. Other database, operating system, or web server combinations may work, but they are not the project CI/CD baseline.

The main runtime dependencies are PHP, MariaDB, a web server, and the PHP extensions required by OpenCATS. Optional document parsing utilities such as `antiword`, `pdftotext`, `html2text`, and `unrtf` improve resume/document text extraction and search, but are not required just to complete installation.

**MariaDB is the supported and tested database family. MySQL is not supported.** On some MySQL/shared-hosting installations, MySQL's `ONLY_FULL_GROUP_BY` mode causes existing OpenCATS queries to fail. If your host offers only MySQL, see the [known limitation and optional session-only workaround](https://documentation.opencats.org/installation/run-the-installer#unsupported-mysql-hosting-and-only_full_group_by). This is not a supported configuration, and additional incompatibilities may remain.

The Composer minimum is a compatibility requirement, not a security recommendation. Use a currently patched PHP 8.4 or 8.5 runtime, including your distribution's security fixes. Updating OpenCATS does not update PHP on the server.

## What changed in 0.12.0?

* Bootstrap 5.3 styling across the main application, login, installer and public Career Portal.
* Locally bundled SunEditor replaces CKEditor; Chart.js replaces Artichow, with accessible tables for chart values.
* ISO dates (`YYYY-MM-DD`) alongside US and UK formats.
* Stronger permission checks, administrator-only CSV exports, and mandatory default administrator password changes.
* Career Portal CAPTCHA and server-side candidate sessions replace persistent candidate authentication cookies.

Read the [0.12.0 release notes](https://github.com/opencats/OpenCATS/releases/tag/v0.12.0), [current user guidance](https://documentation.opencats.org/using-the-software), and [upgrade notes](https://documentation.opencats.org/technical-configuration-options/opencats-backup-restore-and-upgrade-instructions-this-section-incomplete#upgrading-to-0120) before deploying.

## Which package should I install?

For a normal installation, download one of the prepared **full** release archives from GitHub Releases. These include the production Composer dependencies and are intended to be easier to install than GitHub's automatically generated source archives.

If you install from source, clone the repository, or download source code instead of a prepared full release archive, install PHP dependencies with Composer:

```bash
composer install --no-dev
```

Use `--no-dev` for production so development and test packages are not installed. Developers who need to run the test suite should run Composer without `--no-dev`.

## Before upgrading

Before upgrading an existing OpenCATS installation, take a CLI database backup, back up `attachments/`, preserve your `config.php`, and test the restore/upgrade process outside production first. See [Backup, Restore, and Upgrade](https://documentation.opencats.org/technical-configuration-options/opencats-backup-restore-and-upgrade-instructions-this-section-incomplete).

## Documentation status

This documentation is maintained by the OpenCATS community. If you find a mistake or a missing workflow, please submit a pull request to the [GitBook documentation repository](https://github.com/opencats/gitbook). Some older integration guides are retained as historical reference and are labelled accordingly.


# Introduction and Overview

![](https://1269012679-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFMP3hgt72kl23HAv7iDu%2Fuploads%2Fgit-blob-81098d5dfe622f4eb051f4b0e560113e3560d0fd%2Fopencats-logo.svg?alt=media)

OpenCATS is a free and open source, full-featured, web-based applicant tracking system, or ATS. It helps you manage the complete recruitment life-cycle from business development through finalizing a placement. It manages a huge range of information for you, including:

### What is an Applicant tracking system (ATS)?

An Applicant tracking system, or ATS, is software designed specifically for Recruiting firms, and HR departments within organizations to organize and track everything within the recruiting process for their organizations.

### How is it free and what is Open Source software?

Without getting too specific or technical on what is and is not open source, open source software is community developed software that is available to use for free, by anyone, at any time, in any way they choose to. It is truly “free” software. Furthermore, because of the open nature, if you want to dig into the code and customize it, you are allowed to. If you want to share your changes back with the community, you are allowed to (please do!).

There are a lot of different variances in open source software and they’ve been covered extensively online. If you want to really dig into, and understand the purpose, intentions, limitations of open source software, please read up on it.

The developers behind OpenCATS will never contact you to try to sell you anything. We are a community of people creating recruiting software for people who do recruiting. Pure and simple.

### OpenCATS vs CATSOne vs “open source”

OpenCATS is a free, open-source ATS. This means that there are no charges or limitations to install or to use it.

* For software developers, this also means that you are free to modify or extend the OpenCATS software, and to participate as a member of its development community.
* This also means that there is no help desk that you can call for support, though we do have this documentation, some YouTube videos, support forums and a community that helps.

The origins of OpenCATS are in a commercial/open-source development effort called CATS, which split into two separate efforts:

* This open-source OpenCATS system: [http://www.opencats.org](http://www.opencats.org/)
* The commercial CATS product: [http://www.catsone.com](http://www.catsone.com/)

The commercial CATS product is a highly polished, professionally supported, hosted software service.

OpenCATS, on the other hand, has somewhat less functionality, is installed on your server(s), and is supported only by you – with some help from the community.

The OpenCATS team and the CATSOne organization are not associated in any way. We will not push anyone into any paid service, any time, ever.

### What can OpenCATS be used for?

If you have to fill jobs, even if it’s only one or two jobs a year, OpenCATS can make your life a lot easier. It will work in small to enterprise sized environments. From one user to hundreds.

### How does OpenCATS compare to other free software and paid Applicant Tracking Systems?

Choose an ATS by testing your recruitment workflows, hosting requirements, integrations and support needs. OpenCATS is self-hosted and has no per-user licence fee, but operating, securing, backing up and maintaining the system still takes time and resources. Commercial services offer different features and support arrangements.

With a self-hosted installation you control where the data is stored and who can access it. That control also makes your organisation responsible for security, updates and tested backups. See the [installation guides](https://documentation.opencats.org/installation) and [security guidance](https://documentation.opencats.org/technical-configuration-options/security).

### OpenCATS General Features

Try our demo!

What better way to dig in to the OpenCATS capabilities and feature than to dig into it for yourself?

[OpenCATS Demo](http://demo.opencats.org/) (Currently offline!)

**Free:** OpenCATS is open source software. Which means it is free (no cost) to use, and you are free to modify it in (almost) any way you want. Seriously, if you can do it, get down into the code and change absolutely anything!

**Support:** It also means support may be hard to find. We have an active community of people that are willing to help as much as possible though. Also, we are slowly adding to our documentation and YouTube channel.

**It is easy:** OpenCATS has an easy to use, intuitive interface. This means minimal training time for you and your recruiters. The job portal has a simple search and application process that your candidates will get through easily.

**Web based or local:** OpenCATS can be installed in a variety of environments. For the solo recruiter/single user, OpenCATS can be installed on your local computer, accessible only by you. OpenCATS can be installed on a local network, accessible by everyone within the office, with no limit on users, yet still protected and removed from the outside internet. OpenCATS can also be installed and accessible via the internet, through a public facing web server, A VPS, a shared-hosting environment, so multiple users from all over the world can access and use OpenCATS together. Keep in mind though, that because OpenCATS is open source software, security is your responsibility. Make sure the appropriate measures are taken for the setup that you choose.

**Full recruiting life-cycle:** OpenCATS provides the infrastructure for the entire recruiting life-cycle, regardless of the type of role that you are recruiting for, or the volume of openings that you are dealing with.

Note

OpenCATS can get cumbersome for very high-volume recruiting due to the current lack of bulk recruiting features. Importing and dealing with many candidates at once per role may be prohibitive in OpenCATS. You would need to gauge the effort against the results and decide if OpenCATS is the best solution for your situation.

OpenCATS will walk you through the process, including the sales cycle, from building targeted lead lists, making client calls, getting signed agreements and taking job orders. It will handle all of recruiting, from initial candidate intake, job posting and applications, through the interview, offer, acceptance and candidate start. OpenCATS was designed by recruiters, for recruiters and continues to be developed with recruiting as the sole focus.

**Internal and external recruiting:** OpenCATS has all the functionality for companies that need an Applicant Tracking system for their internal recruiting as well as recruiting companies that are recruiting for multiple, external clients.

For internal recruiting, all recruiting can be done by checking the “Internal posting” check-box on the job order. Departments can be created and customized within any organization, and contacts added for those departments. OpenCATS can be as thorough and specific as you need it to be. For recruiting firms with external clients, each client can be tracked individually, even if they have multiple locations, departments and hiring managers. The flexibility is there within OpenCATS to ensure accuracy throughout the recruiting process.

**Company branding:** OpenCATS can be branded for your organization, you can replace the OpenCATS logo with your company logo, and the public-facing job posting page and outgoing emails, can be changed to match the look of your company’s website and emails. **Search and tags:** OpenCATS provides candidate searches, key-skills fields and record tags. Document text extraction depends on the optional parser utilities and their configuration; Sphinx is an optional search integration. Tags label records and do not replace resume text search. See [Prerequisites](https://documentation.opencats.org/technical-configuration-options/pre-requisites).

**Lists:** Users can manually group candidates, contacts and other records for later reference. Lists are not automatically refreshed searches and need ongoing review. CSV export through the export module requires Site Administrator access.

**Calendar:** OpenCATS has a rich and immersive calendar built in that provides a thorough and accurate overview of activities. If you use the calendar system, you will always know what is coming up, and be able to quickly find information from past scheduled events. Unfortunately, at this time, there is no integration with any external calendar systems. OpenCATS can not sync with anything outside of OpenCATS.

**Website integration and job board:** OpenCATS has a company job postings page built right in. All you have to do is turn it on and brand it however you want. All the “public” marked jobs in your OpenCATS system will show up on your jobs page, and candidates will be able to apply through your site. You can create questionnaires for candidates to answer prior to applying, to ensure only candidates that fit the requirements apply. The candidate would then be added to the pipeline of the job order, and the recruiter working the role would be notified of the new application for review. Lastly, your newly added openings can be automatically posted to certain job posting sites via a built in XML feed. This feature does not work with every job board out there, but it does work with some of the larger ones.

**Candidate and client management:** From the first phone call to the last email. OpenCATS will help you keep track of all the details, activities, records, contact numbers and keep your work-flow managed.

**Reporting:** Generate reports on recruiting activity for a quick and accurate overview.

**Ownership of data:** You own it. It’s yours. You can control it and secure it however you want. No need for your data to be on someone else’s servers, unless that is how you choose to do it.

**Backup and restore:** Back up the MariaDB database, attachments, configuration and customisations, and test recovery regularly. CLI database and filesystem backups are the recommended operational approach; a GUI backup alone should not be assumed to cover everything. See [Backup, Restore, and Upgrade](https://documentation.opencats.org/technical-configuration-options/opencats-backup-restore-and-upgrade-instructions-this-section-incomplete).

**User access levels:** Administrators assign access levels that control actions within OpenCATS. Version 0.12.0 strengthens existing authorization checks and restricts CSV exports to Site Administrators. Ownership filters such as “Only My Candidates” are not a guarantee of record isolation. See [Access control lists](https://documentation.opencats.org/technical-configuration-options/access-control-lists).

**Built in Emailing:** The email functionality within OpenCATS is substantial. Currently, OpenCATS can be used to send emails to candidates, clients, and contacts. It can also be used to notify of status changes and new applications, or anything you would like it to do. Templates can be set up and used and branding can be included.

**Built in modification system:** There are certain aspects of modifying OpenCATS that are built in and do not require any technical ability or coding. Fields can be added to the candidate, client, and contact pages quite easily. Any information you want included, or tracked, that isn’t built in to OpenCATS can be added through the intuitive interface with a few clicks.


# Licensing

OpenCATS licensing should mirror the application repository `LICENSE.md`.

The application is available under two licenses:

1. OpenCATS code is under the **Mozilla Public License 2.0**.
2. Original code from the **CATS Project** circa 2007 is under the **CATS Public License Version 1.1a**, a modified Mozilla Public License.

For the full license text, see the `LICENSE.md` file in the OpenCATS application repository:

<https://github.com/opencats/OpenCATS/blob/master/LICENSE.md>


# Authors and Contributors

OpenCATS is maintained by the OpenCATS community.

## Contributing

The application source code is maintained at:

<https://github.com/opencats/OpenCATS>

Documentation is maintained separately in the GitBook documentation repository.

Before opening an application pull request, read [CONTRIBUTING.md](https://github.com/opencats/OpenCATS/blob/master/CONTRIBUTING.md) and the [Modernisation & Contributor Roadmap](https://github.com/orgs/opencats/projects/2). Pull request titles use `type: description`, for example `docs: update installation guidance`. See the [Developer Guide](https://documentation.opencats.org/technical-configuration-options/developer-guide#pull-request-title-format) for allowed types.

If anyone has been forgotten, please let us know! <russh@opencats.org>


# Installation

OpenCATS can be installed from a release archive, from source with Composer, or in the repository Docker environment for development and testing.

## Choose an installation path

* **Linux/Unix production-style install:** use the [Ubuntu installation guide](https://documentation.opencats.org/installation/install-on-ubuntu) as the primary documented path.
* **Windows/WAMP/XAMPP install:** use the [Windows guide](https://documentation.opencats.org/installation/install-on-windows). OpenCATS is known to be deployed on Windows, but the project builds and tests only in a Linux/Unix CI environment.
* **Docker:** use the [Docker guide](https://documentation.opencats.org/technical-configuration-options/docker-opencats-installation-instructions) for development and testing. Some experienced users deploy Docker in production, but the repository Docker setup is not the recommended production configuration without hardening.
* **Existing installation upgrade:** read [Backup, Restore, and Upgrade](https://documentation.opencats.org/technical-configuration-options/opencats-backup-restore-and-upgrade-instructions-this-section-incomplete) before changing files or database schema.

## Baseline requirements

OpenCATS 0.12.0 requires PHP 8.4.1 or later within PHP 8. Project CI tests PHP 8.4.27 and PHP 8.5.12, with MariaDB 10.7 used by the Docker-backed integration and Behat test environment. Install the required PHP extensions, create a MariaDB database and user, and ensure OpenCATS writable directories are owned by the web server user.

Use a currently patched PHP 8.4 or 8.5 runtime; the Composer minimum does not mean that old PHP patch releases are secure. See [Prerequisites](https://documentation.opencats.org/technical-configuration-options/pre-requisites).

For normal installations, use a prepared **full** release archive from GitHub Releases so production Composer dependencies are already included.

If you use a source checkout or GitHub source archive instead, install dependencies with:

```bash
composer install --no-dev
```

After files, database, and permissions are ready, continue to [Run the Installer](https://documentation.opencats.org/installation/run-the-installer).


# Install on Ubuntu

These instructions describe a Linux/Apache/MariaDB/PHP installation path for OpenCATS 0.12.0. Commands may need small adjustments for your Ubuntu release and package repositories.

## Install MariaDB and Apache

```bash
sudo apt-get update
sudo apt-get install mariadb-server mariadb-client apache2 unzip wget software-properties-common
sudo mysql_secure_installation
```

MariaDB is the documented database family for OpenCATS. Current CI Docker tests use MariaDB 10.7.

## Install PHP 8.4 and extensions

OpenCATS 0.12.0 requires PHP 8.4.1 or later within PHP 8. Project CI tests PHP 8.4.27 and PHP 8.5.12. If your Ubuntu release does not provide PHP 8.4 packages directly, use a trusted package source such as the Ondrej Surý PHP PPA.

```bash
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.4 php8.4-cli php8.4-fpm php8.4-mysql php8.4-gd php8.4-soap php8.4-ldap php8.4-xml php8.4-curl php8.4-mbstring php8.4-zip
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php8.4-fpm
sudo systemctl enable --now php8.4-fpm
sudo systemctl restart apache2
```

This example uses PHP-FPM. If Apache already uses a different PHP handler or FPM version, adjust the virtual host and disable the conflicting handler before switching. Confirm that both CLI PHP and the web server use the intended version; `php -v` checks only the CLI. Use current security-patched packages, not an old PHP 8.4.1 installation.

## Optional document parsing utilities

Install these if you want OpenCATS to extract text from common resume and document formats:

```bash
sudo apt-get install antiword poppler-utils html2text unrtf
```

After installation, verify or update the parser paths in `config.php` if your distribution installs binaries in non-standard locations.

## Create the MariaDB database and user

Log in to MariaDB as root:

```bash
sudo mysql -u root -p
```

Then create a database and user. Replace `databasepassword` with a strong unique password.

```sql
CREATE DATABASE opencats CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'opencats'@'localhost' IDENTIFIED BY 'databasepassword';
GRANT ALL PRIVILEGES ON opencats.* TO 'opencats'@'localhost';
FLUSH PRIVILEGES;
EXIT;
```

These database credentials are separate from your OpenCATS application login.

## Download OpenCATS

Download the latest prepared **full** release archive from [GitHub Releases](https://github.com/opencats/OpenCATS/releases). For OpenCATS 0.12.0:

```bash
cd /var/www/html
sudo wget https://github.com/opencats/OpenCATS/releases/download/v0.12.0/opencats-v0.12.0-full.zip
sudo unzip opencats-v0.12.0-full.zip -d opencats
```

The full release archive includes production Composer dependencies. If a future release asset name differs, use the exact filename shown on GitHub Releases.

## Installing from source instead

If you clone the repository or download source code instead of using a prepared full release archive, install Composer dependencies:

```bash
cd /var/www/html/opencats
composer install --no-dev
```

Use `--no-dev` for production-style installs.

## Configure ownership and permissions

The web server user must own or be able to write OpenCATS runtime directories:

```bash
sudo chown -R www-data:www-data /var/www/html/opencats
sudo chmod 750 /var/www/html/opencats
sudo chmod 770 /var/www/html/opencats/attachments
sudo chmod 770 /var/www/html/opencats/upload
sudo chmod 770 /var/www/html/opencats/temp
```

If you restore from a GUI backup file, also create and make a `restore/` directory writable by the web server user.

## Start the installer

Open your browser at your OpenCATS URL, for example:

```
http://your-server/opencats/
```

If an `INSTALL_BLOCK` file exists before first install, remove it so the installer can run:

```bash
sudo rm /var/www/html/opencats/INSTALL_BLOCK
```

After installation, confirm `INSTALL_BLOCK` exists so the installer is not exposed again.

Now continue to [Run the Installer](https://documentation.opencats.org/installation/run-the-installer).


# Install on Windows

OpenCATS is known to be deployed in many Windows/WAMP/XAMPP environments. However, the OpenCATS project builds and tests in a Linux/Unix CI environment only. WAMP and XAMPP can work, but Windows-specific behavior is not covered by automated project testing.

## Windows prerequisites

Install a Windows web stack that provides:

* PHP 8.4.1 or later within PHP 8
* MariaDB
* Apache or another PHP-capable web server
* phpMyAdmin or another MariaDB administration tool

OpenCATS CI currently tests PHP 8.4.27 and PHP 8.5.12. XAMPP and WAMP are common Windows choices, but make sure the version you install provides a compatible PHP release or allows you to configure one.

Use a currently patched PHP 8.4 or 8.5 build. Upgrading OpenCATS alone does not patch the Windows PHP runtime.

## Download OpenCATS

Download the current prepared **full** release archive from [GitHub Releases](https://github.com/opencats/OpenCATS/releases). The full release archive includes production Composer dependencies. Extract it under your web root, for example:

```
C:\xampp\htdocs\opencats
```

If you download source code or clone the repository instead of using a prepared full release archive, install Composer for Windows and run this from the OpenCATS directory:

```bat
composer install --no-dev
```

## Start Apache and MariaDB

Open your XAMPP or WAMP control panel and start only the services you need:

* Apache
* MariaDB/MySQL service provided by the stack

Even if the control panel labels the service as MySQL, use a MariaDB-backed stack for the documented OpenCATS path.

## Create the database in phpMyAdmin

Open phpMyAdmin, usually at:

```
http://localhost/phpmyadmin/
```

Create a database named `opencats`. Use UTF-8 character set and collation when available, for example:

```sql
CREATE DATABASE opencats CHARACTER SET utf8 COLLATE utf8_general_ci;
```

Create a database user, for example `opencats`, and grant that user all privileges on the `opencats` database. Use a strong password and save it for the installer.

## Configure parser utility paths on Windows

Document parser utilities are optional, but if you install them, Windows paths in `config.php` must use escaped backslashes. For example:

```php
define('ANTIWORD_PATH', 'C:\\antiword\\antiword.exe');
define('PDFTOTEXT_PATH', 'C:\\path\\to\\pdftotext.exe');
define('HTML2TEXT_PATH', 'C:\\path\\to\\html2text.exe');
define('UNRTF_PATH', 'C:\\path\\to\\unrtf.exe');
```

## Run the installer

Open your browser at:

```
http://localhost/opencats/
```

If an `INSTALL_BLOCK` file exists before first install, remove it so the installer can start. After installation, confirm `INSTALL_BLOCK` exists again so the installer is not left exposed.

Continue to [Run the Installer](https://documentation.opencats.org/installation/run-the-installer).


# Run the Installer

After the web server, PHP, MariaDB database, OpenCATS files, and directory permissions are ready, open OpenCATS in your browser.

For a local installation, use:

```
http://localhost/opencats/
```

For a server or VPS, use the hostname and path you configured.

## If the installer does not start

OpenCATS starts the installer when `INSTALL_BLOCK` is missing. If you are doing a first-time installation and the installer does not appear, check whether `INSTALL_BLOCK` exists in the OpenCATS directory and remove it only for the installation step.

After installation or upgrade, confirm `INSTALL_BLOCK` exists again so the installer is not exposed.

## Database connectivity

Enter the MariaDB database name, user, password, and host you created during installation.

Common host values:

* `localhost` for a normal local Linux or Windows stack.
* `opencatsdb` for the repository Docker Compose development environment.
* A hosting-provider database hostname for shared hosting or managed database services.

Use the installer database connectivity test before continuing. If the test fails, confirm:

* the database exists;
* the database user has privileges on that database;
* the password is correct;
* the database host is reachable from the web server;
* PHP has the MariaDB/MySQL extension installed.

## Unsupported MySQL hosting and `ONLY_FULL_GROUP_BY`

OpenCATS is developed and tested with **MariaDB**, not Oracle MySQL. Shared hosting providers (including some Bluehost plans) may supply MySQL rather than MariaDB. A successful database connection does **not** mean that all OpenCATS queries will run correctly on MySQL.

A known compatibility problem is MySQL's `ONLY_FULL_GROUP_BY` SQL mode. Existing OpenCATS queries can fail with an error similar to `Expression ... is not in GROUP BY clause`. This has been reported previously in [issue #329](https://github.com/opencats/OpenCATS/issues/329) and [issue #413](https://github.com/opencats/OpenCATS/issues/413); these are historical reports, not promises of MySQL support.

**Recommended solution:** Use a hosting service offering a supported MariaDB database. If you must use MySQL and understand the risks, the following *site-local, untested compatibility workaround* removes **only** `ONLY_FULL_GROUP_BY` for OpenCATS' database connection. Make a backup first. In `lib/DatabaseConnection.php`, inside `DatabaseConnection::connect()`, after the successful `mysqli_select_db()` check and immediately before `return true;`, add:

```php
if (!mysqli_query(
    $this->_connection,
    "SET SESSION sql_mode = sys.list_drop(@@SESSION.sql_mode, 'ONLY_FULL_GROUP_BY')"
)) {
    throw new RuntimeException(
        'Unable to change MySQL session SQL mode: ' . mysqli_error($this->_connection)
    );
}
```

This uses MySQL's `sys.list_drop()` function. Some shared-hosting accounts may not have access to the `sys` schema; if this fails, contact your hosting provider rather than disabling all SQL modes. The change applies **only to the current connection**, not the server's global configuration, and must be reapplied to local OpenCATS files after application upgrades. It is **not** an OpenCATS project patch.

**Do not use** `SET SESSION sql_mode = ''` as a general workaround: it turns off additional SQL validation protections, including strict data handling. Even the narrower workaround relaxes `GROUP BY` validation and can allow ambiguous grouped results; it does not correct the underlying SQL. Test candidate lists, reports, data edits and upgrades carefully. Other MySQL incompatibilities may remain, and MySQL installations are outside the project's support and CI matrix.

## Resume indexing and document parsing

OpenCATS can use external tools to extract text from uploaded resumes and documents. The installer may ask for paths to these tools. Typical Linux paths are:

```
/usr/bin/antiword
/usr/bin/pdftotext
/usr/bin/html2text
/usr/bin/unrtf
```

OpenCATS can be installed without these tools. Resume indexing and text extraction will be limited until you install the utilities and configure the paths in `config.php`.

## Mail settings

OpenCATS can send mail through PHP mail, Sendmail, or SMTP. If you do not want OpenCATS to send email immediately, disable mail during installation and configure it later.

For SMTP, collect these values before enabling mail:

* SMTP host
* SMTP port
* authentication username
* authentication password or app password
* security mode such as `tls` or `ssl`

OpenCATS uses PHPMailer for email delivery.

## Installation type

The installer may offer options such as:

* new installation;
* demo/test data installation;
* restore from backup;
* use an existing OpenCATS database and perform required upgrades.

For production upgrades, use the existing installation/upgrade path only after taking CLI backups and testing the upgrade on a copy of production data.

## First login

For a new installation, the default login is:

```
admin / cats
```

OpenCATS 0.12.0 requires the default administrator password to be changed after login. Complete that step before using the application.

## Post-install checklist

After clicking `Start OpenCATS` and logging in:

* Change the default administrator password.
* Confirm `INSTALL_BLOCK` exists.
* Confirm `attachments/`, `upload/`, and `temp/` permissions are no broader than necessary.
* Configure upload-directory execution restrictions before exposing the career portal or accepting uploads.
* Configure mail and scheduled reminders if needed.
* Take an initial CLI database and attachments backup.

If you are exposing OpenCATS to the web, review [Security](https://documentation.opencats.org/technical-configuration-options/security) and [Vital Security: Restrict access to upload folders (.htaccess)](https://documentation.opencats.org/technical-configuration-options/vital-security-restrict-access-to-upload-folders-.htaccess).


# Using the software

This guide covers the released OpenCATS 0.12.0 workflows. The interface now uses Bootstrap 5.3; the core Company, Contact, Job Order, Candidate, Activity and Calendar records remain familiar.

Start with [Companies, contacts, job orders, and candidates](https://documentation.opencats.org/using-the-software/companies-contacts-job-orders-and-candidates), then use [Screens In-Depth](https://documentation.opencats.org/using-the-software/screens-in-depth) for navigation and reporting.

## Changes to expect in 0.12.0

* **Forms and dialogs:** refreshed styling and layouts across the main modules, login, installer and Career Portal. Use the labelled controls; positions can vary with screen width and local customisations.
* **Rich text:** SunEditor replaces CKEditor for formatted content. Check the preview before sending an email or publishing a job description, especially when pasting formatted text or using older templates.
* **Charts:** Hiring Overview, job-order pipeline and EEO charts use Chart.js. Associated tables expose exact values. The recruiting-summary PDF shows a numeric summary instead of a graph image.
* **Dates:** administrators can select US, UK or ISO (`YYYY-MM-DD`) in Settings → Administration → Localization. Existing installations keep their chosen format.
* **Exports:** CSV exports through the export module require Site Administrator access. Other actions depend on your access level and the records you can see.
* **Career Portal:** returning-candidate verification uses CAPTCHA and a server-side session. Persistent “Remember my information” authentication has been removed.

## Lists and tags

Lists group records that users add to them. They are not live searches that automatically gain or lose members when candidate details change. Review membership and ownership regularly; a list's name does not guarantee that its records are still current. Tags are record labels, not a replacement for activity history or job-order pipeline status.

## Reading reports

Home Hiring Overview counts submission, interview and placement status-change events in four calendar periods. Repeated transitions can count more than once, and the current period is incomplete. Do not read these as distinct-candidate totals.

Job-order pipeline chart categories are cumulative and can overlap. They are not separate shares of a total. Use the pipeline table to inspect the individual candidates.

For shipped changes and upgrade considerations, see the [0.12.0 release notes](https://github.com/opencats/OpenCATS/releases/tag/v0.12.0). Future roadmap items are not necessarily available in this release.


# Companies, contacts, job orders, and candidates

These workflows apply to OpenCATS 0.12.0. Forms use Bootstrap 5.3, so positions may differ from older versions or custom themes. See [Using the software](https://documentation.opencats.org/using-the-software) for the main release changes.

### Using OpenCATS-The building blocks: companies, contacts, job orders, and candidates

### The modules

OpenCATS is made up of the following modules:

**Home:** When you log into OpenCATS, you will see the Home module. The dashboard shows recent activity, upcoming events, recent hires, Hiring Overview and Important Candidates.

**Activities:** All of your daily activities and interactions with candidates, companies and contacts are populated in this module.

**Job Orders:** All of the available Job Orders are displayed in this module. Search existing and create new Job Orders.

**Candidates:** All of the available Candidates are displayed in this module. Search existing and create new Candidates. Access your Saved Lists.

**Companies:** All of the available Companies are displayed in this module. Search existing and create new Companies.

**Contacts:** All of the available Contacts are displayed in this module. Search existing and create new Contacts. Access your Cold Call List.

**Calendar:** All scheduled events are populated in this module. By default, the Calendar shows the week view of the current week. Add new Events and access your Upcoming Events.

**Reports:** All available reports are populated in this module.

**Settings:** Users can view their profile and change their password. Administrators manage users, Career Portal settings, email configuration, localization, imports and backups.

Note

Let’s start entering in information and populating our fantastic new OpenCATS system.

### Add a new Company

Click on `Companies`

Note

I have already entered some test information. A new system screen will look a little different.

This is your main company screen. This will have an overview of all the companies in your OpenCATS system. From new leads, to active clients and old clients. They will all be here.

Note

For internal hiring (your company), select `Internal postings` as the client.

Click on `Add Company`

There are two ways to add information into OpenCATS.

* Copy and paste it into the box labeled `cut and paste free-form address here` Then click the `<--` button to populate the fields.
* Manually type and paste it into each field on the left.

Note

Don’t forget to enter key technologies for the company and any miscellaneous notes that you want to save in the bottom two fields for future reference.

Warning

The success rate of auto-populating the information fields for me has always been terrible. Sometimes it works great, sometimes it’s doesn’t. I usually just enter the fields one at a time manually.

If it worked, it should look like this. If some of the information did not populate, manually enter it and let’s move one.

This is what you should see.

Click `Add Company`

Voila! You have a new client!

If you want to add any relevant attachment documents such as a copy of your client agreement, benefits overview, etc. Click the `Add Attachment` button.

### Add a new Contact

Next let’s add a Company Contact.

Click `Add Contact` at the bottom of the current screen.

Fill in all the information fields, including any relevant notes that’s you want to remember for later. Then click `Add Contact`

You should now see the contact listed in the Contacts section of the Company screen.

### Add a new Job Order

From the current screen, let’s add our first Job order. Click `Add Job Order` in the Job Orders section of Bob’s Company page.

Note

OpenCATS is set up to run Direct-hire (Perm) or Contract (project) jobs. We will note the differences below.

Let’s look at the fields in the **Add Job Order** screen:

The fields on the upper left column are self-explanatory.

* **Start Date** is when the hired candidate should start.
* **Duration** The length of contract (Project) for a temporary role. It this is a permanent role, you can put “direct hire”, whatever you want, or just leave it blank.
* **Maximum rate** Self-explanatory
* **Type** This drop-down field let’s you select the type of role. Options are: Hire, Contract to hire, Contract, or freelance
* **Salary** Put the salary range here
* **Openings** Number of openings
* **Company Job ID** This is for the unique Job ID assigned to this role.
* **Hot** If this is a hot job, check this box.
* **Public** If you have the OpenCATS job board set up (we will do this later), checking this box will make this job order visible on it. Candidates will be able to view and apply.
* **Description** Enter your job description here
* **Internal Notes** Any notes or information entered here will be visible within your company, but not visible on your public job board.

Note

If you have the public job board set up (we will go through this later), all the information on this screen **except** the **Internal Notes** section will be viewable to anyone looking at your jobs. Including the listed salary information. If you do not want that visible, put it in the **Internal Notes** section.

Click `Add Job Order`

This will take you to your new Job Order screen.

If everything looks correct, let’s move on to adding our first candidate in OpenCATS and into the pipeline for this job.

### Adding a Candidate and attaching them to the Job Order pipeline

Click `Add Candidate to This Job Order Pipeline` at the bottom of the screen.

Then `Add Candidate`.

Click `Browse` to upload a resume from your local file system.

From this screen you need to manually copy and paste into the information fields on the left. When you have filled out all of the necessary information, click `Add Candidate` in the bottom left corner.

Success! We have a candidate in the pipeline!

Note

Make sure to Rate your candidates with the stars under **Match** on the bottom this screen. It will help with quick reference later on.

## Current behavior notes for OpenCATS 0.12.0

Recent OpenCATS versions changed several day-to-day workflows:

* **Contact title is optional.** You can create a contact without entering a title if that information is not known.
* **Job order state is optional.** Job orders can be saved without a state value when the role is remote, international, or otherwise not tied to a state/province.
* **Activity date and time can be set manually.** The date/time when an activity happened is separate from the date/time when the record was created.
* **Closed jobs are excluded from activity job references.** When logging activities, expect closed job orders to be hidden from active job reference lists.
* **Status change notes are safely rendered by templates.** Do not rely on custom inline HTML being stored in activity notes.

These changes make data entry more flexible while keeping activity history clearer.


# Screens In-Depth

[Using the software](https://documentation.opencats.org/using-the-software)

This page describes the main screens in OpenCATS 0.12.0. Bootstrap layouts adapt to screen width; use the control labels rather than older descriptions of colours or positions. Available actions also depend on your permissions.

### OpenCATS dashboard/home screen

Note

The Home dashboard groups recent activity, upcoming events, hires, Hiring Overview and Important Candidates in cards beneath the shared navigation.

* **The main OpenCATS module tabs:** The main navigation tabs.
* **Recent:** Your five most recently viewed candidates/contacts. Names are clickable for quick access.
* **Quick Search:** Search for candidate/contact name, job title, and Company name
* **My Recent Calls:** Most recent candidate/contact calls. Names are clickable for quick access.
* **My upcoming calls:** List of upcoming, scheduled calls, IF scheduled in OpenCATS.
* **My upcoming events:** Upcoming events scheduled in OpenCATS.
* **Recent Hires:** Short list of your company’s most recent hires
* **Hiring Overview:** Submission, interview and placement status-change events across four calendar weeks, months or years. Switch the period with the range controls. The current period is incomplete and repeat transitions may count more than once. The values table provides exact counts.
* **Important Candidates:** Small overview of some recent candidate activity. The columns in this section are adjustable by dragging the column title left or right.

### Activities Screen

The activities screen gives you an overview of recent candidate, company and contact activities.

Note

The rows at the top always stay the same in OpenCATS (Main navigation tabs, recent, and quick search). We won’t cover that again in the documentation.

* **Time-frame of results:** Click these to filter your results by day, week, month, etc.
* **Rows per page:** Click the drop-down bar to change the amount of results per screen. 15, 30, 50, or 100
* **Filter:** Options to filter results by Date, Regarding, Activity, Notes, Entered By
* **Activity columns:**
  * **Show Columns:** Select which columns to be visible in the activities grid
  * **Rearrange Columns:** Columns can be moved left and right by grabbing the column name and moving it left or right.
  * **Sort Columns:** Each column can also be sorted alphabetically by clicking the column title at the top of the column.

### Job Orders Screen

The Job Orders screen is job order specific. It is where all the job orders are.

Note

The job order screen is structured similarly to the Activities screen. So we won’t go through the same features again.

In the top, right, highlighted row, we have the following:

* **Active/On Hold/Full Drop-down box:** This allows you to filter your results based on the status of the job order. Options are: `Active/On Hold/Full`, `Active`, `On Hold/Full`, `Closed/Canceled`, `Upcoming/Lead`, `ALL`.
* **Only My Job Orders:** This will return results that are only your job orders.
* **Only Hot Job Orders:** This will return results that are only marked as Hot Jobs.

**Show Columns:**

There are quite a few options here to select or deselect. The checked options will include in the job order screen information. Use the column selector to inspect the available fields.

Note

As with the other screens, all columns can be moved left and right, as well as sorted alphabetically.

The last thing to note on the Job order screen is the action button in the bottom left corner.

Action:

* Clicking the action button will allow you to export results to a .csv sheet, or import results to a hot-list within the OpenCATS system. We will go into those further later in the documentation.

Add specified job orders to an OpenCATS Hot-list, or export them to a CSV:

* Select the checkbox (next to `action`), this will select all the boxes on this screen only.
* Manually select specified candidates
* Then `export` or `add to list` and click `selected`.

OR:

* select `action` then `add to list` or `export` and select `all` to include the entire database (in this case, it would include ALL of the job orders in your OpenCATS system) in your hot-list or CSV export.

### Candidates Screen

The main Candidates screen is laid out similarly to the others.

There are two checkboxes in upper right for filtering the results on this screen. `Only My Candidates` and `Only Hot Candidates`.

Again, there are additional options below that with the `Rows Per Page` dropdown and the `Filter` dropdown.

As before, the columns can be moved right and left by dragging the column title word at the top, and columns can be added or removed by the Show Columns (Image of a grid) in the upper left corner of the main section of the candidates screen. Use the column selector to inspect the available fields.

Depending on access level, the `Action` control offers different candidate actions. You can select specific candidates, the candidates showing on the screen, or all of the candidates in OpenCATS and `Add to List`, `Add To Pipeline`, `Send E-Mail`, or `Export`.

* **Add to List:** Add to a hotlist
* **Add To Pipeline:** Add to a job order pipeline
* **Send E-Mail:** Means type your own email to candidate(s) or use an OpenCATS template.
* **Export:** Export selected candidates to a CSV file. CSV exports through the export module require Site Administrator access in 0.12.0; ordinary recruiter accounts do not have this action.

CSV export actions described above use the administrator-only export module. Adding records to a list or pipeline remains subject to the relevant module permissions.

### Companies Screen

The main Companies page is very similar to the Candidates page. Everything functions the same, and it has the same options.

The only exception is that there are different columns available to choose in the `Show Columns` button. Use the column selector to inspect the available fields.

### Lists Screen

Hot lists, Lead Lists, tear sheets, call lists. Whatever you call them, most recruiters have used them at some point. OpenCATs has them here.

Use `Show Lists` to view lists. Membership is maintained manually; lists do not automatically refresh as a saved search would. Review older lists before using them for calls or mailings.

### Calendar Screen

The Calendar is a central hub for your OpenCATS usage. Every phone call and event, if scheduled through OpenCATS will appear here. The default Calendar screen will show a list of upcoming events in the left column and a Calendar overview on the right.

* `My Upcoming Events:` Shows all upcoming, scheduled events in the left column.
* `Add Event:` Add a new event to your calendar
* `Goto Today:` Shows you todays events
* Calendar date views can be changed by clicking: `Day`, `Week`, or `Month`.
* The Green Arrows can be clicked to move you back or forward on the Calendar.

Every Event box within the calendar is clickable for event information, which will appear in the left column.

Red Arrows:

* The first arrow points to a clickable icon that opens up the record of the Candidate included in the scheduled event.
* The middle red arrow points to an icon that indicates this is a “Public” event, which means it is viewable by any OpenCATS user.
* The third red arrow points to a clickable icon that opens up the record of the Contact included in the scheduled event.
* Lastly, every date number on the Calendar can be clicked on to view that date’s scheduled events.

Note

At this time, the OpenCATS calendar does not sync with outside calendars (Outlook, Google Calendar, etc.). However, that functionality CAN be added if you know a little coding, or a developer willing to do it.

### Reports Screen

The Reports screen displays counts for new Job Orders, Candidates, Companies, Contacts, Submissions and Placements across the available periods, plus totals to date. The submission and placement links open detailed reports.

Job-order pipeline and EEO charts use locally bundled Chart.js with tables of underlying values. EEO visibility depends on permissions and tracking configuration. Pipeline categories are cumulative and overlap, so they should not be added together as separate groups.

The job-order recruiting-summary PDF retains the report figures and notes, with a compact numeric summary replacing its former graph image.

### Settings Screen

There isn’t much to the settings screen.

In the upper left corner:

* `Administration` If you are the OpenCATS system administrator, this will take you to the administration screen.
* `My Profile` View your OpenCATS user profile or change your password.
* `Downloads` For now, this page serves no purpose. Disregard it completely.


# How-to's


# Hiding tabs

### Hiding some tabs all the time

If you only want to use a subset of the tabs available, you can customise the `printTabs()` method in `lib/TemplateUtility.php`. Locate the method by name rather than relying on line numbers. For example:

`if (empty($tabText) || $tabText === 'Companies' || $tabText === 'Job Orders' || $tabText === 'Activities') { continue; }`

Originally the line was:

`if (empty($tabText)) { continue; }`

and only add the modules you want to hide.

### Hiding tabs for users based on privilege

turn off / on tabs for different permissions. This is a way for tabs not to appear (but users may still access them)

At any time - you can get the permission of the logged in user with `$loggedInAccessLevel = $_SESSION['CATS']->getRealAccessLevel(); Real Access level returns the logged in user access:, Read Only - 100, Add / Edit - 200, Add / Edit / Delete (Default) - 300, Site Administrator - 400, Root - 500`

Adding this code to printTabs in TemplateUtility.php in the f`oreach ($modules as $moduleName => $parameters)` loop will hide certain tabs if a user does not meet the appropriate permissions. Module names are: home, activity, joborders, candidates, companies, contacts, lists, calendar, reports, settings

`$loggedInAccessLevel = $_SESSION['CATS']->getRealAccessLevel(); $minimumAccessLevel = array ("lists" => 400, "companies" => 400); if (array_key_exists($moduleName, $minimumAccessLevel)) { if ($loggedInAccessLevel < $minimumAccessLevel[$moduleName]) { continue; //Disabling module for the user by not showing it - if they do not have the minium access level } }`

This is partially supported in the [ACL implementatio](https://documentation.opencats.org/technical-configuration-options/access-control-lists)n - there is explained ACL.\
In some pages, there is a check for 'calculated''access level and required access level, if added into all pages (modules), then it shall be easy to hide menu an also to protect backend functionality. (hiding menu just don't show page to user but it is easy to construct get request to change values).\\

There was this change for some menu:\
<https://github.com/opencats/OpenCATS/pull/91/files#diff-1b811f65c6b10c3dc1cd71932e2f911dL46>

\
and also implementation in Template utility <https://github.com/opencats/OpenCATS/pull/91/files#diff-da82a11a9e0e4b5b31ac602622b777c5L647>

Usage is documented at: <https://github.com/AnritsuSolutionsSK/OpenCATS/blob/develop/lib/TemplateUtility.php#L576>


# Password resets

OpenCATS stores passwords with PHP `password_hash()` and verifies them with `password_verify()`. Older installations may still contain legacy hashes that OpenCATS migrates after successful login.

## Preferred reset method

When possible, have an administrator reset the user's password from inside OpenCATS. This avoids direct database edits and ensures the new password is stored with the current hashing method.

## Emergency database reset

If you are locked out and must reset a password directly in MariaDB, do **not** use MD5. Generate a modern PHP password hash first.

Use the same supported PHP runtime as the OpenCATS installation:

```bash
php -r "echo password_hash('NewStrongPasswordHere', PASSWORD_DEFAULT), PHP_EOL;"
```

Copy the generated hash. Then update the relevant user record in the OpenCATS database using phpMyAdmin or the MariaDB CLI. The exact user table and user ID depend on your installation, so make a database backup before changing anything.

Example CLI workflow:

```bash
mysqldump -u opencats -p opencats > before-password-reset.sql
mysql -u opencats -p opencats
```

Then inspect the users table, identify the correct account, and update only that account's password field with the generated hash.

## Security notes

* Do not store or share the temporary password in tickets, chat, or email.
* Require the user to change the password after login.
* Keep the pre-reset database backup only as long as required and protect it because it contains personal data and password hashes.
* If LDAP authentication is enabled, reset the password in the LDAP directory instead of the OpenCATS database.


# Emails & reminders

cronjob to send reminder emails for events / appointments

OpenCATS can send email through PHP mail, Sendmail, or SMTP. Calendar reminders require both email configuration and a scheduled job that invokes `QueueCLI.php`.

## Configure email

Email settings live in `config.php`.

`MAIL_MAILER` selects the delivery method:

* `0` - disabled
* `1` - PHP built-in mail support
* `2` - Sendmail
* `3` - SMTP

Common SMTP settings are:

```php
define('MAIL_MAILER', 3);
define('MAIL_SMTP_HOST', 'smtp.example.org');
define('MAIL_SMTP_PORT', 587);
define('MAIL_SMTP_AUTH', true);
define('MAIL_SMTP_USER', 'user@example.org');
define('MAIL_SMTP_PASS', 'strong-password');
define('MAIL_SMTP_SECURE', 'tls');
```

For Sendmail, configure:

```php
define('MAIL_MAILER', 2);
define('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail');
```

Do not commit real SMTP passwords to public repositories.

## Scheduled email reminders

OpenCATS sends calendar event reminders when `QueueCLI.php` is run by cron or another scheduler. A typical Linux cron entry runs every minute:

```cron
* * * * * /usr/bin/php /var/www/html/opencats/QueueCLI.php >/dev/null 2>&1
```

Use the correct PHP binary and OpenCATS path for your server.

A URL-based scheduler can also call the script, but local CLI execution is preferred when available:

```cron
* * * * * curl -fsS http://example.org/QueueCLI.php >/dev/null 2>&1
```

## Reminder template

The event reminder email template is configured in `config.php` as `$GLOBALS['eventReminderEmail']`. Back up `config.php` before changing the template.

## SMTP certificate problems

If you see certificate verification errors from PHPMailer, fix the server trust store or SMTP configuration where possible. Disabling certificate verification weakens security and should only be used as a temporary troubleshooting step.

PHPMailer troubleshooting documentation is available at:

<https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#certificate-verification-failure>


# Technical configuration options

This explains usage of optional add- ons or configuring advanced features (such as access controls)


# Technical overview of original OpenCATS Source code

Note

This was written for the original source code. It may not apply completely to the current OpenCATS version

We have not used any outside frameworks. The OpenCATS framework is very light and conceptually simple to understand. This allows for modifications to be isolated, preventing, for example, a small change to a template from affecting library code, or a major change in database structure from requiring a change to every single page.

Let’s have a look at the layout of the code OpenCATS is roughly divided into three parts:

> * Modules
> * Library Components
> * Templates

**Modules**

A module is loosely related to the tabs you see in the GUI and consists of the user interface logic and one or more “templates” to render the HTML page. Some of the modules in OpenCATS are:

> * Home
> * Candidates
> * Contacts
> * Calendar, etc.

Browse the modules directory to see the all the current modules in OpenCATS. Each module has its own separate directory.

**Library Components**

Library components are PHP objects which encapsulate lower-level functionality, such as interfacing with a database, parsing addresses, sending e-mail, etc. For each module, there is a roughly corresponding library component (but not all libraries directly correspond to a module). Examples of some library components are:

> * Candidates
> * Search
> * Users
> * VCard
> * AddressParser

Browse the lib/ directory to see the all different library components.

**OpenCATS Page Request Flow**

Every page request to OpenCATS goes through index.php, which acts as a “router” or delegator to the modules.

> * A page request is sent to index.php
> * index.php parses the URL and sends the request to the corresponding module (specified by m= in the URL) for further processing
> * A module parses the “action” (specified by a= in the URL) and invokes the corresponding method within the module.
> * The method processes the request, often using library components
> * The function displays a template file, if necessary, and fills in the appropriate data and renders the HTML page

Every OpenCATS page request goes more or less through the above 5 steps.

**OpenCATS URLs**

OpenCATS URLs are designed to be intuitive and easy to use for developers:

For a Company record, a current-style URL is `index.php?m=companies&a=show&companyID=239`:

* `m=companies` selects the Companies module.
* `a=show` selects the record display action.
* `companyID=239` identifies the record, subject to the normal permission checks.

Here is the basic layout of a module:

|

```
 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
```

|

```
/* mymodule/MyModuleUI.php: */
class MyModuleUI extends UserInterface
{
public function __construct()
{
parent::__construct();
$this->_moduleDirectory = ‘mymodule’;
}
public function handleRequest()
{
$action = $this->getAction();
switch ($action)
{
case ‘myAction’:
$this->myAction();
break;
…
}
}
```

\| | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

\| |

```
public function myAction()
{
…
}
```

\| | - | ------------------------------------------------------------ |

**Templates**

Modules, as mentioned above, contain the necessary code to render the HTML pages in OpenCATS. HTML is separated from the rest of the code via “templates”. A page is displayed by a template by assigning variables to it using assign() and then call it’s display() method.

\| |

```
public function myAction()
{
…
$this->_template->assign(‘myVariable’, $myValue);
$this->_template->display(‘./modules/mymodule/MyTemplate.tpl’);
}
```

\| | - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

To display a variable inside a template, use:

`_($this->myVariable); ?>`

Interfacing with the database is only done at the library level. This limits the effects that a change in the database structure can have on the upper layers of the code.


# Access control lists

OpenCATS uses access-control checks around modules, actions, settings pages, imports, and AJAX behavior. Recent security work tightened authorization checks for module actions and AJAX endpoints, so custom code should not assume that a reachable URL is permission-free.

## OpenCATS 0.12.0 changes

CSV exports through the export module require Site Administrator access, including candidate exports. Recruiters with ordinary add/edit/delete access should not expect the export action to be available.

Additional checks cover tag administration, attachment deletion, hidden candidates in job-order pipelines, email/phone lookup endpoints, and activity/pipeline updates. Access to a parent record must also be respected when working with its related records or attachments.

## Practical guidance

* Give users the lowest access level that supports their role.
* Review access after adding users, changing roles, or enabling optional workflows such as import.
* Test custom modules or custom AJAX endpoints with low-privilege users.
* Do not expose administrative actions through custom links unless the action is protected by OpenCATS permission checks.
* Preserve CSRF token handling when customizing forms or JavaScript.

## Customization note

If you add custom modules, actions, or settings pages, review the OpenCATS configuration and permission mappings in the application code so your new entry points are covered by the same authorization model as built-in pages.


# CMS addons

These are historical third-party integrations, not components tested with OpenCATS 0.12.0. Check their maintenance status and compatibility before deployment. For the bundled public job board, use the Career Portal and review the [security guidance](https://documentation.opencats.org/technical-configuration-options/security#career-portal-authentication).

Front-ends for popular CMS include:

* [Wordpress](https://github.com/UltraSimplified/OpenCATS/tree/master/wordpress-plugin/wp-opencats) (for job listing display only) - an alternative is to use WP Job Manager and provide it with jobs via an XML feed.
* [Drupal](https://github.com/Inuits/drupal-cats-plugin) (job listings, and applications direct into opencats)
* [Joomla *DEPRECATED*](https://github.com/opencats/joomla-connector) \_\_ but retained for example of complete Joomla integration


# Dev Guide to migrate Legacy to Symfony

> Historical proposal: this page describes an earlier Symfony migration experiment, not the OpenCATS 0.12.0 architecture or installation process. Current releases retain `index.php`, `ajax.php`, `modules/`, `lib/` and `config.php`, and use PHPUnit and Behat. Docker is a development/test option, not a required production deployment. Use the [Developer Guide](https://documentation.opencats.org/technical-configuration-options/developer-guide) for current instructions.

## Introduction

The OpenCATS legacy code is stored in the root of the OpenCATS project, while the code of OpenCATS Symfony it's on the src/ folder.

The legacy application was intended to be light and conceptually to understand. It separated the code in three main areas:

* **Modules:** A module consists of the user interface logic and one or more “templates” to render the HTML page. Some of the modules in OpenCATS are Home, Candidates, Contacts, Calendar, etc.
* **Library components:** Library components are PHP objects which encapsulate lower-level functionality, such as interfacing with a database, parsing addresses, sending e-mail, etc. For each module, there is a roughly corresponding library component but not all libraries directly correspond to a module.
* **Templates:** HTML/CSS/js code with some light logic.

### OpenCATS Legacy Request Flow

Most of OpenCATS request went through index.php and ajax.php files which acted as “router” or delegator to the modules.

1. A page request is sent to index.php or ajax.php file
2. index.php parses the URL and sends the request to the corresponding module (specified by m= in the URL) for further processing
3. A module parses the “action” (specified by a= in the URL) and invokes the corresponding method within the module.
4. The method processes the request, often using library components
5. The function displays a template file, if necessary, and fills in the appropriate data and renders the HTML page

### OpenCATS Legacy URLs

OpenCATS Legacy URLs were designed to be intuitive and easy to use for developers. E.g. <HTTP://OpenCATS.org/index.php?m=clients\\&a=show\\&clientID=239> means:

m = clients a = show clientID = 329

Translation: index.php sends the URL to the “clients” module. The clients module processes the action “show” for clientID 329. We want to display details of client 239.

## Version 0.9.4

This version aims to provide a bridge between Symfony and the legacy code so that the legacy code can be migrated little by little without requiring to rewrite the whole app at a single shot.

In this version, there are no significant changes to the Legacy URLs and the way they are managed from a user point of view. From the request flow, there is an important change. In this version all requests go through a Symfony's front controller.

## What's changed?

* A new docker image: this is required to load the symfony requirements + nginx configuration for the FrontController pattern
* config.php was changed to get variables from environment, to allow configuring symfony app and legacy configuration from the docker image
* Changes to all include paths: A new constant called LEGACY\_ROOT is prepended to all paths for compatibility
* Removal of index.php and ajax.php entry points, they are now functions in LegacyController
* All assets (css, images, javascripts) were relocated into the public assets folder
* Base composer.json and composer.lock are removed (all migrated to composer.json and composer.lock in Symfony structure)
* Behat and PHPUnit tests were standardized into a unified testing framework: Codeception and moved out of their legacy structure to Symfony's.

## Decisions

In order to simplify deployment and installation, the default mode for running OpenCATS will be docker (on all platforms).

## Migration challenges

### Configuration

Symfony configuration is managed by a set of yml files while the legacy application utilizes config.php. The first attempt was to migrate all config.php variables to the parameters.yml but it resulted to be a huge task. In order to solve this issue and also following the recommendations of <https://12factor.net/>, all values were replace with environment variables which are now injectable through docker-compose by replacing the .env file in the folder where the docker-compose file is executed.

### Functional test code

90% of the time is spent on updating test code. What's causing the issue? Mainly selenium and the PHP frameworks being used do not play well nor work reliable with:

* code that's using blocking javascript alert and confirm functions
* code that's using iframes

## Further performance improvements?

1. <https://tideways.io/profiler/blog/5-ways-to-optimize-symfony-baseline-performance>
2. <http://symfony.com/doc/current/performance.html>


# Developer Guide

This guide helps contributors run OpenCATS locally and mirror the current CI test workflow.

## Prerequisites

* Git
* Docker with Docker Compose v2
* PHP 8.4.1 or later within PHP 8 if running tests directly on the host
* Composer 2

Project CI currently tests PHP 8.4.27 and PHP 8.5.12.

## Clone and install dependencies

```bash
git clone https://github.com/opencats/OpenCATS.git
cd OpenCATS
composer install
```

Do not use `--no-dev` for development, because PHPUnit, Behat, and related tools are development dependencies.

## Prepare the Docker test environment

Use a dedicated development checkout: the preparation command replaces `config.php` with test credentials. The local test workflow mirrors CI:

```bash
cp test/config.php ./config.php
touch ./INSTALL_BLOCK
cd docker/
docker compose -f docker-compose-test.yml pull php
docker compose -f docker-compose-test.yml up -d
```

The test stack uses the prebuilt `opencats/php-base:8.4.27` image by default. To select the other 0.12.0 CI image, pull and start it with the same version value:

```bash
PHP_VERSION=8.5.12 docker compose -f docker-compose-test.yml pull php
PHP_VERSION=8.5.12 docker compose -f docker-compose-test.yml up -d
```

The repository also provides `./test/runLocalTests.sh` from the project root to run integration and Behat regressions. It recreates the Docker test environment and test volumes and restores the developer configuration afterward; run it only against disposable test data. Set `PHP_VERSION=8.5.12` when running it to select that image. Run unit tests separately as shown below. See the [versioned testing notes](https://github.com/opencats/OpenCATS/blob/v0.12.0/README-testing.md).

The test Docker setup uses two MariaDB 10.7 databases:

* `opencatsdb` on container port `3306` for functional and Behat testing; Compose assigns its published host port.
* `integrationtestdb` on container port `3306`, published on host port `3307`, for disposable PHPUnit integration tests. These tests recreate their test database; never point them at production.

Install dependencies inside the PHP container if needed:

```bash
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php composer install --no-interaction --prefer-dist
```

For the manual workflow, wait for both database containers to report healthy in `docker compose -f docker-compose-test.yml ps`. Before running the suites, check application database readiness and finalize its schema version, as CI does:

```bash
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php php test/scripts/waitForDb.php
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php php test/scripts/finalizeInstallSchemaVersion.php
```

## Run tests

From the OpenCATS repository, unit tests can be run directly with:

```bash
./vendor/bin/phpunit --testsuite UnitTests
```

From the `docker/` directory, the Docker-backed suites are:

```bash
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php ./vendor/bin/phpunit --testsuite IntegrationTests
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php ./vendor/bin/behat -c ./test/behat.yml --suite="default"
docker compose -f docker-compose-test.yml exec -T --workdir /var/www/public php ./vendor/bin/behat -c ./test/behat.yml --suite="security"
```

Current CI runs PHPUnit unit tests, Docker-backed PHPUnit integration tests, the default Behat suite, and the security Behat suite for both PHP 8.4.27 and PHP 8.5.12. CI also performs a PHP syntax check over `src/` and a Composer audit. The audit is currently non-blocking so legacy dependency advisories can be reviewed without stopping all builds.

## Custom templates and extensions in 0.12.0

Preserve the Bootstrap markup, existing permission checks, CSRF handling and shared dialogs when changing templates. Rich-text fields now use `js/suneditor-manager.js` and locally bundled SunEditor. Chart rendering uses `lib/Charts.php`, `js/charts.js` and locally bundled Chart.js. Graph hooks receive structured chart data rather than Artichow objects. See the [chart migration notes](https://github.com/opencats/OpenCATS/blob/v0.12.0/docs/chart-migration.md) and [SunEditor notes](https://github.com/opencats/OpenCATS/blob/v0.12.0/js/suneditor/README.md) before adapting extensions.

Read [CONTRIBUTING.md](https://github.com/opencats/OpenCATS/blob/master/CONTRIBUTING.md) and the [Modernisation & Contributor Roadmap](https://github.com/orgs/opencats/projects/2) before starting substantial work.

## Pull request title format

OpenCATS pull request titles must use:

```
type: description
```

Allowed types are:

* `chore`
* `docs`
* `feat`
* `fix`
* `refactor`
* `security`
* `test`

Scopes are not currently allowed. For example, use `fix: correct login redirect`, not `fix(auth): correct login redirect`.

## Development notes

* Do not commit local credentials or production `config.php` changes.
* Reuse existing OpenCATS helpers and conventions rather than introducing duplicate utility code.
* Use the Docker test stack when changing database, authorization, upload, import, installer, or PHP-version-sensitive behavior.
* Add or update tests when changing application behavior.
* Shut down the test stack when finished:

```bash
cd docker
docker compose -f docker-compose-test.yml down
```


# Configuration Reference

Most OpenCATS runtime configuration is stored in `config.php`. This page summarizes commonly changed settings. Always back up `config.php` before editing it.

## Database settings

| Setting         | Purpose                                                                                      |
| --------------- | -------------------------------------------------------------------------------------------- |
| `DATABASE_USER` | MariaDB user OpenCATS uses to connect.                                                       |
| `DATABASE_PASS` | Password for `DATABASE_USER`.                                                                |
| `DATABASE_HOST` | Database host name. Use `localhost` for local installs or the Docker service name in Docker. |
| `DATABASE_NAME` | OpenCATS database name.                                                                      |

## Authentication settings

| Setting     | Purpose                                                                  |
| ----------- | ------------------------------------------------------------------------ |
| `AUTH_MODE` | Authentication mode. Supported values are `sql`, `ldap`, and `sql+ldap`. |

Use `sql` for normal OpenCATS-managed users. Use LDAP modes only after configuring the PHP LDAP extension and the LDAP connection settings required by your environment.

## Resume/document parser settings

| Setting           | Purpose                                                              |
| ----------------- | -------------------------------------------------------------------- |
| `PARSING_ENABLED` | Enables external resume parsing service integration when configured. |
| `ANTIWORD_PATH`   | Path to `antiword` for Word document text extraction.                |
| `ANTIWORD_MAP`    | Antiword character map.                                              |
| `PDFTOTEXT_PATH`  | Path to `pdftotext`.                                                 |
| `HTML2TEXT_PATH`  | Path to `html2text`.                                                 |
| `UNRTF_PATH`      | Path to `unrtf`.                                                     |

Parser utilities are optional for installation but useful for resume text extraction and search.

## Runtime paths

| Setting         | Purpose                                                  |
| --------------- | -------------------------------------------------------- |
| `CATS_TEMP_DIR` | Temporary directory writable by the web server.          |
| `MODULES_PATH`  | Path to OpenCATS modules. Usually does not need editing. |

## Sphinx search settings

| Setting         | Purpose                            |
| --------------- | ---------------------------------- |
| `ENABLE_SPHINX` | Enables Sphinx search integration. |
| `SPHINX_HOST`   | Sphinx host.                       |
| `SPHINX_PORT`   | Sphinx port.                       |
| `SPHINX_INDEX`  | Sphinx index names.                |

Leave Sphinx disabled unless you have installed and configured Sphinx.

## Session and display settings

| Setting                 | Purpose                                                                                     |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| `CATS_SESSION_NAME`     | Session cookie name. Change only if hosting multiple OpenCATS instances on the same domain. |
| `ENABLE_SINGLE_SESSION` | Enforces one active session per user when enabled.                                          |
| `OFFSET_GMT`            | Legacy GMT offset setting.                                                                  |
| `HTML_ENCODING`         | HTML output encoding.                                                                       |
| `AJAX_ENCODING`         | AJAX output encoding.                                                                       |
| `SQL_CHARACTER_SET`     | SQL character set.                                                                          |

## Email settings

| Setting              | Purpose                                                          |
| -------------------- | ---------------------------------------------------------------- |
| `MAIL_MAILER`        | Mail method: `0` disabled, `1` PHP mail, `2` Sendmail, `3` SMTP. |
| `MAIL_SENDMAIL_PATH` | Sendmail binary path when using Sendmail.                        |
| `MAIL_SMTP_HOST`     | SMTP server host.                                                |
| `MAIL_SMTP_PORT`     | SMTP server port.                                                |
| `MAIL_SMTP_AUTH`     | Whether SMTP authentication is required.                         |
| `MAIL_SMTP_USER`     | SMTP username.                                                   |
| `MAIL_SMTP_PASS`     | SMTP password.                                                   |
| `MAIL_SMTP_SECURE`   | SMTP security mode: empty string, `ssl`, or `tls`.               |

Calendar reminder email text is also configurable in `config.php`.

## Career portal and SSL settings

| Setting                          | Purpose                                                         |
| -------------------------------- | --------------------------------------------------------------- |
| `SSL_ENABLED`                    | Enables SSL-aware behavior when your site is served over HTTPS. |
| `CAREERS_CANDIDATEAPPLY_SUBJECT` | Candidate email subject after career portal application.        |
| `CAREERS_OWNERAPPLY_SUBJECT`     | Owner email subject after career portal application.            |
| `CANDIDATE_STATUSCHANGE_SUBJECT` | Candidate email subject when status changes.                    |

## Demo and testing settings

| Setting              | Purpose                                                                    |
| -------------------- | -------------------------------------------------------------------------- |
| `ENABLE_DEMO_MODE`   | Enables demo mode behavior. Do not enable on normal production systems.    |
| `TESTER_*` constants | Automated testing defaults. Do not rely on these for production users.     |
| `DEMO_*` constants   | Demo login defaults. Do not expose demo credentials on production systems. |


# Security

This page summarizes security practices for current OpenCATS installations. It complements the application repository `Security.MD` file and the upload-folder hardening guide.

## Reporting security issues

Use [GitHub Private Vulnerability Reporting](https://github.com/opencats/OpenCATS/security/advisories/new). In the application repository, open **Security and quality → Report a vulnerability**. Include affected versions, reproduction steps, impact and any proposed fix.

Do not send vulnerability reports by email or through public issues, discussions or pull requests. Follow the current [OpenCATS security policy](https://github.com/opencats/OpenCATS/blob/master/Security.MD) for private coordination.

## Application and PHP updates

Install OpenCATS 0.12.0 and keep PHP and server packages patched separately. The 0.12.0 test images use PHP 8.4.27 and 8.5.12. Installing an OpenCATS archive does not update the host PHP runtime.

## Career Portal authentication

Career Portal and candidate registration are disabled by default. If enabled, returning-candidate verification requires CAPTCHA and a currently public, visible vacancy. Candidate identity is stored server-side in the PHP session. Persistent “Remember my information” authentication cookies are no longer used. Remove obsolete remember-me wording from custom registration templates.

For a public deployment, consider throttling candidate authentication at the web server or reverse proxy. OpenCATS 0.12.0 does not implement application-level rate limiting. Rules must cover both the main and `careers/index.php` entry points and POST routing, not just a query-string match. See the [deployment guidance](https://github.com/opencats/OpenCATS/blob/v0.12.0/docs/career-portal-authentication.md) for details and limitations.

## Authorization changes

CSV exports through the export module require Site Administrator access. Permission checks also protect tag administration, job-order attachment ownership, hidden pipeline candidates, email/phone lookups, and activity/pipeline parent records. Preserve these checks in custom code; changing a link or hiding a button does not grant access.

## Password storage

OpenCATS stores user passwords with PHP `password_hash()` and verifies them with `password_verify()` using the running PHP version's `PASSWORD_DEFAULT` algorithm. Legacy password hashes may be migrated when users successfully log in.

Do not reset passwords by writing MD5 hashes into the database. If a database-level reset is unavoidable, generate a modern hash with PHP `password_hash()`.

## CSRF protection

Current OpenCATS validates CSRF tokens for normal POST requests and logged-in AJAX POST requests. If you customize templates, forms, JavaScript, modules, or AJAX endpoints, preserve CSRF token output and submission.

## Upload security

OpenCATS applies server-side upload extension validation. Current allowed upload extensions include:

```
bmp, csv, doc, docx, heic, jpeg, jpg, msg, odg, odt, pages, pdf, png, ppt, pptx, rtf, tiff, wpd, wps, xls, xlsx, xps
```

This validation is not a replacement for web server hardening. Configure Apache or Nginx so uploaded files cannot execute as scripts, and review [Vital Security: Restrict access to upload folders (.htaccess)](https://documentation.opencats.org/technical-configuration-options/vital-security-restrict-access-to-upload-folders-.htaccess).

## Installer protection

OpenCATS runs the installer when `INSTALL_BLOCK` is missing. Remove `INSTALL_BLOCK` only when intentionally installing or upgrading, and confirm it exists again afterward.

## Composer and dependencies

If installing from source, run production installs with:

```bash
composer install --no-dev
```

Review Composer audit output and update dependencies when security fixes are available. Development dependencies are not needed on production systems.

## Deployment checklist

Before exposing OpenCATS to users:

* Use HTTPS.
* Use strong unique MariaDB credentials.
* Do not expose phpMyAdmin publicly.
* Ensure `attachments/`, `upload/`, and `temp/` are writable only as needed.
* Prevent script execution from upload and attachment directories.
* Keep `INSTALL_BLOCK` in place after installation.
* Keep `config.php` out of public repositories and backups with weak access controls.
* Back up MariaDB and `attachments/` regularly and test restores.


# How\_to\_install\_Sphinx

> Historical community guide: the Sphinx 2.1.3 build and configuration below are not the OpenCATS 0.12.0 CI baseline. Sphinx is optional. Start with the [current prerequisites](https://documentation.opencats.org/technical-configuration-options/pre-requisites#optional-sphinx-search) and the application's [optional Sphinx integration](https://github.com/opencats/OpenCATS/tree/v0.12.0/optional-updates/latest-sphinx-search), and verify compatibility in a test environment before using the older instructions.

\###How to install Sphinx ##OpenCats Sphinx Integration - latest version contributed by @zoomiest from the OpenCATS forums.

\##Download Sphinx

**Login As User Root in Server via SSH**

**Download Sphinx Version 2.1.3 Source Tar Ball**

`root@c1:~#cd /root`

`root@c1:~#wget [http://sphinxsearch.com/files/sphinx-2.1.3-release.tar.gz](http://sphinxsearch.com/files/sphinx-2.1.3-release.tar.gz)`

\*\*Extract Contents of Tar Ball \*\*

`root@c1:~#tar xvd sphinx-2.1.3-release.tar.gz`

**Configure Sphinx Installer**

`root@c1:~#cd sphinx-2.1.3-release`

`root@c1:~#./configure --prefix=/opt`

NOTE: The command above will set the Directory where Sphinx will be installed "/opt"

**Compile Sphinx Source Code**

`root@c1:~#make`

**Install Sphinx in Server**

`root@c1:~#make install`

**Configure Environment Settings for Sphinx**

`root@c1:~#echo "export PATH=/opt/bin:$PATH" >> ~/.bashrc`

`root@c1:~#echo "export LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH" >> ~/.bashrc`

`root@c1:~#source ~/.bashrc`

NOTE: These commands ensures that Sphinx and its libraries are configured properly.

\##2. Sphinx Configuration for Open Cats##

\###1. Sphinx Configuration Explained###

**1. source catsdb**

{

```
    type                    = mysql

    sql_host                = localhost

    sql_user                = cats

    sql_pass                = yourpasshere

    sql_db                  = cats

    sql_port                = 3306  # optional, default is 3306

    sql_query_pre           = \

            REPLACE INTO sph_counter SELECT 1, MAX(attachment_id) from attachment

    sql_query               = \

            SELECT attachment_id, title, attachment.site_id AS site_id, UNIX_TIMESTAMP(attachment.date_created) AS date_added, text \

    FROM attachment LEFT JOIN candidate ON data_item_id = candidate_id \

    WHERE resume = 1 AND data_item_type IN(100,500) AND text IS NOT NULL AND text != '' \

    AND attachment_id <= (SELECT max_doc_id FROM sph_counter WHERE counter_id = 1)

    sql_attr_uint           = site_id

    sql_attr_timestamp      = date_added

    sql_query_info          = SELECT * FROM attachment WHERE attachment_id=$id
```

}

```
	NOTE: In this section parameters that are of interest are the following:

	sql_host – is the hostname where the mysql database is hosted. 
```

If the same server just set to localhost.

```
  sql_user  - username to access the database
```

sql\_pass – password to access database

sql\_db – database name

sql\_port – port used to access the database. If mysql should be default to 3306

**2. source delta : catsdb**

{

```
    sql_query_pre =

    sql_query = \

            SELECT attachment_id, title, attachment.site_id AS site_id, UNIX_TIMESTAMP(attachment.date_created) AS date_added, text \

    FROM attachment LEFT JOIN candidate ON data_item_id = candidate_id \

    WHERE resume = 1 AND data_item_type IN(100,500) AND text IS NOT NULL AND text != '' \

    AND attachment_id > (SELECT max_doc_id FROM sph_counter WHERE counter_id = 1)
```

}

NOTE: This setting is the used for computing the delta/changes in the indexes when reindexing the database. This should not be changed.

**3. index cats**

{

```
    source                  = catsdb

    path                    = /opt/var/data/catsindex

    docinfo                 = extern

    min_word_len            = 1

    charset_type            = utf-8
```

}

NOTE: The parameter that might be of interest here is the path. This setting indicates where the index file will be generated by the indexer application. Normally you don’t need edit this parameter. Unless you run out of disk space and need to point that to another mountpoint or disk with space.

**4. index catsdelta : cats**

{

```
    source                  = delta

    path                    = /opt/var/data/catsdelta
```

}

NOTE: This is used as a reference file when reindexing the database. The parameter that might be of interest is the path parameter. Which indicated the location where the delta/difference of the index is stored. Normally you don’t need to edit this parameter unless you run of out disk space in /opt and need to point this to a different disk/mountpoint.

**5. indexer**

{

```
    mem_limit               = 32M
```

}

NOTE: This Configuration is for the memory allowed to be used by the indexer application. It’s assumed in the current setup we only have 512 MB of RAM. This setting has been computed based on the available memory left in the server with MySQL and Apache running in the same Virtual Machine. If you increase your memory and want to optimize you might want to increase this setting higher so that the indexer can run faster.

**6. searchd**

{

```
    listen                  = 9312

    listen                  = 9306:mysql41

    log                     = /opt/var/log/searchd.log

    query_log               = /opt/var/log/query.log

    read_timeout            = 5

    max_children            = 30

    pid_file                = /opt/var/log/searchd.pid

    max_matches             = 1000

    seamless_rotate         = 1

    preopen_indexes         = 1

    unlink_old              = 1

    workers                 = threads # for RT to work

    binlog_path             = /opt/var/data
```

}

NOTE: This are the searchd configuration. The parameters that are of interest are:

listen – This is the port where searchd will be listening for opencast queries

log – logfile where searchd enters results and errors encountered

query\_log – logfile for search queries done

binlog\_path – the directory where binary logs are written.

The settings identified are normally not edited unless you run out of disk space in /opt and needs to point these parameters to a different disk or mountpoint.

#### Installing Sphinx Configuration for Open Cats

This document comes with a sphinx.conf file with the default configuration detailed in section A of this chapter. In order to install that configuration file to sphinx upload the file to the server and execute the following commands:

`root@c1:~#cp sphinx.conf /opt/etc/sphinx.conf`

\##Open Cats Configuration

\*\*1. Open Cats Sphinx Configuration \*\*

/\* CATS can optionally use Sphinx to speed up document searching.

* Install Sphinx and set ENABLE\_SPHINX (below) to true to enable Sphinx.

\*/

define('ENABLE\_SPHINX', true);

define('SPHINX\_API', '/var/www/cats/lib/sphinx\_latest/sphinxapi.php');

define('SPHINX\_HOST', 'localhost');

define('SPHINX\_PORT', 9312);

define('SPHINX\_INDEX', 'cats catsdelta');

NOTE: This are the parameters related to sphinx in the config.php file in /var/www/cats/. The SPHINX\_INDEX and SPHINX\_PORT should be the same as the settings in sphinx.conf. If you are using the sphinx.conf file that came with this document. These settings should work properly. The SPHINX\_API parameter is the location of the php library to allow opencast talk to our sphinx server. The actual sphinxapi.php file is included in the sphinx tarball that was extracted earlier. A section later will outline details on how to setup sphinxapi.php

**2. Installing the Search.php file**

This update to Searchd comes with a Search.php file that has been modified to work with open cats. The original Search.php file had some "die" commands that caused that module to exit prematurely. We have commented those lines in the version of the Search.php file that came with this document. To install upload the search.php file in the server. Login as root and execute the following commands:

`root@c1:~#cd /root`

`root@c1:~#cp Search.php /var/www/cats/lib/Search.php`

NOTE: Copy the new Search.php to /cats/lib/.

**3. Installing the Sphinxapi.php file**

The sphinx tarball that was downloaded earlier contains the latest sphinxapi.php file compatible with the version of sphinx we configured. We need to install this in the open cats directory. To do that execute the following commands as user root:

`root@c1:~#cd sphinx-2.1.3-release/api`

`root@c1:~#mkdir /var/www/cats/lib/sphinx_latest`

`root@c1:~#cp sphinxapi.php /var/www/cats/lib/sphinx_latest/.`

NOTE: The following commands will create the directory /var/www/cats/lib/sphinx\_latest. And copy the latest sphinxapi.php that came with the sphinx installer in that directory. This will now be used by the open cats application.

**4. Installing config.php file in opencats**

This update comes with some changed sections for config.php, and are detailed separately. document came with a config.php file. This file has already been preconfigured with the settings outlined in section A of this chapter. To install upload config.php in the server. And as user root execute the following commands.

`root@c1:~#cp config.php /var/www/cats/.`

NOTE: This command will install config.php in the cats directory.

#### 4. Indexer and Cronjob

Indexer is the Sphinx application that creates and index file from the data in the mysql database. It is supposed to be run every 30 minutes.

**1. Running the indexer**

`root@c1:~#indexer --all`

NOTE: This command normally takes 1 minute based on the current 4GB size of data. After this has been ran you can proceed with running the searchd application.

**2. Setting the Indexer to run in the cronjob every 30 minutes**

In order to set a cronjob that will run the indexer every 30 minutes execute the following commands:

`root@c1:~#crontab -e`

NOTE: This command will open a vim shell it normally has default values like this

```
	# Edit this file to introduce tasks to be run by cron.

	# 

	# Each task to run has to be defined through a single line

	# indicating with different fields when the task will be run

	# and what command to run for the task

	# 

	# To define the time you can provide concrete values for

	# minute (m), hour (h), day of month (dom), month (mon),

	# and day of week (dow) or use '*' in these fields (for 'any').

	# 

	# Notice that tasks will be started based on the cron's system

	# daemon's notion of time and timezones.

	# 

	# Output of the crontab jobs (including errors) is sent through

	# email to the user the crontab file belongs to (unless redirected).

	# 

	# For example, you can run a backup of all your user accounts

	# at 5 a.m every week with:

	# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

	# 

	# For more information see the manual pages of crontab(5) and cron(8)

	# 

	# m h  dom mon dow   command
```

NOTE: To be able to edit go to the last line and press the i key. Then add the following entries:

30,59 \* \* \* \* /opt/bin/indexer --merge cats catsdelta --rotate > /tmp/indexer.log

NOTE: Then press esc :wq then enter. This will save the line you added. To verify if the changes you did took effect run this command:

`root@c1:~#crontab -l`

NOTE: You should get a result similar to this

`# Edit this file to introduce tasks to be run by cron.`

`#`

`# Each task to run has to be defined through a single line`

`# indicating with different fields when the task will be run`

`# and what command to run for the task`

`#`

`# To define the time you can provide concrete values for`

`# minute (m), hour (h), day of month (dom), month (mon),`

`# and day of week (dow) or use '*' in these fields (for 'any').#`

`# Notice that tasks will be started based on the cron's system`

`# daemon's notion of time and timezones.`

`#`

`# Output of the crontab jobs (including errors) is sent through`

`# email to the user the crontab file belongs to (unless redirected).`

`#`

`# For example, you can run a backup of all your user accounts`

`# at 5 a.m every week with:`

`# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/`

`#`

`# For more information see the manual pages of crontab(5) and cron(8)`

`#`

`# m h dom mon dow command`

30,59 \* \* \* \* /opt/bin/indexer --merge cats catsdelta --rotate > /tmp/indexer.log

Indexer now runs and indexes every 30th minute and 59th minute every hour.

#### 5. Searchd Startup and Shutdown

\*\*1. Searchd Startup \*\*

To run searchd login as user root in the server and run the following commands:

`root@c1:~# searchd -c /opt/etc/sphinx.conf`

or searchd -c /etc/sphinxsearch/sphinx.conf

NOTE: If the you already followed the instructions in the previous chapters and have already ran the indexer command in chapter 6, the searchd command stated here ought to work. To validate if it’s running you can run this command:

`root@c1:~#ps –ef|grep searchd`

NOTE: You should get something like this after running the ps –ef|grep searchd command.

`root 21323 1 0 Nov26 ? 00:00:00 searchd -c /opt/etc/sphinx.conf`

`root 21324 21323 0 Nov26 ? 00:01:40 searchd -c /opt/etc/sphinx.conf`

`root 26474 26427 0 07:58 pts/0 00:00:00 grep --color=auto searchd`

NOTE: 21323 is the process ID of the searchd application. Whenever you successfully run the searchd application Linux assigns a process ID to it. You can use this process ID in the next section when you want to kill the searchd application.

**2. Searchd Shutdown**

In case you need to shutdown searchd application you can run the ps –ef |grep searchd command in the previous section. Get the process id and run this command to kill the searchd application:

`root@c1:~#kill -9 21323`

NOTE: Where 21323 is the process id that was returned after you did the ps –ef |grep searchd command. This number/value changes every time you run searchd.


# How\_to\_script\_database\_backups

Use a scheduled CLI database dump alongside attachment and configuration backups. Read [Backup, Restore, and Upgrade](https://documentation.opencats.org/technical-configuration-options/opencats-backup-restore-and-upgrade-instructions-this-section-incomplete) for the complete recovery process. A database dump alone does not include resumes or other files.

## Credentials

Create `/etc/opencats-backup.cnf` outside the web root, readable only by the account running the backup (for a root-run job, use owner root and mode `600`):

```ini
[client]
user=opencats_backup
password=replace-with-a-strong-password
host=localhost
```

Use a database account with the privileges needed to dump the OpenCATS database, routines and triggers. Verify the dump with that account before scheduling it. Do not put a database password in cron or command-line arguments.

## Backup script

Save this as `/usr/local/sbin/opencats-db-backup`, owned by the backup account and executable only by that account. Adjust the database name, paths and `mysqldump` binary for your server (`mariadb-dump` may be used instead):

```bash
#!/usr/bin/env bash
set -euo pipefail
umask 077

backup_dir=/var/backups/opencats
mkdir -p "$backup_dir"
backup_file="$backup_dir/opencats-$(date -u +%Y%m%dT%H%M%SZ).sql.gz"
partial_file=$(mktemp "$backup_dir/.opencats-dump.XXXXXX")
trap 'rm -f -- "$partial_file"' EXIT

mysqldump --defaults-extra-file=/etc/opencats-backup.cnf \
    --single-transaction --routines --triggers opencats | gzip > "$partial_file"
mv -- "$partial_file" "$backup_file"
```

The script exits on a dump or compression failure and only gives completed dumps their final name. Monitor failures and confirm successful backups are not empty. `--single-transaction` provides a consistent snapshot for transactional tables; check older installations for non-transactional tables and avoid schema changes during the dump.

## Schedule and verify

For example, in the backup account's crontab:

```cron
30 3 * * * /usr/local/sbin/opencats-db-backup
```

Keep cron error reporting or another monitoring mechanism enabled. Set a retention policy, keep a protected copy off the server, and regularly restore a dump plus its matching attachments into an isolated test environment. The example deliberately does not delete older backups.


# Docker - OpenCATS Installation Instructions

The Docker files in the OpenCATS repository are intended for **development and testing**. Some experienced users deploy OpenCATS with Docker in production, but the repository Docker Compose configuration is not the recommended production configuration without hardening, secret management, persistent backup planning, and web/database security review.

## Current architecture

The repository Docker Compose setup starts these services:

* `opencats_web`: Nginx web container, exposed on ports `80` and `443`.
* `opencats_php`: PHP-FPM container using the prebuilt `opencats/php-base` image; `docker/php/Dockerfile` is the source used to build that image.
* `opencats_data`: shared source/data volume mounting the repository into `/var/www/public`.
* `opencats_mariadb`: MariaDB database container.
* `opencats_phpmyadmin`: phpMyAdmin container exposed on port `8080`.

The PHP image defaults to **PHP 8.4.27 FPM Alpine**. The 0.12.0 CI matrix also uses **PHP 8.5.12**. The image installs OpenCATS runtime tools and extensions including document parser utilities, `mysqli`, `gd`, `soap`, `zip`, `ldap`, and `mbstring`.

## Default development credentials

The default Docker Compose database values are for local development only:

* MariaDB root password: `root`
* Database: `cats`
* User: `dev`
* Password: `dev`
* phpMyAdmin: <http://localhost:8080>
* OpenCATS web: <http://localhost>

Do not expose these defaults to the internet.

## Start the development environment

From the OpenCATS application repository:

```bash
cd docker
docker compose pull php
docker compose up -d
```

If you are working from source and dependencies are missing, install Composer dependencies in the PHP container:

```bash
docker compose exec --workdir /var/www/public php composer install
```

For production-style dependency installation, use `composer install --no-dev` instead.

## Running the installer in Docker

Open <http://localhost> and follow the installer. Use the database values from the Docker Compose configuration:

* Database host: `opencatsdb`
* Database name: `cats`
* Database user: `dev`
* Database password: `dev`

If an existing `INSTALL_BLOCK` file prevents the installer from starting in a fresh development environment, remove it from the mounted repository. After installation, ensure `INSTALL_BLOCK` exists again.

## Test Docker environment

The CI/test environment uses `docker/docker-compose-test.yml`, MariaDB 10.7 containers, Selenium, PHPUnit, and Behat. It defaults to the prebuilt `opencats/php-base:8.4.27` image and uses `PHP_VERSION` to select another published image tag, such as `8.5.12`. The Compose files do not build the PHP image.

For example:

```bash
cd docker
PHP_VERSION=8.5.12 docker compose -f docker-compose-test.yml pull php
PHP_VERSION=8.5.12 docker compose -f docker-compose-test.yml up -d
```

See [Developer Guide](https://documentation.opencats.org/technical-configuration-options/developer-guide) for the full local test workflow.

## Production warning

If you choose to adapt Docker for production, at minimum you should:

* Replace all default passwords.
* Use managed secrets rather than committing credentials.
* Pin image versions.
* Use durable database and attachment storage volumes.
* Back up MariaDB and `attachments/` outside the containers.
* Put TLS termination and HTTP security controls in front of OpenCATS.
* Restrict phpMyAdmin or remove it entirely.
* Review upload directory execution restrictions.

This is an advanced deployment path and is not the primary recommended production installation in this documentation.


# LDAP Authentication

OpenCATS supports SQL authentication, LDAP authentication, and mixed SQL plus LDAP authentication through `AUTH_MODE` in `config.php`.

## Authentication modes

```php
define('AUTH_MODE', 'sql');
```

Supported values are:

* `sql` - OpenCATS authenticates users against the OpenCATS database.
* `ldap` - OpenCATS authenticates users through LDAP.
* `sql+ldap` - OpenCATS can use both SQL and LDAP authentication paths.

## Requirements

LDAP authentication requires the PHP LDAP extension. The repository Docker image installs the LDAP extension in its PHP container.

## Example settings

Your exact LDAP settings depend on your directory server. A typical configuration uses values like these in `config.php`:

```php
define('AUTH_MODE', 'ldap');
define('LDAP_HOST', 'ldap.example.org');
define('LDAP_PORT', '389');
define('LDAP_BASEDN', 'ou=users,dc=example,dc=org');
define('LDAP_UID', 'uid');
define('LDAP_CONNECT_DN', 'cn=readonly,dc=example,dc=org');
define('LDAP_PASSWORD', 'readonly-password');
```

For Active Directory, `LDAP_UID` is often `sAMAccountName`, but this depends on your directory design.

## Troubleshooting

If LDAP login fails:

* Confirm the PHP LDAP extension is installed and enabled.
* Confirm the OpenCATS server can reach the LDAP host and port.
* Confirm bind DN and password are valid.
* Confirm `LDAP_BASEDN` points to the subtree containing users.
* Confirm `LDAP_UID` matches the attribute users enter at login.
* Check whether your directory requires LDAPS, StartTLS, or firewall changes.
* Test with `sql` mode first to separate database/application issues from LDAP issues.

Do not publish LDAP bind credentials in public repositories or screenshots.


# Multi lingual\_version

\###Multi-lingual version

There are some language packs available for the (short-lived) successor to OpenCATS (OSATS). This is now considered abandonware. Languages supported are/were;

* German
* English
* Spanish


# OpenCATS Youtube channel

The channel contains community tutorials. Older videos may show an earlier interface; use the installation and user guides here for OpenCATS 0.12.0 guidance.

[OpenCATS YouTube Channel](https://www.youtube.com/channel/UChJ_YF1w74o8iWFAYa9w0xQ)


# Prerequisites

This page lists the current baseline for OpenCATS 0.12.0.

## Tested CI/CD baseline

OpenCATS requires PHP 8.4.1 or later within PHP 8. Project CI currently tests on Linux with:

* PHP 8.4.27
* PHP 8.5.12
* Composer 2
* MariaDB 10.7 for Docker-backed integration and Behat tests

Other PHP, database, operating system, or web server combinations may work, but this is the baseline used by project CI/CD.

The Composer minimum remains PHP 8.4.1, but deployments should use currently patched PHP 8.4 or 8.5 packages. The 0.12.0 test images use PHP 8.4.27 and 8.5.12; older patch releases are not the deployment target. Update the server runtime separately from OpenCATS.

## Required runtime components

* A Linux/Unix web server environment such as Apache or Nginx with PHP-FPM.
* PHP 8.4.1 or later within PHP 8.
* MariaDB. MariaDB 10.7 is used by current Docker test services.
* Composer if you install from source rather than from a prepared full release archive.
* Writable OpenCATS directories for uploads, attachments, temporary files, and restore operations when used.

## PHP extensions

The repository Docker image installs the PHP extensions OpenCATS expects in that environment:

* `mysqli`
* `gd`
* `soap`
* `zip`
* `ldap`
* `mbstring`

On distribution packages, extension package names vary. Ubuntu-style PHP 8.4 package names are usually similar to `php8.4-mysql`, `php8.4-gd`, `php8.4-soap`, `php8.4-zip`, `php8.4-ldap`, and `php8.4-mbstring`.

## Composer dependencies

OpenCATS runtime Composer dependencies include Bootstrap 5.3, Sphinx search API support, PHPMailer, FPDF, CAPTCHA support, and the `mbstring` extension. SunEditor and Chart.js are bundled locally in the release; neither requires npm, a CDN, or a frontend build. CKEditor and Artichow are no longer runtime dependencies. For production source installs, run:

```bash
composer install --no-dev
```

For development and testing, omit `--no-dev` so PHPUnit, Behat, and related test packages are installed.

## Optional document parsing utilities

OpenCATS can extract text from uploaded documents when parser utilities are installed and configured in `config.php`:

* `antiword`
* `pdftotext` / poppler utilities
* `html2text`
* `unrtf`

These utilities are useful for resume search and parsing, but they are not required to launch the installer.

## Optional Sphinx search

Sphinx is optional. Enable it only after Sphinx is installed and the `ENABLE_SPHINX`, `SPHINX_HOST`, `SPHINX_PORT`, and `SPHINX_INDEX` settings are configured in `config.php`.

## Writable directories

The web server user must be able to write to the directories OpenCATS uses for runtime files. Common directories include:

* `attachments/`
* `upload/`
* `temp/`
* `restore/` when restoring from a GUI backup file

Avoid world-writable permissions such as `777` unless you fully understand the risk and have no safer option in your hosting environment.


# Roadmap

## Current documented baseline

This documentation targets OpenCATS 0.12.0. The Composer requirement is PHP 8.4.1 or later within PHP 8; the release CI matrix uses PHP 8.4.27 and 8.5.12 on Linux with MariaDB 10.7 for Docker-backed tests. Deployments should use current security-patched PHP packages.

## Completed in 0.12.0

* Bootstrap 5.3 styling across the application, login, installer and Career Portal.
* Locally bundled Chart.js and SunEditor replacing Artichow and CKEditor.
* Stronger authorization, administrator-only CSV exports and default administrator password-change enforcement.
* Career Portal CAPTCHA and server-side candidate authentication sessions.
* ISO date support alongside existing US and UK formats.
* Status-history indexes, dependency updates and expanded automated tests.

See the [release notes](https://github.com/opencats/OpenCATS/releases/tag/v0.12.0) for the shipped changes.

## Where to track future work

The [OpenCATS Modernisation & Contributor Roadmap](https://github.com/orgs/opencats/projects/2) is the maintainer planning source. Use it alongside [GitHub issues](https://github.com/opencats/OpenCATS/issues), [pull requests](https://github.com/opencats/OpenCATS/pulls) and [CONTRIBUTING.md](https://github.com/opencats/OpenCATS/blob/master/CONTRIBUTING.md).

Planned recruitment, search, API and dashboard enhancements are not automatically part of the 0.12.0 release. Check the relevant issue and release notes before relying on a feature.


# Vital Security: Restrict access to upload folders (.htaccess)

OpenCATS validates attachment extensions server-side, but the web server must also prevent uploaded files from executing and prevent direct access to private attachments.

## Attachments must be served through OpenCATS

The 0.12.0 `attachments/.htaccess` denies all direct HTTP access. Download attachments through OpenCATS so authentication and authorization checks run. Do not replace this restriction with `Require all granted` for document extensions: that would expose private files outside the application's permission checks.

For Apache 2.4, the equivalent virtual-host configuration is:

```apache
<Directory /var/www/html/opencats/attachments>
    AllowOverride None
    Options -ExecCGI -Indexes
    Require all denied
</Directory>
```

Adjust the path to the real installation directory. This blocks HTTP access; the PHP process must still have filesystem access to read and write attachments. If relying on the shipped `.htaccess` instead, Apache must allow its directives to take effect.

## Upload staging directory

Keep the release's `upload/.htaccess` execution restrictions when using Apache. Check that your virtual host's PHP handler cannot execute files in `upload/`, including scripts with unexpected or multiple extensions. An extension allow-list alone does not establish safe PHP-FPM or CGI handling.

If you maintain equivalent restrictions in the server configuration, check them against the actual PHP handler and import workflow. Do not enable directory listings or grant general access to staged private documents.

## Nginx and other servers

Nginx does not read `.htaccess`. Add equivalent rules to its configuration. For an installation at `/opencats/`, this location denies direct attachment requests and takes precedence over generic PHP regex locations:

```nginx
location ^~ /opencats/attachments/ {
    deny all;
}
```

Adjust the URL prefix, including removing `/opencats` for a root installation. Separately prevent script execution in the upload staging directory and check all PHP routing rules. The repository's development Docker configuration should not be assumed to provide a hardened production deployment.

## Allowed attachment extensions

The 0.12.0 attachment upload validator allows:

```
bmp, csv, doc, docx, heic, jpeg, jpg, msg, odg, odt, pages, pdf, png, ppt, pptx, rtf, tiff, wpd, wps, xls, xlsx, xps
```

This describes attachment validation, not permission to make those files publicly accessible.

## Filesystem permissions

Give the PHP/web server account only the filesystem access it needs. For example, from the installation directory on an Ubuntu system using `www-data`:

```bash
sudo chown -R www-data:www-data upload attachments
sudo chmod 770 upload attachments
```

Avoid world-writable permissions. Filesystem access and HTTP access are separate controls.

## Verify the deployment

* Upload an allowed document and download it through OpenCATS as an authorized user.
* Confirm an unauthenticated request to its direct attachment URL is denied.
* Confirm a user without the relevant record permission cannot download it through OpenCATS.
* Confirm invalid script uploads are rejected and files in upload directories cannot execute.
* Check web server logs for unexpected denials, then retest bulk imports if used.

Reference the versioned [attachment restrictions](https://github.com/opencats/OpenCATS/blob/v0.12.0/attachments/.htaccess), [upload restrictions](https://github.com/opencats/OpenCATS/blob/v0.12.0/upload/.htaccess), and [attachment validator](https://github.com/opencats/OpenCATS/blob/v0.12.0/lib/Attachments.php) when comparing your configuration.


# Backup, Restore, and Upgrade

This page describes the recommended backup, restore, and upgrade approach for OpenCATS.

## Recommendation

Use **CLI database backups** and filesystem backups as your primary backup method. OpenCATS includes GUI backup features, but command-line database and attachment backups are easier to automate, inspect, test, and restore consistently.

## What to back up

A complete OpenCATS backup must include:

* The MariaDB database.
* The `attachments/` directory.
* The `upload/` directory if your workflow uses pending bulk imports.
* `config.php` and any local web server configuration.
* Any custom templates, patches, or integrations you maintain outside the database.

## CLI database backup

Replace database name, user, and output path with your own values:

```bash
mysqldump --single-transaction --routines --triggers -u opencats -p opencats > opencats-$(date +%F).sql
```

Store backups somewhere other than the OpenCATS web directory.

## Attachments backup

From the OpenCATS installation directory:

```bash
tar -czf opencats-attachments-$(date +%F).tar.gz attachments/
```

If your installation uses `upload/` for pending import files, back it up too:

```bash
tar -czf opencats-upload-$(date +%F).tar.gz upload/
```

## Test your backups

A backup is not complete until you have restored it in a separate test environment. Test restores should verify:

* users can log in;
* candidates, companies, contacts, and job orders load;
* attachments download correctly;
* search and parsing features work if enabled;
* email settings are not accidentally sending production email from a test system.

## Restore from CLI backup

1. Install OpenCATS files for the target version.
2. Create a fresh MariaDB database and user.
3. Import the SQL backup:

   ```bash
   mysql -u opencats -p opencats < opencats-backup.sql
   ```
4. Restore `attachments/`:

   ```bash
   tar -xzf opencats-attachments-backup.tar.gz -C /path/to/opencats/
   ```
5. Restore or recreate `config.php` with the correct database settings.
6. Ensure writable directory ownership and permissions are correct.
7. Run the installer/upgrade path only when intentionally upgrading an existing database.
8. Confirm `INSTALL_BLOCK` exists after installation or upgrade.

## Upgrade checklist

Before upgrading production:

* Read release notes for the target OpenCATS release.
* Confirm your server meets the current PHP and MariaDB baseline.
* Back up the database with `mysqldump`.
* Back up `attachments/`, `upload/` if used, and `config.php`.
* Test the upgrade on a copy of production data.
* Schedule a maintenance window.
* Have a rollback plan using the backups you just tested.

## Upgrading OpenCATS files

A typical upgrade flow is:

1. Put the site into maintenance or stop web traffic.
2. Back up database and files.
3. Deploy the new OpenCATS release files.
4. Restore or merge the existing `config.php` settings carefully.
5. Ensure Composer dependencies are installed if using source:

   ```bash
   composer install --no-dev
   ```
6. Remove `INSTALL_BLOCK` only when you are ready to run the installer/upgrade workflow.
7. Visit the site in a browser and choose the existing installation/upgrade path if presented.
8. After upgrade, confirm `INSTALL_BLOCK` exists.
9. Test login, records, attachments, reports, search, email, and scheduled reminders.

## Upgrading to 0.12.0

Read the [0.12.0 release notes](https://github.com/opencats/OpenCATS/releases/tag/v0.12.0) and test your customisations on a restored copy before production deployment.

* **Runtime:** use a currently patched PHP 8.4 or 8.5 installation. The release test images use 8.4.27 and 8.5.12. Updating OpenCATS does not patch PHP.
* **Templates and styles:** review custom themes, CSS and dialogs against the Bootstrap 5.3 markup. Avoid copying entire old templates over the new release.
* **Rich text:** SunEditor replaces CKEditor. Check custom editor integrations, saved email templates, source editing and previews.
* **Charts and extensions:** Chart.js replaces Artichow. Extensions using graph hooks must work with structured chart data rather than the old graph objects. The recruiting-summary PDF now uses a numeric summary in place of the graph image.
* **Permissions:** CSV exports require Site Administrator access. Retest custom workflows with ordinary recruiter accounts as well as administrators.
* **Career Portal:** retest applications, questionnaires and returning-candidate verification if enabled. Persistent candidate authentication cookies are no longer used; review custom registration templates and the [security guidance](https://documentation.opencats.org/technical-configuration-options/security#career-portal-authentication).
* **Dates:** existing installations retain their selected format. ISO `YYYY-MM-DD` is also available in Settings → Administration → Localization.

After deployment, test these workflows and confirm that the installer is blocked again. A rollback after a schema upgrade requires restoring the matching database and files from your tested backup.

## GUI backup and restore

OpenCATS has GUI backup screens under Settings and Administration. These may be useful for small installations or quick exports, but CLI backups are the recommended operational backup method.

If you use GUI restore, the backup file must be named `catsbackup.bak` and placed in a writable `restore/` directory under the OpenCATS installation before running the installer restore path.

## Security notes

* Do not keep backup files inside the public web root longer than necessary.
* Protect SQL backups because they contain personal data and password hashes.
* Protect attachment backups because they may contain resumes and other sensitive documents.
* Do not expose restored test systems publicly with production data.


