Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Posts
    93
    Plugin Contributions
    0

    Default Issues with file /includes/autoload_func.php

    Website - jaysmodelkits.com
    ZC v.2.0.1

    Since having PayPal RESTful installed and set up I seem to be generating multiple bugs on a daily basis and they all are of the same format below:
    [26-Sep-2025 05:03:03 UTC] PHP Fatal error: Uncaught Error: Class "notifier" not found in /includes/autoload_func.php:47
    Stack trace:
    #0 /includes/application_top.php(253): require()
    #1 /ppr_webhook.php(29): require('/home/jaysmode/...')
    #2 {main}
    thrown in /includes/autoload_func.php on line 47

    [26-Sep-2025 05:03:03 UTC] Request URI: /ppr_webhook.php, IP address: 173.0.81.140
    --> PHP Fatal error: Uncaught Error: Class "notifier" not found in /includes/autoload_func.php:47
    Stack trace:
    #0 /includes/application_top.php(253): require()
    #1 /ppr_webhook.php(29): require('/home/jaysmode/...')
    #2 {main}
    thrown in /includes/autoload_func.php on line 47.

    [26-Sep-2025 05:03:03 UTC] Request URI: /ppr_webhook.php, IP address: 173.0.81.140
    --> PHP Fatal error: Uncaught Error: Class "notifier" not found in /includes/autoload_func.php:47
    Stack trace:
    #0 /includes/application_top.php(253): require()
    #1 /ppr_webhook.php(29): require('/home/jaysmode/...')
    #2 {main}
    thrown in /includes/autoload_func.php on line 47.

    I am not tech savvy and have no idea how to fix the above. Can anyone suggest an easy fix that even I can implement?
    Thanks in advance, John.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Issues with file /includes/autoload_func.php

    A minor edit to the /includes/auto_loaders/webhook.core.php file.

    Find this section at the top of the file
    Code:
    //- notifier class loaded via psr4Autoload.php
    $autoLoadConfig[0][] = [
        'autoType' => 'classInstantiate',
        'className' => 'notifier',
        'objectName' => 'zco_notifier',
    ];
    ... and add the highlighted section, noting that this change is applicable for all supported Zen Cart versions (i.e. zc158 through zc210):
    Code:
    //- notifier class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[0][] = [
        'autoType' => 'class',
        'loadFile' => 'class.notifier.php',
    ];
    $autoLoadConfig[0][] = [
        'autoType' => 'classInstantiate',
        'className' => 'notifier',
        'objectName' => 'zco_notifier',
    ];

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Issues with file /includes/autoload_func.php

    Sigh, once the above change is added you'll run into another. Here's another addition that will correct that
    Code:
    //- notifier class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[0][] = [
        'autoType' => 'class',
        'loadFile' => 'class.notifier.php',
    ];
    $autoLoadConfig[0][] = [
        'autoType' => 'classInstantiate',
        'className' => 'notifier',
        'objectName' => 'zco_notifier',
    ];
    $autoLoadConfig[0][] = [
        'autoType' => 'class',
        'loadFile' => 'class.phpmailer.php',
    ];
    /**
     * Breakpoint 5.
     *
     * $zcDate = new zcDate(); ... will be re-initialized when/if the require_languages.php module is run.
     *
     */
    //- zcDate class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[5][] = [
        'autoType' => 'class',
        'loadFile' => 'zcDate.php',
    ];
    $autoLoadConfig[5][] = [
        'autoType' => 'classInstantiate',
        'className' => 'zcDate',
        'objectName' => 'zcDate',
    ];

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Issues with file /includes/autoload_func.php

    Actually ... just replace the /includes/auto_loaders/webhook.core.php file with the following:
    Code:
    <?php
    /**
     * autoloader array for webhooks
     *
     * @copyright Copyright 2003-2025 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     *
     * Last updated: v1.2.2
     */
    if (!defined('IS_ADMIN_FLAG')) {
        die('Illegal Access');
    }
    
    $autoLoadConfig[0][] = [
        'autoType' => 'include',
        'loadFile' => DIR_WS_INCLUDES . 'version.php',
    ];
    //- notifier class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[0][] = [
        'autoType' => 'class',
        'loadFile' => 'class.notifier.php',
    ];
    $autoLoadConfig[0][] = [
        'autoType' => 'classInstantiate',
        'className' => 'notifier',
        'objectName' => 'zco_notifier',
    ];
    $autoLoadConfig[0][] = [
        'autoType' => 'class',
        'loadFile' => 'class.phpmailer.php',
    ];
    /**
     * Breakpoint 30.
     *
     * $zc_cache = new cache();
     *
     */
    $autoLoadConfig[30][] = [
        'autoType' => 'classInstantiate',
        'className' => 'cache',
        'objectName' => 'zc_cache',
    ];
    /**
     * Breakpoint 40.
     *
     * require 'includes/init_includes/init_db_config_read.php';
     *
     */
    $autoLoadConfig[40][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_db_config_read.php',
    ];
    //- sniffer class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[50][] = [
        'autoType' => 'class',
        'loadFile' => 'sniffer.php',
    ];
    $autoLoadConfig[50][] = [
        'autoType' => 'classInstantiate',
        'className' => 'sniffer',
        'objectName' => 'sniffer',
    ];
    $autoLoadConfig[50][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_sefu.php',
    ];
    /**
     * Breakpoint 60.
     *
     * require 'includes/init_includes/init_general_funcs.php';
     * require 'includes/init_includes/init_tlds.php';
     *
     */
    $autoLoadConfig[60][] = [
        'autoType' => 'require',
        'loadFile' => DIR_WS_FUNCTIONS . 'functions_osh_update.php',
    ];
    $autoLoadConfig[60][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_general_funcs.php',
    ];
    $autoLoadConfig[60][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_tlds.php',
    ];
    /**
     * Breakpoint 70.
     *
     * require 'includes/init_includes/init_sessions.php';
     *
     */
    $autoLoadConfig[70][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_sessions.php',
    ];
    /**
     * Breakpoint 90.
     *
     * currencies = new currencies();
     *
     */
    //- currencies class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[90][] = [
        'autoType' => 'class',
        'loadFile' => 'currencies.php',
    ];
    $autoLoadConfig[90][] = [
        'autoType' => 'classInstantiate',
        'className' => 'currencies',
        'objectName' => 'currencies',
    ];
    /**
     * Breakpoints 95,96.
     *
     * require 'includes/init_includes/init_languages.php';
     * require 'includes/init_includes/init_sanitize.php';
     *
     */
    $autoLoadConfig[95][] = [
        'autoType' => 'class',
        'loadFile' => 'language.php',
    ];
    $autoLoadConfig[95][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_languages.php',
    ];
    $autoLoadConfig[96][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_sanitize.php',
    ];
    /**
     * Breakpoint 100.
     *
     */
    //- template_func class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[100][] = [
        'autoType' => 'class',
        'loadFile' => 'template_func.php',
    ];
    $autoLoadConfig[100][] = [
        'autoType' => 'classInstantiate',
        'className' => 'template_func',
        'objectName' => 'template',
    ];
    /**
     * Breakpoint 110.
     *
     */
    $autoLoadConfig[110][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_templates.php',
    ];
    /**
     * Breakpoint 120.
     *
     */
    $autoLoadConfig[120][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_currencies.php',
    ];
    /**
     * Breakpoint 130.
     *
     * messageStack = new messageStack();
     *
     */
    //- messageStack class loaded via psr4Autoload.php; reloading
    //- here for older versions of Zen Cart that don't load the
    //- class via an autoloader.
    $autoLoadConfig[130][] = [
        'autoType' => 'class',
        'loadFile' => 'message_stack.php',
    ];
    $autoLoadConfig[130][] = [
        'autoType' => 'classInstantiate',
        'className' => 'messageStack',
        'objectName' => 'messageStack',
    ];
    /**
     * Breakpoint 175.
     *
     * require 'includes/init_includes/init_observers.php';
     *
     */
    $autoLoadConfig[175][] = [
        'autoType' => 'init_script',
        'loadFile' => 'init_observers.php',
    ];
    That'll be part of the upcoming v1.2.2 release of the payment module.

  5. #5
    Join Date
    Jan 2009
    Posts
    93
    Plugin Contributions
    0

    Default Re: Issues with file /includes/autoload_func.php

    Thank you for the responses. I will copy and paste your final solution into a txt file and hold it in reserve. I am hoping that the guys at Jeandret may have fixed the problem. I am waiting to see if any further debug logs are created. If they continue I will implement the change.
    Again, thank you for your help in this matter.
    Best regards, John.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Issues with file /includes/autoload_func.php

    Quote Originally Posted by johns4y View Post
    Thank you for the responses. I will copy and paste your final solution into a txt file and hold it in reserve. I am hoping that the guys at Jeandret may have fixed the problem. I am waiting to see if any further debug logs are created. If they continue I will implement the change.
    Again, thank you for your help in this matter.
    Best regards, John.
    No problem; thanks for your posting! That's what will get the issue corrected for everyone.

 

 

Similar Threads

  1. v157 Debug File with autoload_func.php
    By honrheart in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 25 Jul 2022, 05:43 PM
  2. Replies: 6
    Last Post: 1 Aug 2008, 05:24 PM
  3. help please? - admin says failed to open /includes/autoload_func.php
    By lj111970 in forum Installing on a Windows Server
    Replies: 14
    Last Post: 14 Feb 2008, 06:03 AM
  4. includes/autoload_func.php problem
    By Backstage in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Feb 2007, 08:08 AM
  5. autoload_func.php Issues I think??
    By wboyden in forum General Questions
    Replies: 2
    Last Post: 22 Jul 2006, 09:56 AM

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