GithubHelp home page GithubHelp logo

Comments (4)

fritzmg avatar fritzmg commented on August 24, 2024

Another problem occurs when the InstallationController generates the bootstrap.php.cache file here. The cache directory is hardcoded to /var/cache: ContainerFactory.php#L52 - thus the new bootstrap.php.cache file will be generated in /var instead.

And if you try to go to example.org/contao/install afterwards, you'll see the following error message multiple times:

Warning: file_get_contents(/var/www/contao4test/htdocs/app/bootstrap.php.cache): failed to open stream:
No such file or directory in /var/www/contao4test/htdocs/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php on line 153

Which is weird, because the old bootstrap.php.cache definitely still exists in that location.

Reproduction (basically the same as above):

  1. Install Contao 4.2.5 via composer create-project contao/standard-edition <target> 4.2.5.
  2. Open example.org/install.php.
  3. Update the installation to Contao 4.3.0 via composer update.
  4. Open example.org/install.php.

The aforementioned Warnings will be shown.

Running

composer run-script post-update-cmd

does not fix it. If you delete /app/cache/*, the following errors will be shown:

Warning: require(/var/www/contao4test/htdocs/app/../../../../../vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php): failed to open stream: No such file or directory in /var/www/contao4test/htdocs/app/bootstrap.php.cache on line 4

Fatal error: require(): Failed opening required '/var/www/contao4test/htdocs/app/../../../../../vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/contao4test/htdocs/app/bootstrap.php.cache on line 4

from installation-bundle.

stefansl avatar stefansl commented on August 24, 2024

I can confirm this. Tested this on two different linux machines.

from installation-bundle.

leofeyer avatar leofeyer commented on August 24, 2024

We need to use $cacheDir = $kernel->getCacheDir() and $logsDir = $kernel->getLogsDir().

from installation-bundle.

leofeyer avatar leofeyer commented on August 24, 2024

Fixed in 53370d9.

from installation-bundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.