SuiteCRM 8.7.1: Can't login?

After many trials and errors, I ha ve been able to complete the installation on a shared shoting environment.

So, Iā€™m at the logon screen and put in my username and password. It comes back and says:
Login credentials incorrect, please try again.

I checked the config.si.php file and found the username and password there to be correct.

Am I missing something somewhere? Oh SO CLOSE!!

Thanks again for all your help

jp

Please check if the user is present in the database table.
select user_name from users;

Also, check with a very simple password, without any strange characters or symbols in it. There was (is?) a bug regarding this

Is there APP_SECRET variable in .env.local ?

Thanks all, so far.

Yes.

There wasnā€™t any rows in this table. Iā€™m not sure why the install script didnā€™t insert the user name into the table. So, I added 1.

Not sure where to put the password and what type should it be plain text or MD52 hashed. Also not sure what other columns need to be filled in to this to be a valid row.

Still would not log me in.

Thanks again.

Reset permissions:

find /var/www -type d -not -perm 2775 -exec chmod 2775 {} \;
find /var/www -type f -not -perm 0664 -exec chmod 0664 {} \;
find /var/www ! -user www-data -exec chown www-data:www-data {} \;

Delete config.php, config_override.php, config_si.php files. Drop the database. Set correct permissions and reinstall using commands with admin rights.

I have done this numerous times (see my other post on ā€œInstalling 8.7.1 on Shared Hostingā€) and the install script does not create all the tables (outbound_mail is the only table it doesnā€™t create) and discovered that the 2nd step of the install (database connection, username/password) does not insert the username and password into the User table. (hence the reason why Iā€™m posting this)

To make matters worse, I fail to see anywhere in the various log files the actual messages I see coded in the install.php scripts.

I did that when I copied the files to the sserver. And again after going through the install script (at login screen but before I tried to log in.). What Iā€™m not sure is the chown commnd. Remember this is on a shared hosting so itā€™s the user account thatā€™s the owner of the folder, not the server account.

find . ! -user ditsquad.work -exec chown ditsquad.work:ditsquad.work {} ;

jp

Files have to be owned by user that runs php.
Create file usertest.php file in public directory:

<?php
echo exec('whoami'); 

And run it in browser. It will show the name of user thes should be the owner of files.

Try a clean install using my 10 m script. Is was updated to install the 8.7.1.

Thank you for the tip.

does the owner and group have to be the same? ( chown (name):(name) where name is the ID returned by the PHP call)

Thanks ā€“ please note Iā€™m using a shared hosting platform. I donā€™t need to install the install php modules, database server or create the database. thatā€™s a step I have to do before the install.

This would work if I was running my own Linux server.

So, Iā€™m going through the script and removing the parts I donā€™t need.

The group may be different if the owner already has full rights.

So did it work?
How was the changes made?

Unfortunately, nope.

It seems that I canā€™t run shell scripts on a shared host platform. And I canā€™t use sudo in the script either.

I had to edit the script and add 1 additional prompt ā€“ the db_host since this is not a ā€˜localhostā€™ configurationā€¦ And comment out a lot of lines ā€“ (install Maria, etc)

However, I will try this script on my local server ā€“ after I build it. Thanks for trying to help.

Yes, local server or a server you control 100%, this will work. This was not design for shared servers, sorry.
Maybe some one in the community could pick up the code and adapt it?

Not all shared hostings are alike. Some of them have more permissions than others.

Lots of people run SuiteCRM successfully on shared hostings but I would say that the hosting needs to be carefully picked before starting, to make sure it has all you need.

One basic thing I would never dispense with is having SSH access through a terminal.

Last try: Check your suitecrm admin password. I noticed that if you use any of these characters ā€™ " ` < > in password you wonā€™t be able to log in. Also if your copy/paste password touch password field (space/backspace) before pasting. I had some issues with copy/pasting passwords.

I agree. In the case of some shared hosting companies, they limit the scope of what you can do via terminal. With this one, it appears that their bash shell is turned off. What I didnā€™t try was copy/paste the commands replacing the variables with the correct info.

jp