Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please Help with Error Message


saksbarkave

Recommended Posts

Posted

I setup a website for my aunt. I don't know a lot about this stuff and she was having some problems and I did the most recent update for oscommerce. It fixed all my problems but now I am getting an error message "Warning: mktime() expects parameter 4 to be long, string given in /home/sbadmin/public_html/includes/counter.php on line 27". If you can help me fix this I would really appreciate it. Also I was wondering on the bottom right side it says " 306 requests since Wednesday 31 December, 1969" how can I change that date?

 

I did a test install under a new directory and I didn't recieve this error anymore but I don't want to have to do everything over again.

 

You can see what i'm talking about if you visit www.saksbarkave.com

 

Please help!!! Thanks

Posted

The code in /includes/counter.php on line 27:

 

  $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));

Change it to:

 

  $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, intval(substr($counter_startdate, 4, 2)), intval(substr($counter_startdate, -2)), intval(substr($counter_startdate, 0, 4))));

(Just copy/paste the code from this post)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
The code in /includes/counter.php on line 27:

 

  $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));

Change it to:

 

  $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, intval(substr($counter_startdate, 4, 2)), intval(substr($counter_startdate, -2)), intval(substr($counter_startdate, 0, 4))));

(Just copy/paste the code from this post)

 

That did the trick. Thanks a bunch!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...