Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

diegocopat@gmail.com's avatar

PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32768 bytes) in C:\Users\Utente\Documents\SharedPlatform\Lavoro\work_creatoridiluce\storage\framework\views\6b5aabdfb80a5b097d11ddf1f2b89d41143db7ca.php on line 1

can someone help me to solve my problem?

I'm working on a project made with Laravel 7.0, with a windows 10 operating system and:

PHP 7.3.7 (cli) (built: Jul 4 2019 16:25:31) ( ZTS MSVC15 (Visual C++ 2017) x86 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies

Thank you so much for help

0 likes
12 replies
Snapey's avatar

Sounds like you have some recursive loop.

What have you added since it last worked....

Show code..

diegocopat@gmail.com's avatar

it's a pretty new project, I just set up the scaffolding and was starting to split the front and back end views. Do you think it is a problem with a command I wrote? because unfortunately I tried to fix it in several ways including restarting the computer, so I lost the commands in the terminal

Sinnbeck's avatar

@diegocopat@gmail.com the error comes from a view. So you probably did something memory intensive there. I assume the error comes when you visit a certain page?

Tray2's avatar

@diegocopat@gmail.com What changes have you made to your controllers, models and views?

Sinnbeck's avatar

So the error shows up the instant you run the serve command?

diegocopat@gmail.com's avatar

the command you advised me ended successfully, unfortunately, however, when the php artisan is launched, the situation does not change. The error is as follows:

PS C:\Users\Utente\Documents\SharedPlatform\Lavoro\work_creatoridiluce> php artisan serve Laravel development server started: http://127.0.0.1:8000 [Fri Dec 24 09:51:33 2021] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in C:\Users\Utente\Documents\SharedPlatform\Lavoro\work_creatoridiluce\storage\framework\views\97df14ff731f18e8fefd2c9c3626fa31c8183eb1.php on line 35 [Fri Dec 24 09:51:33 2021] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32768 bytes) in C:\Users\Utente\Documents\SharedPlatform\Lavoro\work_creatoridiluce\vendor\symfony\error-handler\Error\FatalError.php on line 1 [Fri Dec 24 09:51:33 2021] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 118784 bytes) in Unknown on line 0

Snapey's avatar
Snapey
Best Answer
Level 122

You have a recursive loop

layouts.front-end has @include('partials.header') and partials.header extends layouts.front-end

3 likes

Please or to participate in this conversation.