Forums / General Questions / Any suggestions for Error Log.

Any suggestions for Error Log.

Views: 1,471

Results 1 to 18 of 18
29 Sep 2015, 9:52 PM
#1
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Any suggestions for Error Log.

Hi everyone,

Strange problem started today. No changes but have at least 50 error logs all the same as below.

I haven't changed anything!! No logs for any other day, all was clear. The first thing that was noticed was an order received with no name, address, email or contact number. Luckily the customer paid with PayPal and they had all the order details for me. Strangely though I have received about 8 PayPal orders tonight and only 1 has this problem. Every order tonight regardless of payment method generated this error. This has become an urgent issue for me...........

I have replaced /home/mysite/public_html/myadmin/includes/classes/object_info.php with a copy from my old backups but still the logs keep being generated.

Any suggestions helpful.

Error log:
[29-Sep-2015 21:56:40 Europe/London] PHP Warning: reset() expects parameter 1 to be array, null given in /home/mysite/public_html/myadmin/includes/classes/object_info.php on line 29
[29-Sep-2015 21:56:40 Europe/London] PHP Warning: Variable passed to each() is not an array or object in /home/mysite/public_html/myadmin/includes/classes/object_info.php on line 30

29 Sep 2015, 9:55 PM
#2
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

FYI

contents of /home/mysite/public_html/myadmin/includes/classes/object_info.php

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |   
// | http://www.zen-cart.com/index.php                                    |   
// |                                                                      |   
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
//  $Id: object_info.php 1969 2005-09-13 06:57:21Z drbyte $
//

  class objectInfo {

// class constructor
    function objectInfo($object_array) {
//this line should be added, but should be tested first:
//      if (!is_array($object_array)) return;
      reset($object_array);
      while (list($key, $value) = each($object_array)) {
        $this->$key = zen_db_prepare_input($value);
      }
    }
  }
?>
29 Sep 2015, 9:56 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

Quicker answers can be provided with the necessary information provided (posting tips info really is a great start):

Php version?
ZEN CART version (this really should be a starter for almost any post and is one reason why it is provided as a dropdown option when starting a thread.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Sep 2015, 10:03 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

Guessing ZC 1.3.x and PHP 5.4 or above?

Regardless, would suggest installing lat9's mydebug backtrace which may provide more information about the origin of the error if a php zc discrepancy doesn't exist.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Sep 2015, 10:13 PM
#5
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

mc12345678:

Guessing ZC 1.3.x and PHP 5.4 or above?

Regardless, would suggest installing lat9's mydebug backtrace which may provide more information about the origin of the error if a php zc discrepancy doesn't exist.

Yeah sorry forgot the basics.......

Zen Cart 1.54 and PHP 5.4

Gone to look at "lat9's mydebug backtrace" now. :lookaroun

29 Sep 2015, 10:21 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

What paypal method is being used?

Any access logs that correspond with the date/time of the debug logs?

Log indicates a warning, not an error, but the issue could case downstream processing to not work as expected/necessary. May want to enable paypal error logging. (Is paypal the only payment method available? I assume not because of the statement that it was good that they used paypal.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Sep 2015, 10:21 PM
#7
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

mc12345678:

Php version?
ZEN CART version (this really should be a starter for almost any post and is one reason why it is provided as a dropdown option when starting a thread.)

Just looked at this and started a new Thread (testing). No drop downs for zen version or php versions in ie11! Your comment stumped me a little so checked, I do remember this being there but no longer present!! :no:

Any how just thought would say.

29 Sep 2015, 10:24 PM
#8
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

mc12345678:

What paypal method is being used?

Any access logs that correspond with the date/time of the debug logs?

Log indicates a warning, not an error, but the issue could case downstream processing to not work as expected/necessary. May want to enable paypal error logging. (Is paypal the only payment method available? I assume not because of the statement that it was good that they used paypal.)

PayPal API

I have turned PayPal logging on but closed store for the night now so no more orders until 17:00hrs GMT tomorrow (Chinese takeaway store). We have Cash, Cards (authorize.net) & PayPal. All methods of payment are generating these error logs.

29 Sep 2015, 10:25 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

SpaceMonkey:

Just looked at this and started a new Thread (testing). No drop downs for zen version or php versions in ie11! Your comment stumped me a little so checked, I do remember this being there but no longer present!! :no:

Any how just thought would say.

That's interesting. Should definitely be made as a comment about the forum in the forum. :) (seems an ironic statement), anyways good to know that when (if?) I upgrade to a windows version that has IE 11 then it is likely to not work correctly... Hmm, wonder what causes it not to work, because it could have a serious negative impact on things like attributes. Oh, and what forum template are you using? (Lower left or right corner depending on which one of the two desktop templates.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Sep 2015, 10:30 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

SpaceMonkey:

PayPal API

I have turned PayPal logging on but closed store for the night now so no more orders until 17:00hrs GMT tomorrow (Chinese takeaway store). We have Cash, Cards (authorize.net) & PayPal. All methods of payment are generating these error logs.

So, could still independently continue testing even with the store closed primarily depending on how that was accomplished, as to choice of using paypal ipn, any reason not using paypal express?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Sep 2015, 10:35 PM
#11
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

mc12345678:

So, could still independently continue testing even with the store closed primarily depending on how that was accomplished, as to choice of using paypal ipn, any reason not using paypal express?

Hi, I am a uk store and yes will be testing overnight. I currently have a restore running from last week just to be sure. Will take about 45 mins to complete as running it through a remote connection (slows things down a little).

As for PayPal, the PayPal Express Checkout connects using API.....

29 Sep 2015, 10:38 PM
#12
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

mc12345678:

Oh, and what forum template are you using? (Lower left or right corner depending on which one of the two desktop templates.)

FYI
Standard Styles - Zen Cart 2015

29 Sep 2015, 11:00 PM
#13
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

Okay have tested PayPal and payments went through with no prob. Voided a transaction and again no problem. PayPal IPN has posted correctly back to store and cancelled order correctly in admin (I don't think this problem is PayPal, that was just the trigger for the store to report the problem to me).

Again the same log created. Going to spend a little time now looking at lat9 Mydebug and see what it turns up.. Will post when I have more info. :frusty:

Thanks for input peeps. :smile:

29 Sep 2015, 11:02 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

SpaceMonkey:

Hi, I am a uk store and yes will be testing overnight. I currently have a restore running from last week just to be sure. Will take about 45 mins to complete as running it through a remote connection (slows things down a little).

As for PayPal, the PayPal Express Checkout connects using API.....

Definitely an across the lake "translation" issue as some previous post clued me in to the uk based part, but I don't see the connection between paypal express and paypal api...

Yikes, 45 mins on a remote phone connection, ouch...

So, now that there is this little "timeout". The thing is not that there is a problem with the file referenced in the second post per se, but more that the data being sent/accessed is not put together in the way that is expected to be handled... Something somewhere is trying to access that function with the data and if not mistaken (she's been around here recently) lat9's program should shed some additional light on what/where is feeding that "bad" data...

Might want to look and see if there are additional unexpected files in the store through a comparison to see if something got deposited that was unexpected... Don't know how the backup works: ie, if it writes only files that previously existed or if it recreates the directory(ies) and all of the files such that extra files get removed as part of the backup/restore.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Sep 2015, 11:13 PM
#15
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

Yes ouch. Restore has just failed as well so restarted. If continues will have to go to store in the morning.

Backups are manually run Monday and Thursday by the store. They use Dreamweaver and simply use the Get command and then zip up the directory and file in archives. The store has 1 computer on a RDC that I can access, hence go slow restore. If it fails again I will have to jump in car and go visit to copy archives.

Total number of files on remote server is the same as last restore so doubt is extra files present but I will bear that in mind whilst investigating.

As soon as restore done will get Lat9 debug under way. :smile:

30 Sep 2015, 3:19 AM
#16
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Any suggestions for Error Log.

See that stiill on the page, sort of... Any progress updates or en route to the store in the wee hours of the night?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

30 Sep 2015, 4:53 AM
#17
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Any suggestions for Error Log.

mc12345678:

See that stiill on the page, sort of... Any progress updates or en route to the store in the wee hours of the night?

Not resolved as yet. Will have to travel in the morning. I think the store internet is struggling to keep up. Looking like it maybe corruption in /includes as folder size is different (smaller) than backups. Is nearly 6am here and need a few hours sleep (not functioning properly now)!!

I will post an update when I have visited and picture is clearer. I don't want to add debugger yet, I have downloaded it and have it with me ready to go on a USB stick. Would like to restore directories first.

I have repaired the database manually, adding missing data and getting the customer accounts correct. I have also left store down for maintenance until I get there.

Fingers crossed!

1 Oct 2015, 5:31 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Any suggestions for Error Log.

SpaceMonkey:

[29-Sep-2015 21:56:40 Europe/London] PHP Warning: reset() expects parameter 1 to be array, null given in /home/mysite/public_html/myadmin/includes/classes/object_info.php on line 29
[29-Sep-2015 21:56:40 Europe/London] PHP Warning: Variable passed to each() is not an array or object in /home/mysite/public_html/myadmin/includes/classes/object_info.php on line 30
Those do indicate some incompatibility in PHP versions, where certain array elements are not passed as expected.
BUT ...
Those are only PHP Warnings. They are not fatal errors that would stop execution and thus prevent scripts from continuing on with final steps such as sending confirmation emails.

Further, those logs you posted are from the admin side ... which has no impact on customer-side checkouts or sales.

So, your customer-facing problems are coming from something else.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.