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

Help! - Fatal error during install
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

I’m going through the install wizard, and I filled out the page where you enter the database name, user, password, etc…

Then I click continue, and the next page says:

Fatal error: Call to a member function isApplicationInstalled() on a non-object in /home/johnw/apache/domain.com/htdocs/magento/app/Mage.php on line 361

Can anyone tell me what is wrong, and how I might fix it?

Server is running Linux with PHP5

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

Please remove existing app/etc/local.xml and re-run installation wizard.

No need to clean database or remove files.

Let us know how it goes.

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

"No need to ... remove files”

besides app/etc/local.xml smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

OK, I deleted the local.xml file, then tried to re-run the installation wizard, but now I can’t even do that because when I go to http://www.domain.com/magento/install/

I get this error:

Fatal error: Call to a member function isApplicationInstalled() on a non-object in /home/johnw/apache/domain.com/htdocs/magento/app/Mage.php on line 361

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

We can’t reproduce this error, but please try this update:

in app/Mage.php on approx. line 363 replace

if (self::getSingleton('install/installer')->isApplicationInstalled()) {
with
$installer self::getSingleton('install/installer');
if (
$installer && $installer->isApplicationInstalled()) {
Please let me know if that helped .
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

I’ve made a mistake in previous post.

it should be

$installer self::getSingleton('install/installer');
if (!
$installer || $installer->isApplicationInstalled()) {

Then it should show an error, please paste it here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

OK, I did that.  Here is what I get when I go to http://www.domain.com/magento/install/

exception ‘Zend_Db_Adapter_Exception’ with message ‘SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’ in /home/johnw/apache/domain.com/htdocs/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php:131
Stack trace:
#0 /home/johnw/apache/domain.com/htdocs/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(67): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/johnw/apache/domain.com/htdocs/magento/lib/Zend/Db/Adapter/Abstract.php(367): Varien_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/johnw/apache/domain.com/htdocs/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query(’SET NAMES utf8’, Array)
#3 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(32): Zend_Db_Adapter_Pdo_Abstract->query(’SET NAMES utf8’)
#4 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Resource.php(71): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#5 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(238): Mage_Core_Model_Resource->getConnection(’core_read’)
#6 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Mysql4/Config.php(47): Mage_Core_Model_Mysql4_Abstract->getConnection(’read’)
#7 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Config.php(122): Mage_Core_Model_Mysql4_Config->getChecksum(’config_data,web...’)
#8 /home/johnw/apache/domain.com/htdocs/magento/app/Mage.php(328): Mage_Core_Model_Config->init(NULL)
#9 /home/johnw/apache/domain.com/htdocs/magento/app/Mage.php(349): Mage::init(NULL)
#10 /home/johnw/apache/domain.com/htdocs/magento/index.php(27): Mage::run(’base’)
#11 {main}

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

Are you sure there’s no app/etc/local.xml file ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

OK, I deleted the local.xml file again....then I was able to go to domain.com/magento/install/ and start the install wizard again.  I got to the page where I fill in the database info like name, user, password, etc…

Then I click the button to continue to the next page, but I get this:

exception ‘Zend_Db_Adapter_Exception’ with message ‘SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’ in /home/johnw/apache/domain.com/htdocs/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php:131
Stack trace:
#0 /home/johnw/apache/domain.com/htdocs/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(67): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/johnw/apache/domain.com/htdocs/magento/lib/Zend/Db/Adapter/Abstract.php(367): Varien_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/johnw/apache/domain.com/htdocs/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query(’SET NAMES utf8’, Array)
#3 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(32): Zend_Db_Adapter_Pdo_Abstract->query(’SET NAMES utf8’)
#4 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Resource.php(71): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#5 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(238): Mage_Core_Model_Resource->getConnection(’core_read’)
#6 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Mysql4/Config.php(47): Mage_Core_Model_Mysql4_Abstract->getConnection(’read’)
#7 /home/johnw/apache/domain.com/htdocs/magento/app/code/core/Mage/Core/Model/Config.php(122): Mage_Core_Model_Mysql4_Config->getChecksum(’config_data,web...’)
#8 /home/johnw/apache/domain.com/htdocs/magento/app/Mage.php(328): Mage_Core_Model_Config->init(NULL)
#9 /home/johnw/apache/domain.com/htdocs/magento/app/Mage.php(349): Mage::init(NULL)
#10 /home/johnw/apache/domain.com/htdocs/magento/index.php(27): Mage::run(’base’)
#11 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

Got anymore ideas on what the problem might be?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mycommerce
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2007-09-21
London, now Los Angeles
 

I’m having the same problem. I’m running locally with:

Apache 2.0.54
PHP 5.2
MySQL 5.1

I followed the instructions given by Moshe in this thread and this is the error I get after the database info screen:

exception ‘Zend_Db_Adapter_Exception’ with message ‘The mysql driver is not currently installed’ in C:\web\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php:104
Stack trace:
#0 C:\web\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(67): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 C:\web\magento\lib\Zend\Db\Adapter\Abstract.php(367): Varien_Db_Adapter_Pdo_Mysql->_connect()
#2 C:\web\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(206): Zend_Db_Adapter_Abstract->query(’SET NAMES utf8’, Array)
#3 C:\web\magento\app\code\core\Mage\Core\Model\Resource\Type\Db\Pdo\Mysql.php(32): Zend_Db_Adapter_Pdo_Abstract->query(’SET NAMES utf8’)
#4 C:\web\magento\app\code\core\Mage\Core\Model\Resource.php(71): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#5 C:\web\magento\app\code\core\Mage\Core\Model\Mysql4\Abstract.php(238): Mage_Core_Model_Resource->getConnection(’core_read’)
#6 C:\web\magento\app\code\core\Mage\Core\Model\Mysql4\Config.php(47): Mage_Core_Model_Mysql4_Abstract->getConnection(’read’)
#7 C:\web\magento\app\code\core\Mage\Core\Model\Config.php(122): Mage_Core_Model_Mysql4_Config->getChecksum(’config_data,web...’)
#8 C:\web\magento\app\Mage.php(328): Mage_Core_Model_Config->init(NULL)
#9 C:\web\magento\app\Mage.php(349): Mage::init(NULL)
#10 C:\web\magento\index.php(27): Mage::run(’base’)
#11 {main}

The problem seems to be outlined perfectly in this post:

http://www.magentocommerce.com/boards/viewthread/306/#t1982

Although I reinstalled PHP with the PDO MySQL extension checked and still no joy......

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

@john_wilson: Something weird, do you have any other applications that run on this MySQL server? it looks like PDO makes connection but is unable to run 1st statement.

@mycommerce: Actually you have different problem: “The mysql driver is not currently installed”, check that you have php_pdo_mysql installed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mycommerce
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2007-09-21
London, now Los Angeles
 

Hey Moshe,

I grabbed the PDO DLL from here:

http://www.nolimitclubbing.com/lib_php/php_pdo_mysq.dll

And it works fine now (well my empty database now has 157 tables in it and I’m onto the next step!)

cheers

Jason

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

Moshe, I have an rsync running which copies the MySQL data from another server to this server.  Could that be the problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

I got the problem solved by setting a shortcut so the mysql.sock appears in /var/lib/mysql/

Everything seems to work now, and I got Magento installed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rajbrades
Member
 
Total Posts:  53
Joined:  2007-09-04
 

I’m now also having these same problems,

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

I’ve followed the solutions given by other users both in this post and the “Go Daddy CGI installation problems?” , but am not successful.

Is there anything else I can do? It took forever to be able to get just to the installation page, and now this problem!

Help is greatly appreciated!!!

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