Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Page 1 of 2
Strict Notice: Only variables should be passed by reference in ..lib/Zend/Db/Select.php on line 216
 
DOLARiON
Jr. Member
 
Total Posts:  4
Joined:  2007-09-24
 

After upgrade system - we were start to reseive error like that:

Strict NoticeOnly variables should be passed by reference  in /var/www/clients/client1/web50/web/lib/Zend/Db/Select.php on line 216
Trace
:
#0 /var/www/clients/client1/web50/web/lib/Zend/Db/Select.php(216): mageCoreErrorHandler(2048, 'Only variables ...', '/var/www/client...', 216, Array)
#1 /var/www/clients/client1/web50/web/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute/Collection.php(70): Zend_Db_Select->columns(Array)
#2 /var/www/clients/client1/web50/web/app/code/core/Mage/Eav/Model/Config.php(606): Mage_Eav_Model_Mysql4_Entity_Attribute_Collection->useLoadDataFields()
#3 /var/www/clients/client1/web50/web/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(367): Mage_Eav_Model_Config->loadCollectionAttributes('catalog_product', Array)
#4 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php(319): Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToSelect(Array, false)
#5 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php(58): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection->addAttributeToSelect(Array)
#6 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(458): Mage_Adminhtml_Block_Dashboard_Tab_Products_Ordered->_prepareCollection()
#7 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(464): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#8 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(642): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#9 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php(64): Mage_Core_Block_Abstract->toHtml()
#10 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(199): Mage_Adminhtml_Block_Dashboard_Grids->_prepareLayout()
#11 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Model/Layout.php(422): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/Block/Dashboard.php(65): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#13 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(199): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#14 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Model/Layout.php(445): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#15 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Model/Layout.php(229): Mage_Core_Model_Layout->addBlock('Mage_Adminhtml_...', 'dashboard')
#16 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Model/Layout.php(195): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#17 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Model/Layout.php(200): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#18 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Action.php(303): Mage_Core_Model_Layout->generateBlocks()
#19 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Action.php(231): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#20 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/Controller/Action.php(237): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#21 /var/www/clients/client1/web50/web/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(38): Mage_Adminhtml_Controller_Action->loadLayout()
#22 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Adminhtml_DashboardController->indexAction()
#23 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch('index')
#24 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#25 /var/www/clients/client1/web50/web/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#26 /var/www/clients/client1/web50/web/index.php(65): Mage::run()
#27 {main}

and cant login to admin area… and 50% frontend - the same:

Strict NoticeOnly variables should be passed by reference  in /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php on line 373
Trace
:
#0 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php(373): mageCoreErrorHandler(2048, 'Only variables ...', '/var/www/client...', 373, Array)
#1 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php(532): Mage_Catalog_Block_Product_List_Toolbar->getCurrentMode()
#2 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php(560): Mage_Catalog_Block_Product_List_Toolbar->getAvailableLimit()
#3 /var/www/clients/client1/web50/web/app/code/core/Mage/Page/Block/Html/Pager.php(77): Mage_Catalog_Block_Product_List_Toolbar->getLimit()
#4 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php(158): Mage_Page_Block_Html_Pager->setCollection(Object(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection))
#5 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Product/List.php(160): Mage_Catalog_Block_Product_List_Toolbar->setCollection(Object(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection))
#6 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(642): Mage_Catalog_Block_Product_List->_beforeToHtml()
#7 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#8 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml('product_list', true)
#9 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/Block/Category/View.php(81): Mage_Core_Block_Abstract->getChildHtml('product_list')
#10 /var/www/clients/client1/web50/web/app/design/frontend/default/default/template/catalog/category/view.phtml(101): Mage_Catalog_Block_Category_View->getProductListHtml()
#11 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Template.php(144): include('/var/www/client...')
#12 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#13 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#14 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#15 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#16 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Text_List->_toHtml()
#17 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#18 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#19 /var/www/clients/client1/web50/web/app/design/frontend/default/default/template/page/3columns.phtml(63): Mage_Core_Block_Abstract->getChildHtml('content')
#20 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Template.php(144): include('/var/www/client...')
#21 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#22 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#23 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#24 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Model/Layout.php(526): Mage_Core_Block_Abstract->toHtml()
#25 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Action.php(347): Mage_Core_Model_Layout->getOutput()
#26 /var/www/clients/client1/web50/web/app/code/core/Mage/Catalog/controllers/CategoryController.php(115): Mage_Core_Controller_Varien_Action->renderLayout()
#27 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Catalog_CategoryController->viewAction()
#28 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch('view')
#29 /var/www/clients/client1/web50/web/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#30 /var/www/clients/client1/web50/web/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#31 /var/www/clients/client1/web50/web/index.php(65): Mage::run()
#32 {main}

