4

I just started working on a new magento site and when I moved it to my local I got the below error on my nginx server.

2016/09/14 13:38:41 [error] 7#7: *13 FastCGI sent in stderr: "PHP message: PHP Warning: require(/var/www/html/app/bootstrap.php): failed to open stream: No such file or directory in /var/www/html/index.php on line 64

I simply removed that line from index.php, but what's that file for? Why is it in some Magento installs? It's a Magento ver. 1.9.0.1 install.

1
  • Hi there, check the answer & give feedback ;) Jun 28, 2018 at 10:10

2 Answers 2

1

app/bootstrap.php file should be provided in the package you have used

Anyways, in Magento 1.9 that file just provides a workaround for some libxml PHP bugs

/**
 * Apply workaround for the libxml PHP bugs:
 * @link https://bugs.php.net/bug.php?id=62577
 * @link https://bugs.php.net/bug.php?id=64938
 */

if (function_exists('libxml_disable_entity_loader')) {
    libxml_disable_entity_loader(false);
}
-1

Bootstrap.php performs essential initialization required to run magento you can find more detail here

3
  • does this file come with every Magento install and/or version? Should I add this file because it's not there?
    – Holly
    Sep 14, 2016 at 13:54
  • Yes it is default file in magento package in the folder app/bootstrap.php Also you should never comment including of the same from index.php
    – mp196
    Sep 14, 2016 at 13:56
  • they're the dev docs for Magento 2, not Magento 1
    – Holly
    Sep 14, 2016 at 14:19

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.