You can see the login page but receive a message stating that "An internal server error has occurred" or "The application credentials are incorrect for this system" every time you enter your login credentials.
The login form utilizes the API to authenticate users. Using a tool like Postman to test logging in directly via API is a very good way to get clarity where the error actually is. Moreover, the API will provide a better response regarding what the actual issue is.
Open Postman, and create a
POST request to
http://elentra-1x-me.localhost/api/v2/auth/login while passing the following data in the
"auth_username": "[Your AUTH Username]",
"auth_password": "[Your AUTH Password]",
You should see helpful response identifying what the logging in issue is. If the response you receive isn't helpful, then please proceed with the checklist below.
Database schema is created?
Database user exists?
Database user password is correct?
Database user has permissions to the schema? (try with full permissions, to make sure that permissions aren’t the issue, restrict afterwards)
Can you connect to the database with the MySQL command line (or a database GUI like phpMyAdmin) and view the tables of the database?
Is the character encoding/collation correct for the database and the DEFAULT_CHARSET in
settings.inc.php? Mixing Latin1 and UTF8 can lead to problems. This may require adding debug statements or stepping through the login process, and checking variables/error messages.
Verify the following in
There is a row in
script_id matches [“auth_username” in the config file]?
script_password matches MD5([auth_password]) in the config file?
AUTH_APP_ID defined in settings.inc.php is the same as
[auth_schema].registered_apps.id? (Try putting
Log::info($app_auth_credentials); after that variable is defined in the API’s
AuthController.php postLogin() method to be sure.)
Is the API set up correctly (for a development environment, there may be a symbolic link in
www-root/core/library/vendor/elentrapackages)? Make sure that the link is pointing to a valid API directory.
Is the API accessible? You should be able to go to
[website url]/api/v2 and see the message “Welcome to the Elentra API. Please see our documentation for assistance.”. You can also use Postman to work directly with the API; that will often show additional information that may be helpful.
Is there a
.htaccess file in your
If using different Elentra applications (i.e. Admissions, ME, CPD), is the API the correct version for the application version you are running? CPD may require a different API version from ME.
Is there a row in
username matches the username in the login form?
password matches the SHA1(login form password + salt from row)?
organisation_id exists in
[auth_schema].organisations matches the
app_id in in
Is there a row in
user_id matches the id field in
app_id matches the id in
organisation_id matches the id in
account_active is true?
access_starts is before now?
access_expires is after now (or 0)?
locked_out_until is NULL?
Is the “organisation_id” set to the correct value in
Do the “AUTH_APP_ID” and “AUTH_APP_IDS_STRING” variables in
settings.inc.php match the ID of a row in the
Are there entries in in
[auth_schema].user_preferences for the “organisation_switcher” module that are pointing to the wrong
organisation_id? These rows can safely be removed because they will be regenerated as needed (they determine which Organisation is the default for that user when logging in).
In the in
[auth_schema].organisations table, is the template for this organisation set to a
www-root/templatesdirectory that does not exist (e.g. if the DB has come from a live site that has a customized set of templates, and your development site doesn't have them)?
Be sure to check the following logs if you cannot see any errors or warnings being printed to the screen.
Apache logs (typically
/var/log/httpd/error_log or /var/log/httpd/ssl_error_log)
Enable Laravel debug messages (only for use in development) by running the following command from the root of your
echo "APP_DEBUG=true" > www-root/core/library/vendor/elentrapackages/elentra-1x-api/.env