This Help forum is for issues relates to the latest release (1.7.2). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: Config.ini.php crash

Config.ini.php crash 2 years 3 days ago #1

  • ksajdak
  • ksajdak's Avatar
  • Offline
  • New
  • Posts: 42
Just started getting the following error:

#0 unknown:unknown ErrorException("syntax error, unexpected '$' in C:\home\site\wwwroot\webtrees\data\config.ini.php on line 1 ")
#1 \includes\session.php:253 parse_ini_file()
#2 \index.php:31 require()

I have 3 questions:

1) What caused this?
2) How do I get back into my tree?
3) How do I prevent it?
The administrator has disabled public write access.

Config.ini.php crash 2 years 3 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10262
> What caused this?

Most likely, your server has been hacked, and an attacker has added their own code to the file config.ini.php

I've seen this a few times.

Usually only this file is infected, as it is often the only .PHP script that the server can write to.

> How do I get back into my tree?

Edit this file, and remove the "bad" code that has been inserted at the start.

> How do I prevent it?

Are all the web applications on your server patched and updated?
This is especially relevant for things like word-press plugins.

If your web host provides other websites, and doesn't properly isolate its customers, then it is possible that a vulnerability on another customer's site was the cause.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Config.ini.php crash 2 years 3 days ago #3

  • ksajdak
  • ksajdak's Avatar
  • Offline
  • New
  • Posts: 42
Thanks for the quick response.

As I'm not sure what should be in the file, can I delete it and reinstall without losing anything?
The administrator has disabled public write access.

Config.ini.php crash 2 years 3 days ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10262
> As I'm not sure what should be in the file, can I delete it and reinstall without losing anything?

It contains your database connection information.

It should look like this:
www.webtrees.net/index.php/en/forum/help...tion-collation#59621
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.
Powered by Kunena Forum