0

I am setting up multi store view and I have placed index.php and .htaccess file under the new directory /home/storeweb/public_html/so/sb/extreme-landing/ but for some reason I am not able to select Mage.php file by adding any number of ../ before app/Mage.php

I tried by adding single ../ before app/Mage.php and I got an error

/home/storeweb/public_html/so/sb/extreme-landing/../app/Mage.php was not found.

By adding single ../ it should be looking for Mage.php under sb directory but not sure what is wrong.

My virtual host entries:

<VirtualHost *:80>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/storeweb/public_html/
    ErrorLog /home/storeweb/logs/domain_error.log
    CustomLog /home/storeweb/logs/domain_access.log combined
</VirtualHost>

<VirtualHost *:443>
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/domain.com.crt
    SSLCertificateKeyFile /etc/apache2/ssl/domain.com.key
    SSLCertificateChainFile /etc/apache2/ssl/DigiCertCA.crt

    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/storeweb/public_html/
    ErrorLog /home/storeweb/logs/domain_error.log
    CustomLog /home/storeweb/logs/domain.log combined
</VirtualHost>
0

Because index.php have below code

define('MAGENTO_ROOT', getcwd());

This is define current directory as MAGENTO_ROOT so:

MAGENTO_ROOT : /home/storeweb/public_html/so/sb/

Change index.php code

define('MAGENTO_ROOT', getcwd());

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}

$mageFilename = MAGENTO_ROOT . '/app/Mage.php';

to:

//define('MAGENTO_ROOT', getcwd());

    $compilerConfig = '../../includes/config.php';
    if (file_exists($compilerConfig)) {
        include $compilerConfig;
    }

    $mageFilename = '../../app/Mage.php';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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