I am testing the new version and i am getting a lot of errors and many questions and am sure others do as well.
first i get this error :
Fatal error: Uncaught Error: Call to a member function get() on null in C:\xampp\htdocs\all\t2021\src\phpfn.php:122 Stack trace: #0 C:\xampp\htdocs\all\t2021\src\phpfn.php(1355): PHPMaker2021_1692015\Container(‘sqllogger’) #1 C:\xampp\htdocs\all\t2021\src\phpfn.php(1268): PHPMaker2021_1692015\ConnectDb(Array) #2 C:\xampp\htdocs\all\t2021\src\phpfn.php(5471): PHPMaker2021_1692015\Conn() #3 C:\xampp\htdocs\all\t2021\src\phpfn.php(5625): PHPMaker2021_1692015\ExecuteQuery(’ SELECT COUNT(…‘, NULL) #4 C:\xampp\htdocs\all\t2021\src\userfn.php(511): PHPMaker2021_1692015\ExecuteScalar(’ SELECT COUNT(…') #5 C:\xampp\htdocs\all\t2021\index.php(28): require_once(‘C:\xampp\htdocs…’) #6 {main} thrown in C:\xampp\htdocs\all\t2021\src\phpfn.php on line 122
then somehow not sure i managed to bypass that error and i got below:
when i login i get this error : C:\xampp\htdocs\all\t2021\src\AdvancedSecurity.php(507): Call to undefined method PHPMaker2021_1692015\Profile::assign()
maybe it is related to above, the sessions saved on User_Validated are not recognized/undefined when used on Recordset_selecting .
also i have one question, on the server events when dose the session starts and can be used?
in addition, i noticed that the log file is actually logging the password typed into the text file even so i have selected hashed password and i think this is not secure and should be changed.
Post your code near line 511 in userfn.php (which contains code from your the server side Global Code) and also near line 122 from C:\xampp\htdocs\all\t2021\src\phpfn.php.
Post your code near line 511 in userfn.php (which contains code from your the server side Global Code) and also near line 122 from C:\xampp\htdocs\all\t2021\src\phpfn.php.
the line 511 is on global code (i am counting some records here and out put them on the menu rendering to show the numbers of records and save them on session):
$UID=CurrentUserID();
if (CurrentUserLevel() <> -1 && CurrentUserLevel() <> 61 && CurrentUserLevel() <> 16) {
$foo = $myCount1 = ExecuteScalar(" SELECT COUNT() FROM deapproval WHERE ContractHolder=‘$UID’ " );
$foo[] = $myCount2 = ExecuteScalar(" SELECT COUNT() FROM prbhapproval WHERE UserID=‘$UID’ " );
$foo = $myCount3 = ExecuteScalar(" SELECT COUNT() FROM prubghapproval WHERE UserID=‘$UID’ " );
$foo[] = $myCount4 = ExecuteScalar(" SELECT COUNT() FROM executive1pr WHERE UserID=‘$UID’ " );
$foo = $myCount5 = ExecuteScalar(" SELECT COUNT() FROM orderchapproval WHERE ContractHolder=‘$UID’ “);
$foo[] = $myCount6 = ExecuteScalar(” SELECT COUNT() FROM orderbghapproval WHERE UserID=‘$UID’ " );
$foo = $myCount7 = ExecuteScalar(" SELECT COUNT() FROM orderubghapproval WHERE UserID=‘$UID’ " );
$foo[] = $myCount8 = ExecuteScalar(" SELECT COUNT() FROM executive1orders WHERE UserID=‘$UID’ " );
$foo = $myCount9 = ExecuteScalar(" SELECT COUNT(*) FROM executive2orders WHERE UserID=‘$UID’ " );
Fatal error: Uncaught Error: Call to a member function get() on null in C:\xampp\htdocs\all\t2021\src\phpfn.php:122
Stack trace: #0 C:\xampp\htdocs\all\t2021\src\phpfn.php(1355): PHPMaker2021_1692015\Container(‘sqllogger’) #1 C:\xampp\htdocs\all\t2021\src\phpfn.php(1268): PHPMaker2021_1692015\ConnectDb(Array) #2 C:\xampp\htdocs\all\t2021\src\phpfn.php(5471): PHPMaker2021_1692015\Conn() #3 C:\xampp\htdocs\all\t2021\src\phpfn.php(5625): PHPMaker2021_1692015\ExecuteQuery(’ SELECT COUNT(…‘, NULL) #4 C:\xampp\htdocs\all\t2021\src\userfn.php(511): PHPMaker2021_1692015\ExecuteScalar(’ SELECT COUNT(…')
You got the error when executing ExecuteScalar(). The script tried to get the SQL logger to log your SQL but failed to get the logger class. Be reminded the composer packages used in v2021 is very different from previous version. Make sure you have run composer update after generation and upload the “vendor” folder. You should do the follows:
Enable “Composer update” in Generate tab
Generate all files
Wait until the composer update completes
Upload all files in the project folder to your site again
sorry for replying late, i did follow all the steps you mentioned but still i get the same error. the only way forward is to delete the entire script in global code, however, this will lead to many other errors. and there is no log file.
Click Tools → Advanced Settings, enable Debug, generate the config.php again. Run your application again, by default the log file is under the “log” folder under your project folder. Again, make sure you re-generate all files and run composer update again, or there is no logger in the old “vendor” folder at all.