2014-09-23 92 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');