TinyPortal

Development => Support => Topic started by: mymistake on May 26, 2009, 03:27:13 PM

Title: a LOT of weird errors in error log (Undefined variable)
Post by: mymistake on May 26, 2009, 03:27:13 PM
Hi,

I think this is TinyPortal related, but could be SMF as well..frankly, I have no idea what is causing this, so hoping to find some answers from the experts.

I have SMF 1.1.7 and TP 0.9.8 (I realize there are newer versions available, but that shouldn't explain the issue here). No other mods. Previously my error log in the database was pretty free of anything, but recently something changed. Today I accidentally checked the error log and it was 150 Mb in size!  :o The forum itself is functioning and all pages load up correctly, but it seems that each page view generates three entries to error log:

Quote from: error log
8: Undefined variable: R9DB9...6D42B508D6D11AB
File: /home/.../smf/Themes/default/Login.template.php (eval?)
Line: 1

8: Undefined index:  dhhag
File: /home/.../smf/Themes/default/TPortal.template.php (eval?)
Line: 1

8: Undefined index:  dguh
File: /home/.../smf/Themes/default/TPortal.template.php (eval?)
Line: 1

I'm not using the default theme for anything, the theme in use is SilentWave. As I said there was no problems previously at all, and after that I have only added some articles, perhaps some blocks too, rearranged forum sections etc. I have not updated the forum software or TP, installed any other mods whatsoever.

So.. do those error messages tell you guys anything? What might be broken, and how could I fix it? Thanks...
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: Renegd98 on May 26, 2009, 03:41:00 PM
The fact you are not using the default theme doesn't mean that the files in the default theme directory are not used. When a custom theme does not have custom versions of the files found in the default theme directory them the files foudn in that directory are used.

If you have not checked the error log in a log time I rould delete all erros and watch for any new errors.
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: mymistake on May 26, 2009, 06:40:38 PM
Thanks for the reply.

I'm deleting the errors all the time, they are always the same for each page view - so it seems. 1 Mb of errors is generated in a couple of hours. :/

EDIT: there are also other errors, but they are point to the same files, TPortaltemplate.php etc. What causes these "undefined variable/constant" errors?
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: IchBin on May 26, 2009, 06:50:50 PM
I'm guessing you have a block code snippet or article with some code in them that is doing this. I would disable all of the blocks first, and see if the errors are still there. If they disappear, then you know you have a block that is causing the errors. You can then enable one by one, each time checking the log to see if you get the errors.
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: mymistake on May 26, 2009, 07:15:50 PM
Good idea, I just tried it, but with no luck unfortunately. I went to admin center and disabled all blocks (green->red) so that none of them showed on the site anymore. But the errors still appear just like previously.

What I noticed is that each page view for TP article seem to generate those exact three errors I listed in the first post, and each forum view gives various d"Use of undefined constant host", "Use of undefined constant port", "Undefined index" etc. errors. I noticed this from the error log url information.

EDIT: Seems like the forum was hacked, and it was not about TP afterall. I have run a clean up and will update the forum software...
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: grabman on May 30, 2009, 03:31:51 AM
I'm having exactly the same issue, have disabled blocks etc as well but error log just loads up again so not in blocks,

I have no idea how to fix as I'm not sure when the issue started.

All the error lines have  (eval?) at the end, is this significant?
as below:
8: Use of undefined constant host - assumed 'host'
File: /home/xxxxxxxx/public_html/Themes/default/languages/TPShout.english.php (eval?)
Line: 1


if i uninstall TP and SMF, then reinstall will it connect to current dBase?  Is this an easy way of correcting the issue?
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: IchBin on May 30, 2009, 06:08:19 AM
Not really necessary to do that IMO. Have you added anything to do with the word "host" ?
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: grabman on May 30, 2009, 06:17:18 AM
NO haven't added anything with "host" in.

I did upgrade to SMF 1.1.9 and TP 1.0b4

Think I've sorted it though! Uploaded all SMF files again to overwrite 'damaged' ones and reinstalled TP.  Error log is clean so far!  Just have to wait for members/guest to hit the site and see if all is well.

Grab
Title: Re: a LOT of weird errors in error log (Undefined variable)
Post by: mymistake on May 30, 2009, 08:04:33 PM
In my case the forum was actually hacked, apparently one user somehow managed to exploit the recently discovered security whole in SMF 1.1.7 and was able to change php files on my server and upload 1500 files to some theme/attachement folders and stuff like that. Here's some more info and a tool to check/correct things if the forum has been hacked: http://www.simplemachines.org/community/index.php?topic=313201.0