Fatal Error: Allowed Memory Size Of 134217728 Bytes Exhausted (codeigniter + XML-RPC)

This error occurs when the PHP script exceeds the maximum amount of memory allowed to be allocated. In this case, it has reached the limit of 134217728 bytes (128 MB).

To resolve this issue, you can try increasing the memory_limit in your php.ini configuration file. Locate the php.ini file and find the line that sets the memory_limit. Increase the value to a higher limit, such as 256M or 512M:

memory_limit = 256M

After making this change, you will need to restart your web server for the new configuration to take effect.

If you don’t have access to the php.ini file or the changes don’t take effect, you can also try increasing the memory limit programmatically within your PHP script using the ini_set function:

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

Place this line at the beginning of your script before any memory-intensive operations are performed.

Keep in mind that increasing the memory limit is not always the ideal solution, as it might be a sign of inefficient code or a large dataset. Consider optimizing your code or finding alternative ways to process your data if increasing the memory limit is not feasible.

About the Author Rex

I'm a passionate tech blogger with an insatiable love for programming! From my early days tinkering with code, I've delved into web dev, mobile apps, and AI. Sharing insights and tutorials with the world is my joy, connecting me to a global community of like-minded tech enthusiasts. Python holds a special place in my heart, but I embrace all challenges. Constantly learning, I attend tech conferences, contribute to open-source projects, and engage in code review sessions. My ultimate goal is to inspire the next generation of developers and contribute positively to the ever-evolving tech landscape. Let's code together!