web solutions for school management using lampp: PMB – Moodle - Triade under Linux

mjaffar

New Member
Credits
71
In order to present a project for a training, I propose here, the deployment of three opensources solutions in intranet on the unique Linux server for a school.This project will remain in the long term evolutionary and open to the proposals of all internet users and especially to the participants registered in the forum. The solutions:
- Library Management Software (PMB) for the Documentation and Information Center.
- Remote learning platform (Moodle ) for teachers and students;
- School management software (Triade) for administration and teachers;

We will use the combination of several software technologies such as Linux Apache MariaDB PHP in Intranet. Starting from scratch.
It is also possible to use ETL (Extract-Transform-Load) software to share data across multiple databases.

The Experience will be done in virtual machine debian 10 under VirtualBox.
The main aim is to be able to manipulate databases via a common interface.
What we know about the 3 software:
They each have their own database that is specific to them in the format of tables and table names. It is following the evolution of the deployment that we will be led to use some means, to privilege some on others or even to come back on others in case we are blocked.

In my progress I discovered that there is a pmb plugin for Triade that allows students to connect.
Just one less puzzle.
So I would focus more on the Moodle-PMB or Moodle-Triade relation.
Because the PMB-TRIADE relation exists.

Step 1: Preparing the Debian Linux server.
- Creation of the virtual machine:
new Debian 64 Linux machine
8Go hard drive will suffice because for the needs the databases should only contain for the purposes of the experiment about twenty record.
- debian 10 minimal netinst iso download
- Installing Debian 10
- Update

type:
apt update
apt full-upgrade
apt install unzip (unzip is required to unzip the zip archive. )

installation of database management tools:
apt install apache2 libapache2-mod-php php php-cli

installation and activation of php add-ons:
instead of typing php- and the module name we use braces as tips.
Since most of these modules are native or included, we will only remember the following line.
Then we will enable the necessary extensions in/etc/php/7.3/php.ini:
xmlrpc (useful for the installation of moodle )
openssl (normally already existing)

type:
apt install php-{xmlrpc,mysql,memcache,apcu,bz2,curl,gd,imagick,intl,ldap,mbstring,soap,sqlite3,xsl,zip}

installation of the mariadb-server database:
type:

apt install mariadb-server
mysql_secure_installation ( for the first configuration )

In case the installation could be done with an external machine, we will configure an administrator who can connect from any host.

type:
mysql -u root -p
CREATE USER 'johndo'@'*' IDENTIFIED BY 'bananajoe48$';
CREATE USER 'johndo'@'localhost' IDENTIFIED BY 'bananajoe48$';
GRANT ALL PRIVILEGES ON *.* TO 'johndo'@'*';
GRANT ALL PRIVILEGES ON *.* TO 'johndo'@'localhost';
FLUSH PRIVILEGES;

In : /etc/mysql/mariadb.conf.d/50-server.cnf
# nano /etc/mysql/mariadb.conf.d / 50-server.cnf
...
bind-address = 0.0.0.0 (mysql listens on all ip address)

it is essential that the base exists if not impossible to make an installation.
The minimum is to create the same vacuum.

Restart all services:
systemctl restart mysql
systemctl restart mariadb
systemctl restart apache2

Downloading web apps sources:
Before proceeding, we will also need phpmyadmin to be able to graphically administer remote databases via the web interface.

for:
- phpmyadmin
wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip

- PMB
wget https://forge.sigb.net/attachments/download/3113/pmb7.3.4.zip

-Triade
wget ftp://www.triade-educ.com/distrib/triade-full.zip

- Moodle
wget https://download.moodle.org/stable39/moodle-latest-39.tgz

- Moodle langage pack french (for french):
wget https://download.moodle.org/download.php/langpack/3.9/fr.zip

Are Triade and Moodle php7 compatible? If so, then we can install pmb7.x
otherwise we have to install pmb5.x. This is not the best solution because we intend to use the latest features of pmb.
The only constraint is the compatibility of Triade with php7 because the rest is compatible.
I tried to install Triade in vain, and reading the php code, I realized that the mysql_ functions of php5 have become obsolete and no longer exist under php7. I tried to replace them with mysqli_ but given the large number of lines in the Triade web app, I postponed it.

Step 2 Software installation:

