Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Cannot login - Cann...
 
Notifications
Clear all

Cannot login - Cannot use a scalar value as an array

10 Posts
2 Users
0 Reactions
4,714 Views
(@projeqtor-user)
Posts: 6
Active Member
Topic starter
 
[#7610]

I downloaded V9.1.5 last night and installed it between last night and today. I installed this on Bitnami wampstack-7.4.9-0 on Windows 10 Home.

I am getting the following error when trying to login for the first time.

2021-07-01 17:33:46.671 ** ERROR ** [V9.2.0] ERROR **
2021-07-01 17:33:46.672
** ERROR ** [V9.2.0] on file 'C:Bitnamiwampstack-7.4.9-0apache2htdocsprojecttoolprojeqtor.php' at line (4611)
2021-07-01 17:33:46.672
** ERROR ***** [V9.2.0] cause = Cannot use a scalar value as an array

I tried to search for a solution with no success.

Any ideas?


 
Posted : 02 Jul 2021 1H59
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

I have a real concern with your issue as in V9.1.5 projeqtor.php file does not show any possible issue on line 4611.
But looking at log file I saw you are using V9.2.0 (note : we just deployed V9.2.1 😉 )

Your issue is strange, I never faced it.
Possibly it is linke to PHP version and log level.
Please try and change line 4609 in projeqtor.php, from

  if (! isset($_SESSION[$projeqtorSession]) ) {

to

  if (! isset($_SESSION[$projeqtorSession]) or !is_array($_SESSION[$projeqtorSession])) {

Does it solve the issue ?


 
Posted : 02 Jul 2021 18H40
(@projeqtor-user)
Posts: 6
Active Member
Topic starter
 

Many Thanks for the quick reply!

I made the change. I got the same error.

2021-07-02 14:31:25.459 ** ERROR ** [V9.2.0] ERROR **
2021-07-02 14:31:25.461
** ERROR ** [V9.2.0] on file 'C:Bitnamiwampstack-7.4.9-0apache2htdocsprojecttoolprojeqtor.php' at line (4611)
2021-07-02 14:31:25.461
** ERROR ***** [V9.2.0] cause = Cannot use a scalar value as an array

I took the version number from the web page... I did not see the version number in the log. 😉

Cheers!!


 
Posted : 02 Jul 2021 22H36
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Try and change lines 4602-4613 (or about) in tool/projeqtor.php with

function setSessionValue($code, $value, $global=false) {
  global $paramDbName, $paramDbPrefix;
  echo "setSessionValue(code=$code) to value ";
  var_dump($value);
  echo "
";
  if ($global) {
    $projeqtorSession='ProjeQtOr';
  } else {
    $projeqtorSession='ProjeQtOr_'.$paramDbName.(($paramDbPrefix)?'_'.$paramDbPrefix:'');
  }
  if (! isset($_SESSION[$projeqtorSession]) or !is_array($_SESSION[$projeqtorSession])) {
    $_SESSION[$projeqtorSession]=array();
    echo "initialise array for _SESSION[$projeqtorSession]
";
  }
  echo "   > store value for _SESSION[$projeqtorSession][$code]
";
  $_SESSION[$projeqtorSession][$code]=$value;
  echo "   >OK
";
}

Then in parameters.php, change value for variable $logLevel

$logLevel='3';

Then try and connect.
You should get some messages, please post them here
(you can then comment / remove lines wiht echo added in projeqtor.php) 
 


 
Posted : 05 Jul 2021 17H31
(@projeqtor-user)
Posts: 6
Active Member
Topic starter
 

From the log file.

2021-07-05 14:19:36.450 ----- DEBUG ----- loginCheck : current db version = 'V9.2.0'
2021-07-05 14:19:36.457 ----- DEBUG ----- User->authenticate('admin', 'owHgPDhN42Bsv5IEnA==')
2021-07-05 14:19:36.461 ----- DEBUG ----- User->authenticate : md5 encryption
2021-07-05 14:19:36.462 ----- DEBUG ----- User->authenticate : wrong password ba0267c642f635ef7535aada214a6a98!=owHgPDhN42Bsv5IEnA== (exit)
2021-07-05 14:19:36.463 ----- DEBUG ----- loginCheck : unidentified incorrect authentification
2021-07-05 14:19:36.463 ===== TRACE ===== Login error for user 'admin'

It is interesting that it is saying wrong password - I have not yet been able to change the password yet. Can I change the password manually temporarily?

Do you want me to download the newest release?

Cheers!!


 
Posted : 05 Jul 2021 22H22
(@projeqtor-user)
Posts: 6
Active Member
Topic starter
 

I should have posted this too.

setSessionValue(code=lang) to value string(2) "en"
> store value for _SESSION[ProjeQtOr_projeqtor][lang]
>OK
setSessionValue(code=globalParametersArray) to value array(0) { }
> store value for _SESSION[ProjeQtOr_projeqtor][globalParametersArray]
>OK
setSessionValue(code=triggeredEventList) to value array(0) { }
> store value for _SESSION[ProjeQtOr_projeqtor][triggeredEventList]
>OK
Invalid login parameters

I apologize for the formatting of the log data.

I am a retired systems internal engineer. I opened the database and checked that a password did exist and that is was indeed admin. All is well.

I am not familiar with PHP. Sorry.


 
Posted : 06 Jul 2021 21H43
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

if it is a first isntall, possibly your setup is missing module.
Maybe apache error log file contains explicit error message.


 
Posted : 06 Jul 2021 22H15
(@projeqtor-user)
Posts: 6
Active Member
Topic starter
 

Since I was here, I did an Ubuntu update that failed. I did a fresh install of ubuntu 20 and I a a m getting the same results.

I am a retired coder. This appears to be an invalid reference.

Cheers!!


 
Posted : 20 Jul 2021 8H49
(@projeqtor-user)
Posts: 6
Active Member
Topic starter
 

I was not clear in my last post. I have now tried this on 2 machines. I took the time to deploy the app on two systems with the same results.

Basically, the logon fails. I suspect you are not getting a result array (or whatever) and your code does not expect this and therefore does not handle the failed login.

Here is a clue.

MySQL 8.0.4 has changed a default authentication method to caching_sha2_password which is not supported by PHP (at the time of writing). For MySQL 8 it should be changed to mysql_native_password method.

I cannot change this setting - MySQL Workbench does not allow it. I will see if I can find another way around this tomorrow.

Tired and should have gone to bed a while ago. Soon, the sun will be coming up.

Cheers!!


 
Posted : 20 Jul 2021 12H48
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Hi,
This has nothing to do with PHP.
It is just an internal way to store password in MySql.
So it is just the way you defined password for your mysql user that has to use correct method


 
Posted : 20 Jul 2021 16H31
Share:

Scroll to Top