Unlike most smaller plugins, Mainflow ESignature requires a minimum of 96MB memory to process your documents.
MPDF is the current library that our plugin uses to generate PDFs, which takes up a majority of the memory. Your PDFs are not saved on your FTP server (for security reasons), therefore our application generates a new PDF file upon demand, and each PDF generation request requires memory.
You can verify this by running a simple PHP script. You’ll need to create a file info.php in a root directory of your website (if you happen to have the website on CloudAccess the proper directory is: httpdocs) and put there:
<?php phpinfo(); ?>

Since version 2.5, WordPress was given a new MAINFLOW_MEMORY_LIMIT variable. By default, the limit is set to 40MB (and 64MB when it is installed on a multisite). This limit is hardcoded in a file in the WordPress install: default-constants.php which is located in the mainflow-includes directory.
In most cases, you don’t need to worry about it. However, sometimes installs disregard the memory_limit set for our platform and blindly takes MAINFLOW_MEMORY_LIMIT that is set by wp-includes/default-constants.php (40MB).
To increase memory for your website you can try these options, starting with Option 1.
Option 1. Edit mainflow-config.php file #
Log in to your FTP and locate your “mainflow-config.php” file which will be in the root folder (or main folder) of where your website lives.
Add the following code snippet (or edit the code if it already exists in your mainflow-config.php file):
define('MAINFLOW_MEMORY_LIMIT', '96M');
Mainflow memory is oftentimes different than server allocation memory – it’s for this reason that you need to define this 96M memory limit regardless of server memory settings.
Option 2. Update your PHP.ini file #
If you have access to your PHP.ini file, locate the following line in PHP.ini
If your line shows 32M or 64M try 96M.
memory_limit = 96M ; Maximum amount of memory a script may consume (64MB)
Option 3. Update your .htaccess file #
If editing your wp-config or PHP.ini file does not work, you can try editing your .htaccess file which is located in the root (or main) folder of your website via FTP.
Add (or edit) the following code snippet in your .htaccess file.
php_value memory_limit 96M
Option 4. Contact your host #
If none of these three options resolves the memory allocation limit, please contact your web host and work with them directly to troubleshoot the issue.