Bonjour Frayed0324
Frayed0324 Où trouver les logs des erreurs de Rosario ? J'ai bien les logs d'Apache
RosarioSIS ne log rien. Seul PHP log ses erreurs dans les logs d'Apache.
Frayed0324 N'est il pas possible de bypasser ce module d'emailing pour avoir les sorties dans un répertoire du même type que ce que fait Apache ?
Cela n'est pas adapté, les emails envoyés sont beaucoup trop longs pour être logués. Ils contiennent à chaque fois le debug backtrace.
Voici un exemple depuis HackingLog()
System: Rosario Student Information System
IP: 82.139.137.201
Date: 2024-02-29 23:30:31
User: teacher
Profile: teacher
Page: /Modules.php
Query string: modname=School_Setup/PortalNotes.php
Can use modname: false
Referrer: https://www.rosariosis.org/demonstration/Modules.php?modname=Library/Library.php
Error:
Array
(
[0] => You're not allowed to use this program!
)
Request Array:
Array
(
[modname] => School_Setup/PortalNotes.php
[modfunc] =>
)
Session Array:
Array
(
[DefaultSyear] => 2023
[token] => b3a7908576f5bed1b1d485b1257d5e3a
[locale] => en_US.utf8
[UserSyear] => 2023
[STAFF_ID] => 2
[LAST_LOGIN] => 2024-02-29 21:02:04.960266
[UserSchool] => 1
[UserCoursePeriod] => 1
[UserMP] => 6
[is_secondary_teacher] =>
[_REQUEST_vars] => Array
(
[modname] => School_Setup/Schools.php
[modfunc] =>
[search_modfunc] =>
)
[List_PHP_SELF] => Modules.php?modname=Students/AddUsers.php&search_modfunc=list
[Back_PHP_SELF] => student
[staff_id] =>
[student_id] =>
[HackingLog] => Array
(
[0] => 1709245831
)
)
Debug Backtrace:
Array
(
[0] => Array
(
[file] => /var/www/ProgramFunctions/HackingLog.fnc.php
[line] => 78
[function] => ErrorSendEmail
[args] => Array
(
[0] => Array
(
[0] => You're not allowed to use this program!
)
[1] => HACKING ATTEMPT
)
)
[1] => Array
(
[file] => /var/www/Modules.php
[line] => 116
[function] => HackingLog
[args] => Array
(
)
)
)
Voici un exemple d'erreur SQL
System: Rosario Student Information System
IP: 128.92.122.195
Date: 2024-02-19 06:04:56
User: teacher
Profile: teacher
Page: /Modules.php
Query string: modname=Attendance/TakeAttendance.php&table=0&period=1
Can use modname: true
Referrer: https://www.rosariosis.org/demonstration/Modules.php?modname=Attendance/TakeAttendance.php&year_date=2024&month_date=02&day_date=19&table=0
Error:
Array
(
[0] => Failure Notice: DB Execute Failed.
[1] => Additional Info: ERROR: null value in column "table_name" of relation "attendance_completed" violates not-null constraint
DETAIL: Failing row contains (2, 2024-02-19, 2, null, 2024-02-19 06:04:56.994966, null).
[2] => INSERT INTO "attendance_completed" ("staff_id","school_date","period_id") values('2','2024-02-19','2');
)
Request Array:
Array
(
[modname] => Attendance/TakeAttendance.php
[table] => 0
[period] => 1
[school_period] => 2
[month_date] => 02
[day_date] => 19
[year_date] => 2024
[attendance] => Array
(
[1] => CODE_2
[2] => CODE_3
)
[comment] => Array
(
[1] =>
[2] => Showed up 5 minutes late
)
[modfunc] =>
[search_modfunc] =>
)
Session Array:
Array
(
[DefaultSyear] => 2023
[token] => 13dd9e764ab11d5121e8a9cff96df733
[locale] => en_US.utf8
[UserSyear] => 2023
[STAFF_ID] => 2
[LAST_LOGIN] =>
[UserSchool] => 1
[UserCoursePeriod] => 1
[student_id] =>
[staff_id] =>
[UserMP] => 6
[is_secondary_teacher] =>
[_REQUEST_vars] => Array
(
[modname] => Attendance/TakeAttendance.php
[modfunc] =>
[search_modfunc] =>
[year_date] => 2024
[month_date] => 02
[day_date] => 19
[table] => 0
[school_period] => 2
[cust_begin] =>
[cust_end] =>
[LO_id] =>
[LO_page] =>
[LO_sort] =>
[LO_dir] =>
[LO_search] =>
[LO_save] =>
)
)
Debug Backtrace:
Array
(
[0] => Array
(
[file] => /var/www/database.inc.php
[line] => 694
[function] => ErrorSendEmail
[args] => Array
(
[0] => Array
(
[0] => Failure Notice: DB Execute Failed.
[1] => Additional Info: ERROR: null value in column "table_name" of relation "attendance_completed" violates not-null constraint
DETAIL: Failing row contains (2, 2024-02-19, 2, null, 2024-02-19 06:04:56.994966, null).
[2] => INSERT INTO "attendance_completed" ("staff_id","school_date","period_id") values('2','2024-02-19','2');
)
[1] => Database Error
)
)
[1] => Array
(
[file] => /var/www/database.inc.php
[line] => 168
[function] => db_show_error
[args] => Array
(
[0] => INSERT INTO "attendance_completed" ("staff_id","school_date","period_id") values('2','2024-02-19','2');
[1] => DB Execute Failed.
[2] => ERROR: null value in column "table_name" of relation "attendance_completed" violates not-null constraint
DETAIL: Failing row contains (2, 2024-02-19, 2, null, 2024-02-19 06:04:56.994966, null).
)
)
[2] => Array
(
[file] => /var/www/database.inc.php
[line] => 233
[function] => db_query
[args] => Array
(
[0] => INSERT INTO "attendance_completed" ("staff_id","school_date","period_id") values('2','2024-02-19','2');
)
)
[3] => Array
(
[file] => /var/www/functions/DBUpsert.php
[line] => 91
[function] => DBQuery
[args] => Array
(
[0] => INSERT INTO "attendance_completed" ("staff_id","school_date","period_id") values('2','2024-02-19','2');
)
)
[4] => Array
(
[file] => /var/www/modules/Attendance/TakeAttendance.php
[line] => 297
[function] => DBInsert
[args] => Array
(
[0] => attendance_completed
[1] => Array
(
[STAFF_ID] => 2
[SCHOOL_DATE] => 2024-02-19
[PERIOD_ID] => 2
[TABLE_NAME] => 0
)
)
)
[5] => Array
(
[file] => /var/www/Modules.php
[line] => 107
[args] => Array
(
[0] => /var/www/modules/Attendance/TakeAttendance.php
)
[function] => require_once
)
)
Voici un exemple d'erreur fatale PHP (qui sera aussi dans le error.log
, mais avec moins d'infos)
System: Rosario Student Information System
IP: 82.139.137.201
Date: 2024-02-29 23:30:31
User: teacher
Profile: teacher
Page: /Modules.php
Query string: modname=School_Setup/PortalNotes.php
Can use modname: false
Referrer: https://www.rosariosis.org/demonstration/Modules.php?modname=Library/Library.php
Error:
Array
(
[0] => You're not allowed to use this program!
)
Request Array:
Array
(
[modname] => School_Setup/PortalNotes.php
[modfunc] =>
)
Session Array:
Array
(
[DefaultSyear] => 2023
[token] => b3a7908576f5bed1b1d485b1257d5e3a
[locale] => en_US.utf8
[UserSyear] => 2023
[STAFF_ID] => 2
[LAST_LOGIN] => 2024-02-29 21:02:04.960266
[UserSchool] => 1
[UserCoursePeriod] => 1
[UserMP] => 6
[is_secondary_teacher] =>
[_REQUEST_vars] => Array
(
[modname] => School_Setup/Schools.php
[modfunc] =>
[search_modfunc] =>
)
[List_PHP_SELF] => Modules.php?modname=Students/AddUsers.php&search_modfunc=list
[Back_PHP_SELF] => student
[staff_id] =>
[student_id] =>
[HackingLog] => Array
(
[0] => 1709245831
)
)
Debug Backtrace:
Array
(
[0] => Array
(
[file] => /var/www/ProgramFunctions/HackingLog.fnc.php
[line] => 78
[function] => ErrorSendEmail
[args] => Array
(
[0] => Array
(
[0] => You're not allowed to use this program!
)
[1] => HACKING ATTEMPT
)
)
[1] => Array
(
[file] => /var/www/Modules.php
[line] => 116
[function] => HackingLog
[args] => Array
(
)
)
)