2014-09-23 52 views
0

我想實現條帶API的基本功能,當我需要Stripe.php文件時,由於某種原因,我得到500內部服務器錯誤...當我評論在需要出錯誤消失,但顯然我不能使用API​​的話..獲取500條帶的內部服務器錯誤

基本要求......顯示錯誤的模態登錄

require_once('/php/Stripe.php'); 

我檢查了服務器錯誤,它給了我這個back

Fatal error: Uncaught exception 'Exception' with message 'Stripe needs the Multibyte String PHP extension.' in /php/Stripe.php:13 Stack trace: #0 /home/stripepost.php(4): require_once() #1 {main} thrown in /php/Stripe.php on line 13 

這一切都來自只需要該文件..

+2

PHP中的500錯誤意味着_go檢查Web服務器的錯誤LOG_。那裏的錯誤將會更加詳細。總是在開發或測試代碼時,啓用PHP的錯誤顯示。在腳本的頂部:'error_reporting(E_ALL); ini_set('display_errors',1);'和致命的錯誤將被打印到你的屏幕上。 – 2014-09-23 16:14:28

+0

你致命的錯誤是它不能找到該文件,因爲絕對路徑不存在。 – Ohgodwhy 2014-09-23 16:15:38

回答

0

我找到了答案,我沒有我的服務器上啓用的MBSTRING ... whooops

+0

如果您使用composer,將會檢查依賴關係 - https://github.com/stripe/stripe-php/blob/master/composer.json 另請參閱https://getcomposer.org/ – 2014-10-06 09:26:12

0

您的'Stripe.php'文件是否真的位於'/ php'或它是否在您的代碼本地的名爲'php'文件夾?

當前代碼:

require_once('/php/Stripe.php'); 

我覺得這個問題是這樣的。您可能的意思是使用相對於您的代碼庫的東西。就像這樣:

require_once('./php/Stripe.php');