Commit def15d51 authored by Stéphane Crozat's avatar Stéphane Crozat
Browse files

Fixing install issues

parent 0d9b16c2
# Create user and db
sql/ (edit password first)
# PostgreSQL
# Connect
## Create user and db
sudo su postgres
sql/ (edit path and password first)
## Test
psql -h localhost -U apisub -d apisub
On Ubuntu, add XML lib to PHP
## Install
apt install php-pgsql
apt install php-xml
## Connexion
cp lib/connexion-sample.php lib/connexion.php
if (!isset($_SESSION['ticket'])) {
$DEVMODE = True;
if (!$DEVMODE && !isset($_SESSION['ticket'])) {
/* If session is already open for current PHP file, user is already logged in, do nothing
If session is not open on current PHP file, check if it is open on CAS server
If it is open on CAS server retrieve session informations
......@@ -23,6 +25,13 @@ if (!isset($_SESSION['ticket'])) {
$_SESSION['localcopy'] = true; //call localcopy once per session
else {
$_SESSION['ticket'] = '-1';
$_SESSION['utclogin'] = 'crozatst';
$_SESSION['mail'] = '';
$_SESSION['surname'] = 'Crozat/dev';
$_SESSION['firstname'] = 'Stéphane/dev';
include 'lib/db.php';
include 'lib/views.php';
psql -c "DROP DATABASE apisub"
psql -c "DROP USER apisub"
psql -c "DROP DATABASE IF EXISTS apisub"
psql -c "DROP USER IF EXISTS apisub"
psql -c "CREATE USER apisub WITH ENCRYPTED PASSWORD 'password'"
psql -c "CREATE DATABASE apisub WITH OWNER apisub"
psql -d apisub -f "$sqlfiles/apisub_functions.sql"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment