1 (edited by dreaddy 05/28/2014 08:49:52 pm)

Topic: I think my site got hacked...

Suddenly my site doesn't have a tax table or others...not sure

DATABASE ERROR : could not get all tax types
error code : 1146
error message : Table 'frontaccounting.0_tax_types' doesn't exist
sql that failed was : SELECT * FROM 0_tax_types

Sure enough the tax table was gone.

I tried to recreate the table

CREATE TABLE `0_tax_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rate` double NOT NULL DEFAULT '0',
  `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
  `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
  `name` varchar(60) NOT NULL DEFAULT '',
  `inactive` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)

get the following error code

Error Code: 1005
Can't create table 'frontaccounting.0_tax_types' (errno: -1)

WHY?

Any ideas how to recreate the tax table? or create tables for frontaccounting?

2 (edited by dreaddy 05/28/2014 08:48:54 pm)

Re: I think my site got hacked...

Anyone???.....dang.

Does ne1 know how to restore?

or why I can't create the table?

CREATE TABLE `0_tax_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rate` double NOT NULL DEFAULT '0',
  `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
  `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
  `name` varchar(60) NOT NULL DEFAULT '',
  `inactive` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)


I did a restore from an old backup...same thing.

Crap!!!!

Is frontaccounting dead?

I see some activities. So people are reading this.?

Re: I think my site got hacked...

Alrighty. I'll just talk to myself.

SOLUTION (requires a backup)

Create the table with a different table name

CREATE TABLE `FA_COMMUNITY_SUCKS_tax_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rate` double NOT NULL DEFAULT '0',
  `sales_gl_code` varchar(15) NOT NULL DEFAULT '',
  `purchasing_gl_code` varchar(15) NOT NULL DEFAULT '',
  `name` varchar(60) NOT NULL DEFAULT '',
  `inactive` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)

Rename the table

RENAME TABLE `FA_COMMUNITY_SUCKS_tax_types` TO `0_tax_types`

Then insert your data

INSERT INTO `0_whatever_you_lost` VALUES (...)

As for why I have to do this song and dance. No f**king clue

Attackers dropped a couple of the tables.

Could have done much worse.

FA community appears to be dead.

This message is for those poor souls who trigger the activity counter.

Good luck with this.

Re: I think my site got hacked...

What version of FA are you running?
Had you installed the most recent updates that fixed some security problems?
What FA modules do you have installed?

Do you have any other applications such as phpmyadmin running on your web server?
Is your mysql root password at least 10 alphanumeric characters?

If your restoring your backup did not fix the problem, that suggests the problem occurred before that backup was created.

Re: I think my site got hacked...

I was running one the earlier 2.3.xx builds.

I had the mobile module installed I think.

The backups had the missing tables and data.

I'm of the opinion that restoring would have

1.) dropped existing tables,
2) recreate the table
3) import data

It's there in the sql and that process ran fine for the existing tables.

6 (edited by apmuthu 06/16/2014 04:41:59 am)

Re: I think my site got hacked...

Also check the db user privileges for the database tables.
Modifying the sql backup and restoring it could have also done the trick.

Sorry you had to wait so long for your solution. It's nice that you have shared your solution despite the delayed response from the FA Forum users who are generally quite quick to assist. Welcome to the FA fraternity.