Support » Plugin: WP eCommerce » Help, Braintree requires xmlwriter error

  • Hi,

    I’m getting the below errors after installing your plugin. My site goes completely down when the plugin is activated.

    My Setup:
    -Wordpress Version: 4.9.8
    -PHP Version: PHP7.0
    -xmlwriter is installed
    -OS Ubuntu 16.04

    Fatal error: Uncaught Braintree\Exception: The Braintree library requires the xmlwriter extension. in /var/www/wordpress/

    Stack Trace
    WPEC_Braintree_Hel in /var/www/wordpress/ on line 18

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Justin Sainton


    Hi @fivestarg!

    Is it possible for you to enable XMLWriter in PHP, or ask your host to do so for you? That would be the way to fix this. I noticed you said it was installed – but the Braintree code running here is doing a simple extension_loaded( 'xmlwriter' ) check – so if it is loaded, there’s something deeper at a server level here to uncover.

    Thank for the quick reply!

    I did have to install php7.0-xml as it was not installed.
    The I added the extension setting in php.ini and checked the install.

    this command: php -i | grep “xml” give me the following output

    php -i | grep “xml”
    xmlrpc_error_number => 0 => 0
    xmlrpc_errors => Off => Off
    libxml Version => 2.9.3
    Simplexml support => enabled
    libxml2 Version => 2.9.3
    libxslt compiled against libxml Version => 2.9.3

    the extension is enabled (

    I have full control. It is on a VPS with root access

    I just cant understand what dependencies I could be missing

    • This reply was modified 1 year, 7 months ago by fivestarg.
    • This reply was modified 1 year, 7 months ago by fivestarg.

    I figured it out. I had to also install php-curl

    then after a reboot the plugin activated successfully!

    Thanks for the help though

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help, Braintree requires xmlwriter error’ is closed to new replies.