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

Invalid bind-variable name ‘:username’
 
Bimal Poudel
Jr. Member
 
Total Posts:  17
Joined:  2009-05-12
 

When I try to login in the admin, right after I give Magento my login details in the admin area, I see the below error.
I can not login as admin.
How can I fix this?

Invalid bind-variable name ‘:username’

Trace:
#0 lib/Zend/Db/Statement.php(108): Zend_Db_Statement->_parseParameters(’SELECT `ba_admi...’)
#1 lib/Zend/Db/Adapter/Mysqli.php(377): Zend_Db_Statement->__construct(Object(Varien_Db_Adapter_Mysqli), ‘SELECT `ba_admi...’)
#2 lib/Zend/Db/Adapter/Abstract.php(456): Zend_Db_Adapter_Mysqli->prepare(’SELECT `ba_admi...’)
#3 lib/Zend/Db/Adapter/Abstract.php(687): Zend_Db_Adapter_Abstract->query(Object(Varien_Db_Select), Array)
#4 app/code/core/Mage/Admin/Model/Mysql4/User.php(84): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select), Array)
#5 app/code/core/Mage/Admin/Model/User.php(298): Mage_Admin_Model_Mysql4_User->loadByUsername(’admin’)
#6 app/code/core/Mage/Admin/Model/User.php(244): Mage_Admin_Model_User->loadByUsername(’admin’)
#7 app/code/core/Mage/Admin/Model/User.php(282): Mage_Admin_Model_User->authenticate(’admin’, ‘2dc804b’)
#8 app/code/core/Mage/Admin/Model/Session.php(71): Mage_Admin_Model_User->login(’admin’, ‘2dc804b’)
#9 app/code/core/Mage/Admin/Model/Observer.php(55): Mage_Admin_Model_Session->login(’admin’, ‘2dc804b’, Object(Mage_Core_Controller_Request_Http))
#10 app/code/core/Mage/Core/Model/App.php(1167): Mage_Admin_Model_Observer->actionPreDispatchAdmin(Object(Varien_Event_Observer))
#11 app/Mage.php(301): Mage_Core_Model_App->dispatchEvent(’controller_acti...’, Array)
#12 app/code/core/Mage/Core/Controller/Varien/Action.php(410): Mage::dispatchEvent(’controller_acti...’, Array)
#13 app/code/core/Mage/Adminhtml/Controller/Action.php(130): Mage_Core_Controller_Varien_Action->preDispatch()
#14 app/code/core/Mage/Core/Controller/Varien/Action.php(356): Mage_Adminhtml_Controller_Action->preDispatch()
#15 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(247): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#16 app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#18 index.php(54): Mage::run()
#19 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bimal Poudel
Jr. Member
 
Total Posts:  17
Joined:  2009-05-12
 

Basically, this affected all the POST variables.

My finding is that, I am usng mysqli extesion.
And its Db Adapter returns false, while processing something like :username, :customer_email.

It originates the error from here, and onwards:

/**
* Check if the adapter supports real SQL parameters.
*
* @param string $type ‘positional’ or ‘named’
* @return bool
*/
public function supportsParameters($type)
{
switch ($type) {
case ‘positional’:
return true;
case ‘named’:
default:
return false;
}
}

However, this is not a solution. My problem exists.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ankush Sharma
Jr. Member
 
Total Posts:  7
Joined:  2009-03-02
 

hi

if you are running this on ur local server or on localhost, so use this http://127.0.0.1/your_magento_folder/ instead of http://localhost/your_magento_folder.

Try this

 
Magento Community Magento Community
Magento Community
Magento Community
 
nasha
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2009-04-15
 

check this thread
http://www.magentocommerce.com/boards/text/javascript/viewthread/10029/#t139893

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