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

Uncaught exception ‘Mage_Core_Model_Store_Exception’
 
spreedictive
Jr. Member
 
Total Posts:  4
Joined:  2008-05-12
 

Hi, i am dying to get my hands on testing out magento but faced the below problem when i tried to install via simplescripts. Will anyone be able to help?

Fatal error: Uncaught exception ‘Mage_Core_Model_Store_Exception’ in /home/imbccoms/public_html/shop/app/code/core/Mage/Core/Model/App.php:1056 Stack trace: #0 /home/imbccoms/public_html/shop/app/code/core/Mage/Core/Model/App.php(545): Mage_Core_Model_App->throwStoreException() #1 /home/imbccoms/public_html/shop/app/Mage.php(577): Mage_Core_Model_App->getStore() #2 /home/imbccoms/public_html/shop/app/Mage.php(439): Mage::printException(Object(Zend_Db_Adapter_Exception)) #3 /home/imbccoms/public_html/shop/index.php(40): Mage::run() #4 {main} thrown in /home/imbccoms/public_html/shop/app/code/core/Mage/Core/Model/App.php on line 1056

 
Magento Community Magento Community
Magento Community
Magento Community
 
spreedictive
Jr. Member
 
Total Posts:  4
Joined:  2008-05-12
 

Hi,
After installing magento, my website show :

Fatal error: Uncaught exception ‘Mage_Core_Model_Store_Exception’ in /home/imbccoms/public_html/shop/app/code/core/Mage/Core/Model/App.php:1056 Stack trace: #0 /home/imbccoms/public_html/shop/app/code/core/Mage/Core/Model/App.php(545): Mage_Core_Model_App->throwStoreException() #1 /home/imbccoms/public_html/shop/app/Mage.php(577): Mage_Core_Model_App->getStore() #2 /home/imbccoms/public_html/shop/app/Mage.php(439): Mage::printException(Object(Zend_Db_Adapter_Exception)) #3 /home/imbccoms/public_html/shop/index.php(40): Mage::run() #4 {main} thrown in /home/imbccoms/public_html/shop/app/code/core/Mage/Core/Model/App.php on line 1056

Does anyone know what is the problem for this? how do i resolve this?

Website: http://www.shop.spreedictive.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
bblinn
Jr. Member
 
Total Posts:  1
Joined:  2008-05-15
 

Same thing here on BlueHost. I’d really like to see if this does what I need, but ...
Fatal error: Uncaught exception ‘Mage_Core_Model_Store_Exception’ in /home/sixoneze/public_html/blinn-com/MagentoTest/app/code/core/Mage/Core/Model/App.php:1056 Stack trace: #0 /home/sixoneze/public_html/blinn-com/MagentoTest/app/code/core/Mage/Core/Model/App.php(545): Mage_Core_Model_App->throwStoreException() #1 /home/sixoneze/public_html/blinn-com/MagentoTest/app/Mage.php(577): Mage_Core_Model_App->getStore() #2 /home/sixoneze/public_html/blinn-com/MagentoTest/app/Mage.php(439): Mage::printException(Object(Zend_Db_Adapter_Exception)) #3 /home/sixoneze/public_html/blinn-com/MagentoTest/index.php(40): Mage::run() #4 {main} thrown in /home/sixoneze/public_html/blinn-com/MagentoTest/app/code/core/Mage/Core/Model/App.php on line 1056

I see posts here and elsewhere about this problem, but so far no solutions.  confused

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Guru
 
Avatar
Total Posts:  364
Joined:  2007-11-08
Phoenix, AZ
 

I have a couple of theories that I should share.

1.  These errors are the result of a low memory condition.  This could be related to a lot of configuration factors; Everything from the environment available memory to the php.ini memory configurations and as complex as the apache keepalive and MPM module configurations.

Each of these things would make it so that the system work work, until it ran out of memory - then it would throw the error.  I think a system restart can rule out this problem.

2.  PHP extensions directory location changes.  This is common with the very popular CPanel control panel.  CPanel has a nasty habit of changing your lib dir to it’s own custom location.  This can cause a lot of problems if your PDO is not located in this new setting.  However, this issue could only be caused by some sort of php/apache recompilation/upgrade.  Keep in mind that many CPanels are set to ‘automatically’ upgrade themselves when patches are available, which could easily lead to this lib directory changing. 

I would think this would be common only in shared hosting environments.  Shared hosts sometimes rebuild apache without paying close enough attention to this particular configuration value and it’s certainly not an ‘expected’ result of recompilation.

I’m going to run some tests on lab hosting environments to see if I can find a way to replicate this error

If anyone has any other idea’s or things that you think would be important to look at it would be appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Guru
 
Avatar
Total Posts:  364
Joined:  2007-11-08
Phoenix, AZ
 

I accidentally chopped my original reply by editing it.

I was asking if you guys could give any details regarding your hosting environment?

Things like;

1. VPS / Shared hosting?

2. If VPS how much RAM/Memory (guaranteed)

3. Apache/PHP configuration details

4. Caching systems in place?  eAcellerator/APC?

5. Anything unusual about your configuration that might be able to help replicate this issue?

Appreciate any feedback you can give.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dawgfather
Jr. Member
 
Total Posts:  2
Joined:  2008-05-15
 

I have bluehost too and used simple scripts

We use MySQL 5.0.x

Apache is 2.2.8
I have attached my phpinfo file and thx

File Attachments
bluehostphpinfo.txt  (File Size: 19KB - Downloads: 600)
 
Magento Community Magento Community
Magento Community
Magento Community
 
ben-zene
Jr. Member
 
Total Posts:  1
Joined:  2008-02-28
 

There’s another post that applies to this one: http://www.magentocommerce.com/boards/viewthread/8354/

He figured it out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 
Crucial Web Host - 15 May 2008 03:09 PM

I accidentally chopped my original reply by editing it.

I was asking if you guys could give any details regarding your hosting environment?

Things like;

1. VPS / Shared hosting?

2. If VPS how much RAM/Memory (guaranteed)

3. Apache/PHP configuration details

4. Caching systems in place?  eAcellerator/APC?

5. Anything unusual about your configuration that might be able to help replicate this issue?

Appreciate any feedback you can gxive.

My client’s site suddenly is having the exact same problem, I was in panic until I saw your post. Thank you!

Here is the server info:
1. Shared hosting with Cpanel.
I don’t know anything about the caching systems, as for the Apache/PHP confiiguration, I think it’s up to par as I have not encountered any problem testing Magento store until now.

If you want the PHP info, let me know, I will PM you.

THanks!

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

In app/Mage.php, do you have this code on approx line 575:

public static function printException(Exception $e$extra '')
// ...
            
chmod($reportFile0777);

// added these 5 lines
            
$storeCode 'default';
            try 
{
                $storeCode 
self::app()->getStore()->getCode();
            
}
            
