2017-05-17 10 views
0

내 웹 사이트에서 지불을 허용하기 위해 braintree를 사용하고 있습니다. 내가 구매를 위해보기를 열려고 할 때이 오류가 얻을 :XMLWriter가 braintree에로드되지 않습니다.

Exception in Braintree.php line 20: The Braintree library requires the xmlwriter extension.

을이 내 Braintree.php 파일입니다

<?php 
/** 
* Braintree PHP Library 
* Creates class_aliases for old class names replaced by PSR-4 Namespaces 
* 
* @copyright 2015 Braintree, a division of PayPal, Inc. 
*/ 

require_once(__DIR__ . DIRECTORY_SEPARATOR . 'autoload.php'); 

if (version_compare(PHP_VERSION, '5.4.0', '<')) { 
    throw new Braintree_Exception('PHP version >= 5.4.0 required'); 
} 


function requireDependencies() { 
    $requiredExtensions = ['xmlwriter', 'openssl', 'dom', 'hash', 'curl']; 
    foreach ($requiredExtensions AS $ext) { 
     if (!extension_loaded($ext)) { 
      throw new Braintree_Exception('The Braintree library requires the ' . $ext . ' extension.'); 
     } 
    } 
} 

requireDependencies(); 

내가 이미 XmlWriter를하고 libxml가 활성화되어 확인하고 내 프로젝트에 설치되고 모든 것이 해결됩니다. 그래서 나는 무엇을 해야할지 모르겠다. 왜 이런 일이 일어나는 지 알고 싶습니까?

어떤 도움은 매우 apreciatted됩니다 :)

답변

4

첫째, XMLWriter가 PHP는 모듈이이 선을 표시해야

php -i | grep "xml"

sudo apt-get update

sudo apt-get install php7.0-xml 반드시 설치되어 있는지 확인 xmlwriter

은 당신의 경로가 올바른지 확인, 오류가 failed to open stream입니다 경우 오류가 sudo cat /var/log/nginx/error.log

를 기록하십시오.

오류 메시지는 더 많은 방향을 제시합니다.

+0

확인. 고맙습니다. :) –

+0

경로를 어떻게 확인할 수 있습니까? 제 말은 많은 디렉토리가 있다는 것입니다. 모든 확장 기능은 어디에 있습니까? –

+0

@ G.Rocha'braintree.php' 파일을 방문 할 때 서버 로그에 오류가 발생합니까? 어떤 설정을 사용하고 있습니까? (방금 내 대답에 nginx 가정) – Caffeineli