Encountered Fatal error: Class 'PHPMailer' not found in C:\Documents and Settings\ ...user... \Sites\commerce_kickstart-7.x-2.5\sites\all\modules\phpmailer\includes\phpmailer.class.inc on line 12
Following 1) Clean install of Kickstart, 2) Enabling and configuring PHPMailer (no other changes made)
Class.phpmailer.php and class.smtp.php are installed in C:\Documents and Settings\ ...user... \Sites\commerce_kickstart-7.x-2.5\sites\all\libraries\phpmailer as directed by phpmailer readme.txt
Moving the files to the folder referenced by error message has no effect. Same results with php library release V5.1, V525 & V526.
As I understand it I need PHPMailer for html email support for Commerce however I've made no changesto the Commerce side of things at this stage. I get this error message on going to admin/config and modules so I cannot undo the change.
Comment | File | Size | Author |
---|---|---|---|
#1 | Image 001.png | 24.35 KB | drupauler |
#1 | Image 002.png | 13.61 KB | drupauler |
Comments
Comment #0.0
drupauler CreditAttribution: drupauler commentedspellcheck
Comment #0.1
drupauler CreditAttribution: drupauler commentedspellcheck
Comment #1
drupauler CreditAttribution: drupauler commentedAttached are screenshots of phpmailer library install instructions and folders on target system. ((Ive just reproduced the problem using the standard acquia dev drupal dist drupal v7.22
Comment #2
oadaeh CreditAttribution: oadaeh commentedDo you have the Libraries API module installed?
Comment #3
drupauler CreditAttribution: drupauler commentedYes, it's a pre-req of PHPMailer; you cannot enable PHPMailer without it.
Comment #4
oadaeh CreditAttribution: oadaeh commentedYou can install drush (this is the Windows installer) to disable the module.
I can look at an installation I have on a Windows server to see what happens, but due to my schedule, it's not likely to happen today.
Comment #5
drupauler CreditAttribution: drupauler commentedThanks. I'm at the sandbox stage playing with Commerce Kickstart. Ran a couple of test transactions and realised I needed to setup email and... ran into a brick wall. I'm using smtp with gmail.
Comment #6
drupauler CreditAttribution: drupauler commentedLooking again I getthe feeling the problem may relate to phpmailer having a bunch of 'module dependencies, although this is not immediately obvious (obvs) for SMTP Authentication, Mime Support, etc.
The problem is that right now, enabling PHPmailer immediately locks me out of the system and I cannot seem to disable it using Drush so investigating this is a bit of a problem.
That I can break the system so easily is surely 'bad'.
I must be missing something incredibly obvious on phpmailer, so if anybody has any favourite tutorials/examples on setting up and usinng Phpmailer let me know!
Paul
Comment #7
brunorios1 CreditAttribution: brunorios1 commentedsame here when enabled with "drush en"...
works ok when enabling via admin interface.
Comment #8
amcat CreditAttribution: amcat commentedI have a similar problem and I can not get into PA:
Fatal error: Class 'PHPMailer' not found in /customers/8/e/e/.............de/httpd.www/sites/all/modules/phpmailer/includes/phpmailer.class.inc on line 12
Comment #8.0
amcat CreditAttribution: amcat commenteddo you know if you include text as "< text > " the editor drops it? I didnt
Comment #9
sahaj CreditAttribution: sahaj commentedHi,
having the same issue here, installing phpmailer the same way as on other sites on a commerce kickstart project leading to this php fatal error.
Any insight?
Comment #10
wardevour CreditAttribution: wardevour commentedHas anyone found the answer? I've installed libraries API and PHPMailer like I always do and I get this same error. If I alter PHPMailer's code to include the two classes manually and put them in includes dir will it work? I feel like this is an issue with Libraries API...
Comment #11
gl2748 CreditAttribution: gl2748 commentedI am having the same issue site is WSOD.
Trying to 'drush dis phpmailer' 'drush en phpmailer' 'drush cc all' and any drush related commands gets.
The output from my site's error log at: /var/log/nginx/
tail mysite.com_error.log
My site is running in a docker container, could the issue be with symlinks similar and the solution similar to #6 here:
https://www.drupal.org/node/1534706
Thanks.
Comment #12
maynn123 CreditAttribution: maynn123 commentedSame issue. I've tried a lot of things and nothing happens. How come no one knows the answer? Ive seen so many issues on this with no clear solution :(
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedwas about to try this module but thanks to everyone's comments i will stick to SMTP auth
Comment #14
dashohoxha CreditAttribution: dashohoxha as a volunteer commentedI had this error as well. But once I fixed the other Drupal errors, this one went away as well.
So, it seems to be caused by Drupal malfunctioning due to some other problems.
Comment #15
oadaeh CreditAttribution: oadaeh as a volunteer commentedThanks to dashohoxha posting, I'm looking at this issue again, and the error posted in #11 (which prompted me to re-read the description):
is for a file that comes with this module, i.e., it should be in the .tar.gz or .zip file you get from the download from https://www.drupal.org/project/phpmailer. It is not part of the PHPMailer library.
So, make sure that file is there and did not get moved or deleted.
There are different but very similar filenames, and they should be like so:
From this module (from here: https://www.drupal.org/project/phpmailer):
From the PHPMailer library (from here: https://github.com/PHPMailer/PHPMailer):
Comment #16
dashohoxha CreditAttribution: dashohoxha as a volunteer commentedIt seems that Drupal is confused somehow (when something is not OK), and it fails to load the library file 'class.phpmailer.php'. As a result the class 'PHPMailer' is undefined and we get a PHP error.
Maybe this is related to the way that the library is loaded by the module, maybe it is a bit outdated or deprecated.
Comment #17
oadaeh CreditAttribution: oadaeh as a volunteer commentedI'm closing old issues. If this is still a problem, please reopen it with updated information.