Topic: Problem logging in

Hi.  After starting XAMPP and after entering my login credentials, the page  changes and instead of taking me to the home page I get a nearly blank page and all that shows is "Back", a functioning hyper-link the the FrontAccounting web page and today's date and time.  I've tried rebooting and another browser.  the FA version I have is 2.4.9 Build 12.05.2021.  Up till today FA has been running fine.  I recently installed Malewarebytes but FA has been stable after that install.

2 (edited by rafat 09/22/2021 06:04:05 pm)

Re: Problem logging in

Anything in /tmp/errors.log?

Re: Problem logging in

Yes.  I wasn't sure where to locate this log file but I finally did under xampp > htdocs > account > tmp, which I I think is correct.  The reported error is:

[22-Sep-2021 18:55:16 Europe/Berlin] <b>DATABASE ERROR :</b> could not get validate user login for jeff<br>error code : 1046<br>error message : No database selected<br>sql that failed was : SELECT * FROM 0_users WHERE user_id = 'jeff' AND password='658bd16d7fdac6883fba21937ecb2c8d'<br><br><br>

I verified that the login credentials I'm using are correct.

Re: Problem logging in

From your config_db.php check the database name and it has to match with your xampp phpmyadmin database. And also connecting credentials  such as username,  password,  database name, host needs to be the right credentials.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Problem logging in

Thank you all for your responses.  Please bear with me as I attempt to follow the recommendations given me, as I do not have any experience working behind the scenes, if you will, with the underlying files and databases.  That said, I did find the config_db.php file and I did discover how to access the xampp phpmyadmin database. I did find the Databases and User accounts tabs, as well as the 0_users table in the frontacc database.  The below code is from the .php file but I cannot find corresponding settings in the database.

array (
    'name' => 'Diventi Enterprises, LLC',
    'host' => 'localhost',
    'dbuser' => 'frontacc',
    'dbpassword' => 'frontacc',
    'dbname' => 'frontacc',
    'tbpref' => '0_',
    'collation' => 'utf8_xx',
  ),

Also, the dbuser and dbpasswords values shown above are not the credentials I use to login in to company 0, so this information doesn't make sense to me.

I wish there was a more efficient way to diagnose the issue but I am so very grateful for your help.

Re: Problem logging in

The problem clearly indicates a db problem,,its either not found or is corrupt. Are you sure your db name is frontacc?
The dbuser, dbpassword are mysql parameters to access the db, they are different from userid and password in front accounting which is normal in your case...as your fa id is jeff with a password. Do you have other companies in config_db?

If you are confident you can restore the db using phpmyadmin from a previous backup and try again. All data after the backup will be lost though..

Re: Problem logging in

As you said you don't have much experience.  So the configurations are wrong. For default xampp the username is root  and passwords is empty and goto Phpmyadmin

You can see the Data base name. If frontacc found and which has atleast 78 tables inside. It's correct to try.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Problem logging in

Thanks for the explanations.  I found my latest backup and got some instructions on how to restore it.  Before I do so though I want to share one other discovery:

While in phpmyadmin, on the Databases tab, if I click on Check priviledges associated with the frontacc database, an error window is displayed with the following information:

#1030 - Got error 176 "Read page with wrong checksum" from storage engine Aria

( SELECT `User`, `Host`, `Select_priv`, `Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`, `Grant_priv`, `Index_priv`, `Alter_priv`, `References_priv`, `Create_tmp_table_priv`, `Lock_tables_priv`, `Create_view_priv`, `Show_view_priv`, `Create_routine_priv`, `Alter_routine_priv`, `Execute_priv`, `Event_priv`, `Trigger_priv`, '*' AS `Db`, 'g' AS `Type` FROM `mysql`.`user` WHERE NOT (`Select_priv` = 'N' AND `Insert_priv` = 'N' AND `Update_priv` = 'N' AND `Delete_priv` = 'N' AND `Create_priv` = 'N' AND `Drop_priv` = 'N' AND `Grant_priv` = 'N' AND `References_priv` = 'N' AND `Create_tmp_table_priv` = 'N' AND `Lock_tables_priv` = 'N' AND `Create_view_priv` = 'N' AND `Show_view_priv` = 'N' AND `Create_routine_priv` = 'N' AND `Alter_routine_priv` = 'N' AND `Execute_priv` = 'N' AND `Event_priv` = 'N' AND `Trigger_priv` = 'N')) UNION ( SELECT `User`, `Host`, `Select_priv`, `Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`, `Grant_priv`, `Index_priv`, `[...]

It has been suggested that it might prove beneficial to reinstall xampp.  Thoughts?

Re: Problem logging in

If you have the luxury to reinstall xampp then be it. Because this way you are reinstalling a fresh copy of your environment...including Apache, Mysql and Php. You will also need to reinstall fa code and restore the db backup. I  would say this is a very good learning exercise. If you do not have the time and luxury then restoring the db first is a good idea.
We are here if you need help.
Good luck.

Re: Problem logging in

While I waited I decided to restore a backup.  As a precaution is exported the frontacc database first.  Restoring the backup did not fix the issue.  So now, with the most recent input from rafat, I plan to install a new version of xampp.  However, I would like to restore the exported database file, since it contains the most up to date data.  I'm not sure though that using that exported file will result in a clean restore.  When I compare the backup file that I used to the exported database file I see some differences in code.  The backup has the following code (similar code precedes each table listing):

DROP TABLE IF EXISTS `0_areas`;

CREATE TABLE `0_areas` (
  `area_code` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `inactive` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`area_code`),
  UNIQUE KEY `description` (`description`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;

### Data of table `0_areas` ###

INSERT INTO `0_areas` VALUES
('1', 'Global', '0'),
('2', 'TSI', '0'),
('3', 'Mech.Eng.', '0');


Whereas the exported database file has this code:


CREATE TABLE `0_areas` (
  `area_code` int(11) NOT NULL,
  `description` varchar(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',

  `inactive` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `0_areas`
--

INSERT INTO `0_areas` (`area_code`, `description`, `inactive`) VALUES
(1, 'Global', 0),
(2, 'TSI', 0),
(3, 'Mech.Eng.', 0);

I've been told that the code "DROP TABLE IF EXISTS" is very important to have included.  I would appreciate folks weighing in on this.

Thx

11 (edited by rafat 09/24/2021 08:31:28 pm)

Re: Problem logging in

Strange the restore of the backup did not resolve the issue..unless the backup also contains the corrupted data..then you are restoring what is already corrupted. Anyway "DROP TABLE IF EXISTS" is important to have and it is inserted by the FA backup routines.. I guess you are exporting via phpmyadmin or mysql command line which does not have the DROP command.

Now I am concerned even if you reinstall xampp and restored the bad backup then you will end up in the same situation as before. You might want to try and restore an older backup to start with ..just to eliminate the chance that the one your are working with is not the problem.

If you do XAMPP fresh install you can import the DB from your exported data without the DROP command , but that should be to an empty DB.

Re: Problem logging in

Update:

What fixed the problem was a reinstall of Xampp as well as an earlier version of php.  I wish I knew what caused the issue in the first place but other than a few days of being down, none of my data was lost.

Thanks for all the help!