Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在新浪SAE平台上的部署问题 #63

Closed
baidut opened this issue Jul 19, 2015 · 4 comments
Closed

在新浪SAE平台上的部署问题 #63

baidut opened this issue Jul 19, 2015 · 4 comments

Comments

@baidut
Copy link

baidut commented Jul 19, 2015

Fatal error: Uncaught exception 'Overtrue\Wechat\Exception' with message '
[Wechat]读取输入失败,请在 php.ini 中打开 always_populate_raw_post_data=On' 
in /data1/www/htdocs/152/a327/1/third_party/Wechat/Server.php:200 
Stack trace: #0 /data1/www/htdocs/152/a327/1/third_party/Wechat/Server.php(160): 
Overtrue\Wechat\Server->prepareInput() #1 /data1/www/htdocs/152/a327/1/wechat.php(20): 
Overtrue\Wechat\Server->serve() #2 {main} thrown in third_party/Wechat/Server.php on line 200

新浪的SAE下开发有一定限制,不能修改php.ini 想要部署在SAE上有解决的办法么?

@overtrue
Copy link
Collaborator

@baidut 请问是用的什么方式在访问。

@baidut
Copy link
Author

baidut commented Jul 19, 2015

感谢回复!是这样的,按照说明下载了最新的2.0.27版本,上传到SAE的服务器上后,
代码如下

<?php
require __DIR__ . "/autoload.php";

use Overtrue\Wechat\Server;
use Overtrue\Wechat\Message;

$appId          = 'XXX'; 
$token          = 'XXX'; 
$encodingAESKey = 'XXX'; // 可选
$server = new Server($appId, $token, $encodingAESKey);

$server->serve();

微信验证token失败,于是就直接用浏览器访问了一下这个页面,出现上面的出错信息,可能是SAE的服务器限制问题,不知道能不能解决

@overtrue
Copy link
Collaborator

@cos800
Copy link

cos800 commented Nov 2, 2015

所以是不支持SAE喽?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants