Skip to content

How to install RosarioSIS on cPanel

François Jacquet edited this page Oct 21, 2022 · 9 revisions

Create database

  1. Go to cPanel

  2. Enter the PostgreSQL or MySQL Database Wizard (if PostgreSQL is available, prefer PostgreSQL).

    PostgreSQL Database Wizard

  3. Create the database, for example: "sisdb". Note the complete name down (for example, rosario_sisdb). Click "Create Database".

  4. Create a database user, for example: "sisuser", and set a password. Note the complete username (for example rosario_sisuser) and password down. Click "Create User".

  5. Add a User to the Database. For MySQL, check "All privileges". Click "Submit".

MySQL only: change database collation

On cPanel, the default collation is latin1_swedish_ci but RosarioSIS needs it to be utf8mb4_unicode_520_ci.

  1. Go to cPanel

  2. Enter phpMyAdmin

  3. Click on the "Databases" tab

    phpMyAdmin databases

  4. Select your database in the list

  5. Click on the "Operations" tab

  6. Scroll down to "Collation", and select utf8mb4_unicode_520_ci. Click "Go".

    phpMyAdmin databases

https://support.cpanel.net/hc/en-us/articles/360056173654-How-to-change-the-collation-or-character-set-for-your-database-in-cPanel-

Create subdomain

  1. Go to cPanel

  2. Enter the Subdomains.

    cPanel Subdomains

  3. Create a subdomain named "rosariosis". And note down the "Document root" (here, it is ~/public_html/rosariosis). Click "Create".

    cPanel Create subdomain

  4. Your RosarioSIS URL will later be accessed like this: http://rosariosis.yourdomain.com/

  5. Deactivate ModSecurity: go back to cPanel and search for "ModSecurity" under the Security section. If found, enter ModSecurity and deactivate it for the subdomain. (ModSecurity blocks the "Configuration.php" scripts)

Upload RosarioSIS

  1. Download RosarioSIS.

  2. Go to cPanel

  3. Enter the File Manager and select the right document root in the popup.

    cPanel File Manager

  4. Click the "Upload" button. Then, in the new "Upload Files" window, select the rosariosis-xxx.zip archive. Go back to the file manager when the upload is complete.

    File Manager Upload button

    Upload Files

  5. Select the archive and click the "Extract button". Then click the "Extract File(s)" button.

    File Manager Archive Extract button

    File Manager Archive Extract Files

  6. Refresh and enter the rosariosis-xxx/ folder. Click the "Select All" button.

    File Manager Select All

  7. Now, click the "Move File" button and enter the document root path where we want to move the files (here, it is ~/public_html/rosariosis). Click "Move File(s)".

    File Manager Move Files

  8. Go back to our document root by clicking on the "Up one level" button.

Generate the configuration file

  1. Right-click on the config.inc.sample.php file and rename it to config.inc.php.

  2. Select the config.inc.php file and click the "Code Editor" button.

File Manager Code Editor

  1. Edit as follows (replace the database type, name, user and password with your own):

    $DatabaseType = 'postgresql'; // Or 'mysql'.
    
    $DatabaseUsername = 'rosario_sisuser';
    
    $DatabasePassword = 'YOUR_CHOSEN_PASSWORD';
    
    $DatabaseName = 'rosario_sisdb';
    
    // Optional: activate other languages; here, for Spanish & French:
    $RosarioLocales = [ 'en_US.utf8', 'es_ES.utf8', 'fr_FR.utf8' ];
    
    // Recommended PHP configuration settings
    ini_set( 'max_execution_time', 240 );
    ini_set( 'max_input_vars', 4000 );
    ini_set( 'session.gc_maxlifetime', 3600 ); // Session timeout: 1 hour.
  2. Save the config.inc.php file

Note: For other configuration options, you may refer to the INSTALL file.

Install Database

  1. Go to the following URL http://rosariosis.yourdomain.com/InstallDatabase.php

  2. If you get an error, please review sections related to configuration file and database creation.

Enter RosarioSIS

Access RosarioSIS at http://rosariosis.yourdomain.com/

Errors, blank screen? Troubleshoot issues by going to http://rosariosis.yourdomain.com/diagnostic.php

Login with username admin and password admin.

Enjoy!

Install wkhtmltopdf (optional)

This step may not work depending on your host OS. wkhtmltopdf will let you generate PDF from within RosarioSIS.

  1. Download wkhtmltopdf (generic for Linux 64bits): https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

  2. Extract the wkhtmltox-0.12.4_linux-generic-amd64.tar.xz archive on your computer.

  3. Go to cPanel, enter the File Manager and select the right document root in the popup.

  4. Click the "Upload" button and then, in the new "Upload Files" window, select the wkhtmltox/bin/wkhtmltopdf file.

  5. Right-click the wkhtmltopdf file and click "Change Permissions": check the "Execute" permissions for both User and Group. Click "Change Permissions" button.

  6. Select the config.inc.php file, click the "Edit" button.

  7. Edit as follows. Replace /home/public_html/rosariosis/wkhtmltopdf with your actual wkhtmltopdf installation path:

$wkhtmltopdfPath = '/home/public_html/rosariosis/wkhtmltopdf';

PostgreSQL only: Adminer

phpPgAdmin will not work properly due to cPanel limitations. You can use Adminer instead to browse your database.

Quick Setup Guide

You can continue with the Quick Setup Guide.

Update RosarioSIS

To update RosarioSIS, simply follow steps 0 to 7 of the Upload RosarioSIS section above.