I am getting this error when trying to import users (students). Data is validated in dry run. But with Live run it gives this error and cannot upload users to the system.
Can someone help me please.
Hi mldjayaranjan,
Hmm, that is odd that the dry run didn’t catch any errors. Check your PHP error log to see if there is anything in there that looks like an SQL related error. If that doesn’t help, you could also try opening the src/Data/Importer.php file and setting $debug = true; on line 126
Hi mldjayaranjan,Hmm, that is odd that the dry run didn’t catch any errors. Check your PHP error log to see if there is anything in there that looks like an SQL related error. If that doesn’t help, you could also try opening the src/Data/Importer.php file and setting $debug = true; on line 126
Thanks:
I found this error log;
“24-Jan-2021 05:17:55 America/Detroit] PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/siamasia/erp.siamnet.asia/index.php on line 408”
Index Php/Line 408 is:
$container->get(UserGateway::class)->update($session->get(‘gibbonPersonID’), [
@ross; Appreciate if you can guide me , how to fix the error
Hi mldjayaranjan, are you able to tell us what PHP version you are running? Thanks! Ross.
Daer Ross,
These are the information,
Gibbon 21.0.00
PHP 7.2.26Y
MySQL 5.6.41-84.1
Sincerely , Duminda
Hi Duminda,
The error your seeing is generally related to the ::class syntax, which was introduced in PHP version 5.3+. The PHP version you’ve shared, is this the one displayed in Gibbon, or on your server? Generally this error would indicate that Gibbon is running with an older unsupported version of PHP.
Dear Sandra,
This is seen on Gibbon system check! Is there any way to solve this out?
I imported staff users earlier, using system admin file import. It was ok,; however when I am trying to import users for students , the mentioned error occurred.
Dear Sandra, This is seen on Gibbon system check! Is there any way to solve this out? I imported staff users earlier, using system admin file import. It was ok,; however when I am trying to import users for students , the mentioned error occurred.
Standard server Php version is 5.45; however the set PHP version using PHP SELECTOR in CPanel for this sub-domain is is 7.2.
Hi Duminda,
Hmm. The error you’ve shared seems to be on index.php, which theoretically would affect much more than the importer, I wonder if it’s perhaps coincidental. We have recently noticed and patched an importer bug related to the handling of null values. Can you try the fix suggested here, which involves updating your ImportType.php file: https://ask.gibbonedu.org/discussion/comment/8143/#Comment_8143
Dear Sandra,
Thx, I replaced the file. However , it could not solve the issue. Should I try to reinstall the software again?
Dear Sandra,
I tried to reinstall the Gibbon Via Softaculous. I got this error after installing and even I cannot login. Hope you will fin d the reason from this error.
Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/siamasia/erp.siamnet.asia/index.php on line 408
Even it is a very new installation, it gave me the above error.
Hi, Sandra,
I could solve this after reinstalling and I change the PhP version of the domain to 7.2 . Now it seems ok, however still I did not upload users. I will let you know if any error again with new installation. Thanks.
** As I did not have much data , it was very OK to me to reinstall and check. Thank you again
Great to hear you have resolved the issue. Yes, running PHP 7.2 meets the minimum requirements and you shouldn’t encounter any other compatibility related errors.