Child Protection Act System

The Child Protection Act Project was a community development project to build the Child Protection Act System (CPAS) for the Australian Service Center. In Australia, local laws require anyone who works with youth to register with the local state that they live in. This program allows local church leaders to track the certification status of all adult members.

Current status

CPAS version 1.1 was released to production on 13 September 2010. There is ongoing development and maintenance of this project.


There are three categories of users of the CPAS program.

  • Service Center users. These are Church employees that work in the Australian service center. Their job is to monitor compliance of the certification process (through the reports section) as well as allowing configuration of the program (setting up new stakes and missions, etc.)
  • Stake / Mission presidents and their delegates which we shall call stake users. Stake users login to monitor compliance of the certification process within their stake units. Stake users also "certify" compliance through the audit tab which allows them to certify that all eligible members have been certified and that non-eligible members are not working with the youth.
  • Bishops / Branch Presidents and their delegates which we shall call ward users. Ward users are responsible to having all of the eligible members become certified within the state they reside. Ward users can run compliance reports. In addition, as each user becomes certified, they are responsible to bring their certification information to the ward where the information will be scanned by the ward user and submitted to the CPAS system.

How to set up CPAS on your local machine

Below is the information you need to get CPAS configured and setup on your system as well as information for how you can get involved. Please help us keep this documentation updated by adding your comments about how to get CPAS working on your system.

Step 1: Check system requirements

If you want to get CPAS running on your local development machine, you need to have the following software components installed and configured:

  • PHP 5.1 or greater. (See note below about bug with PHP 5.3). If you have PHP 5.1 you will also need to install the PHP Pear, LDAP, SOAP, and JSON extensions.
  • Apache 2.0 or greater.
  • MySQL 5.0 or greater.

Once these apps are installed, check out the source code from subversion and setup the necessary information in Apache to connect to your local development site.

Step 2: Check out source code

We use Subversion as our source code repository tool. You can check out the source code at the following URL:

Use your LDS Account Username/password to get the source. You must type in your LDS Account username in lowercase to be able to check out the code. You can also browse the source by visiting this URL in your browser.

Step 3: Initial database setup

CPAS uses MySQL to store data. In order to effectively get CPAS running on your local development machine, follow these steps to setup your database.

  • Create a database in MySQL. You can call it anything you like as the name of the database will be configured later in the software.
    Example: create database cpas;
  • Create a user/password that can create the database and grant it access to the database.
    Example: grant all privileges on cpas.* to 'cpasusr'@'localhost' identified by 'mypassword';
  • In the source code you checked out previously will be a folder called "db". This folder contains all of the DB schema changes since the beginning of the project. First run the cpas_db_create.sql script to create the database.
    Example from command prompt: mysql -u{user} -p{password} cpas < cpas_db_create.sql;
  • Run the following script to setup some country service center sample data.
    Example from command prompt: mysql -u{user} -p{password} cpas < cpas_addtestdata.sql;

Step 4: Application configuration

You will need to create a configuration file before CPAS can run on your local machine. THIS FILE SHOULD NOT BE CHECKED IN TO SUBVERSION. Note that there isn't a trailing ?> at the end of the file. This is valid and preferred since it prevents stray white space from causing problems when the file is included.

Create the configuration file at /config/config.php by copying the sample configuration file located in that directory. The sample configuration file contains connection information for the community LDAP and MLU services. You will need to update your database information and local document directory name in the config file.

Once you have created this file, you should be able to connect to the application via your browser. You should also be able to login as a country service center employee by the name of olmsteadas. This is currently the only user setup to access the system. If you are unable to get the login screen to appear, review the previous steps to figure out what is wrong before you continue.

Step 5: Sample data setup

In this step you will add in some sample unit information and membership information. To do so follow these instructions:

  • Login to the system. Use the "olmsteadas" username as shown on the login screen. This account allows you to log in as a country service center employee. Only country service center employees can add new stakes and missions to the system which is what you will do next.
  • Set up the following stakes stakes and missions by following these steps.
    1. Click on the "Stake/Mission" tab and click on "Add a new stake or mission".
    2. Add each of the following stakes and missions:
      • 555240 - Adelaide Australia Firle Stake
      • 555292 - Australia Brisbane Mission
    Once you do this, the data will be pulled in from our sample database at CHQ and populate all of the wards and branches assigned to these stakes/missions and you can then login with one of the other accounts on the login page. NOTE: Your server needs to be able to make outgoing connections to our test membership database at CHQ for the population of the database to work.
  • After you have added the above units to CPAS, you need to populate the members from these units into the system. To do this, follow these steps:
    1. from your command prompt, navigate to the "cpas/cron" folder. Note, this is different than the "cpas/web" folder where most of the code resides. There are a few cron jobs that run on a regular basis on the production server to populate members information. You need to manually run these cron jobs on your local server to update members information.
    2. From the cron folder, run "php updateunits.php". This script will scan all of the units in your local CPAS database and update the bishops or branch presidents in those units, granting them access to the system.
    3. From the cron folder, run "php updatemembers.php". This script will scan all units in your local CPAS database and will add or remove all members into those units. If you fail to perform this step, all of your units will not show any members. Note: Missions do not have any "members" assigned to them by default. So if you look at the "missionaries" assigned to the "Australia Brisbane Mission", there will be no missionaries assigned to it. Missions have to manually add missionaries to their missions.
  • States must be assigned to wards and stakes using the application after the above data is loaded.

Step 6: Image storage setup

You will need to create a directory where certification images (scanned PDF files) will be stored. This folder should be outside the web folder that was created when you checked out the code from subversion. This directory needs to be writable by the web server user. The path to the folder should be put in config.php as DOC_FOLDER.

The /docimgs directory has been set to be ignored in the subversion repository, so you can create a docimgs directory inside the source tree and use that for document images.

Special notes

  1. If you are using PHP 5.3, there is a known bug with the SOAP interface when fetching WSDLs that are large (like the WSDL for membership data). If you get this error:
    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from '' : Extra content at the end of the document
    Then you need to either get a later version of PHP 5.3 or you can download the WSDL with your browser by visiting the above URL and and saving the "source" to a location that your local web server can access. Then you can update the MLU_WSDL value in config.php with the URL of the local copy of the WSDL. The only downside to this approach is if the WSDL changes on the server, you will have to repeat this process.
  2. If you are running an older version of PHP without the SOAP classes built in, you will need to install the PEAR system and install the SOAP Pear extension.
  3. If you are running an older version of PHP without the JSON classes built in, you will need to install the PEAR system and install the JSON Pear extension.
  4. If you are running a newer version of PHP, on Windows with UniServer, soap must be enabled (uncommented) in both php.ini for the GUI and in php-cli.ini for the command-line interface.
  5. If you are running UniServer on Windows, you will need to enable (uncomment) the LDAP extension in php.ini. That, in turn, may give you an error where the file libsasi.dll can't be found. It is in c:\uniserver\usr\local\php, but needs to be copied over to the c:\uniserver\usr\local\apache2\bin directory.

Test system

We have a test system setup that you can access that has the latest changes that everyone on the project has contributed to. This site is updated whenever a subversion commit occurs. You can access the test system by visiting:

Login as one of the users listed on the login screen. You can click the button with a user's login name to automatically login as that user.

Bug/issue tracking system

We use Jira to track bugs and features against the project. You can login to Jira by visiting:

Look for "Child Protection Act System" as the project. You can then see "unassigned" open items that need to be fixed. Grab a task and help out!

This page was last modified on 28 September 2012, at 09:20.

Note: Content found in this wiki may not always reflect official Church information.