Coder Social home page Coder Social logo

Out of memory error about whoops HOT 4 CLOSED

filp avatar filp commented on May 21, 2024
Out of memory error

from whoops.

Comments (4)

filp avatar filp commented on May 21, 2024

That's odd, print_r should handle recursion internally. Do you have an idea of what kind of data it's trying to output, that uses so much memory?

from whoops.

KaeruCT avatar KaeruCT commented on May 21, 2024

I have tracked it down to a Doctrine Entity that I'm storing in session.
Since I'm using Doctrine in my project already, I just replaced the call to print_r with \Doctrine\Common\Util\Debug::dump($value).

Maybe code that checks for Doctrine and uses this method instead could be added?
Anyway, thanks for the quick response.

from whoops.

wasilak avatar wasilak commented on May 21, 2024

Hey, I had exactly same problem. I fixed it by replacing print_r with var_dump in mentioned line:

Now it works like a charm :)

from whoops.

jissereitsma avatar jissereitsma commented on May 21, 2024

I have bumped into the same issue: Replacing print_r with var_dump in Whoops/Util/TemplateHelper.php fixes this. So it seems that print_r should handle recursion internally, but it doesn't. I checked and on PHP fora this is familiar difference the two calls, where var_dump is actually designed to bypass this issue of print_r. I have added a simple PR for this now: #545

from whoops.

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.