PS:
MySQL 5.1.37
php 5.2.11

what we can do width this error?
Any opinions how to fix that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
DOLARiON
Jr. Member
 
Total Posts:  4
Joined:  2007-09-24
 

ok… I found…

this error is comming from PHP Version 5.2.11-0.dotdeb.1 width Suhosin Patch 0.9.7 & eAccelerator v0.9.6-rc1

perfect work under 5.2.9

error in (lib/Zend/Db/Select.php on line 216)
“current” function… they dont work currect!

find that:

$correlationName current(array_keys($this->_parts[self::FROM]));

simple fix:

$correlationName array_keys($this->_parts[self::FROM]);
$correlationName $correlationName[0];

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdc888
Jr. Member
 
Total Posts:  1
Joined:  2008-04-15
 

This appears to be an eAccelerator 0.9.6-rc1 problem. I had issues with magento 500 errors while testing this version of eAccelerator. After downgrading to 0.9.5.3 all is well (tested on PHP 5.2.10). This could be because the new eAccelerator is optimized for php 5.3?

 
Magento Community Magento Community
Magento Community
Magento Community
 
impi_busy
Jr. Member
 
Total Posts:  23
Joined:  2009-02-19
 

DOLARiON, Your’e a Legend!
I ran into this problem now too and your post saved my skin,

Thank you Mister!

Impi

 
Magento Community Magento Community
Magento Community
Magento Community
 
kkdistrib
Jr. Member
 
Total Posts:  1
Joined:  2007-09-19
 

the fix work for me
thank you very much
magento 1.3.2.4 + nginx 0.8.17 + eaccelerator 0.9.6-rc1 + php 5.2.11 + php-fpm 0.6

 
Magento Community Magento Community
Magento Community
Magento Community
 
quelizinha
Jr. Member
 
Total Posts:  12
Joined:  2007-09-27
 

Only backend works with this fix for me.

How to fix the frontend?

 Signature 

Toca do Verde - Seu Garden Center Online
http://www.tocadoverde.com.br
Bulbos, sementes, substratos, adubos, defensivos e muito mais.

 
Magento Community Magento Community
Magento Community
Magento Community
 
quelizinha
Jr. Member
 
Total Posts:  12
Joined:  2007-09-27
 

Its better fix:

(to fix backend) Find in Select.php on line 216:

$correlationName current(array_keys($this->_parts[self::FROM]));

replace to:

$arrayKeys array_keys($this->_parts[self::FROM]);
$correlationName current($arrayKeys);

(to fix frontend) Find in Toolbar.php on line 373:

return current(array_keys($this->_availableMode));

replace to:

$arrayKeys array_keys($this->_availableMode);
        return 
current($arrayKeys);

 Signature 

Toca do Verde - Seu Garden Center Online
http://www.tocadoverde.com.br
Bulbos, sementes, substratos, adubos, defensivos e muito mais.

 
Magento Community Magento Community
Magento Community
Magento Community
 
creativelifeform
Member
 
Avatar
Total Posts:  70
Joined:  2009-06-22
Sydney, Australia
 

Hi guys,

