简体   繁体   English

使用Stripe获取500内部服务器错误

[英]Getting 500 Internal Server Error with Stripe

I am trying to implement basic functionality of the Stripe API, I get 500 Internal Server Error for some reason when I require the Stripe.php file that you have to require...When I comment the require out the error goes away but obviously I can not use the API then.. 我正在尝试实现Stripe API的基本功能,由于某些原因,当我需要您需要的Stripe.php文件时,由于某些原因,我收到500 Internal Server Error ...当我评论require out时,错误消失了,但显然我不能使用该API。

Basic require...shows error in the Modal Log 基本要求...在模态日志中显示错误

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

I checked the server error and it gave me this 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

This all comes from just requiring the file.. 所有这些都只需要文件即可。

Is your 'Stripe.php' file really located in '/php' or is it in a folder called 'php' local to your code? 您的“ Stripe.php”文件确实位于“ / php”中,还是位于代码本地的名为“ php”的文件夹中?

Current code: 当前代码:

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

I think the problem is this. 我认为问题是这样的。 You probably mean to use something relative to your code base. 您可能打算使用与您的代码库相关的内容。 Like this: 像这样:

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

我找到了答案,我的服务器上没有启用mbstring ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM