tecnickcom / tcexam

TCExam is a CBA (Computer-Based Assessment) system (e-exam, CBT - Computer Based Testing) for universities, schools and companies, that enables educators and trainers to author, schedule, deliver, and report on surveys, quizzes, tests and exams.
http://www.tcexam.org
Other
564 stars 400 forks source link

TCExam 16.1.0 || PHP Requirement issue #415

Closed pinalgirkar closed 10 months ago

pinalgirkar commented 10 months ago

Describe the bug I was manually installing TCExam 16.1.0 on a CentOS 7 server with server configuration Apache 2.2, PHP 5.5, and MySQL 5.5. However after complete installation when I visit the URL [[http://example.com/tcexam160/public/code/index.php]] then It gives the internal server error. So, I checked in the apache error logs and this is the error msg

PHP Parse error: syntax error, unexpected '{' in {{PATH_TO_DIRECTORY}}/shared/code/tce_functions_errmsg.php on line 70, referer: http://example.com/tcexam_160/install/install.php

This error is thrown as in this file tce_functions_errmsg.php match statement has been used which is introduced in PHP 8.0. Does the PHP version has been changed to PHP 8.0??

To Reproduce Steps to reproduce the behavior:

  1. Unzip the zip in the directory and do the necessary changes as mentioned in the document
  2. Then visit the URL from browser http://example.com/tcexam_160/install/install.php and fill all the required details and install
  3. Then visit the URL mentioned in the installation http://example.com/tcexam160/public/code/index.php it will throw an internal server

Expected behavior The login page should load

Logs Apache error logs PHP Parse error: syntax error, unexpected '{' in {{PATH_TO_DIRECTORY}}/shared/code/tce_functions_errmsg.php on line 70, referer: http://example.com/tcexam_160/install/install.php

Environment:

Additional context Please change the document if that's the only issue.

pinalgirkar commented 10 months ago

Hii,

@nicolaasuni any updates regarding this??

nicolaasuni commented 10 months ago

The latest version of TCExam requires at least PHP 8.0.

The following page shows the PHP supported versions. https://www.php.net/supported-versions.php

PHP 8.0 has just reached EOL, so I recommend at least PHP 8.1.