Comments (15)
这可能是你的 PHP 配置是显示 Warning 。
我刚更新了 init.php
文件,忽略显示 Warning,可以覆盖下试试。
from disqus-php-api.
认证出错,使用那个邮箱和密码是可以登录进去,在网页上可以登录进去,然后也改了密码尝试。也不行,是不是需要disqus哪里配置什么呢
from disqus-php-api.
Disqus 那边应该没什么问题。还没折腾过 Docker,看起来有可能你的 Docker /tmp
目录不存在,或者没写的权限。
from disqus-php-api.
那可能是这个问题吧,不过使用了docker 搭建 php,上传文件是可以的,是不是可以说明有读写权限。
from disqus-php-api.
嗯,还可能会有另一个原因,就是你的 PHP 没有配置 cURL 扩展。
from disqus-php-api.
我试了下
<?php
// 使用 sys_get_temp_dir() 在目录里创建临时文件
$temp_file = tempnam(sys_get_temp_dir(), 'Tux');
echo $temp_file;
?>
可以创建文件的,是不是说明有权限,对了我的服务器在墙内。
好像发现问题了,我使用这段代码测试
<?php
$ch = curl_init();
//设置选项,包括URL
curl_setopt($ch, CURLOPT_URL, "https://baidu.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
//执行并获取HTML文档内容
$output = curl_exec($ch);
//释放curl句柄
curl_close($ch);
//打印获得的数据
print_r($output);
?>
Parse error: syntax error, unexpected '$ch' (T_VARIABLE) in /var/www/html/disqus/aa.php on line 2
from disqus-php-api.
权限应该没问题,可能是 cURL 的问题,找一下 php.ini
文件,看看 extension=php_curl.dll
是否被注释了。
from disqus-php-api.
经过多个测试,CURL 是有用的。
<?php
//初始化
$curl = curl_init();
//设置抓取的url
curl_setopt($curl, CURLOPT_URL, 'http://www.baidu.com');
//设置头文件的信息作为数据流输出
curl_setopt($curl, CURLOPT_HEADER, 1);
//设置获取的信息以文件流的形式返回,而不是直接输出。
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
//执行命令
$data = curl_exec($curl);
//关闭URL请求
curl_close($curl);
//显示获得的数据
print_r($data);
?>
然后我把api 部署到了一个虚拟主机里面,也是不行的
from disqus-php-api.
会不会是因为服务器在墙内的原因
from disqus-php-api.
当服务器在墙内时 config.php
的设置项 GFW_INSIDE
设为 true
。
from disqus-php-api.
from disqus-php-api.
@aimuz 我刚用阿里云国内虚机试了一下,确实是连不上的原因,最近网络环境差不少……
from disqus-php-api.
from disqus-php-api.
你可以试试,我目前部署在阿里云的香港 VPS 上面,一切正常。
from disqus-php-api.
部署在墙外OK了
from disqus-php-api.
Related Issues (20)
- 点击登录后弹出Invalid Request: Invalid parameter: redirect_uri (should match predefined callback URI) HOT 1
- get_ip函数不支持IPv6地址 HOT 1
- 无法显示被隐藏的回复
- now.sh v2 不再支持docker部署,能否更新以兼容v2? HOT 2
- 无法正确在now.json部署 HOT 1
- 添加now.json缺失的文件 HOT 1
- 加载错误 HOT 1
- 如何关掉上传图片功能,直接改js? HOT 1
- 匿名头像 `noavatar92.png` 404 Not Found HOT 1
- heroku上成功部署,也能加载demo,但是在hexo网站上一直显示“正在初始化”的动画 HOT 2
- Nginx上一直显示“正在初始化” HOT 1
- 有没有办法部署到阿里云的函数计算上 HOT 3
- 建议加入延迟加载的功能 HOT 1
- App 设置问题?
- 提交失败,请稍后重试,错误代码:12 HOT 1
- 翻墙可以访问但是墙内无法访问
- 使用简易评论框时无法登录
- 一直转圈,显示正在初始化,右键检查错误iDisqus.min.js:11 HOT 2
- 查询字符串的访问链接会创建新的 thread
- 部署失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disqus-php-api.