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

JackJones's avatar

Fatal PHP Error [Mon Jan 29 23:34:08 2018] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp\htdocs\SideBar\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 586 [Mon Jan

For some reason I'm getting the following error in my console:

[Mon Jan 29 23:34:08 2018] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp\htdocs\SideBar\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 586
[Mon Jan 29 23:34:08 2018] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp\htdocs\SideBar\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php on line 122
[Mon Jan 29 23:35:18 2018] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp\htdocs\SideBar\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 692
[Mon Jan 29 23:35:18 2018] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
0 likes
6 replies
JackJones's avatar

Composer won't dump an autoload now either

C:\xampp\htdocs\SideBar>composer dumpautoload
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command.


VirtualFree() failed: [0x000001e7] Attempt to access invalid address.


VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command.


VirtualFree() failed: [0x000001e7] Attempt to access invalid address.

PHP Fatal error:  Out of memory (allocated 1526726656) (tried to allocate 262144 bytes) in C:\xampp\htdocs\SideBar\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 586

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command.


VirtualFree() failed: [0x000001e7] Attempt to access invalid address.

PHP Fatal error:  Out of memory (allocated 1526726656) (tried to allocate 262144 bytes) in C:\xampp\htdocs\SideBar\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php on line 122
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
tykus's avatar

Increase the memory_limit in your ini file - you have hit the 128MB limit.

You can find the path using:

$ php --ini

Search for memory_limit and increase the number

EDIT above might work on Windows

¯\_(ツ)_/¯
JackJones's avatar

It's only a simple file, something has gone wrong but I'm not sure what, I'll have to delete everything and try again

tykus's avatar

You're using XAMPP? Just edit the php.ini under Apache config inside the XAMPP control panel and restart Apache.

shez1983's avatar

is this the first time you have recieved this? what are you doing that returns this?

your php might be using too much memory (surprise surprise) like a foreach loop or stuff like that.. if its one particular script paste the code here so we can see..

i think upping a limit is just painting over a crack in the wall.. which might eventually lead to broken wall..

vicneasm's avatar

hi, im experiencing the same problem. i already increase the memory limit to 10000M... but still got the same error. each time when error occured, apache need to restart. is there any solution for this. kindly pls help me. thank you.

error message:

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command.

VirtualFree() failed: [0x000001e7] Attempt to access invalid address.

Please or to participate in this conversation.