I had exactly the same problem, but funnily enough, this happened suddenly, no system upgrade nothing! I haven’t even touched the code for the pages which the error was referring to.

I’m really happy the code here helped me fix the issue, but what I need to know is, WHY did this happen? HOW could it happen since I hadn’t changed any settings or code?

Really need to know to prevent further issues…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Magento Team
 
Total Posts:  826
Joined:  2007-08-31
 
creativelifeform - 24 November 2009 02:42 AM

I had exactly the same problem, but funnily enough, this happened suddenly, no system upgrade nothing! I haven’t even touched the code for the pages which the error was referring to.

I’m really happy the code here helped me fix the issue, but what I need to know is, WHY did this happen? HOW could it happen since I hadn’t changed any settings or code?

Check the PHP and eAccelerator versions in phpinfo. It could be your hosting company or sysadmin upgraded it for you wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
blueben
Guru
 
Avatar
Total Posts:  446
Joined:  2008-10-09
Charleston, SC
 

nmd.

 Signature 

Benjamin MarksBlue AcorneCommerce Consulting
Magento Professional Partner

 
Magento Community Magento Community
Magento Community
Magento Community
 
evoratec
Jr. Member
 
Total Posts:  3
Joined:  2008-09-20
 

Fantastic. Thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
 
blueben
Guru
 
Avatar
Total Posts:  446
Joined:  2008-10-09
Charleston, SC
 

We’ve noticed eAccelerator 0.9.6rc1 to correlate with our clients having issue out of the blue.  Not sure why a host would implement any rc software on a server, but we’ve seen so-called Magento hosts doing this.

 Signature 

Benjamin MarksBlue AcorneCommerce Consulting
Magento Professional Partner

 
Magento Community Magento Community
Magento Community
Magento Community
 
CharliePinglass
Jr. Member
 
Total Posts:  12
Joined:  2009-08-22
 

Worked perfectly - thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tamagochi
Member
 
Total Posts:  33
Joined:  2008-01-17
 

Hi

Mi select.php is different, how must i fix this? In this magento i dont have this problem but i can acces to admin panel to upgrade (gives me 404 error), and i think that the problem maybe similar, couse in the same server i installed a new magento and i have this problem on it. This is my file attached:

Best Regards

File Attachments
Select.php  (File Size: 42KB - Downloads: 158)
 
Magento Community Magento Community
Magento Community
Magento Community
 
depo
Jr. Member
 
Total Posts:  4
Joined:  2008-02-10
 

Hi
the fix work for me after put new code

to:  lib/Zend/Db/Select.php

$arrayKeys = array_keys($this->_parts[self::FROM]);
$correlationName = current($arrayKeys);

and downgrading eAccelerator to v0.9.5.3

thank you very much

Magento 1.4.0.0 on PHP Version 5.2.4-2ubuntu5.10 + eAccelerator v0.9.5.3

 
Magento Community Magento Community
Magento Community
Magento Community
 
ali.userexpert
Jr. Member
 
Total Posts:  4
Joined:  2010-02-16
 
quelizinha - 23 November 2009 08:22 AM

Its better fix:

(to fix backend) Find in Select.php on line 216:

$correlationName current(array_keys($this->_parts[self::FROM]));

replace to:
$arrayKeys array_keys($this->_parts[self::FROM]);
$correlationName current($arrayKeys);

(to fix frontend) Find in Toolbar.php on line 373:

return current(array_keys($this->_availableMode));

replace to:

$arrayKeys array_keys($this->_availableMode);
        return 
current($arrayKeys);

I love u man. thanks that works for me now i am trying to solve this for almost 20 hrs but now its done. Only one small issue i.e. the categories i am generating there is showing like a top menu bar ( it seems ok ) but on the main body of homepage its still blank. i hope you getting my point so is there a way to fill it with like recent products or top products etc to fill that space on that homepage.

Thanks alot

ali

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|841 users currently online|497193 forum posts