mise à jour
This commit is contained in:
parent
77bca56c3e
commit
95e6005df0
1 changed files with 98 additions and 0 deletions
|
@ -128,3 +128,101 @@ Mettre en place un crontab, ici 1 fois par jour en précsiant l’heure, par exe
|
||||||
## Mise à jour
|
## Mise à jour
|
||||||
|
|
||||||
Pour les mises à jour de statoolinfos, il suffit juste de récuper le dernier fichier `statoolinfos.jar` et de le remplacer.
|
Pour les mises à jour de statoolinfos, il suffit juste de récuper le dernier fichier `statoolinfos.jar` et de le remplacer.
|
||||||
|
|
||||||
|
## Corrections bugs php pour l'application Libreto
|
||||||
|
|
||||||
|
Sinon, on a constaté beaucoup de lignes d'erreurs dans les logs de libreto avec `LINE IS NOT MATCHING`. On a changé la ligne 466 dans le fichier **/etc/php/7.4/fpm/php.ini** en rajoutant `& ~E_NOTICE` au bout da ligne 466.
|
||||||
|
|
||||||
|
`error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE `
|
||||||
|
|
||||||
|
explication au-dessus de la ligne:
|
||||||
|
|
||||||
|
```
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; Error handling and logging ;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
; This directive informs PHP of which errors, warnings and notices you would like
|
||||||
|
; it to take action for. The recommended way of setting values for this
|
||||||
|
; directive is through the use of the error level constants and bitwise
|
||||||
|
; operators. The error level constants are below here for convenience as well as
|
||||||
|
; some common settings and their meanings.
|
||||||
|
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
|
||||||
|
; those related to E_NOTICE and E_STRICT, which together cover best practices and
|
||||||
|
; recommended coding standards in PHP. For performance reasons, this is the
|
||||||
|
; recommend error reporting setting. Your production server shouldn't be wasting
|
||||||
|
; resources complaining about best practices and coding standards. That's what
|
||||||
|
; development servers and development settings are for.
|
||||||
|
; Note: The php.ini-development file has this setting as E_ALL. This
|
||||||
|
; means it pretty much reports everything which is exactly what you want during
|
||||||
|
; development and early testing.
|
||||||
|
;
|
||||||
|
; Error Level Constants:
|
||||||
|
; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
|
||||||
|
; E_ERROR - fatal run-time errors
|
||||||
|
; E_RECOVERABLE_ERROR - almost fatal run-time errors
|
||||||
|
; E_WARNING - run-time warnings (non-fatal errors)
|
||||||
|
; E_PARSE - compile-time parse errors
|
||||||
|
; E_NOTICE - run-time notices (these are warnings which often result
|
||||||
|
; from a bug in your code, but it's possible that it was
|
||||||
|
; intentional (e.g., using an uninitialized variable and
|
||||||
|
; relying on the fact it is automatically initialized to an
|
||||||
|
; empty string)
|
||||||
|
; E_STRICT - run-time notices, enable to have PHP suggest changes
|
||||||
|
; to your code which will ensure the best interoperability
|
||||||
|
; and forward compatibility of your code
|
||||||
|
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
|
||||||
|
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
|
||||||
|
; initial startup
|
||||||
|
; E_COMPILE_ERROR - fatal compile-time errors
|
||||||
|
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
|
||||||
|
; E_USER_ERROR - user-generated error message
|
||||||
|
; E_USER_WARNING - user-generated warning message
|
||||||
|
; E_USER_NOTICE - user-generated notice message
|
||||||
|
; E_DEPRECATED - warn about code that will not work in future versions
|
||||||
|
; of PHP
|
||||||
|
; E_USER_DEPRECATED - user-generated deprecation warnings
|
||||||
|
;
|
||||||
|
; Common Values:
|
||||||
|
; E_ALL (Show all errors, warnings and notices including coding standards.)
|
||||||
|
; E_ALL & ~E_NOTICE (Show all errors, except for notices)
|
||||||
|
; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
|
||||||
|
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
|
||||||
|
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
|
||||||
|
; Development Value: E_ALL
|
||||||
|
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||||
|
; http://php.net/error-reporting
|
||||||
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE
|
||||||
|
```
|
||||||
|
J'essaie aussi de voir après avoir lu les logs d'ignorer un erreur recurrente de php
|
||||||
|
|
||||||
|
```
|
||||||
|
LINE IS NOT MATCHING [ in /var/www/libreto/libreto/pad.php on line 148" while reading response header from upstream, client: 89.234.140.172, server: libreto.linux07.fr, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-libreto.sock:", host: "libreto.linux07.fr"]
|
||||||
|
```
|
||||||
|
|
||||||
|
La ligne 148 en question de **/var/www/libreto/libreto/pad.php**
|
||||||
|
|
||||||
|
`$txt = file_get_contents($this->url('txt'));`
|
||||||
|
|
||||||
|
est dans cette portion de fonction
|
||||||
|
|
||||||
|
```
|
||||||
|
public function txt() {
|
||||||
|
146 if (!$this->url('txt')) { return; }
|
||||||
|
147
|
||||||
|
148 $txt = file_get_contents($this->url('txt'));
|
||||||
|
149 return $txt;
|
||||||
|
150 }
|
||||||
|
```
|
||||||
|
|
||||||
|
En cherchant, j'essaie d'ignorer l'erreur avec un `@`
|
||||||
|
|
||||||
|
`$txt = @file_get_contents($this->url('txt'));`
|
||||||
|
|
||||||
|
sources :
|
||||||
|
|
||||||
|
[https://www.php.net/manual/fr/language.operators.errorcontrol.php](https://www.php.net/manual/fr/language.operators.errorcontrol.php)
|
||||||
|
|
||||||
|
et cette discussion:
|
||||||
|
|
||||||
|
[https://stackoverflow.com/questions/272361/how-can-i-handle-the-warning-of-file-get-contents-function-in-php](https://stackoverflow.com/questions/272361/how-can-i-handle-the-warning-of-file-get-contents-function-in-php)
|
Loading…
Reference in a new issue