Do you know that there is a default memory limits in your PHP to refrain any programs from crashing? What you can do is to use a PHP infinite meaning all that is available, to be more exact in the amount of memory. When we are in
How to find Your php.ini?
Remember that there are two versions of php.ini on Linux. Why? Because there is a possibility that you will have a different version
See the example below, in Ubuntu:
Command line: /etc/php5/cli/php.ini
While in a different version of Linux or BSD, it could be in different locations, but they are easy to find. Take note that on shared
2. Edit Your “memory_limit”
Finding the php.ini file, you can open your favorite text editor by this command:
With this line, you are editing the memory_limit. It can be similar to the following below:
memory_limit = 64M
In this example, it is set up to 64MB, you can change it to 128MB or 32MB. What you can do is to change this line, after setting the line, you can now save then exit your php.ini file.
If you want to change the web server's php.ini, you can restart the web server, How?
If you really think and happy to know what you are doing, that is good because you are capable in setting the limit of your memory in using all the RAM available. What's troubling is if your script is out of control, there is a possibility that your machine will crash. It's not totally recommended, but it's an option for you.
To accomplish this just set the memory limit to -1 like this:
memory_limit = -1
Now that you