Attempting to send email invite causes memory error
| Project: | Invite |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I have installed the invite module. When I try to send an invitation email here is the error I get:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 66060185 bytes) in /var/www/modules/user/user.module on line 457
I have increased the memory limits up to 64M, and it just seems like the higher I put the limit, the more bytes are attempted to be allocated. I have uninstalled and reinstalled the module. I know that the user module is what is actually exhausting the memory here, but could you tell me what part of the invite module would be calling on the user module? I don't have any other problems with the user module through out the site and emails are going out fine. Just having problems with the invite module. Thank you.

#1
UPDATE: It definitely has something to do with the creation of the tracking code. I've commented out function invite_generate_code and the error is now coming from line 1042 of invite.module for an undefined function (obviously because I've commented that function out). Any ideas?
#2
SOLVED: Sorry for thinking out loud on here, but I was able to finally get this working. I moved the function from user.module into interest.module, but was still having the same problem. After a little searching about the function user_password (http://api.drupal.org/api/function/user_password/6) I found that I needed to add a ++ in the following line:
// Loop the number of times specified by $length.
for ($i = 0; $i < $length; $i++) {
The module as it was was missing this. Hope this helps anyone that may be having the same problem.