Jump to content

[SOLVED] Parse error: syntax error, unexpected '<' in /home/www/mysite.co.uk/index.php on line 30


Recommended Posts

I get the following when I navigate to my Website www.mrswalton.co.uk Parse error: syntax error, unexpected '<' in /home/www/mrswalton.co.uk/index.php on line 30

 

and when I navigate to my backend get Parse error: syntax error, unexpected '<' in /home/www/mrswalton.co.uk/admin_ps/index.php on line 138

 

Everything was all good last night, then this morning tryto login to add some products as faced with this issue!

 

Please help!

Link to comment
Share on other sites

The site have been hacked. My advice is if you're using FileZilla to change it to some secure FTP client.

You shoud change your password as well.

 

 

All starting with the following to the end of the file should be removed:

<script> var BrowserDetect

 

From what I see above the root index.php is hacked as well as your admin index.php (admin_ps/index.php).

There a good chance all your index.php files to be hacked, so download your site, search for the string above and remove it.

 

PS. When I say "search for the string above and remove it" I mean from script to script:

<script>.............</script>

 

As far as I can see it's on one row.

Edited by UltraWebDev (see edit history)
  • Like 2
Link to comment
Share on other sites

Well this has worked for the front end. So how would I prevent this from happening again, and could they have infected any other files that could be a security risk to my business and customers?

 

I do use file zilla would it just be the index files of other to?!

 

1) Change your FTP account password. (You may remove the old account and add a new one with new password, which is better)

2) Remove and do not use FileZilla (It keeps your FTP access info, including your password in raw form - not encrypted and there are some virusus (your PC is most probably infected as well) use this data, connect via the extracte data, and adds malicious code on your site - at the end of the files).

3) Install another FTP client (WinSCP is good enough)

4) Download all your files and search for the code above... remove it and reupload the files (most brobably only .php files are infected, but I would not be surprised if the .tpl files are infected as well, so just check all of them, remove the code and override them - with the new FTP client and new account data)

  • Like 1
Link to comment
Share on other sites

Thanks for your help, have seached a few .php files and found no <script> var BrowserDetect so hopefully the index files were the extent of it.

 

Thanks for your help!!!

 

You've not cleaned them all.

 

Check: http://mrswalton.co....in_ps/login.php

 

the code is still there.

 

The code is most probably at admin_ps/index.php, not in login.php but check them all.

Edited by UltraWebDev (see edit history)
Link to comment
Share on other sites

  • 4 months later...

I have a similar issue with my website. It got hacked and there was additional cod in every single file. I reported that to my hosting company which then scanned the whole website and removed the code for me. after that my site started to give me errors on some pages such as error on line 309 at column 78: EntityRef: expecting ';'

 

then i updated my site with the latest version the errors which were coming on the website were removed but to my surprise my back office has got that error just after login screen and i can not access my back office now.

 

If you could help me as i am in a great trouble.

 

Ataul

post-326986-0-48167200-1338115423_thumb.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...