Gibbons are escaping with staff absences

Hi there,

I’m hoping someone can help me get to the bottom of an issue I’m having. Whenever anyone adds a new staff absence, for some reason on clicking submit you are met with the error page.

The absence request goes through but you still get sent to the error page.

Can anyone help with this?

Thanks
Hamzah

Hi Hamzah, this certainly shouldn’t be the case. Can you please check your PHP error logs to see what the cause is? Anytime the Gibbons Escaped message is displayed, there will be a system-level PHP error that has been logged. Also, be sure to let us know which versions of Gibbon, PHP and MySQL you’re using. Thanks

Hi @sandra, I am not sure how to get my php logs. I am using a webhost with cpanel. I’m not sure if you could help with finding them.

I am using gibbon v27.0.01, php 8.1.29 and mysql 8.0.39.

Thanks for the help
Hamzah

Hi @sandra , I have found an error log but im not sure if its the correct one! Please have a look and let me know.

Error Logs

[09-Sep-2024 09:18:14 Europe/London] Warning: Undefined variable $gibbonPersonID in /home/abraraca/public_html/home/modules/Staff/absences_add.php on line 276
[09-Sep-2024 19:15:24 Europe/London] Uncaught Exception: TypeError - count(): Argument #1 ($value) must be of type Countable|array, null given in /home/abraraca/public_html/home/modules/Data Admin/records_duplicates.php on line 67
[11-Sep-2024 13:21:52 Europe/London] PHP Warning: Undefined variable $page in /home/abraraca/public_html/home/index_tt_ajax.php on line 44
[11-Sep-2024 13:21:52 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function addError() on null in /home/abraraca/public_html/home/index_tt_ajax.php:44
Stack trace:
#0 {main}
thrown in /home/abraraca/public_html/home/index_tt_ajax.php on line 44
[11-Sep-2024 18:09:23 Europe/London] Warning: Undefined variable $gibbonPersonID in /home/abraraca/public_html/home/modules/Staff/absences_add.php on line 276
[17-Sep-2024 09:20:47 Europe/London] Uncaught Exception: TypeError - Unsupported operand types: string - int in /home/abraraca/public_html/home/modules/Attendance/moduleFunctions.php on line 106
[17-Sep-2024 17:52:27 Europe/London] PHP Warning: Undefined variable $page in /home/abraraca/public_html/home/index_tt_ajax.php on line 44
[17-Sep-2024 17:52:27 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function addError() on null in /home/abraraca/public_html/home/index_tt_ajax.php:44
Stack trace:
#0 {main}
thrown in /home/abraraca/public_html/home/index_tt_ajax.php on line 44

Thank you,
Hamzah

Hi Hamzah, that is strange, as the only lines related to staff absences appear to be warnings rather than errors, and that shouldn’t cause a Gibbons Escaped page. However, there are some other odd errors in there too, which seem to perhaps be PHP version related, but it’s odd to see those in v27.0.01.

Are you able to be sure to check the error logs directly after the absence error is triggered, to be sure you’re getting the exact error that might have caused the issue?

So the last time, when I was trying to find the correct error logs, I triggered the gibbons escaped page to see which file had updated but I couldn’t find any that did. That’s why I was confused as to whether I had got the correct error logs or not.

I will try to have a look again when I get a chance tomorrow.

Again thanks for the help,
Hamzah

Also I found that when I put a staff absence in that requires approval, when approval is given there is no option to assign cover. The cover feature only works when no approval is required.

Hi Hamzah, there are two coverage options: internal (staff cover other staff), or not internal (external, specific users marked as substitutes cover staff). You can check which option is enabled in User Admin > Staff Settings.

If you’re using external substitutes, then when an absence requires approval, the teacher will be notified to put in their coverage only after it’s approved. Otherwise, they would go through the process of setting up coverage and then it doesn’t get approved, which ties up substitutes and causes a bunch of extra cancellations.

If you use the internal coverage option, then coverage is assigned by an admin and not requested individually, so then coverage can be requested when an absence requires approval. Hope this helps (and makes sense).

Hi again,
I’ve managed to find another log file that I think just updated when I triggered the error again so I’ll paste the logs here for you to have a look.

error logs

[Mon Sep 23 14:50:23.211240 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.js
[Mon Sep 23 14:50:23.211202 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.htm
[Mon Sep 23 14:50:23.211162 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.html
[Mon Sep 23 14:50:23.211002 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.phtml
[Mon Sep 23 14:50:23.210892 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.jsp
[Mon Sep 23 14:50:23.210536 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.php5
[Mon Sep 23 14:50:23.210496 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.php7
[Mon Sep 23 14:50:23.210368 2024] [access_compat:error] [pid 3944895:tid 3944999] [client 35.158.144.28:51750] AH01797: client denied by server configuration: /home/abraraca/public_html/home/uploads/index.php

Thank you
Hamzah

Hi Hamzah, that looks like it may be an access log rather than an error log? The ‘client denied’ messages look like something may have been probing for known file types, but that’s rather common for a web server. Otherwise, there’s no PHP errors showing up.

Hi again,
I’m really sorry but I just can’t seem to find the correct logs. Is there anything you can do to help me solve this issue.

I have a similar issue now when I use the messenger to try and send emails. I get the gibbon error page. When I use the message wall there is no error, it is only when I add email to it.

Apologies for not being much use and thanks for all your help,
Hamzah

Hi Hamzah, sorry to hear you’re encountering these issues. If your visit the System Admin > Server Info page, the top field called Error Log Location should be able to tell you the exact location of logs on your system. Hope this helps! Also, if you visit the System Check, are there any red X? An error when sending emails sounds like it could be a server configuration issue. Checking the logs right after an error occurs is the best way to see what the issue might be.

Hi Sandra,
Umm, unfortunately the server info page also throws up an error! Now I’m sure there is something wrong with my installation. Have you seen an error on the server info page before? How would I go about solving these issues?


Sorry for all the trouble,
Hamzah

Edit: Also on the system check page it all has green checks besides “allow_url_fopen == 1

Okay I just tried a second install of gibbon on my server with a new database and address and tried adding a new absence and still got the same error so maybe its something to do with the softaculous installer? Or potentially my server I am not sure.

Edit:
Okay I tried installing gibbon manually and tried it again but I am still getting the same errors. So this leads me to think it is something to do with my server? Not sure exactly what the problem is though.

If anyone has any ideas please let me know.

Thanks
Hamzah

Hello again @sandra,
Have you any idea on why even my server info page has an error?

Thank you,
Hamzah

Hi @Hamziatcha This is quite unusual, perhaps try my suggestion from the other thread and see if you can find the server error logs:

Hi again!
I have inally found the correct error logs for the staff absences. It seems the logs are placed wherever the .php files are which caused the error. So I found these logs in the staff module folder.

Error logs

[18-Oct-2024 09:51:21 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function Gibbon\Services\exec() in /home/abraraca/public_html/home/src/Services/BackgroundProcessor.php:128
Stack trace:
#0 /home/abraraca/public_html/home/src/Services/BackgroundProcess.php(62): Gibbon\Services\BackgroundProcessor->startProcess()
#1 /home/abraraca/public_html/home/modules/Staff/coverage_requestProcess.php(266): Gibbon\Services\BackgroundProcess->__call()
#2 /home/abraraca/public_html/home/modules/Staff/absences_addProcess.php(174): require_once(‘/home/abraraca/…’)
#3 {main}
thrown in /home/abraraca/public_html/home/src/Services/BackgroundProcessor.php on line 128
[29-Oct-2024 11:34:53 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function Gibbon\Services\exec() in /home/abraraca/public_html/home/src/Services/BackgroundProcessor.php:128
Stack trace:
#0 /home/abraraca/public_html/home/src/Services/BackgroundProcess.php(62): Gibbon\Services\BackgroundProcessor->startProcess(‘Gibbon\Module\S…’, ‘runNewAbsenceWi…’, Array)
#1 /home/abraraca/public_html/home/modules/Staff/coverage_requestProcess.php(266): Gibbon\Services\BackgroundProcess->__call(‘startNewAbsence…’, Array)
#2 /home/abraraca/public_html/home/modules/Staff/absences_addProcess.php(174): require_once(‘/home/abraraca/…’)
#3 {main}
thrown in /home/abraraca/public_html/home/src/Services/BackgroundProcessor.php on line 128
[30-Oct-2024 14:35:00 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function Gibbon\Services\exec() in /home/abraraca/public_html/home/src/Services/BackgroundProcessor.php:128
Stack trace:
#0 /home/abraraca/public_html/home/src/Services/BackgroundProcess.php(62): Gibbon\Services\BackgroundProcessor->startProcess()
#1 /home/abraraca/public_html/home/modules/Staff/absences_addProcess.php(167): Gibbon\Services\BackgroundProcess->__call()
#2 {main}
thrown in /home/abraraca/public_html/home/src/Services/BackgroundProcessor.php on line 128

Thanks,
Hamzah

Aha, I see the issue. It looks like your hosting provider has also disabled the exec() function, which is not uncommon. In this case, can you go into System Admin > System Settings and disable background processing, and then things should work as normal. I’ll look into seeing if there’s a way for us to detect if exec() has been disabled and warn admins of this.

Thank you so much, this fixed it all! We were having some other random issues throughout the website but it seems to all be working properly now. You’ve helped us out a lot!

Thanks again,
Hamzah