Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (12337)
This diff is collapsed.
......@@ -6,9 +6,14 @@
.directory
.emacs.desktop*
/TAGS
/GPATH
/GRTAGS
/GTAGS
# Ignore all but the base skins
/skins/*
/public/opac/skins/*
!/public/opac/skins/intonation
!/public/opac/skins/modele
!/public/opac/skins/original
!/public/opac/skins/responsive
......@@ -23,6 +28,7 @@ local.php
public/captcha
report
temp
vendor
amber/src/.DS_Store
amber/src/.svn
amber/src/bin/.DS_Store
......@@ -705,4 +711,7 @@ userfiles/js/*
userfiles/photoBib/*
userfiles/photobib/*
userfiles/web_thumbnails/*
userfiles/*
xhprof/extension/*
docker/.env.dev
tests/.phpunit.result.cache
\ No newline at end of file
variables:
MYSQL_HOST: registry.afi-sa.net__hds__mariadb-docker
MYSQL_DATABASE: "bokeh_build_${CI_BUILD_REF}"
MYSQL_ROOT_PASSWORD: root
BOKEH_HTML_VALIDATOR_URL: "http://sthysel__nuhtml:8888"
test:php81_bokeh:
image:
name: registry.afi-sa.net/hds/php-nginx-docker:8.1-dev
pull_policy: always
services:
- sthysel/nuhtml
script:
- bash build_bokeh.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD $MYSQL_HOST
except:
- tags
tags:
- 81_bokeh
test:php81_other:
image:
name: registry.afi-sa.net/hds/php-nginx-docker:8.1-dev
pull_policy: always
services:
- registry.afi-sa.net/hds/mariadb-docker:10.11.8
- sthysel/nuhtml
script:
- bash scripts/ci_data_preparation.sh $MYSQL_DATABASE $MYSQL_HOST $MYSQL_ROOT_PASSWORD
- bash build_other.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD $MYSQL_HOST
except:
- tags
tags:
- 81_other
test:php81_scenario:
image:
name: registry.afi-sa.net/hds/php-nginx-docker:8.1-dev
pull_policy: always
services:
- sthysel/nuhtml
script:
- bash build_scenario.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD $MYSQL_HOST
except:
- tags
tags:
- 81_scenario
test:php83_bokeh:
image:
name: registry.afi-sa.net/hds/php-nginx-docker:alpine-8.3-dev
pull_policy: always
services:
- sthysel/nuhtml
script:
- bash build_bokeh.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD $MYSQL_HOST
except:
- tags
tags:
- 83_bokeh
test:php83_other:
image:
name: registry.afi-sa.net/hds/php-nginx-docker:alpine-8.3-dev
pull_policy: always
services:
- registry.afi-sa.net/hds/mariadb-docker:10.11.8
- sthysel/nuhtml
script:
- bash scripts/ci_data_preparation.sh $MYSQL_DATABASE $MYSQL_HOST $MYSQL_ROOT_PASSWORD
- bash build_other.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD $MYSQL_HOST
except:
- tags
tags:
- 83_other
test:php83_scenario:
image:
name: registry.afi-sa.net/hds/php-nginx-docker:alpine-8.3-dev
pull_policy: always
services:
- sthysel/nuhtml
script:
- bash build_scenario.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD $MYSQL_HOST
except:
- tags
tags:
- 83_scenario
[submodule "tests_js/lib/qunit-phantomjs-runner"]
path = tests_js/lib/qunit-phantomjs-runner
url = http://git.afi-sa.fr/afi/qunit-phantomjs-runner.git
[submodule "library/storm"]
path = library/storm
url = http://git.afi-sa.fr/afi/storm.git
url = https://git.afi-sa.net/afi/storm.git
[submodule "library/Redmine"]
path = library/Redmine
url = https://git.afi-sa.net/afi/php-redmine-api.git
[submodule "library/iCal"]
path = library/iCal
url = https://git.afi-sa.net/afi/iCal.git
[submodule "library/PhpParser"]
path = library/PhpParser
url = https://git.afi-sa.net/afi/PHP-Parser.git
[submodule "library/matomo-php-tracker"]
path = library/matomo-php-tracker
url = https://git.afi-sa.net/afi/matomo-php-tracker.git
[submodule "library/php-jwt"]
path = library/php-jwt
url = https://git.afi-sa.net/afi/php-jwt.git
[submodule "library/phpseclib"]
path = library/phpseclib
url = https://git.afi-sa.net/afi/phpseclib.git
[submodule "library/activitystreams"]
path = library/activitystreams
url = https://git.afi-sa.net/afi/activitystreams.git
[submodule "public/tarteaucitron"]
path = public/tarteaucitron
url = https://git.afi-sa.net/afi/tarte_au_citron.git
[submodule "tests_js/lib/chrome-php"]
path = tests_js/lib/chrome-php
url = https://git.afi-sa.net/afi/chrome-php.git
[submodule "library/emogrifier"]
path = library/emogrifier
url = https://git.afi-sa.net/afi/emogrifier.git
RewriteEngine on
RewriteCond %{REQUEST_URI} !/(xhprof_html|ckeditor)
RewriteCond %{REQUEST_URI} !^/(google[a-z0-9]+\.html|.*/xhprof_html|ckeditor|exploit|\.well-known)
RewriteCond %{REQUEST_FILENAME} !^.*/robots\.txt$ [NC]
RewriteRule !(userfiles|public|tmp|temp|skins)/.*\.(js|ico|txt|gif|jpg|jpeg|png|css|xml|swf|mov|pdf|doc|docx|woff|eot|svg|ttf|xls|wsdl|mp3|m4v|ogg|ogv|epub|html|xhtml|asmx|zip|sql|bro)$ index.php [NC,NE]
RewriteRule !(userfiles|public|tmp|temp|skins|library/templates|library/digital_resources/.*/js)/.*\.(js|ico|txt|gif|jpg|jpeg|png|css|xml|swf|mov|pdf|doc|docx|woff|woff2|eot|svg|ttf|xls|xlsx|xlsm|wsdl|mp3|m4v|ogg|ogv|epub|htm|html|xhtml|asmx|zip|sql|bro|flv|mp4|webm|tgz|json|geojson|xsl|ods|odp|odt|ots|ott|odm|odg|otg|otp)$ index.php [NC,NE]
AddType application/x-javascript .js
AddType text/css .css
......
VERSIONS
\ No newline at end of file
## Configurer le timeout pour les appels Webservice
Dans le fichier ./config.ini
Rajouter des clefs de style webservice_timeout
- webservice_timeout.all=10 pour permettre d'avoir un timeout de 10sec pour tout les appels Webservice
- webservice_timeout.Class_WebService_SIGB_Koha2405_Service=10 pour affecter un timeout que pour ce Webservice spécifique
CONTRIB.en.md
\ No newline at end of file
......@@ -3,22 +3,40 @@ This procedure is meant for Ubuntu et Debian GNU/Linux
# Necessary packages :
## Ubuntu Trusty
## PHP 7.4
### Debian Buster
```
apt-get install libapr1-dev libssl-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev imagemagick libmagickwand-dev libfontconfig bzip2 libmemcached-dev zlib1g-dev yaz default-mysql-client zip libzip-dev libxslt-dev
```
From PECL:
```
pecl install imagick-3.4.3RC1
pecl install memcached
pecl install mcrypt-1.0.3
```
## PHP 5.6
### Ubuntu Trusty
```
apt-get install python-software-properties php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysql php5-xhprof graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
apt-get install python-software-properties php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysqlnd php5-xhprof graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
```
## Debian Wheezy
### Debian Wheezy
```
apt-get install php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysql graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
apt-get install php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysqlnd graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
```
## ArchLinux
### ArchLinux
```
yaourt -S php php-gd php-imagick xdebug php-pear apache mysql php-apache php-xhprof graphviz git
yaourt -S php php-gd php-imagick xdebug php-pear apache mariadb php-apache php-xhprof graphviz git
```
## CentOS
### CentOS
```
rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
yum install php54w php54w-gd php54w-pear php54w-mysql php54w-pecl-xdebug php54w-xml php54w-soap php54w-mbstring
......@@ -31,7 +49,7 @@ You need to build Imagick extension from scratch
```
cd /usr/local/bin
wget https://phar.phpunit.de/phpunit.phar
wget https://phar.phpunit.de/phpunit-5.7.27.phar
mv phpunit.phar phpunit
```
......@@ -50,7 +68,7 @@ cd opacce
# Apache / PHP Configuration:
# Apache webserver:
## Activate the following modules :
......@@ -66,26 +84,15 @@ Modify /etc/httpd/conf/http.conf and add the line:
LoadModule php5_module modules/libphp5.so
```
Activate mod_mpm_prefork (see https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP).
Deactivate negotiation module which is in conflict with Zend Framework on index/index urls:
```
a2dismod negotiation
```
## Configure PHP
In /etc/php5/apache2/php.ini (ArchLinux: /etc/php/php.ini), configure the following variables:
```
post_max_size = 10M
upload_max_filesize = 10M
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
```
Activate the following extensions if they are not already actived (they should be):
```
php5enmod calendar curl gd gettext iconv mcrypt mysql pdo_mysql openssl soap imagick
```
## Configure Apache
In Apache conf, delete indexes option (file list) and authorise .htaccess:
......@@ -109,20 +116,183 @@ Warning: For apache 2.4
</Directory>
```
# Nginx webserver (experimental)
Using Nginx imply using PHP in PHP-FPM mode.
Recommaded configuration use 2 files.
This provides a mean to have factorised Bokeh configuration and a custom configuration for each Bokeh instance.
## Include file « bokeh.inc », store it for example in /etc/nginx/conf-enabled
```
# Include directives for Bokeh portal
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 30d;
log_not_found off;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny access to sensitive files.
location ~ (\.inc\.php|\.tpl|\.sql|\.tpl\.php|\.db)$ {
#deny all;
return 403;
}
location ~ /(\.|\.htaccess|config\.(ini|php)) {
#deny all;
return 403;
}
# User rights on temp folder
# Path without redirection
location ~ /(xhprof_html|ckeditor|\.well-known) {
}
# Serve PHP
location ~ /cosmogramme/cosmozend {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
#fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/cosmogramme/cosmozend/index.php;
fastcgi_param SCRIPT_NAME /cosmogramme/cosmozend/index.php;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_pass bokeh-dock:9000;
}
location ~ (\.php$|/(cosmogramme|exploit/(test\.php|fpm-ping|fpm-status))) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_pass bokeh-dock:9000;
}
```
## Vhost file, adapt it to your needs (change URL_Bokeh, Path_Bokeh_Dir, Bokeh_Dir, …)
```
server {
listen 80;
index index.php;
server_name <URL_Bokeh>;
root <Path_Bokeh_Dir>/<Bokeh_Dir>;
access_log "<Path_Nginx_Log>/<URL_Bokeh>_access.log";
error_log "<Path_Nginx_Log>/<URL_Bokeh>_error.log";
location / {
try_files $uri $uri/ @rewrite;
}
# if the requested file exists, return it immediately
if (-f $request_filename) {
break;
}
location @rewrite {
rewrite ^(.*)$ /index.php last;
}
include /etc/nginx/conf-enabled/bokeh.inc;
}
```
## Example content of etc/nginx/fastcgi_params
```
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
```
# Configure PHP
In /etc/php5/apache2/php.ini (ArchLinux: /etc/php/php.ini), configure the following variables:
```
post_max_size = 10M
upload_max_filesize = 10M
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
```
Activate the following extensions if they are not already actived (they should be):
```
php5enmod calendar curl gd gettext iconv mcrypt mysql pdo_mysql openssl soap imagick
```
On Archinux uncomment the corresponding lines.
# Write permission on directories
- userfiles hold all uploaded files and files harvested from digital resources.
- temp hold cache files, edit history and files generated by Bokeh.
Example:
```
chmod -R 777 opacce/userfiles
chmod -R 777 opacce/temp
```
If you don't want to give write permission to anybody, you must give it to the user who owns the PHP process at least.
# MySQL config
## Finalise the installation (ArchLinux)
See https://wiki.archlinux.org/index.php/MySQL#Installation
# Configuration
Edit /etc/mysql/my.cnf and add to the [mysqld] section the following line (in order to force fulltext indexation from the first letter)
```
ft_min_word_len = 1
ft_stopword_list = /dev/null
```
The stopword list can be set to a file in which you can define any word to be ignored.
Restart mysql.
......
......@@ -3,19 +3,37 @@ Sauf indiqué, cette procédure prends en compte par défaut les distributions G
# Paquets nécessaires:
## PHP 7.4
### Debian Buster
```
apt-get install libapr1-dev libssl-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev imagemagick libmagickwand-dev libfontconfig bzip2 libmemcached-dev zlib1g-dev yaz default-mysql-client zip libzip-dev libxslt-dev
```
Depuis PECL:
```
pecl install imagick-3.4.3RC1
pecl install memcached
pecl install mcrypt-1.0.3
```
## PHP 5.6
## Ubuntu Trusty
```
apt-get install python-software-properties php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysql php5-xhprof graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
apt-get install python-software-properties php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysqlnd php5-xhprof graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
```
## Debian Wheezy-Jessie
```
apt-get install php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysql graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
```
apt-get install php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysqlnd graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz php5-xhprof
```
## ArchLinux
```
yaourt -S php php-gd php-imagick xdebug php-pear apache mysql php-apache php-xhprof graphviz git
yaourt -S php php-gd php-imagick xdebug php-pear apache mariadb php-apache php-xhprof graphviz git php-mcrypt binutils automake autoconf gcc make fakeroot
```
## CentOS
......@@ -24,15 +42,17 @@ rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
yum install php54w php54w-gd php54w-pear php54w-mysql php54w-pecl-xdebug php54w-xml php54w-soap php54w-mbstring
```
You need to build Imagick extension from scratch
Il est nécessaire de compiler Imagick extension à partir des sources.
# Installer PHPUnit (en compte root / sudo):
Rechercher le numéro de la dernière version *phpunit-x.x.x.phar* sur [https://phar.phpunit.de](https://phar.phpunit.de)
```
cd /usr/local/bin
wget https://phar.phpunit.de/phpunit.phar
mv phpunit.phar phpunit
wget https://phar.phpunit.de/phpunit-5.7.27.phar
mv phpunit-x.x.x.phar phpunit
chmod +x phpunit
```
# Récupération des sources
......@@ -48,9 +68,7 @@ cd opacce
./update.sh
```
# Configuration Apache / PHP:
# Serveur web Apache :
## Activez les modules :
......@@ -66,26 +84,14 @@ Modifiez /etc/httpd/conf/http.conf et ajoutez la ligne:
LoadModule php5_module modules/libphp5.so
```
Activer mod_mpm_prefork (voir https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP).
Désactivez le module negotiation qui pose problème avec Zend Framework sur les urls index/index:
```
a2dismod negotiation
```
## Configurer PHP
Dans /etc/php5/apache2/php.ini (ArchLinux: /etc/php/php.ini), configurer les variables suivantes:
```
post_max_size = 10M
upload_max_filesize = 10M
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
```
Activez les extensions suivantes si elles ne le sont pas déjà (elles devraient l'être) :
```
php5enmod calendar curl gd gettext iconv mcrypt mysql pdo_mysql openssl soap imagick
```
## Configurer Apache
Dans la conf Apache (/etc/apache2/sites-available/votre-site.conf), supprimer l'option Indexes (listing des fichiers) et autoriser les .htaccess:
......@@ -99,6 +105,14 @@ Dans la conf Apache (/etc/apache2/sites-available/votre-site.conf), supprimer l'
</Directory>
```
```
<VirtualHost *:80>
DocumentRoot /emplacement/du/repertoire/Bokeh/
ServerName monSiteBokeh.fr
AllowEncodedSlashes NoDecode
</Directory>
```
Note: pour apache 2.4
```
......@@ -109,15 +123,176 @@ Note: pour apache 2.4
</Directory>
```
# Serveur web Nginx (experimental)
Le fait d’utiliser Nginx comme serveur Web implique d’utiliser le moteur PHP en mode FPM.
La configuration recommandée utilise 2 fichiers qui présentent l’intérêt d’avoir des fichiers vHost simplifiés et permettent de concentrer le paramétrage commun à tous les vHost dans un fichier annexe, qui fait un peu le même job que le fichier .htaccess sous Apache.
## Fichier d’include « bokeh.inc » à placer par exemple dans /etc/nginx/conf-enabled
```
# Include directives for Bokeh portal
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 30d;
log_not_found off;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny access to sensitive files.
location ~ (\.inc\.php|\.tpl|\.sql|\.tpl\.php|\.db)$ {
#deny all;
return 403;
}
location ~ /(\.|\.htaccess|config\.(ini|php)) {
#deny all;
return 403;
}
# Path without redirection
location ~ /(xhprof_html|ckeditor|\.well-known) {
}
# Serve PHP
location ~ /cosmogramme/cosmozend {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
#fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/cosmogramme/cosmozend/index.php;
fastcgi_param SCRIPT_NAME /cosmogramme/cosmozend/index.php;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_pass bokeh-dock:9000;
}
location ~ (\.php$|/(cosmogramme|exploit/(test\.php|fpm-ping|fpm-status))) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_pass bokeh-dock:9000;
}
```
## Fichier vhost à adapter à votre propre cas (changer URL_Bokeh, Path_Bokeh_Dir, Bokeh_Dir, …)
```
server {
listen 80;
index index.php;
server_name <URL_Bokeh>;
root <Path_Bokeh_Dir>/<Bokeh_Dir>;
access_log "<Path_Nginx_Log>/<URL_Bokeh>_access.log";
error_log "<Path_Nginx_Log>/<URL_Bokeh>_error.log";
location / {
try_files $uri $uri/ @rewrite;
}
# if the requested file exists, return it immediately
if (-f $request_filename) {
break;
}
location @rewrite {
rewrite ^(.*)$ /index.php last;
}
# Droits sur le répertoire temporaire
include /etc/nginx/conf-enabled/bokeh.inc;
}
```
## Pour information exemple de fichier etc/nginx/fastcgi_params
```
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
```
# Configurer PHP
Dans /etc/php5/apache2/php.ini (ArchLinux: /etc/php/php.ini), configurer les variables suivantes:
```
post_max_size = 10M
upload_max_filesize = 10M
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
extension = xhprof.so
xhprof.output_dir = /chemin/vers/bokeh/temp
```
Activez les extensions suivantes si elles ne le sont pas déjà (elles devraient l'être) :
```
php5enmod calendar curl gd gettext iconv mcrypt mysql pdo_mysql openssl soap imagick
```
Sur ArchLinux décommenter les lignes correspondantes.
# Droits d'écriture sur les répertoires
- userfiles contient tous les fichiers téléversés via l'interface Bokeh ou moissonés sur des ressources tierces.
- temp contient les fichiers de caches, fichiers d'historiques de modification, et autres fichiers générés par Bokeh.
Par exemple:
```
chmod -R 777 opacce/userfiles
chmod -R 777 opacce/temp
```
Si vous ne souhaitez pas donner les droits d'écriture à tous sur ces répertoires, vous devez donner la permission à l'utilisateur sous lequel s'exécute le code PHP.
# Configuration MySQL
## Finaliser l'installation (ArchLinux)
Voir https://wiki.archlinux.org/index.php/MySQL#Installation
## Configuration
Modifier /etc/mysql/my.cnf pour forcer l'indexation fulltext à partir de 1 lettre : ajouter dans la section [mysqld] :
```
......@@ -161,12 +336,29 @@ cp config.ref.php config.php
Allez sur http://localhost/opacce/cosmogramme
Connectez vous avec le compte admin/achanger et exécutez la mise à niveau de la base de données
# Mise à jour de la base de données
En ligne de commande:
```
php scripts/upgrade_db.php
```
ou bien via navigateur web:
- Pointez votre navigateur sur http://localhost/opacce/cosmogramme/ et connectez vous avec le compte admin / achanger.
- De là, cliquez sur le lien **Vous devez exécuter une mise à niveau de la base de données**.
# Se connecter à l'OPAC:
Utiliser le compte admin/achanger
Vous pouvez maintenant administrer Bokeh à l'adresse http://localhost/opacce/admin avec le compte admin / achanger.
Les URLs sont:
- interface publique: http://localhost/opacce
- interface d'administration: http://localhost/opacce/admin
- interface de configuration des intégrations SIGB: http://localhost/opacce/cosmogramme
# Pour lancer les tests de l'OPAC:
......
COPYING
\ No newline at end of file
Logo_biblioaccess.png

3.38 KiB

BOKEH is released under a dual-license AGPL / Proprietary use.
Copyright (c) 2012, 2013, 2014, 2015 Agence Française Informatique (AFI). All rights reserved.
You can redistribute it and/or modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by the Free Software Foundation (see COPYING)
Third-Party Components and their license are listed in doc/extern_libs.txt
# Bokeh Portal Library
## Learn
* User documentation can be read on [the official Wiki](http://wiki.bokeh-library-portal.org/)
* [User friendly changelog](VERSIONS)
* [Developer changelog](VERSIONS_DEV.md)
## Install
See [english](INSTALL.en.md) or [french](INSTALL.fr.md) documentation.
## Develop
See [How to contribute](http://git.afi-sa.fr/afi/opacce/blob/master/CONTRIB.en.md) or [comment contribuer](http://git.afi-sa.fr/afi/opacce/blob/master/CONTRIB.fr.md)
## Config
See [How to contribute](http://git.afi-sa.fr/afi/opacce/blob/master/CONFIG.fr.md)
## License
BOKEH is released under a dual-license AGPL / Proprietary use.
Copyright \(c\) 2012, 2013, 2014, 2015 Agence Française Informatique \(AFI\). All rights reserved.
You can redistribute it and/or modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by the Free Software Foundation \([see COPYING](COPYING)\)
[Third-Party Components and their license] (doc/extern_libs.org)
## Version
BOKEH version : https://semver.org/spec/v2.0.0.html
Actual 9.0.1-Focale
......@@ -2,32 +2,176 @@ Sauf indiqué, cette procédure prend en compte par défaut les distributions GN
# Pré-requis
## Sauvegarder votre site
Pensez à faire une sauvegarde de votre base de données ainsi que de votre dossier de sources.
En effet, si la base de données est impactée dans la mise à jour il est fortement déconseillé d'essayer de "downgrader" après application des patchs.
Si vous constatez un problème suite à la mise à jour, nous vous conseillons de réinjecter votre dump de base de données et de faire un retour arrière sur les sources.
## Mettre votre site en maintenance
Vous pouvez mettre votre site en maintenance avant de commencer toute opération: dans l'interface d'administration sur la page d'accueil il y a un lien "rendre le site indisponible". À la fin de l'opération, pensez à cliquer sur "remettre le site en ligne".
Vous pouvez mettre votre site en maintenance avant de commencer toute opération: dans l'interface d'administration sur la page d'accueil il y a un lien "rendre le site indisponible".
À la fin de l'opération, pensez à cliquer sur "remettre le site en ligne".
## Sauvegarder votre site
Pensez à faire une sauvegarde de votre base de données ainsi que de votre dossier de sources. En effet, si la base de données est impactée dans la mise à jour il est fortement déconseillé d'essayer de "downgrader" après application des patchs. Si vous constatez un problème suite à la mise à jour, nous vous conseillons de réinjecter votre dump de base de données et de faire un retour arrière sur les sources.
## Identifier la version ciblée
Lorsqu'une version est publiée par l'équipe Bokeh, elle est identifiable par un [tag](http://git.afi-sa.fr/afi/opacce/tags).
Les apports des versions sont consignés dans le fichier [VERSIONS de la racine du projet](http://git.afi-sa.fr/afi/opacce/blob/master/VERSIONS).
Les dernières versions majeurs sont complétées par une [page dans le wiki](http://wiki.bokeh-library-portal.org/index.php/Category:Notes_de_version) qui apporte un éclairage plus fonctionnel aux ajouts des développements.
## Identifier la version
Lorsqu'une version est publiée par l'équipe Bokeh, elle est identifiable par un [tag](http://git.afi-sa.fr/afi/opacce/tags)
Les apports des versions sont consignés dans le fichier [VERSIONS de la racine du projet](http://git.afi-sa.fr/afi/opacce/blob/master/VERSIONS) Les dernières versions sont complétées par une [page dans le wiki](http://wiki.bokeh-library-portal.org/index.php/Category:Notes_de_version) qui apporte un éclairage plus fonctionnel aux ajouts des développements.
## Collecter les versions intermédaires
# Mise à jour de Bokeh
Si votre installation de BOKEH est très éloignés de la version que vous ciblez, il est probable que vous deviez d'abord mettre à jour votre installation vers des versions intermédiaires.
La mise à jour d'un portail se fait en plusieurs phase: mise à jour des sources puis mise à jour de la base de données.
Il s'agit principalement de versions contenant des patchs de base de données qui sont dépendants de la version du code source de Bokeh.
Veuillez strictement respecter ces installations intermédiaires pour ne pas compromettre votre mise à jour.
# Mise à jour de Bokeh vers une version
La mise à jour d'un portail se fait à l'aide de plusieurs commandes :
- des commandes pour mettre à jour les sources du projets
- des commandes pour mettre à jour la base de données.
À la racine de votre installation de BOKEH, lancez la commande suivante pour récupérer les sources depuis le dépôt GIT officiel :
```
git checkout XXX
```
XXX étant un [tag](http://git.afi-sa.fr/afi/opacce/tags)
## Mise à jour des sources
Vous devez positionner vos sources sur le tag choisi (vous référer notamment aux commandes git checkout et git rebase).
À la racine de votre installation de BOKEH, lancez le script suivant pour mettre à jour les projets dont dépend BOKEH :
## Mise à jour de la base de données
```
$ bash update.sh
```
La base de données peut être mise à jour en ligne de commande ou via l'interface.
À la racine du dossier qui contient le fichier d'accès à la base de données (config.ini), lancer le script suivant pour mettre à jour la base de données :
```
$ php cosmogramme/php/upgrade_db.php
$ php scripts/upgrade_db.php
```
# Informations sur les versions
## MariaDB
Bokeh requiert a minima MariaDB 10.3
## Moteur PHP
### PHP 5.6
Dernière version 8.0.139
### PHP 7.2
Dernière version 8.0.147
### PHP 7.4
Dernière version : 8.0.204
### PHP 8.1
Version minimum : 8.0.157
Dernière version : en cours
### PHP 8.3
Version minimum : Focale.0
Dernière version : en cours
## Migration de base de données en PHP
Tant que votre version de Bokeh est inférieure à l'une des versions suivantes,
vous devez procéder à l'étape d'installation de chacune d'elle.
- 8.0.141 - 11/10/2021 : cosmogramme/sql/patch/patch_403.php
- 8.0.144 - 08/11/2021 : cosmogramme/sql/patch/patch_417.php
cosmogramme/sql/patch/patch_418.php
- 8.0.149 - 17/01/2022 : cosmogramme/sql/patch/patch_423.php
cosmogramme/sql/patch/patch_424.php
- 8.0.151 - 24/01/2022 : cosmogramme/sql/patch/patch_425.php
- 8.0.152 - 15/02/2022 : cosmogramme/sql/patch/patch_426.php
- 8.0.157 - 23/05/2022 : cosmogramme/sql/patch/patch_429.php
cosmogramme/sql/patch/patch_430.php
- 8.0.158 - 16/05/2022 : cosmogramme/sql/patch/patch_431.php
- 8.0.159 - 31/05/2022 : cosmogramme/sql/patch/patch_432.php
- 8.0.162 - 12/07/2022 : cosmogramme/sql/patch/patch_434.php
cosmogramme/sql/patch/patch_435.php
- 8.0.167 - 06/09/2022 : cosmogramme/sql/patch/patch_437.php
## Opérations spécifiques
### Version 8.0.162
#### Recherche plus exacte
Si vous avez déjà des données en base avant de passer Bokeh en version 8.0.162 ou supérieure,
Pour réindexer toutes les notices de la base de données de façon à tirer le meilleur parti des améliorations du moteur de recherche et de pertinence.
au cas où vous souhaitiez avoir un accès rapide à cette fonctionnalité il est nécessaire de lancer le script
`scripts/reindex_local_unimarc.php`
Vous pouvez aussi attendre un réimport total de votre catalogue.
#### Parcourir les étagères
Pour que vos utilisateurs puissent parcourir les documents de la même étagère,
Vous pouvez activer le parcours des étagères dans la configuration de la boite exemplaire.
Cela fait appel à des clés de parcours d'étagères qui ont besoin d'être calculées et stockées
au cas où vous souhaitiez avoir un accès rapide à cette fonctionnalité il est nécessaire de lancer le script
`scripts/index_items_shelf_key.php`
Vous pouvez aussi attendre un réimport total de votre catalogue.
#### Identifiant unique PPN et Ark
Pour que vous puissiez accéder aux ressources du portail de type notice depuis un autre système avec un identifiant unique.
Après avoir configuré le profil de données du cosmogramme pour ajouter la définition de l'identifiant unique,
pour réindexer l'unimarc présent dans les notices et mettre à jour les données en base, il est nécessaire de lancer le script
`scripts/identifiers_records.php`
Vous pouvez aussi attendre un réimport total de vos notices.
## Changement de structure HTML pouvant impacter votre charte graphique
- 8.0.154 - 20/03/2022 : Suite à une amélioration RGAA des thèmes du magasin de thèmes, les tag "a" servant à afficher un dropdown ont été modifiés en tag "button".
- 8.0.158 - 16/05/2022 : Passage de jQuery 3.2.1 en 3.6.0
- 8.0.159 - 31/05/2020 : Suite à une amélioration de l'ergonomie, le résultat de recherche
et la liste des exemplaires dans le magasin de thèmes passent de
l'affichage mur à l'affichage grille.
- 8.0.160 - 20/06/2022 : cosmogramme/sql/patch/patch_433.php
- 8.0.170 - 29/09/2022 : Pour faciliter la personnalisation, les titres des notices sont maintenant composés de balises span ayant comme classe le champs UNIMARC.
- 8.0.179 - 04/04/2023 : Patch correctif de la migration des abonnements des utilisateurs.
- Focale.0 - 04/02/2025 : Suite à une amélioration RGAA, migration des h3 en h2 dans le magasin de thème.
This diff is collapsed.
# Class_Entity
## Description
In PHP we have StdClass on which we can set and get any direct property
```php
$o = new StdClass();
$o->title = 'my title';
echo $o->title; // -> my title
```
_Class_Entity_ provides same functionality with getter and setter methods
```php
$o = new Class_Entity();
$o->setTitle('my title');
echo $o->getTitle(); // -> my title
```
## Implementation
Any call to set*() will be catched to populate an internal key => value array, it will return $this to chain calls.
Any call to get*() will look for an existing key in internal array and will return its value or null if not found.
Keys of internal array are not transformed in any way
* setMyValue will produce a 'MyValue' key
* set_my_value will produce a '_my_value' key
* setmyvalue will produce a 'myvalue' key
You can define default values by setting
```php
protected $_attribs = ['MyValue' => ''];
```
Then a getMyValue() call will return an empty string instead of null if not set.
## Use cases
### In tests
When you have an API relying on getter and setter methods you can provide a _Class_Entity_ as a mock and easily verify that an attribute has been set or prepare it with attributes needed by tested code.
### In general
When you are modeling an object and don't want to write all those standard getters and setters just extend Class_Entity.
# ticket #22209
## Search result
Reification of the array returned by _Class_MoteurRecherche_ that contained queries for facets & record fetch. Now we have _Class_MoteurRecherche_Result_ that depends on search engine & search criterias. Noticeable methods:
* _recordsCollect($closure)_: for parsing all records. $closure must accept a record (_Class_Notice_).
* _acceptCriteresVisitor($visitor)_: for parsing search criterias
## Atom search feed generation
Add _ZendAfi_Feed_SearchResult_ as a _Class_MoteurRecherche_Result_ visitor that renders a search result as Atom feed.
# ticket #24821
## Notifications
In controllers, notifcations can be rendered as popup instead of static bars:
```php
$this->getHelper('notify')->bePopup()
```
_ZendAfi\_Controller\_Action\_Helper\_FlashMessenger_ notifications now stored as array and can accept parameters:
```php
public function addNotification($message, $options = []) {
$params = ['message' => $message] + $options;
$this->addMessage([ZendAfi_Controller_Action_Helper_FlashMessenger::NOTIFICATION => $params]);
}
```
and _FlashMessengerNotification_ represent a notification. For example to get all popups notifications:
```php
(new ZendAfi_Controller_Action_Helper_FlashMessenger())
->getNotifications()
->select(function($n) {return $n->isPopup();});
```
Users ILS subscription ('abonnement') related functions moved to new _Class\_User\_ILSSubscription_.
See _Class\_Users>>registerNotificationsOn_ for notifications usage.
## ILS Web services
Add _Class\_WebService\_SIGB\_Reservation>>isWaitingToBePulled_ that returns _true_ when holded document is available in library. Works for: Nanook, Koha, Microbib, Aloes, Carthame, Orphée, Pergame.
# Reload module content with AJAX
On module ajax link, add tag attributes: 'data-reload-module = true'.
For example:
```php
$this->view->tagAnchor($reload_link,
'',
['data-ajax-reload' => 'true',
'class' => 'reload-module',
'title' => $this->view->_('Recharger')]);
```
See public/opac/js/reload_module.js
\ No newline at end of file
- ticket #26137 : Les balises html insérées dans les réponses de formulaires sont maintenant supprimées.
\ No newline at end of file
- ticket #26993 : Correction de l'intégration des notices de dépouillement des périodiques provenant de Nanook.
\ No newline at end of file
- correctif #193156 : corrige la saisie manuelle dans les datetimepickers
\ No newline at end of file