Extra Installation Guide for Institutions other than HKUST

If you are using the system outside HKUST, please check out the advice in this page on what to do to get it working.

After you installed and setup the system according to the normal installation page, you should do the following appropriate steps to get it working.

You can click on any image in this page to get a larger version of it.


1. Change the SMTP server setting for PHP

Please locate the file called php.ini in your system and open it with a text editor (e.g. notepad). Then search for the words SMTP.

Change the SMTP server to yours which is available in your institution. As you are using the system in a different institution, you should use a SMTP server which is different from smtp.ust.hk.

Figure 1 - Find and set the SMTP server

Save and close the file.


2. Change the email domain

Open the ini_param.php in the root directory of PACOS with a text editor.

You have to change the value of EMAIL_DOMAIN to the email account domain of your institution (e.g. ust.hk for our institution HKUST).

Figure 2 - Set the EMAIL_DOMAIN to the email account domain of your institution

Save and close the file.


3. Change the authentication method

If your institution is using CAS for authentication, you only need to change the parameters in ini_param.php in the root directory of PACOS with a text editor.

You have to change the value of CAS_HOST to your CAS base url and the value of CAS_PORT to the port it is using.

Figure 3 - Set the CAS_HOST and CAS_PORT to match the CAS used by your institution

Save and close the file.


Otherwise, you have to change the authentication function check_user in configs.php so it is suitable for your institution.
For example, this function should redirect to your own user login validation page. This page should be written in PHP so that the session variable can be changed later properly. In that user login validation page, if the validation is successful, you must store the username to the session variable user using $_SESSION['user'] = username and then redirect to the index.php of PACOS system.

Figure 4 - Change the authentication function

Save and close the file.


In case you want to try out PACOS but do not want to handle the authentication issue, you can bypass the authentication by making the authentication function check_user always pass and login as an user that is already existed in the PACOS system.

Here is an example of the check_user() function which bypasses the authentication. It 'forces' a login as the administrator user you set up in step 3.3.2 of the installation guide. You should remember that using this code will allow everyone who has the link to your PACOS system to login as administrator. He/she can then do anything he/she wants to do.

function check_user(&$user) {
    if(isset($_SESSION['user'])) {
        $user = 'the_admin_user_name_you_chose';
        return 1;
    }
    else {
        $_SESSION['user'] = 'the_admin_user_name_you_chose';
        $user = 'the_admin_user_name_you_chose';
        header("Location: index.php");
        return 1;
    }
}

Please replace the 'the_admin_user_name_you_chose' with the administrator username you have set up previously.

Save and close the file.


4. Change text for user interface

Open the lib.php in the root directory of PACOS with a text editor.

Search for the string 'ITSC username', replace it with other text which is appropriate for your institution.

Figure 5 - Change the text for your institution


Search for the string 'Enter their ITSC account(s) here:', then replace the two lines of text shown in the image below to other text which is appropriate for your institution.

Figure 6 - Change the text for your institution

Save and close the file.