Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Undefined class constant ‘Zend_Log::DEBUG’
 
lkbryant
Member
 
Avatar
Total Posts:  60
Joined:  2007-09-03
 

Hi,
I am getting this error when i point my browser to http://test.com/magento ....
i tried both the tar and also the svn checkout. i get the same error.

PHP Fatal error:  Undefined class constant ‘Zend_Log::DEBUG’ in /home/user/www/test.com/public_html/magento/app/Mage.php on line 390

anyone know why I would get this error?
i am on Centos4 w/ php 5.2.4 via REMI repository.

help is greatly appreciated.

p.s.

if i set Zend_Log::DEBUG to be 7 , then I get a

Call to a member function children() on a non-object

can someone help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Looks like Zend_Log is not found, which might mean that include_path is not setup right.

The include_path is set in app/Mage.php:33.

Let’s try this, put in line 34 this code:

die(get_include_path());
and paste the response here please
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

I’m wrong, Zend_Log IS found, but the constant is not found.

What do you have in lib/Zend/Log.php on line 41?

there should be

class Zend_Log
{
    
const EMERG   0;  // Emergency: system is unusable
    
const ALERT   1;  // Alert: action must be taken immediately
    
const CRIT    2;  // Critical: critical conditions
    
const ERR     3;  // Error: error conditions
    
const WARN    4;  // Warning: warning conditions
    
const NOTICE  5;  // Notice: normal but significant condition
    
const INFO    6;  // Informational: informational messages
    
const DEBUG   7;  // Debug: debug messages
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Maybe you already have Zend Framework somewhere else and it’s referenced before Magento’s copy.

Put before Zend_Log class definition

die(__FILE__);
See if it’s actually included..
 
Magento Community Magento Community
Magento Community
Magento Community
 
skecer
Jr. Member
 
Total Posts:  3
Joined:  2010-07-11
 

hi;

i was using magento 1.4.0.1 but there were some bugs in the magento api. So i have upgraded it to magento 1.4.1.1.
At my local computer it works fine, but at the test development environment i got this error:

Fatal error: Class 'Zend_Log' not found in .......  on line 142

But when i look at the line 142 there is nothing. it is the end of the file. But this file is a custom module which is about payment.

my local computer is ubuntu 10.04 and php version is
PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46)

test development computer is

debian: 2.6.26-2-amd64 #1 SMP Thu Aug 19 00:37:36 UTC 2010 x86_64 GNU/Linux
php: PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 06:06:53)

i can’t find the solution. Please help me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacco Moolenaar
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2010-08-31
 

I have had a similar problem. It was caused by an include in my script which contained warnings. Default Magento error level is strict. You can change this in de index.php. For me the following settings solved the problem:
error_reporting( E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR );

Hope this helps....

 
Magento Community Magento Community
Magento Community
Magento Community
 
newaira
Jr. Member
 
Total Posts:  1
Joined:  2011-07-14
 

I came across the same error:

Fatal error: Class 'Zend_Log' not found in .......  on line 142

It turns out that for the payment model class that I was using, the capture function has to accept a Varien_Object:

public function capture (Varien_Object $payment$amount)

I had something like Mage_Sales_Model_Order_Payment instead of Varien_Object and was getting the error message.

It is strange to get an error like this, but I suppose Magento is extracting some sort of meta data info from the class, and then crashes for who knows what reason…

Anyway, works now…

 
Magento Community Magento Community
Magento Community
Magento Community
 
mariyar
Jr. Member
 
Total Posts:  11
Joined:  2011-05-19
 

which might mean that include_path is not setup right.

The include_path is set in app/Mage.php:33. ............

Fabulous Coach Shoes For Less
Diesel Shoes And Coach Boots
The History of Coach Shoes

 
Magento Community Magento Community
Magento Community
Magento Community
 
harsh1212
Jr. Member
 
Total Posts:  21
Joined:  2010-07-20
 

Hi Jacco Moolenaar,

Thanks for your Answer, its working like a charm.

Thanks again,
Harsh

 
Magento Community Magento Community
Magento Community
Magento Community
 
richcduk
Jr. Member
 
Total Posts:  1
Joined:  2014-04-08
 

Jacco

worked for me too! grin

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top