catch (Exception $e{}
// until here

            
$baseUrl rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');

            
$reportUrl $baseUrl '/report/?id='
// instead of:
                
$reportId '&s;=' self::app()->getStore()->getCode();

// replaced with:
                
$reportId '&s;=' $storeCode;
// ...

If not, please edit it and paste exception text if you get one.
Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Hi Moshe, thank for taking a look and I am greatly grateful.

I am getting different error though:

pdo_mysql extension is not installed
Trace:
#0 /home/citicomm/public_html/lib/Zend/Db/Adapter/Abstract.php(390): Varien_Db_Adapter_Pdo_Mysql->_connect()
#1 /home/citicomm/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query(’SET NAMES utf8’, Array)
#2 /home/citicomm/public_html/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(39): Zend_Db_Adapter_Pdo_Abstract->query(’SET NAMES utf8’)
#3 /home/citicomm/public_html/app/code/core/Mage/Core/Model/Resource.php(77): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#4 /home/citicomm/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(54): Mage_Core_Model_Resource->getConnection(’core_setup’)
#5 /home/citicomm/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(110): Mage_Core_Model_Resource_Setup->__construct(’core_setup’)
#6 /home/citicomm/public_html/app/code/core/Mage/Core/Model/Config.php(195): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#7 /home/citicomm/public_html/app/code/core/Mage/Core/Model/App.php(212): Mage_Core_Model_Config->init(Array)
#8 /home/citicomm/public_html/app/Mage.php(404): Mage_Core_Model_App->init(’’, ‘store’, Array)
#9 /home/citicomm/public_html/app/Mage.php(423): Mage::app(’’, ‘store’, Array)
#10 /home/citicomm/public_html/index.php(40): Mage::run()
#11 {main}

I realized that code you asked me to replace, matches the latest version, which I have not upgraded yet based on these :
@ryanb - since the packages are over-writing the code there should not be an issue to skip a version.

@ryanb: You can skip it, unless you are unhappy with the other bugs we have provided fixes for. It’s up to you, just review the release notes carefully.

I thought I will skip it till the next major upgrade in June. Now with this error, must I upgrade?

I think the server is up to par.

Oh, also, here the replaced code in the Mage.php - I actually replaced it with the latest version soon after I saw the new error. THought it will make a different but obviously not.

public static function getIsDeveloperMode()
    
{
        
return self::$_isDeveloperMode;
    
}

    
/**
     * Display exception
     *
     * @param Exception $e
     */
    
public static function printException(Exception $e$extra '')
    
{
        
if (self::$_isDeveloperMode{
            
print '<pre>';

            if (!empty(
$extra)) {
                
print $extra "\n\n";
            
}

            
print $e->getMessage() . "\n\n";
            print 
$e->getTraceAsString();
            print 
'</pre>';
        
}
        
else {
            self
::getConfig()->createDirIfNotExists(self::getBaseDir('var') . DS 'report');
            
$reportId   intval(microtime(true) * rand(1001000));
            
$reportFile self::getBaseDir('var') . DS 'report' DS $reportId;
            
$reportData = array(
                !empty(
$extra) ? $extra "\n\n" '' $e->getMessage(),
                
$e->getTraceAsString()
            );
            
$reportData serialize($reportData);

            
file_put_contents($reportFile$reportData);
            
chmod($reportFile0777);

            
$storeCode 'default';
            try 
{
                $storeCode 
self::app()->getStore()->getCode();
            
}
            
catch (Exception $e{}

            $baseUrl 
rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');
            
$reportUrl $baseUrl '/report/?id='
                
$reportId '&s;=' $storeCode;

            if (!
headers_sent()) {
                header
('Location: ' $reportUrl);
            
}
            
else {
                
print '<script type="text/javascript">';
                print 
"[removed].href = '{$reportUrl}';";
                print 
'</script>';
            
}
        }

        
die();
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@chinesedream: you do not have PDO installed. Also make sure pdo_mysql is installed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 
Moshe - 20 May 2008 06:00 PM

@chinesedream: you do not have PDO installed. Also make sure pdo_mysql is installed.

Moshe, thank you so much and so sorry! I should have double check many times the phpinfo - the scrolling of the file made me lose sight of it (though that shouldn’t be an excuse!).  The host didn’t upgrade the sever properly I believe.

Solved!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Teclance Enterprise
Member
 
Total Posts:  44
Joined:  2008-06-11
 

I am having a similar issue with the downloader. It worked fine but now when I access it, I get this error message on the page and was hoping to get this resolved:

Fatal error: Uncaught exception ‘Mage_Core_Model_Store_Exception’ in /home2/profeta2/public_html/app/code/core/Mage/Core/Model/App.php:1169 Stack trace: #0 /home2/profeta2/public_html/app/code/core/Mage/Core/Model/App.php(581): Mage_Core_Model_App->throwStoreException() #1 /home2/profeta2/public_html/app/Mage.php(212): Mage_Core_Model_App->getStore(NULL) #2 /home2/profeta2/public_html/app/code/core/Mage/Core/Model/Session/Abstract.php(69): Mage::getStoreConfig(’web/cookie/cook...’) #3 /home2/profeta2/public_html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(58): Mage_Core_Model_Session_Abstract->getCookieLifetime() #4 /home2/profeta2/public_html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(121): Mage_Core_Model_Session_Abstract_Varien->start(NULL) #5 /home2/profeta2/public_html/app/code/core/Mage/Core/Model/Session/Abstract.php(52): Mage_Core_Model_Session_Abstract_Varien->init(’admin’, NULL) #6 /home2/profeta2/public_html/app/code/core/Mage/Admin/Model/Session.php(39): Mage_Core_Model_Session_Abs in /home2/profeta2/public_html/app/code/core/Mage/Core/Model/App.php on line 1169

 
Magento Community Magento Community
Magento Community
Magento Community
 
pixelpusher
Sr. Member
 
Avatar
Total Posts:  135
Joined:  2008-04-23
SoCal
 

same here. still have the error. I don’t remember making any server configuration changes since the last upgrade…

I replaced the downloader directory with one from a fresh install. It then works but shows nothing to upgrade. so I run Mage All Latest, and it does the update, but then I’m right back to square 1…
Anyone else with this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
pixelpusher
Sr. Member
 
Avatar
Total Posts:  135
Joined:  2008-04-23
SoCal
 

I made of copy of my php.ini file and placed it in the downloader directory. It seemed to me like the issue was actually a memory error, or an error from PDO not being enabled (even though I knew it was in the base directory)…
All is working now! smile

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