PMB:
Prerequisites:
In
/etc/php/7.3/apache2
Check the values (minimums) of the following parameters:
max_execution_time = 300
memory_limit = 64M
post_max_size = 64M
upload_max_filesize = 64M
Activate the necessary libraries
search for the lines:
extension=php_bz2
;extension=php_curl
extension=php_gd2
extension=php_mbstring
extension=php_mime_magic
extension=php_mysql
extension=php_sockets
extension=php_xsl
extension=php_zip
and cancel them by removing the ";" at the beginning of the line if necessary.
Save the file "php.ini"

Extraction :
unzip pmb7.3.4.zip -d /var/www/html/

the folder belongs to root:root
So apache does not have permissions it would be necessary to change the root group by www-data (apache group)

type:
chgrp -R www-data pmb or chown -R www-data:www-data pmb
chmod -R 774 / var / www / html / pmb

Installation:
Since the operation is done on a remote machine I am obliged to give the rights to all users just the moment of the operation and then will subsequently restore the maximum security rights.

Create the database first with phpmyadmin.

With firefox I go to the page: http://ip-address/pmb/tables/install.php
After installation, I must delete (or move ) the file /var/www/html/pmb/tables/install.php by security too.

Moodle:

Extraction :
type:

tar xzvf moodle-latest-39.tgz -C /var/www/html/

socket unix : (put nothing)
user : johndo
server : localhost
moodle user creation: johndo (instead of admin)

Triade:
Concerning Triade we have seen above that there is incompatibility of pages written in php5 with php7.
It seems that the Triade development team has been looking into the adaptation of php5 code to php7 from Triade since 2017, but there is no news.
Pending an answer from them, I am open to your possible proposals to replace Triade by a compatible equivalent php7.
Thus, while waiting for a response from the Triade development team, I am open to any other proposal for a solution equivalent to php7 compatible Triade.


Thank you for your comprehension...





Jaffar Mahamoud.
 
Last edited:


captain-sensible

Well-Known Member
Credits
14,215
looks like a laudable project . You might have heard of Alan Turing , some say "father of computing" well i was in touch with a descendant of Alan Turing - James Turing. he had some involvement in Ghana and i met up with his mother and brother in Ghana where they were/are involved in edu project.

The Irony was that none of them can code and they mentioned they were having a problem with moodle in that there was a clash of databases both trying to use the same port as something else they were using.

Some on here might have a quiet laugh to themselves when I state my spiritual mentor is Gino A'Acampo whose mantra is "minimum effort, maximum satisfaction" and of course those that know I have a dry sense of humor know that i'm at least half joking.

IN object orientated programming (oop) there is concepts of class , inheritance and before all that setting out an objective and meeting an objective.

I did look at moodle and my immediate thought was from my minimalist thinking "baggage" . Perhaps i didn't understand moodle correctly but is it not basically a glorified way of presenting courses to students.

if you take the concept of least and simplest route means less to go wrong then you could probably take out MySQl and replace it with sqlite3. if as i'm using on a web the fact that sqlite3 is outside what can be accessed from the web and password for admin is hashed it should be to much of a problem.


I did once set up a Intranet and did it via dnsmasq via slackware which gives clients on a network an IP address. I've dropped php5 and am using 7.4.1 since codeigniter minimum requirement is 7.2


I don't know if its possible for you, but a project ideally would be code that you and those involved in the project come up with from the bottom up, and for what you want to do maybe on top of something like codeigniter4 and keep it minimalistic.

On codeigniter4 you can carry out all CRUD works and have a login system. There are filters so that routes can not be accessed unless your logged in sessions and all that stuff.

I've got a stripped back content management system i'm working on for daughter , where blogs can be created images uploaded, blogs edited deleted . I only a login system for one admin though so simple used my own custom login.

Why use xampp when you can have Linux Apache Mysql php phpyadmin (lampp) which is part of your linux system. Using xampp you have (to a degree) already introduced conflicts . Where is php.ini for xampp ? where is php.ini under linux system etc do they both use same php - no because to a degree xampp has embedded stuff .
 
Last edited:

elst

New Member
Credits
7
If your PHP 5 code is written in a certain way or uses functions that have been removed, your code will break, and you'll have an error.
You know that the problem comes from your PHP so you can try to migrate your PHP.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top