Hi Charlie please read the following URL in regards to memory and I am sure your issue will go away.
Another option you can carry out is to deactivate all your other plugins except this one and see if the memory issue is till triggered.
Regards
Thank you. I changed define( ‘WP_MEMORY_LIMIT’, ’96M’ ) to define( ‘WP_MEMORY_LIMIT’, ‘384M’ ) in wp-config.php, then restarted the Apache2 service. The symptoms remain the same — no backup and the memory size stated in the Apache error remains unchanged.
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 70255224 bytes) in /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-backup.php on line 67
– Charlie
Thank you Charlie for reporting back. One of the plugin developers will investigate this further.
Thank you
Any news on this? I did try several more things to change the allocated memory. None so far has changed the size of memory stated in the error message “Allowed memory size of 268435456 bytes exhausted…”
– Charlie
Your server’s PHP memory_limit is too low for the DB backup operation and the change you made obviously has not been recognised by your server.
Talk to your host provider and show them the log and ask them to increase the PHP “memory_limit” value so that this issue does not recur.
They should be able to help you.
I am the host provider; it is my server.
In /etc/php5/apache2/php.ini
memory_limit = 384M
In /etc/php5/cli/php.ini
memory_limit = 384M
Reported by php –info | grep memory
memory_limit => 384M => 384M
opcache.memory_consumption => 64 => 64
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
These were changed from a default value of 128M. I have tied as high as 512M. The changes here do not alter the figure of memory size of 268435456 bytes.
Is there some place else where this limit might be stated?
– Charlie
Have you tried troubleshooting the various possible causes for the memory_limit change not apparently taking effect?
This might help as a start:
http://stackoverflow.com/questions/10000944/php-memory-limit-not-taking-effect-in-normal-php-scripts
Do you have other .htaccess or config files somewhere in another directory where you may be specifying the memory_limit value?
Good suggestion. I will pursue those ideas. Will let you know what I get.
– Charlie
Okay I think we have some progress. When I click on the Create DB Backup Now button, I no longer get a blank page. I get a visible page that says, DB Backup failed. Please check the permissions of the backup directory.
Adding the line…
define( 'WP_MAX_MEMORY_LIMIT', '384M' );
…to file /var/www/html/wp-config.php seems to have changed things. What apparently was needed was WP_MAX_MEMORY_LIMIT, not WP_MEMORY_LIMIT. The WP_MAX_MEMORY_LIMIT constant specifically defines the maximum memory limit available when in the administration back-end.
That the page now says something rather just stops dead is an improvement.
As for the message Please check the permissions of the backup directory, the backup directory is /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/backups, is that correct?
The AIOWPS/backups directory has the same ownership settings as the rest of the web site. And file attributes are 777. What else could it need? Or is this not the correct directory path?
The Apache error log event associated with this permissions failure is:
PHP Warning: mkdir(): Permission denied in /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-utility-file.php on line 386
Mkdir()? Is it trying to make a new directory?
– Charlie
Hi, try and change folder permissions to 0755
I still get DB Backup failed. Please check the permissions of the backup directory.
The folder ../wp-content/plugins/all-in-one-wp-security-and-firewall/backups and its sub-files was set to 755. Apache was restarted, then Create DB Backup Now tried again. At least it is doing something now but I do get the above message and this is the Apache error log:
PHP Warning: mkdir(): Permission denied in /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-utility-file.php on line 386
Should I try deleting the /backups folder and let AIOWPS remake it?
– Charlie
Yes @charlie that is a great idea. I guess it would not hurt.
Regards
Darn! That did not work. I deleted just the /backups directory, then tried making a Backup Now. Same DB Backup failed. Please check the permissions of the backup directory.
I then created the backups directory again and checked that it was inheriting its permissions from above. Tried Backup Now again and still got DB Backup failed. Please check the permissions of the backup directory.
Where is the folder path controlled? I get the impression that AIOWPS is trying to make a directory someplace else.
– Charlie
Hi, this is the name of the backup folder created by AIOWPS.
aiowps_backups
And this is the path…
/yourwebsite/wp-content/aiowps_backups/
Perfect! Database backups now work.
I manually created directory /var/www/html/wp-content/aiowps_backups, with the same permissions and ownerships as the rest of the site, then clicked the Create DB Backup Now button. The routine ran without failure and did produce a zipped backup file.
The other, previous, change was to set a high enough value for WP_MAX_MEMORY_LIMIT in wp-config.php, ahead of the line that invokes wp-settings.php.
Thanks very much for your help.
– Charlie