Results 1 to 10 of 13

Threaded View

  1. #1
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default PHP Fatal error: Allowed memory size of 32MB exhausted, in query_factory.php line 486

    So I am going through my logs and I have for the most part got them all cleaned up however there are a few that are absolutely blowing my mind and I can not put my finger on

    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 36 bytes) in includes/classes/db/mysql/query_factory.php on line 486
    this line contains

    PHP Code:
    while (list($key$value) = each($zp_result_array)) { 
    and then in a different log there is this

    PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20 bytes) in /includes/classes/db/mysql/query_factory.php on line 487

    this line contains
    PHP Code:
    if (!preg_match('/^[0-9]/'$key)) { 
    The entire section of code reads

    PHP Code:
      function MoveNext() {
        global 
    $zc_cache;
        
    $this->cursor++;
        if (
    $this->is_cached) {
          if (
    $this->cursor >= sizeof($this->result)) {
            
    $this->EOF true;
          } else {
            while(list(
    $key$value) = each($this->result[$this->cursor])) {
              
    $this->fields[$key] = $value;
            }
          }
        } else {
          
    $zp_result_array = @mysql_fetch_array($this->resource);
          if (!
    $zp_result_array) {
            
    $this->EOF true;
          } else {
            while (list(
    $key$value) = each($zp_result_array)) {
              if (!
    preg_match('/^[0-9]/'$key)) {
                
    $this->fields[$key] = $value;
              }
            }
          }
        }
      } 
    and then there is this one

    PHP Warning: Illegal string offset 'cost' in /includes/classes/order.php on line 384

    this line is

    PHP Code:
    'shipping_cost' => $_SESSION['shipping']['cost'], 
    the entire section of code is

    PHP Code:
    $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
                            
    'currency' => $_SESSION['currency'],
                            
    'currency_value' => $currencies->currencies[$_SESSION['currency']]['value'],
                            
    'payment_method' => $GLOBALS[$class]->title,
                            
    'payment_module_code' => $GLOBALS[$class]->code,
                            
    'coupon_code' => $coupon_code->fields['coupon_code'],
        
    //                          'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''),
        //                          'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''),
        //                          'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''),
        //                          'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''),
        //                          'cc_cvv' => (isset($GLOBALS['cc_cvv']) ? $GLOBALS['cc_cvv'] : ''),
                            
    'shipping_method' => (is_array($_SESSION['shipping']) ? $_SESSION['shipping']['title'] : $_SESSION['shipping']),
                            
    'shipping_module_code' => (isset($_SESSION['shipping']['id']) && strpos($_SESSION['shipping']['id'], '_') > $_SESSION['shipping']['id'] : $_SESSION['shipping']),
                            
    'shipping_cost' => $_SESSION['shipping']['cost'],
                            
    'subtotal' => 0,
                            
    'shipping_tax' => 0,
                            
    'tax' => 0,
                            
    'total' => 0,
                            
    'tax_groups' => array(),
                            
    'comments' => (isset($_SESSION['comments']) ? $_SESSION['comments'] : ''),
                            
    'ip_address' => $_SESSION['customers_ip_address'] . ' - ' $_SERVER['REMOTE_ADDR']
                            ); 
    Then here is another one

    PHP Warning: Creating default object from empty value in /includes/modules/shipping_estimator.php on line 92

    this line contains

    PHP Code:
    $order->delivery = array('postcode' => $zip_code
    then in a different log there is this one

    PHP Warning: Creating default object from empty value in /includes/modules/shipping_estimator.php on line 117

    this line contains

    PHP Code:
    $country_info $_SESSION['country_info']; 
    this entire section is

    PHP Code:
    // user not logged in !
        
    if (isset($_POST['zone_country_id'])){
          
    // country is selected
          
    $_SESSION['country_info'] = zen_get_countries($_POST['zone_country_id'],true);
          
    $country_info $_SESSION['country_info'];
          
    $order->delivery = array('postcode' => $zip_code,
                                   
    'country' => array('id' => $_POST['zone_country_id'], 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' =>  $country_info['countries_iso_code_3']),
                                   
    'country_id' => $_POST['zone_country_id'],
                                   
    //add state zone_id
                                   
    'zone_id' => $state_zone_id,
                                   
    'format_id' => zen_get_address_format_id($_POST['zone_country_id']));
          
    $_SESSION['cart_country_id'] = $_POST['zone_country_id'];
          
    //add state zone_id
          
    $_SESSION['cart_zone'] = $state_zone_id;
          
    $_SESSION['cart_zip_code'] = $zip_code;
        } elseif (
    $_SESSION['cart_country_id']){
          
    // session is available
          
    $_SESSION['country_info'] = zen_get_countries($_SESSION['cart_country_id'],true);
          
    $country_info $_SESSION['country_info'];
          
    // fix here - check for error on $cart_country_id
          
    $order->delivery = array('postcode' => $_SESSION['cart_zip_code'],
                                   
    'country' => array('id' => $_SESSION['cart_country_id'], 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' =>  $country_info['countries_iso_code_3']),
                                   
    'country_id' => $_SESSION['cart_country_id'],
                                   
    'zone_id' => $state_zone_id,
                                   
    'format_id' => zen_get_address_format_id($_SESSION['cart_country_id']));
        } else {
          
    // first timer
          
    $_SESSION['cart_country_id'] = STORE_COUNTRY;
          
    $_SESSION['country_info'] = zen_get_countries(STORE_COUNTRY,true);
          
    $country_info $_SESSION['country_info'];
          
    $order->delivery = array(//'postcode' => '',
                                   
    'country' => array('id' => STORE_COUNTRY'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' =>  $country_info['countries_iso_code_3']),
                                   
    'country_id' => STORE_COUNTRY,
                                   
    'zone_id' => $state_zone_id,
                                   
    'format_id' => zen_get_address_format_id($_POST['zone_country_id']));
        } 
    Any help would be greatly appreciated.

    Thanks in advanced fellow Zenners!
    Last edited by jwaynehinkle; 15 Mar 2014 at 07:47 AM.

 

 

Similar Threads

  1. Replies: 61
    Last Post: 3 Jan 2017, 08:57 AM
  2. Replies: 11
    Last Post: 12 Feb 2013, 10:04 PM
  3. Allowed Memory Size Exhausted
    By SFAShop in forum General Questions
    Replies: 2
    Last Post: 20 Mar 2010, 10:28 PM
  4. Replies: 4
    Last Post: 22 Jan 2009, 01:14 PM
  5. Allowed memory size of 8388608 bytes exhausted
    By Cornholio in forum General Questions
    Replies: 2
    Last Post: 14 Jun 2007, 03:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg