Codeigniter, Laravel, WordPress PHP Fatal error Allowed memory size of bytes exhausted

Through this tutorial, you will learn how to fix PHP: fatal error: allowed memory size of 8388608,16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824 bytes exhausted PHP, laravel, codeIgniter, WordPress in linux ubuntu, windows, mac.

How To Fix PHP Fatal error: Allowed memory size of bytes exhausted codeigniter, Laravel, WordPress

Steps to fix laravel, codeIgniter, wordpress PHP fatal error allowed memory size of 8388608,16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824 bytes exhausted in linux ubuntu, windows, mac:

  • Step 1 – Open php.ini
  • Step 2 – Edit php.ini
  • Step 3 – Save PHP.ini

Step 1 – Open php.ini

Search the the php.ini file in etc folder on your windows, ubuntu or mac os system.

The location of the php.ini file can vary depending on the operating system. Here’s how to find the php.ini file on Ubuntu, Windows, and macOS:

Ubuntu:

  1. Open a terminal.
  2. Run the following command to find the location of the php.ini file:
    • php -i | grep “Loaded Configuration File”
  3. The output will display the path to the php.ini file.

Windows:

  1. Open a command prompt.
  2. Run the following command to find the location of the php.ini file:
    • php -i | findstr /C:”Loaded Configuration File”
  3. The output will display the path to the php.ini file.

macOS:

  1. Open a terminal.
  2. Run the following command to find the location of the php.ini file:
    • php -i | grep “Loaded Configuration File”
  3. The output will display the path to the php.ini file.

Step 2 – Edit php.ini

Edit php.ini file and add the line “memory_limt =” with limit; as follows:

 ini_set('memory_limit', '1024M');

Step 3 – Save PHP.ini

Finally, You adjust the value accordingly and save it. And restart your server.

Recommended Tutorials

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *