Title: [Plugin: Mage Enabler] Mage.php address
Last modified: August 19, 2016

---

# [Plugin: Mage Enabler] Mage.php address

 *  Resolved [bluemuse](https://wordpress.org/support/users/bluemuse/)
 * (@bluemuse)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/)
 * I’ve got a totally clean install of wordpress and magento running and am trying
   to set the plugin up. I’m getting invalid url no matter what url i put in, i’ve
   tried
 * [http://mydomain.com/public_html/app/Mage.php](http://mydomain.com/public_html/app/Mage.php)
   /
   public_html/app/Mage.php /app/Mage.php
 * I get Invalid URL message when putting these in. I know this is the location 
   of the file as i’m looking at here on my server settings.
 * Do I have to change the .htaccess file in the app folder? Are there any settings
   I should change somewhere else?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Richard Feraro](https://wordpress.org/support/users/richardferaro/)
 * (@richardferaro)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589120)
 * You didn’t include your home/root directory
 * Sample:
 * if magento is installed in your webroot or public_html
    `/home/richardferaroserver/
   public_html/app/Mage.php`
 * or
 * if magento is one directory (magento) up
    `/home/richardferaroserver/public_html/
   magento/app/Mage.php`
 *  [oscarino](https://wordpress.org/support/users/oscarino/)
 * (@oscarino)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589155)
 * I have installed Mage Enabler on Wordpres 3.0.1. It works and it is enabled.
   
   I am trying to “connect” to Magento 1.4.1.1. I have fixed the function collision
   problem between WordPress and Magento. When, in wordpress plugin admin, I insert
   the absolute url for the file Mage.php, I get the following error.
 * `Fatal error: Uncaught exception 'Mage_Core_Model_Store_Exception' in D:\wamp\
   www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php:1247 Stack trace:#
   0 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php(760):
   Mage_Core_Model_App->throwStoreException() #1 D:\wamp\www\leborsedisilvia\shop\
   app\Mage.php(322): Mage_Core_Model_App->getStore(NULL) #2 D:\wamp\www\leborsedisilvia\
   shop\app\Mage.php(334): Mage::getStoreConfig('web/url/use_sto...', NULL) #3 D:\
   wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Controller\Request\Http.
   php(204): Mage::getStoreConfigFlag('web/url/use_sto...') #4 D:\wamp\www\leborsedisilvia\
   shop\app\code\core\Mage\Core\Controller\Request\Http.php(156): Mage_Core_Controller_Request_Http-
   >_canBeStoreCodeInUrl() #5 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\
   Core\Model\App.php(379): Mage_Core_Controller_Request_Http->setPathInfo() #6 
   D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php(262): 
   Mage_Core_Model_App->_initRequest() #7 D:\wamp\www\leborsed in D:\wamp\www\leborsedisilvia\
   shop\app\code\core\Mage\Core\Model\App.php on line 1247`
 *  Plugin Author [Richard Feraro](https://wordpress.org/support/users/richardferaro/)
 * (@richardferaro)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589156)
 * I’ve checked the file that triggers your error.
    `D:\wamp\www\leborsedisilvia\
   shop\app\code\core\Mage\Core\Model\App.php`
 * It seems there’s a problem in your store code setup because it says you have 
   an empty store code. The code below is where you’re having a problem (line #760):
 *     ```
       if (empty($this->_stores[$id])) {
       	$store = Mage::getModel('core/store');
       	/* @var $store Mage_Core_Model_Store */
       	if (is_numeric($id)) {
       		$store->load($id);
       	} elseif (is_string($id)) {
       		$store->load($id, 'code');
       	}
   
       	if (!$store->getCode()) {
       		$this->throwStoreException();
       	}
       	$this->_stores[$store->getStoreId()] = $store;
       	$this->_stores[$store->getCode()] = $store;
       }
       ```
   
 * You have to fix it first. Mage Enabler requires a WORKING Magento setup.
 *  [Christopher](https://wordpress.org/support/users/c_turnbull/)
 * (@c_turnbull)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589171)
 * Hi,
    I appear to be getting roughly the same error as oscarino. I have a functioning
   webshop. I have modified the (__) function as instructed. When I enter the absolute
   url of Mage.php the settings page for Mage Enabler is just blank, no errors or
   anything. The front end of my blog is completely blank. The following showed 
   up in my error log:
 *     ```
       [Wed Sep 01 09:42:15 2010] [error] [client xx.xx.xxx.xxx] PHP Fatal error:  Uncaught exception 'Mage_Core_Model_Store_Exception' in /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php:1228
       Stack trace:
       #0 /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php(760): Mage_Core_Model_App->throwStoreException()
       #1 /var/www/magento/htdocs/app/Mage.php(322): Mage_Core_Model_App->getStore(NULL)
       #2 /var/www/magento/htdocs/app/Mage.php(334): Mage::getStoreConfig('web/url/use_sto...', NULL)
       #3 /var/www/magento/htdocs/app/code/core/Mage/Core/Controller/Request/Http.php(196): Mage::getStoreConfigFlag('web/url/use_sto...')
       #4 /var/www/magento/htdocs/app/code/core/Mage/Core/Controller/Request/Http.php(148): Mage_Core_Controller_Request_Http->_canBeStoreCodeInUrl()
       #5 /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php(379): Mage_Core_Controller_Request_Http->setPathInfo()
       #6 /var/www/magento/htdocs/app/code/core/M in /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php on line 1228
       ```
   
 * It may be worth pointing out that I don’t have a ‘default’ website/store setup–
   I have two websites, and two stores for each website (to handle different languages).
   Although I don’t see how this can be a problem. Should I be specifying a store
   to use somewhere?
 *  [Christopher](https://wordpress.org/support/users/c_turnbull/)
 * (@c_turnbull)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589172)
 * Ok. I found out why I am getting the error. I posted the solution on your [blog](http://mysillypointofview.richardferaro.com/2010/05/11/mage-enabler/#comment-659),
   but basically if you don’t have a store with the code ‘default’ the plugin will
   crash and burn. So for now one can just edit the plugin file manually, and change:
   `
   Mage::app( 'default' );` to: `Mage::app( 'your_store_code_here' );`
 *  Plugin Author [Richard Feraro](https://wordpress.org/support/users/richardferaro/)
 * (@richardferaro)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589173)
 * I’m just wondering, is it a good practice to remove the ‘default’ store view 
   code and change it to whatever code you want when in fact you do really need 
   a default config on settings that relies to a global/default reference?
 * PS: I’ve never seen a plugin that “…burn” like **c_turnbull** mentioned
 *  [Christopher](https://wordpress.org/support/users/c_turnbull/)
 * (@c_turnbull)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589174)
 * I must admit I can’t find out how Magento goes about getting the default store
   view when there isn’t one specifically named ‘default’. Perhaps it’s just the
   first one in the list of store views that gets loaded (i.e. sort order 1), for
   all I know. But it works, so I’m happy enough!
 *  Plugin Author [Richard Feraro](https://wordpress.org/support/users/richardferaro/)
 * (@richardferaro)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589176)
 * [@c_turnbull](https://wordpress.org/support/users/c_turnbull/): This has been
   fixed in Mage Enabler 1.2 version
 *  [hardik.upadhyay](https://wordpress.org/support/users/hardikupadhyay/)
 * (@hardikupadhyay)
 * [15 years ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589209)
 * i install magento in c:\wamp\www\magento
    so which URL i have to write in mage
   enabled plugin.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: Mage Enabler] Mage.php address’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mage-enabler.svg)
 * [Mage Enabler](https://wordpress.org/plugins/mage-enabler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mage-enabler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mage-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/mage-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mage-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mage-enabler/reviews/)

 * 9 replies
 * 5 participants
 * Last reply from: [hardik.upadhyay](https://wordpress.org/support/users/hardikupadhyay/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/plugin-mage-enabler-magephp-address/#post-1589209)
 * Status: resolved