Trickster61 Posted October 13, 2014 Share Posted October 13, 2014 So if you could help me with this one I'd be grateful for any pointers. [13-Oct-2014 04:55:53 Australia/Perth] PHP Warning: No callback method defined. in /home/you32903/public_html/classes/cubecart.class.php on line 256 Easy fix or massive problem? Or not enough info? Line 256 = trigger_error('No callback method defined.', E_USER_WARNING); Thanks in advance! Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 13, 2014 Share Posted October 13, 2014 This error occurs when CubeCart is interpreting a querystring (the part after the questionmark), such as: _g=rm&type=gateway&cmd=process&module=SagePay&cart_order_id=141012-123456-0000 The above is a typical notification posting from a payment processor. The _g=whatever is the important part in this. The 'whatever' is either missing or is a word that CubeCart is not programmed to recognize. Valid words are: ajaxadd, rm, remote, and cancel. Unfortunately, the error message doesn't mention the 'whatever' word if one was supplied. To find it, you will need to access your hosting account's "raw access logs" and look for the log entry that has: index.php?_g=a_word_that_may_or_may_not_be_present&somekey2=value2&somekey3=value3 Quote Link to comment Share on other sites More sharing options...
Trickster61 Posted October 13, 2014 Author Share Posted October 13, 2014 Unfortunately the raw access log from yesterday is gone, the default setting is not to save it daily. I'll just have to wait for the error to repeat and then check the raw access log. I've changed the settings so it archives the daily logs and deletes them at the end of the month instead of daily. One step closer. Thanks! Quote Link to comment Share on other sites More sharing options...
Trickster61 Posted October 14, 2014 Author Share Posted October 14, 2014 This error has replicated four times today (14 Oct) at 07.36.08; 12.52.48; 15.08.31; and 16.39.23. I looked for any index.php?_g= entries in the Raw Access Log that corresponded with the error message times, there were five but they weren't around the times of the error message. In fact there weren't any entries in the Raw Access Log at all for those exact times. I've taken the last two and provided the error message followed by the closest entries in the Raw Access Log. The middle two error messages and their closest entries in the Raw Access Log are as follows: [14-Oct-2014 12:52:48 Australia/Perth] PHP Warning: No callback method defined. in /home/you32903/public_html/classes/cubecart.class.php on line 256 The two closest entries in the Raw Access Log either side of the above time are: [14/Oct/2014:12:45:02 +1100] "GET /index.php HTTP/1.1" 200 3499 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" 180.76.6.142 - - and [14/Oct/2014:12:54:37 +1100] "GET /index.php?_a=login&redir=%2Findex.php%3F_a%3Dtellafriend&productId=422 HTTP/1.1" 200 3130 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" 199.30.24.231 - - Next error message was : [14-Oct-2014 15:08:31 Australia/Perth] PHP Warning: No callback method defined. in /home/you32903/public_html/classes/cubecart.class.php on line 256 The two closest Raw Access Log entries on either side of that time are: [14/Oct/2014:15:06:54 +1100] "GET /index.php?_a=viewProd&productId=628 HTTP/1.1" 200 2859 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 180.76.5.143 - - and [14/Oct/2014:15:08:58 +1100] "GET /index.php?_a=viewProd&productId=675 HTTP/1.1" 200 2861 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" 183.60.213.7 - - There were five index.php?_g= entries in the Raw Access Logs but were not made at around the times of the errors (00:11:59; 10:36:05; 15.52.46; 18.08.29; 19:39:23). They were all index.php?_g=co. Here's an example of a couple. [14/Oct/2014:15:52:46 +1100] "GET /index.php?_g=co&_a=reg&redir=%2Findex.php%3F_a%3Dtellafriend%26productId%3D725 HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 180.76.6.56 - - and [14/Oct/2014:18:08:29 +1100] "GET /index.php?_g=co&_a=reg&redir=%2Findex.php%3F_a%3DviewProd%26productId%3D728 HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 66.249.69.109 - - I don't know if any of that is helpful or not. Hopefully it is. Like anyone with an online business I'm worried its something that will cause us to lose customers because their browser errors out or can't complete a shopping transaction. thanks! Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 14, 2014 Share Posted October 14, 2014 You made a very good effort. Please note the times: PHP: [14-Oct-2014 15:08:31 Australia/Perth] which is UTC+8 WEB: [14/Oct/2014:15:08:58 +1100] which is UTC+11 or New Zealand or Russia So, in the raw access logs, look for the exact minute:second but off by three hours. Anyway, this one: [14/Oct/2014:15:52:46 +1100] "GET /index.php?_g=co corresponds closely (although two seconds is pretty far apart) with [14-Oct-2014 12:52:48 Australia/Perth] The _g=co looks like a CubeCart 4 querystring for "checkout". Plus the User Agent String "Baiduspider/2.0" tells me that your site is getting scanned based from an older scan that happened when your store was at CC4. Quote Link to comment Share on other sites More sharing options...
Trickster61 Posted October 14, 2014 Author Share Posted October 14, 2014 Damn should have picked that up, for some reason it was in my head all server times would be the same, but the evidence was in front of my nose. ok so with one exception there was a 3 second or less delay each time from the Raw Access Log entry to the Error Log. The error log entries were all the same, bar the times - [14-Oct-2014 07:36:08 Australia/Perth] PHP Warning: No callback method defined. in /home/you32903/public_html/classes/cubecart.class.php on line 25 So these two entries in the Raw Access Log preceded the first error of the day by three seconds: [14/Oct/2014:00:11:12 +1100] "GET /images/cache/YCW4008_arrows_curved.116.jpg HTTP/1.1" 200 4384 "-" "Googlebot-Image/1.0" 183.60.215.45 - - [14/Oct/2014:00:11:59 +1100] "GET /index.php?_g=co&_a=reg&redir=%2Findex.php%3F_a%3DviewProd%26productId%3D341 HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 183.60.213.7 - - The following two Raw Access Log entries preceded the second Error Log message by three seconds: [14/Oct/2014:10:36:05 +1100] "GET /robots.txt HTTP/1.1" 200 81 "-" "Mozilla/5.0 (compatible; Exabot/3.0 (BiggerBetter); +http://www.exabot.com/go/robot)" 178.255.215.88 - - [14/Oct/2014:10:36:05 +1100] "GET /index.php?_g=co&_a=cart HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; Exabot/3.0 (BiggerBetter); +http://www.exabot.com/go/robot)" 178.255.215.88 - - The following Raw Access Log entry preceded the third Error Log message by two seconds: [14/Oct/2014:15:52:46 +1100] "GET /index.php?_g=co&_a=reg&redir=%2Findex.php%3F_a%3Dtellafriend%26productId%3D725 HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 180.76.6.56 - - The following Raw Access Log entry preceded the fourth Error Log message by two seconds: [14/Oct/2014:18:08:29 +1100] "GET /index.php?_g=co&_a=reg&redir=%2Findex.php%3F_a%3DviewProd%26productId%3D728 HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 66.249.69.109 - - The following Raw Access Log entry was at exactly the same time as the fifth and last Error Log message: [14/Oct/2014:19:39:23 +1100] "GET /index.php?_g=co&_a=reg&redir=%2Findex.php%3F_a%3DviewProd%26productId%3D111 HTTP/1.1" 302 20 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)" 66.249.69.109 - - So if I'm understanding this right these are indexing bots acting on behalf of a (chinese?) search engine called Easou. From what I've read the Easou search spider doesn't bother accessing the robots.txt file as a courtesy to see if it's disallowed from doing so. Is there a way to block it? Do I even need to bother? Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 14, 2014 Share Posted October 14, 2014 I'm not an expert in .htaccess files, but that file may have commands that the web server will understand that if the User Agent String has a particular sequence of characters within it, then return a 404. Or, check for "_g=co" in the querystring and send back either a 404 or 302 (Moved permanently? to index.php) to prompt the spider to remove/replace the obsolete URL. Does one need to bother? For me, no. But if you can identify how this harms you in any significant way, then the decision is up to you. Such as having to weed out the irrelevant error_log entries, once they have been identified as such. Quote Link to comment Share on other sites More sharing options...
Trickster61 Posted October 15, 2014 Author Share Posted October 15, 2014 I'm leaning towards ignoring it. It's the only error message I'm getting at the moment. Thank you for your help - again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.