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

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

Find the directory of the php.ini directory. This will usually be etc/php.ini.

The location of the php.ini file can vary depending on the operating system and how PHP was installed. 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

Once you have got php.ini file path. Now, you need to open php.ini file and add the line “memory_limt =” with limit; is 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

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of 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 from a starting stage. As well as demo example.

Leave a Reply

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