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

1.2.0 upgrade fails with call_user_func(bcadd) error
 
pstechnology
Jr. Member
 
Total Posts:  7
Joined:  2008-11-08
Edenbridge, Kent
 

Error report after reported successful upgrade from 1.1.8 to 1.2.0 is as follows:

Warning: call_user_func(bcadd) [function.call-user-func]: First argument is expected to be a valid callback in /var/www/html/lib/Zend/Date.php on line 1325
Trace:
#0 [internal function]: mageCoreErrorHandler(2, ‘call_user_func(...’, ‘/var/www/html/l...’, 1325, Array)
#1 /var/www/html/lib/Zend/Date.php(1325): call_user_func(’bcadd’, 0, 1230629380)
#2 /var/www/html/lib/Zend/Date.php(2573): Zend_Date->_assign(’set’, 1230629380, 0, false)
#3 /var/www/html/lib/Zend/Date.php(1174): Zend_Date->_calculate(’set’, Object(Zend_Date), NULL, ‘en_GB’)
#4 /var/www/html/lib/Zend/Date.php(205): Zend_Date->set(Object(Zend_Date), NULL, ‘en_GB’)
#5 /var/www/html/app/code/core/Mage/Core/Model/Locale.php(448): Zend_Date->__construct(NULL, NULL, Object(Zend_Locale))
#6 /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php(614): Mage_Core_Model_Locale->storeDate(’1’)
#7 /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php(108): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection->_joinPriceRules()
#8 /var/www/html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(700): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection->_beforeLoad()
#9 /var/www/html/lib/Varien/Data/Collection.php(662): Mage_Eav_Model_Entity_Collection_Abstract->load()
#10 /var/www/html/app/code/core/Mage/Reports/Block/Product/Abstract.php(81): Varien_Data_Collection->getIterator()
#11 /var/www/html/app/code/core/Mage/Reports/Block/Product/Viewed.php(74): Mage_Reports_Block_Product_Abstract->_getRecentProductsCollection()
#12 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Reports_Block_Product_Viewed->_toHtml()
#13 /var/www/html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#14 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Text_List->_toHtml()
#15 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#16 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml(’right’, true)
#17 /var/www/html/app/design/frontend/default/default/template/page/2columns-right.phtml(63): Mage_Core_Block_Abstract->getChildHtml(’right’)
#18 /var/www/html/app/code/core/Mage/Core/Block/Template.php(144): include(’/var/www/html/a...’)
#19 /var/www/html/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#20 /var/www/html/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#21 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#22 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(525): Mage_Core_Block_Abstract->toHtml()
#23 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(325): Mage_Core_Model_Layout->getOutput()
#24 /var/www/html/app/code/core/Mage/Cms/Helper/Page.php(92): Mage_Core_Controller_Varien_Action->renderLayout()
#25 /var/www/html/app/code/core/Mage/Cms/controllers/IndexController.php(32): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘home’)
#26 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(348): Mage_Cms_IndexController->indexAction()
#27 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#28 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#29 /var/www/html/app/Mage.php(450): Mage_Core_Controller_Varien_Front->dispatch()
#30 /var/www/html/index.php(52): Mage::run()
#31 {main}

No matter whether I try an view home page, or admin back-end, this is the error I get. Centos 5.2 with Apache if that helps.

Luckily running on VMWare ESX, so snapshot was taken before.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ecchi
Jr. Member
 
Total Posts:  4
Joined:  2008-07-11
 

I was running 1.18 with cgi mode pretty smoothly.
But I got the same error after upgrading to 1.20.
So, I did a fresh installation of 1.20, but still have the same error.

Well, I guess I am a bit even more ahead of you guys, now in Asia 6:00pm tried both upgrade and fresh installation. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rogier Bom
Jr. Member
 
Total Posts:  8
Joined:  2008-09-03
 

The above two problems are not the same, but they seem to be related. They both have to do with locale/currency settings that are different from the default.

I’m having the same problem as described in the first post. I’m using the nl_NL locale.

Warning: call_user_func(bcadd) [function.call-user-func]: First argument is expected to be a valid callback in /var/www/vhosts/sitename/httpdocs/lib/Zend/Date.php on line 1325

#0 [internal function]: mageCoreErrorHandler(2, ‘call_user_func(...’, ‘/var/www/vhosts...’, 1325, Array)
#1 /var/www/vhosts/sitename/httpdocs/lib/Zend/Date.php(1325): call_user_func(’bcadd’, 0, 1230637501)
#2 /var/www/vhosts/sitename/httpdocs/lib/Zend/Date.php(2573): Zend_Date->_assign(’set’, 1230637501, 0, false)
#3 /var/www/vhosts/sitename/httpdocs/lib/Zend/Date.php(1174): Zend_Date->_calculate(’set’, Object(Zend_Date), NULL, ‘nl_NL’)
#4 /var/www/vhosts/sitename/httpdocs/lib/Zend/Date.php(205): Zend_Date->set(Object(Zend_Date), NULL, ‘nl_NL’)
#5 /var/www/vhosts/sitename/httpdocs/app/code/core/Mage/Core/Model/Locale.php(426): Zend_Date->__construct(NULL, NULL, Object(Zend_Locale))
#6 /var/www/vhosts/sitename/httpdocs/app/code/core/Mage/Cms/Helper/Page.php(65): Mage_Core_Model_Locale->date()
#7 /var/www/vhosts/sitename/httpdocs/app/code/core/Mage/Cms/controllers/IndexController.php(32): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘mengenenmixen’)
#8 /var/www/vhosts/sitename/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(348): Mage_Cms_IndexController->indexAction()
#9 /var/www/vhosts/sitename/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#10 /var/www/vhosts/sitename/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /var/www/vhosts/sitename/httpdocs/app/Mage.php(450): Mage_Core_Controller_Varien_Front->dispatch()
#12 /var/www/vhosts/sitename/httpdocs/index.php(46): Mage::run()
#13 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Please let us know what is your PHP version, whether it has “BCMath support” and what was PHP “Configure Command” - you can find all this information on your phpinfo page.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Please remove comment # in line 153 in the file lib/Zend/Locale/Math.php, that instead of

#require_once 'Zend/Locale/Math/PhpMath.php';
it will be
require_once 'Zend/Locale/Math/PhpMath.php';

or just replace lib/Zend/Locale/Math.php with the attached file.

File Attachments
Math.php  (File Size: 6KB - Downloads: 217)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Rogier Bom
Jr. Member
 
Total Posts:  8
Joined:  2008-09-03
 
Michael - 30 December 2008 01:20 AM

Please remove comment # in line 153 in the file lib/Zend/Locale/Math.php, that instead of

#require_once 'Zend/Locale/Math/PhpMath.php';
it will be
require_once 'Zend/Locale/Math/PhpMath.php';

or just replace lib/Zend/Locale/Math.php with the attached file.

Replacing the file fixed my problem. Thank you for your quick response.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pstechnology
Jr. Member
 
Total Posts:  7
Joined:  2008-11-08
Edenbridge, Kent
 

Worked for me too. Many thanks

Changed the math.php file (interestingly though, line 153 (require_once ‘Zend/Locale/Math/PhpMath.php’;) was not commented out.
Also added php-bcmath as per other users experience.

Upgrade from 1.1.8 to 1.2.0 then went through fine. (I rolled back to 1.1.8 beforehand)

 
Magento Community Magento Community
Magento Community
Magento Community
 
ecchi
Jr. Member
 
Total Posts:  4
Joined:  2008-07-11
 

HI, Michael,

I am running Magento in cgi mode, so could you advise a fix for me?

here is a phpinfo() url:

http://www.pepamilk.com/phpinfo.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
ecchi
Jr. Member
 
Total Posts:  4
Joined:  2008-07-11
 

Arrrrr, sorry, Michael!!  I got the line 153 in the file lib/Zend/Locale/Math.php modified. And now it is working wink

So, the fresh 1.20 has no sample data right?

Anyway, happy new year to you all smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
bmihai
Jr. Member
 
Total Posts:  5
Joined:  2008-12-25
 

I installed the version 1.2.0 on server, the installation completed succesfully. The frontend works well, but I have problems when I try to login in backend. When I try to login in admin area appears the following error:

Notice: Undefined variable: value in /home/modas/public_html/shop/lib/Zend/Currency.php on line 251
Trace:
#0 /home/modas/public_html/shop/lib/Zend/Currency.php(251): mageCoreErrorHandler(8, ‘Undefined varia...’, ‘/home/modas/pub...’, 251, Array)
#1 /home/modas/public_html/shop/lib/Zend/Currency.php(179): Zend_Currency->_processSymbolChoice(Array)
#2 /home/modas/public_html/shop/app/code/core/Mage/Directory/Model/Currency.php(163): Zend_Currency->toCurrency(’0.000000’, Array)
#3 /home/modas/public_html/shop/app/code/core/Mage/Directory/Model/Currency.php(151): Mage_Directory_Model_Currency->formatTxt(NULL, Array)
#4 /home/modas/public_html/shop/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format(NULL)
#5 /home/modas/public_html/shop/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(62): Mage_Adminhtml_Block_Dashboard_Bar->format(NULL)
#6 /home/modas/public_html/shop/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(65): Mage_Adminhtml_Block_Dashboard_Bar->addTotal(’Revenue’, NULL)
#7 /home/modas/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(199): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#8 /home/modas/public_html/shop/app/code/core/Mage/Core/Model/Layout.php(421): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#9 /home/modas/public_html/shop/app/code/core/Mage/Adminhtml/Block/Dashboard.php(52): Mage_Core_Model_Layout->createBlock(’adminhtml/dashb...’)
#10 /home/modas/public_html/shop/app/code/core/Mage/Core/Block/Abstract.php(199): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#11 /home/modas/public_html/shop/app/code/core/Mage/Core/Model/Layout.php(421): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 /home/modas/public_html/shop/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(41): Mage_Core_Model_Layout->createBlock(’adminhtml/dashb...’, ‘dashboard’)
#13 /home/modas/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(348): Mage_Adminhtml_DashboardController->indexAction()
#14 /home/modas/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(143): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#15 /home/modas/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#16 /home/modas/public_html/shop/app/Mage.php(450): Mage_Core_Controller_Varien_Front->dispatch()
#17 /home/modas/public_html/shop/index.php(52): Mage::run()
#18 {main}

Any advice to solve the problem will be appreciated.

Thank you,
Mihai

P.S: I made the changes in Math.php, it’s a fresh installation and my currency is leu (ro_RO)

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