I have created new web site for language code with sub-directory and copying two files index.php and .htacess from the root to the individual sub-directory.Then edit index.php file as:

define('MAGENTO_ROOT', getcwd());

$compilerConfig = ‘../includes/config.php’;
if (file_exists($compilerConfig)) {
    include $compilerConfig;

$mageFilename = ‘../app/Mage.php’;
$maintenanceFile = 'maintenance.flag';

    /* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

Mage::run($mageRunCode, $mageRunType);
$mageRunCode = 'de';
$mageRunType = 'website';

After I edit getting a following issue;

Parse error: syntax error, unexpected '.' in /home/kaansilv/public_html/de/index.php on line 42

Also I edited .htaccess file on new sub-directory file as;

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


My site structure;

www.mydomain.com/en base directory  * it's fine 
www.mydomain.com/de sub-directory *new web site which I created for sub-directory

Also I never forget to edit store base url each store view in Magento admin.

Now I would like ask ;

Am I need make symlink for sub-directory.Because I don't know how to path edit on SSH.

Another issue ;

Fatal error: require(): Failed opening required '/home/kaansilv/public_html/de/app/bootstrap.php' (include_path='.:/usr/local/php55/pear') in /home/kaansilv/public_html/de/index.php on line 64

1 Answer 1


Assuming you directly copy/pasted your source, I'm going to assume that line 43 is likely $mageFilename = ‘../app/Mage.php’;. The string is wrapped in smart quotes, not single quotes which PHP doesn't interpret as a string. Either copy and replace the line with:

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

... or manually delete the quote at the start and end and make them proper single or double quotes.

  • As you mentioned string issue,I have changed to single quotes and issue is fixed.But now I get another issue.Please check my first post last line;
    – Kaan Burak
    Commented Feb 3, 2016 at 12:24
  • @KaanBurak it might be worth opening that as a seperate question - the answer did resolve the specific issue to do with the question. The include path would seem to be implying Magento 2 but your tags suggest 1.9 is that definately the version? Commented Feb 3, 2016 at 15:20
  • @johncuthbert I using version
    – Kaan Burak
    Commented Feb 3, 2016 at 15: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.