I have SMTP module in production and my log is inundated with SQL errors attempting to override already existing 'smtp_library' variable. Regretfully the errors also show up in the UI:
Date Saturday, April 1, 2006 - 12:16am
User Anonymous
Location /taxonomy/term/22/9/feed
Message Duplicate entry 'smtp_library' for key 1 query: INSERT INTO variable (name, value) VALUES ('smtp_library', 's:24:\"modules/smtp/smtp.module\";') in /var/drupal/drupal-4.6.5/includes/database.mysql.inc on line 66.
I grepped for 'smtp_library' string and found that it is only used by user.module and updated in the beginning of smtp.module. However, the logic of using getcwd() to get base directory may be suspect and the cause of errors.
Possible Solution: Remove "if (variable_get('smtp_on', 1))" statement in the beginning of the smtp.module file. Require population of 'smtp_library' variable through settings admin screen only.
Comments
Comment #1
cerulean47 commentedI'll second this, I am seeing the same behavior in my production 4.6.0 installation.
Comment #2
LukeLast commentedThe smtp_library variable setting code has been updated and moved to the settings page.
Comment #3
(not verified) commentedComment #4
notsleepy commentedAlthough this is reported as fixed I am still seeing it on my live site and I have the latest version of the module. I just downloaded it again and did a diff on the copy and I have and the latest copy and they are identical. What was the code change? Has it been updated here for version 4.6?
http://drupal.org/project/Modules