Question

Mage::log(print_r($filename, true));

is not working in Update.php.. and my homepage cpu100% .... what problem?

2016-02-03T04:11:53+00:00 ERR (3): Warning: simplexml_load_string(): <reference name="left">  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T04:11:53+00:00 ERR (3): Warning: simplexml_load_string(): ^  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T07:32:04+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 9: parser error : Extra content at the end of the document  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T07:32:04+00:00 ERR (3): Warning: simplexml_load_string(): <reference name="left">  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T07:32:04+00:00 ERR (3): Warning: simplexml_load_string(): ^  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T10:22:35+00:00 ERR (3): Notice: Undefined variable: filename  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 460
2016-02-03T10:22:35+00:00 DEBUG (7): 
2016-02-03T10:22:49+00:00 ERR (3): Notice: Undefined variable: filename  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 460
Was it helpful?

Solution

Reviewing your error log it looks like it is working. The row:

2016-02-03T10:22:35+00:00 DEBUG (7): 

Would appear to be your log, i.e. it's empty. If you look at the row before:

2016-02-03T10:22:35+00:00 ERR (3): Notice: Undefined variable: filename  in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 460

We can see that you are getting an error due to undefined variable filename, which is the variable you are attempting to write to the log file. The call to print_r will therefore return an empty string. I'm assuming therefore that your Mage::log call is on line 460 of app/code/core/Mage/Core/Model/Layout/Update.php.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top