2

The title says it all .. however I'm having a problem.

I transferred my installation from localhost to a sub-directory in the server root name test.

I edited app/etc/local.xml to include the correct credentials as well as updating base URL within the core_config_data table.

When going to the url http://mydomain/test all I get is a blank page. Of course the admin doesn't work either. When I put the Magento installation in the server root it works fine but not in a sub-directory.

Does anyone have a clue as to why this happens?

If you need any more info please let me know. I'm using Magento CE 1.9.0.1

1 Answer 1

1

If you are using rewrite directives (SEO URLS) you need to edit your htaccess and change the RewriteBase to

############################################
## you can put here your magento root folder
## path relative to web root

    RewriteBase /test/

Then manually rename the 'var/cache' folder and make sure it gets recreated when you try and reload the index.php


Edit:

here is a smple local.xml file

<config>
    <global>
        <install>
            <date><![CDATA[Wed, 11 Feb 2015 12:25:38 +0000]]></date>
        </install>
        <crypt>
            <key><![CDATA[bf0accb767a157c6da44eca568a92142]]></key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix><![CDATA[]]></table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[root]]></username>
                    <password><![CDATA[root]]></password>
                    <dbname><![CDATA[local_magento_com]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
        </resources>
        <session_save><![CDATA[files]]></session_save>    
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>
10
  • I removed the # (which I assume is a comment) and edited the value just like you did but it did not work. I also rename the cache folder and it still does not work. Any other ideas?
    – Natsu
    Commented May 13, 2015 at 14:19
  • Yes, the # means that line was commented out. Did the cache folder get recreated?
    – tecjam
    Commented May 13, 2015 at 14:20
  • It did not, but how would I make sure it does? I'm still seeing the same blank page when going to http://mydomain/test/ or http://mydomain/test/index.php - this seems like it should be a lot easier :/
    – Natsu
    Commented May 13, 2015 at 14:21
  • Check the folder permissions - specifically of var - the server should be able to create a directory in there. That may be the issue.
    – tecjam
    Commented May 13, 2015 at 14:22
  • Nope, it's permissions are 755 which I assume is ok. I renamed the cache folder to c and keep reloading the URL but nothing is being created :/
    – Natsu
    Commented May 13, 2015 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.