[11-Oct-2010 21:34:23] PHP Fatal error: Class 'notifier' not found in /Users/[myusername]/Sites/wald.new/includes/autoload_func.php on line 79
Here is my autoload_func.php:
Code:
<?php
/**
* File contains the autoloader loop
*
* The autoloader loop takes the array from the auto_loaders directory
* and uses this this to constuct the InitSysytem.
* see {@link http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem} for more details.
*
* @package initSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: autoload_func.php 6559 2007-07-05 06:42:51Z drbyte $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
reset($autoLoadConfig);
ksort($autoLoadConfig);
foreach ($autoLoadConfig as $actionPoint => $row) {
$debugOutput = "";
foreach($row as $entry) {
$debugOutput = 'actionPoint=>'.$actionPoint . ' ';
// $entry['loadFile'] = str_replace(array(':', '\\\\'), '', $entry['loadFile']);
switch($entry['autoType']) {
case 'include':
/**
* include a file as specified by autoloader array
*/
if (file_exists($entry['loadFile'])) include($entry['loadFile']); else $debugOutput .= 'FAILED: ';
$debugOutput .= 'include(\'' . $entry['loadFile'] . '\');' . '<br />';
break;
case 'require':
/**
* require a file as specified by autoloader array
*/
if (file_exists($entry['loadFile'])) require($entry['loadFile']); else $debugOutput .= 'FAILED: ';
$debugOutput .= 'require(\'' . $entry['loadFile'] . '\');' . '<br />';
break;
case 'init_script':
$baseDir = DIR_WS_INCLUDES . 'init_includes/';
if (file_exists(DIR_WS_INCLUDES . 'init_includes/overrides/' . $entry['loadFile'])) {
$baseDir = DIR_WS_INCLUDES . 'init_includes/overrides/';
}
/**
* include an init_script as specified by autoloader array
*/
if (file_exists($baseDir . $entry['loadFile'])) include($baseDir . $entry['loadFile']); else $debugOutput .= 'FAILED: ';
$debugOutput .= 'include(\'' . $baseDir . $entry['loadFile'] . '\');' . '<br />';
break;
case 'class':
if (isset($entry['classPath'])) {
$classPath = $entry['classPath'];
} else {
$classPath = DIR_FS_CATALOG . DIR_WS_CLASSES;
}
/**
* include a class definition as specified by autoloader array
*/
if (file_exists($classPath . $entry['loadFile'])) include($classPath . $entry['loadFile']); else $debugOutput .= 'FAILED: ';
$debugOutput .= 'include(\'' . $classPath . $entry['loadFile'] . '\');' . '<br />';
break;
case 'classInstantiate':
$objectName = $entry['objectName'];
$className = $entry['className'];
if (isset($entry['classSession']) && $entry['classSession'] === true) {
if (isset($entry['checkInstantiated']) && $entry['checkInstantiated'] === true) {
if (!isset($_SESSION[$objectName])) {
$_SESSION[$objectName] = new $className();
$debugOutput .= 'if (!$_SESSION[' . $objectName . ']) { ';
$debugOutput .= '$_SESSION[' . $objectName . '] = new ' . $className . '();';
$debugOutput .= ' }<br />';
}
} else {
$_SESSION[$objectName] = new $className();
$debugOutput .= ' $_SESSION[' . $objectName . '] = new ' . $className . '();<br />';
}
} else {
$$objectName = new $className();
$debugOutput .= '$' . $objectName . ' = new ' . $className . '();<br />';
}
break;
case 'objectMethod':
$objectName = $entry['objectName'];
$methodName = $entry['methodName'];
if (is_object($_SESSION[$objectName])) {
$_SESSION[$objectName]->$methodName();
$debugOutput .= '$_SESSION[' . $objectName . ']->' . $methodName . '();<br />';
} else {
$$objectName->$methodName();
$debugOutput .= '$' . $objectName . '->' . $methodName . '();<br />';
}
break;
}
if (DEBUG_AUTOLOAD === true) echo $debugOutput;
}
}
?>
In my text editor, line 79 is
Code:
$objectName = new $className();
I searched the zen cart install for "class notifier" and found it in includes/config.core.php:
Code:
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003-2005 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | [email protected] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: config.core.php 3009 2006-02-11 15:41:10Z wilt $
//
/**
* autoloader array for catalog application_top.php
*
* @package admin
* @copyright Copyright 2003-2005 zen-cart Development Team
**/
/*
*
require(DIR_WS_CLASSES . 'class.base.php');
require(DIR_WS_CLASSES . 'class.notifier.php');
$zco_notifier = new notifier()'
* require(DIR_WS_CLASSES . 'sniffer.php');
* require(DIR_WS_CLASSES . 'logger.php');
* require(DIR_WS_CLASSES . 'shopping_cart.php');
* require(DIR_WS_CLASSES . 'products.php');
* require(DIR_WS_CLASSES . 'table_block.php');
* require(DIR_WS_CLASSES . 'box.php');
* require(DIR_WS_CLASSES . 'message_stack.php');
* require(DIR_WS_CLASSES . 'split_page_results.php');
* require(DIR_WS_CLASSES . 'object_info.php');
* require(DIR_WS_CLASSES . 'class.phpmailer.php');
* require(DIR_WS_CLASSES . 'class.smtp.php');
* require(DIR_WS_CLASSES . 'upload.php');
*
*/
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'class.base.php');
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'class.notifier.php');
$autoLoadConfig[0][] = array('autoType'=>'classInstantiate',
'className'=>'notifier',
'objectName'=>'zco_notifier');
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'sniffer.php');
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'logger.php',
'classPath'=>DIR_WS_CLASSES);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'shopping_cart.php',
);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'products.php');
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=> 'table_block.php',
'classPath'=>DIR_WS_CLASSES);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=> 'box.php',
'classPath'=>DIR_WS_CLASSES);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'message_stack.php',
'classPath'=>DIR_WS_CLASSES);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'split_page_results.php',
'classPath'=>DIR_WS_CLASSES);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'object_info.php',
'classPath'=>DIR_WS_CLASSES);
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'class.phpmailer.php');
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'class.smtp.php');
$autoLoadConfig[0][] = array('autoType'=>'class',
'loadFile'=>'upload.php',
'classPath'=>DIR_WS_CLASSES);
/**
* Breakpoint 10.
*
* require('includes/init_includes/init_file_db_names.php');
* require('includes/init_includes/init_database.ph');
* require('includes/version.php');
*
*/
$autoLoadConfig[10][] = array('autoType'=>'init_script',
'loadFile'=> 'init_file_db_names.php');
$autoLoadConfig[10][] = array('autoType'=>'init_script',
'loadFile'=>'init_database.php');
$autoLoadConfig[10][] = array('autoType'=>'require',
'loadFile'=> DIR_FS_CATALOG . DIR_WS_INCLUDES . 'version.php');
/**
* Breakpoint 20.
*
* require('includes/init_includes/init_db_config_read.php');
*
*/
$autoLoadConfig[20][] = array('autoType'=>'init_script',
'loadFile'=> 'init_db_config_read.php');
/**
* Breakpoint 30.
*
* require('includes/init_includes/init_gzip.php');
* $sniffer = new sniffer();
*
*/
$autoLoadConfig[30][] = array('autoType'=>'init_script',
'loadFile'=> 'init_gzip.php');
$autoLoadConfig[30][] = array('autoType'=>'classInstantiate',
'className'=>'sniffer',
'objectName'=>'sniffer');
/**
* Breakpoint 40.
*
* require('includes/init_includes/init_general_funcs.php');
* require('includes/init_includes/init_tlds.php');
*
*/
$autoLoadConfig[40][] = array('autoType'=>'init_script',
'loadFile'=> 'init_general_funcs.php');
$autoLoadConfig[40][] = array('autoType'=>'init_script',
'loadFile'=> 'init_tlds.php');
/**
* Breakpoint 60.
*
* require('includes/init_includes/init_sessions.php');
*
*/
$autoLoadConfig[60][] = array('autoType'=>'init_script',
'loadFile'=> 'init_sessions.php');
/**
* Breakpoint 70.
*
* require('includes/init_includes/init_languages.php');
*
*/
$autoLoadConfig[70][] = array('autoType'=>'init_script',
'loadFile'=> 'init_languages.php');
/**
* Breakpoint 80.
*
* require('includes/init_includes/init_templates.php');
*
*/
$autoLoadConfig[80][] = array('autoType'=>'init_script',
'loadFile'=> 'init_templates.php');
/**
* Breakpoint 90.
*
* $zc_products = new products();
* require(DIRWS_FUNCTIONS . 'localization.php');
* require(DIRWS_FUNCTIONS . 'validations.php');
*
*/
$autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
'className'=>'products',
'objectName'=>'zc_products');
$autoLoadConfig[90][] = array('autoType'=>'require',
'loadFile'=> DIR_WS_FUNCTIONS . 'localization.php');
/**
* Breakpoint 100.
*
* $messageStack = new messageStack();
*
*/
$autoLoadConfig[100][] = array('autoType'=>'classInstantiate',
'classPath'=>DIR_WS_CLASSES,
'className'=>'messageStack',
'objectName'=>'messageStack');
/**
* Breakpoint 120.
*
* require('includes/init_includes/init_special_funcs.php');
*
*/
$autoLoadConfig[120][] = array('autoType'=>'init_script',
'loadFile'=> 'init_special_funcs.php');
/**
* Breakpoint 130.
*
* require('includes/init_includes/init_category_path.php');
*
*/
$autoLoadConfig[130][] = array('autoType'=>'init_script',
'loadFile'=> 'init_category_path.php');
/**
* Breakpoint 140.
*
* require('includes/init_includes/init_errors.php');
*
*/
$autoLoadConfig[140][] = array('autoType'=>'init_script',
'loadFile'=> 'init_errors.php');
/**
* Breakpoint 150.
*
* require('includes/init_includes/init_admin_auth.php');
*
*/
$autoLoadConfig[150][] = array('autoType'=>'init_script',
'loadFile'=> 'init_admin_auth.php');
/**
* Breakpoint 160.
*
* require(DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'audience.php');
*
*/
$autoLoadConfig[160][] = array('autoType'=>'require',
'loadFile'=> DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'audience.php');
/**
* Breakpoint 170.
*
* require('includes/init_includes/init_admin_history.php');
*
*/
$autoLoadConfig[170][] = array('autoType'=>'init_script',
'loadFile'=> 'init_admin_history.php');
/**
* Breakpoint 180.
*
* require('includes/init_includes/init_html_editor.php);
*
*/
$autoLoadConfig[180][] = array('autoType'=>'init_script',
'loadFile'=> 'init_html_editor.php');
?>
I noticed the class requirement was commented out, so I uncommented it and class.base and got this error log:
Code:
[11-Oct-2010 22:27:53] PHP Warning: require(includes/classes/mime.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /Users/[myusername]/Sites/wald.new/includes/auto_loaders/config.core.php on line 19
[11-Oct-2010 22:27:53] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/classes/mime.php' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Users/[myusername]/Sites/wald.new/includes/auto_loaders/config.core.php on line 19
I also found this thread http://www.zen-cart.com/forum/showthread.php?p=320867 and discovered that my session.auto_start value was already set to 0.
Thanks you for any help!
Bookmarks