You can try increasing the PHP memory limit in your server’s configuration or in your PHP script if it’s allowed. To do this:

In PHP Script (not recommended for production environments, but useful for testing):

Add the following line at the beginning of your PHP script to increase the memory limit:

ini_set('memory_limit', '256M'); // Set the memory limit to 256 megabytes

In Server Configuration (recommended for production environments):

Edit your PHP configuration file (php.ini) and increase the memory limit. Look for the memory_limit setting and change it to a higher value. For example:

memory_limit = 256M

After making this change, you’ll need to restart your web server (e.g., Apache or Nginx) for the new memory limit to take effect.