Login impossible if it has not been done before by the backend

I can’t log in if I didn’t log in from the backend before without any error in the error.log file.

In addition with this instance since I have tried many now I have this error in the login part AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function getallheaders() in /var/www/clients/client0/web8/web/frontend/proxy/proxy.php:38\nStack trace:\n#0 {main}\n thrown in /var/www/clients/client0/web8/web/frontend/proxy/proxy.php on line 38\n’, referer: https://spice.araneus.info/frontend/

How can i resolve?

Looks like your php doesn’t know getallheaders() function. nginx distribution?
You need to define getallheaders() function. Code:
if (!function_exists(‘getallheaders’))
{
function getallheaders()
{
headers = []; foreach (SERVER as $name => $value)
{
if (substr($name, 0, 5) == 'HTTP
’)
{
$headers[str_replace(’ ‘, ‘-’, ucwords(strtolower(str_replace(’_’, ’ ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}

We have this code portion in KREST/index.php but it seems that you need it earlier somewhere else.
Try at the top in index.php or include/entryPoint.php

hi, i have apache not nginx, i change php 7.0 PHP-FPM to 7.3 PHP-FPM + cgimod and i resolve the problem getallheaders()

but i not resolve the login. I can’t login in the frontend without before login in backend with all user.
If i try login in frontend i recive this error:
AH01071: Got error ‘PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client0/web8/web/frontend/proxy/proxy.php on line 66PHP message: PHP Stack trace:PHP message: PHP 1. {main}() /var/www/clients/client0/web8/web/frontend/proxy/proxy.php:0’, referer: https://spice.araneus.info/frontend/

If i login in backend this error does not appear

php warning does not matter.
What is the content of your config/sites/000.cnf file?
It should point to KREST folder

i have this in file
{"id":"spicecrm","display":"Spice","backendUrl":"https:\/\/spice.araneus.info\/backend\/KREST","proxy":false,"developerMode":false,"loginProgressBar":true,"allowForgotPass":true,"autoLogout":0}

looks good.
What do you get on screen when you call
https://spice.araneus.info/backend/KREST/sysinfo

this {"version":"2.0","systemsettings":{"upload_maxsize":30000000,"enableSettingUserPrefsByAdmin":false},"extensions":{"duns":{"version":"1.0","config":[]},"google_api":{"version":"1.0","config":{"key":""}},"reporting":{"version":"1.0","config":[]},"theme":{"version":"1.0","config":[]},"telecockpit":{"version":"1.0","config":[]},"mailboxes":{"version":"1.0","config":[]},"projectmanagement":{"version":"1.0","config":[]},"portal":{"version":"1.0","config":[]},"core":{"version":"2.0","config":{"edit_mode":"custom"}},"gdpr":{"version":"1.0","config":[]},"metadata":{"version":"1.0","config":[]},"module":{"version":"2.0","config":[]},"login":{"version":"1.0","config":[]},"forgotPassword":{"version":"1.0","config":[]},"utils":{"version":"1.0","config":[]},"mobile":{"version":"2.0","config":[]},"user":{"version":"1.0","config":[]}},"languages":{"available":[{"language_code":"en_us","language_name":"US English","system_language":"1","communication_language":"1"}],"default":"en_us"},"elastic":{"name":"4eDY2J6","cluster_name":"elasticsearch","cluster_uuid":"mQ2xiFIFRS-qySMe5W5scw","version":{"number":"6.8.6","build_flavor":"default","build_type":"zip","build_hash":"3d9f765","build_date":"2019-12-13T17:11:52.013738Z","build_snapshot":false,"lucene_version":"7.7.2","minimum_wire_compatibility_version":"5.6.0","minimum_index_compatibility_version":"5.0.0"},"tagline":"You Know, for Search"},"loginSidebarUrl":false,"ChangeRequestRequired":false,"sessionMaxLifetime":1440}

looks good too.
Do you get any error using developer tool > network?

i get this in developer tool in console:

VM21:1 GET https ://spice. araneus.info/backend/KREST/login 401 (Unauthorized)

this error in network:

but the username and password is correct.

mmh. It’s becoming difficult to guess.
Any error thrown in sugarcrm.log?

Please check file permissions in backend/ for
cache/, custom/, media/ and upload/ folders + *.log files in backend/
They should be owned recursively by www-data user and have chmod 0755

only error in suguarcrm.log is
Tue Feb 18 15:57:02 2020 [16739][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone=“Europe/Berlin” in php.ini!
but i resolve, I replaced Vienna with Berlin but nothing and all folder backend recursive is chmod 0755

Whcih branch did install? master ?

with this command
git clone https://github.com/spicecrm/spicecrm_be_release_core backend
git clone https://github.com/spicecrm/spicecrm_fe_release_core frontend

then you have the master. Good.

display_errors is off in your php.ini?

in my php.ini i have this
display_errors=off
default_charset=“UTF-8”
date.timezone = Europe/Berlin
max_execution_time=300
memory_limit=256M
upload_file_size=50MB

i discover this in pdf guide

also good.

Last thing we can try to see if we get more errors in php error log
comment line error_reporting(1); in KREST/index.php
Should around line 19

ok now i have much error in error.log
i paste this in pastebin

https://pastebin.com/VgsDDZvq

I don’t see any fatal error. Only notices and warnings which are informative but no errors.

Did you load ui default config using backend > administration > UI config?

yes. I have tried even now but nothing.