Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2013
    Posts
    711
    Plugin Contributions
    0

    Default max execution time errors in pzen_marcus_template_functions.php

    Maximum execution time of 30 seconds exceeded in /xxxx/www/xxx/xxx/xxx/xxx/includes/functions/extra_functions/pzen_marcus_template_functions.php on line 397
    PHP 7.0
    Code:
    // Check for additional matching images
            $file_extension = $products_image_extension;
            $products_image_match_array = array();
            if ($dir = @dir($products_image_directory)) {
                while ($file = $dir->read()) {
        line 397 ->            if (!is_dir($products_image_directory . $file)) {
                        
        //-bof-image_handler-lat9  *** 1 of 4 ***
        //                if (substr($file, strrpos($file, '.')) == $file_extension) {
        //                    if(preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
        //                        if ($file != $products_image) {
                        // -----
                        // Some additional-image-display plugins (like Fual Slimbox) have some additional checks to see
                        // if the file is "valid"; this notifier "accomodates" that processing, providing these parameters:
                        //
                        // $p1 ... (r/o) ... An array containing the variables identifying the current image.
                        // $p2 ... (r/w) ... A boolean indicator, set to true by any observer to note that the image is "acceptable".
                        //
                        $current_image_match = false;

  2. #2
    Join Date
    Jan 2013
    Posts
    711
    Plugin Contributions
    0

    Default Re: max execution time errors on php7.0

    zen version 5.6c
    another one
    class.base.php on line 98.
    Code:
    foreach($observers as $key=>$obs) {
    line 98 ->        if ($obs['eventID'] == $eventID || $obs['eventID'] === '*') {
             $method = 'update';
             $testMethod = $method . self::camelize(strtolower($eventID), TRUE);
             if (method_exists($obs['obs'], $testMethod))
               $method = $testMethod;
             $obs['obs']->{$method}($this, $eventID, $param1,$param2,$param3,$param4,$param5,$param6,$param7,$param8,$param9);
            }
          }
      }
      function & getStaticProperty($var)
    Last edited by jimmie; 30 Apr 2020 at 01:17 AM.

  3. #3
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,571
    Plugin Contributions
    0

    Default Re: max execution time errors on php7.0

    "Maximum execution time of 30 seconds" that is a function of the php.ini setting of the server.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  4. #4
    Join Date
    Jul 2012
    Posts
    15,130
    Plugin Contributions
    17

    Default Re: max execution time errors on php7.0

    Quote Originally Posted by jimmie View Post
    Maximum execution time of 30 seconds exceeded in /xxxx/www/xxx/xxx/xxx/xxx/includes/functions/extra_functions/pzen_marcus_template_functions.php on line 397
    Code:
    // Check for additional matching images
            $file_extension = $products_image_extension;
            $products_image_match_array = array();
            if ($dir = @dir($products_image_directory)) {
                while ($file = $dir->read()) {
        line 397 ->            if (!is_dir($products_image_directory . $file)) {
                        
        //-bof-image_handler-lat9  *** 1 of 4 ***
        //                if (substr($file, strrpos($file, '.')) == $file_extension) {
        //                    if(preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
        //                        if ($file != $products_image) {
                        // -----
                        // Some additional-image-display plugins (like Fual Slimbox) have some additional checks to see
                        // if the file is "valid"; this notifier "accomodates" that processing, providing these parameters:
                        //
                        // $p1 ... (r/o) ... An array containing the variables identifying the current image.
                        // $p2 ... (r/w) ... A boolean indicator, set to true by any observer to note that the image is "acceptable".
                        //
                        $current_image_match = false;
    How are the pictures organized? Are all of them in a single directory or in a few sub-directories spread out?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  5. #5
    Join Date
    Jan 2013
    Posts
    711
    Plugin Contributions
    0

    Default Re: max execution time errors on php7.0

    im finding out that some of my images are missing, is there script i can run to look for missing images and replace with default image coming soon.
    they used to have a picture so looking at picture name cant help me i think.

  6. #6
    Join Date
    Jan 2013
    Posts
    711
    Plugin Contributions
    0

    Default Re: max execution time errors on php7.0

    most if not all image are in product images, attributes in attributes and maybe some in main image directory, i one time i was trying to separate them by manufacturer.

  7. #7
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,204
    Plugin Contributions
    12

    Default Re: max execution time errors on php7.0

    Quote Originally Posted by jimmie View Post
    most if not all image are in product images, attributes in attributes and maybe some in main image directory, i one time i was trying to separate them by manufacturer.
    That is a problem if you have lots-and-lots-and-lots of images. I'm assuming this error happens when you're on product_listing page and you have additional images showing when you hover the product. You load the main image, then the script needs to go through thousand and thousands of files to try and find an additional image, then moves to the next product and goes all over again.

    If this is the case, I think your only solution would be to reorganize the entire images folder. One way of doing it would be to create subfolders based on products_model or products_id and move all images in matching folders.
    OR, if the template doesn't have a setting to disable additional images on product_listing pages, you could try wrapping that code (the entire block for additional images) with
    Code:
    if($current_page_base == 'product_info' {
    // Check for additional matching images
    }
    That way you would limit this function to product_info page only (no idea if it's even used on that page...).
    Zen Cart Point of Sale? Sure: ZX POS - v2 released
    My site - Pro ZC Help | My portfolio | My plugins

 

 

Similar Threads

  1. v139h date/time errors in certain .php files
    By tpeck in forum General Questions
    Replies: 1
    Last Post: 8 Apr 2013, 05:40 AM
  2. Maximum execution time of 60 seconds exceeded in whos_on line.php
    By haroldpage in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 21 May 2010, 01:55 AM
  3. Replies: 3
    Last Post: 24 Sep 2009, 08:28 PM
  4. Queries, Query Time, Page Execution Time
    By oxicottin in forum General Questions
    Replies: 11
    Last Post: 30 Jun 2009, 09:26 AM
  5. Replies: 2
    Last Post: 10 May 2009, 09:56 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR