Page 2 of 2

Re: zend_mm_heap corrupted

Posted: Wed Feb 17, 2010 5:40 am
by fredp
drsceifers wrote: I turned on debug and got these messages:

Notice: Use of undefined constant ADDR_POLICY_LAST - assumed 'ADDR_POLICY_LAST' in /hsphere/local/home/c63396/millenniumlightingonline.com/modules/Orders/action.default.php on line 135
...
Hi,

I've never used the Orders module. So, all I can offer is a few observations that I made while looking at your debug output and the module code. I hope these might help nonetheless:

1) Line 135 of action.default.php is

Code: Select all

$order_maker = new order_maker($this);
2) A class constant of ADDR_POLICY_LAST *is* defined in lib/class.order_maker.php:

Code: Select all

class order_maker
{
  const ADDR_POLICY_FEU = 'addr::from_feu';
  const ADDR_POLICY_LAST = 'addr::from_last';
  const ADDR_POLICY_NONE = 'addr::none';

  private $_this_module = NULL;
  private $_cart_module = NULL;
  private $_feu_module = NULL;
  private $_billing_address_policy = ADDR_POLICY_LAST;
...
3) If the initialization of the class private variable $_billing_address_policy is supposed to be set by the class constant order_maker::ADDR_POLICY_LAST, then shouldn't ADDR_POLICY_LAST be prefixed with either self:: or order_maker:: ? For example:

    private $_billing_address_policy = self::ADDR_POLICY_LAST;

Otherwise, PHP will be "oh so helpful" and assume the programmer meant the string 'ADDR_POLICY_LAST' and use that to initialize $_billing_address_policy -- as noted in the "notice" debug message above.  My guess is that this probably isn't helping matters.  ;) Or am I missing something?

Hope this helps,
Fred P.

Re: zend_mm_heap corrupted

Posted: Thu Feb 18, 2010 6:52 pm
by kendo451
Orders 1.6.x has been buggy since 1.6.4.  It is a consequence of adding several new features which required rewriting several aspects of the way the Orders module works.

Calguy has solved some of them in SVN, but I don't know when the next release is coming out for the Module Manager.

My production sites are using the latest version of Orders in SVN.  Still get a "required parameter missing" error when paying with CC about 1 out of ten times.

Orders module and others it interacts with are sufficiently complex and tied to the money flow of those who is it that it might be a good idea to have release candidates and "stable version groups" so that you know Orders 1.X.X and Products 2.X.X and Cart 3.X.X work well together.

If you want to help, donate $ to Calguy or Ted for module maintenance, and specify the module and the bug/feature you want fixed.  They have to make a living and like the rest of us, the paying clients get the priority.

********************

Looking at your particular error, "Zend_mm_heap corrupted" on the face of it probably has something to do with the Zend optimizer installed on your server.

Check out Zend's documentation to find out what the heap is, and what triggers the corrupted error.  It may be a problem with your server's hard drive getting ready to give up the ghost and corrupting files.  Or it may be a file was corrupted during download or during install.  Either way, Zend's php optimizer is where you are having the problem.