Allowed memory size error


  • Default avatar
    emeline    
     10 years ago
    0

    Hello,

    Since our upgrade in AwoCoupon 2.3.X (we are in 2.3.2) we can't use coupon anymore. We have an PHP error when we record the code in the virtuemart cart.

    PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 523800 bytes) in xxxxxxxxxxxxxxx/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php , referer: http://xxxxxxxxxxxxxxx/component/virtuemart/cart?Itemid=0


    As you can see I upgrade the PHP memory limit to 512M which is just for testing of course.

    here our systems information:
    [code]
    PHP Version : 5.3.10-1ubuntu3.13
    MySQL Version : 5.5.34-0ubuntu0.12.04.1
    Joomla : 2.5.24
    component_com_virtuemart : 2.0.14
    component_com_awocoupon : 2.3.2
    [/code]

    Our systems is completely down :) If some have an idea !

    Regards
  • Default avatar
    emeline    
     10 years ago
    0

    Hi,

    I reply to myself because I found the problem. my problem was located on file components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php line 643.

    According to https://awodev.com/forum/awocoupon/help-section/coupon-code-exceeds-amount-wont-allow-payment-method-or-ship my version og virtuemart seems impacted isn't it ?

    However I tried patches from this ticket but I wasn't able to fix the issue. My only solution was to comment $this->vmcart->getCartPrices(); function ...

    Can I do something better ?

    Regards
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    Thanks for posting your solution. What you did is fine. That line of code is not needed for virtuemart 2.0.14 and earlier. Will add a conditional statement there so it is not triggered for earlier versions of Virtuemart.