Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Cannot redeclare class PHPMailer error
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Cannot redeclare class PHPMailer error

Cannot redeclare class PHPMailer error 8 years, 1 month ago #25730

I have an issue with the plugin which gives me an error
Cannot redeclare class PHPMailer in /public_html/libraries/phpmailer/phpmailer.php on line 34

I have no other mailing plugins in play.

When I tried to copy you phpmail.php file with is version 5 to Joomla, it works but my Confirmation page is without template container.

If you keep deleting this post I will keep adding it until you tell me why it shouldn't be posted.
The topic has been locked.

Re: Cannot redeclare class PHPMailer error 8 years, 1 month ago #25731

  • jaku
  • OFFLINE
  • Posts: 2697
ARTIO Support Team
The topic has been locked.

Re: Cannot redeclare class PHPMailer error 8 years, 1 month ago #25869

I created a work around by wrapping all the code(inside the <?php ?> tags) in the phpmailer.php file with:

if (!class_exists ( phpmailer)) {
original contents
}

Hope this helps if anyone else comes across this.
Last Edit: 8 years, 1 month ago by BodgeIT.
The topic has been locked.

Re: Cannot redeclare class PHPMailer error 8 years, 1 month ago #25873

  • jaku
  • OFFLINE
  • Posts: 2697
Hello,
that is of course possible and solution that will work fine.

However, it would be even better to remove the problem at the source... which is most likely some VM shipping or payment method code, that call phpmailer declaration regardless if it is already declared.
ARTIO Support Team
The topic has been locked.

Re: Cannot redeclare class PHPMailer error 8 years, 1 month ago #25875

I am only using one virtuemart addon, a payment process component called PayPal Pro US www.virtuemart-solutions.com/index.php?p...uemart&Itemid=5. Having contacted them they are adamant, as you are, that the issue is not theirs.

As a humble site builder(not coder) stuck in the middle, I just try to come up with workable solutions.
Last Edit: 8 years, 1 month ago by BodgeIT.
The topic has been locked.
  • Page:
  • 1
User Login Empty