Errpr: Use of undefined constant c - assumed 'c'

Started by Мel, July 03, 2012, 04:15:55 PM

Previous topic - Next topic

Мel

Hi everybody.
I'm getting lots and lots of errors like this:
"Use of undefined constant c - assumed 'c'
(different lines)

I tried everything I could think of - no result :( Any ideas? I would appreciate any help with this.
"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

Arantor

It would really help to know where the errors are exactly...
Holder of controversial views, all of which my own.


Мel

It goes like this

http://forum.***/index.php?action=admin;area=logs;sa=errorlog;desc8: Use of undefined constant c - assumed 'c'File: /home/me/forum/Themes/Curve_Multi_Color/index.template.php
Line: 9
"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

Arantor

Any chance you can post that file here as an attachment?
Holder of controversial views, all of which my own.


CapadY

Wild guess:

Somewhere in your code you'll find:


C  =>  $something;


This should be:


' C'   =>  $something;




Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Arantor

CapadY: probably, but I want to see the file itself just in case it's something else. The error is... unusual.
Holder of controversial views, all of which my own.


MrPhil

For the core and default themes, line 9 is still way up in the /* prologue comment block */. It's possible that your theme file has been hacked, or it just may be an unusual layout. I would have assumed that the author had tested the theme before releasing it, so I'm leaning towards a hack (or other damage to the file). Anyway, attaching a copy of the file to your next post would settle the issue very quickly.

Мel

Yes, there was actually a trojan on my forum, something called Trojan.PHP45 I think.
And here is the file.
"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Мel

Yep, some files seems to be corrupted. I'm replacing them from originals step by step.
"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

Kindred

If you were hacked and they altered ANY of your files, it is likely that they dropped  backdoor (or multiple) into some hidden, buried directory.
I would suggest replacing **ALL** forum files in **ALL** directories.
Specifically:
save a copy of your Settings.php, as well as your attachments and avatars directories
delete the entire forum tree.
install a fresh copy of the forum files
restore your saved Settings.php file and directories.

reinstall mods and/or themes.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MrPhil

Your index.template.php file looks very suspicious to me. Between the opening <?php and the normal prologue comments are a bunch of obfuscated code lines with eval(base64_decode()) statements. Legitimate code rarely looks like that... I think it's a hack. Try removing those lines 2 through 9 (keep a copy of the file, just in case). Or, compare it to a known clean backup copy.

Мel

Kindred
Yes, thank you. But it wasn't a deliberate hack, just an ad trojan on my configuration (it appeared to be flawed, somebody wrote about this kind of problem some time ago). Also, I've made my FTPAccess to recognize only one my IP.

MrPhil
I've replaced it with a new one from that theme.
"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

Kindred

note: base64 encoding is not used in **ANY** part of SMF, as distributed.

there are several mods (mostly by ADK) which add their copyrights in base64, but this is **BAD** practice, and IMO, any code with the start base64 should be killed with fire and removed from the code as soon as found.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Мel

"The ability to speak does not make you intelligent."
- Qui-Gon Jinn

Advertisement: