1

I am seeing this error on front page of one of my website

Parse error: syntax error, unexpected '< 

Some code has been hidden for security* but the source of that error is index.php. On examining my index.php i see a line of code referncing index_old.php. The code on the that file is as shown

<html>
    <head></head>
    <body>
    <?php
       $ip=$_SERVER["REMOTE_ADDR"];

       $logfilename1=dirname(__FILE__).'/htaccess.log';

       $fp2=fopen($logfilename1,"a");

       fwrite($fp2,$ip);

       fwrite($fp2," ".$_SERVER["SERVER_ADDR"]."    ".$_SERVER["HTTP_HOST"]); 

       fwrite($fp2," ".$_SERVER['HTTP_USER_AGENT']);

       fwrite($fp2," ".strftime('%c')."\r\n");

       fclose($fp2);
    ?>
    </body>
</html>

I am cracking my head to find out if the site has been infiltrated or injected with suspicious scripts. Could anyone help me figure out this?

0

1 Answer 1

2

A bunch of have have posted numerous answers on Joomla Stack Exchange about what to to in case of a site being hacked.

My suggestion first would be to delete the index_old.php file, then remove the reference to this file in the index.php.

Then have a read of these:

A quick summary:

  • Update Joomla to latest version (currently 3.5.1)
  • Update ALL extensions to their latest version
  • Change your password for the hosting control panel, FTP and Joomla super user
  • Ensure chmod permissions for is 755 for directories and 644 for files
1
  • Seems like i cannot get around this problem. Again i am seeing this error
    – Muteshi
    Apr 10, 2016 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.