helloxz / imgurl

ImgURL是一个简单、纯粹的图床程序,让个人图床多一个选择。
https://www.imgurl.ink/
GNU General Public License v3.0
1.75k stars 395 forks source link

压缩500错误 #10

Open chi-yuer opened 6 years ago

chi-yuer commented 6 years ago

使用TinyPNG API 的时候报了 500 错误

helloxz commented 6 years ago

检查config.php API 密钥这些设置正确没有 可编辑php.ini开启详细报错查看一下

chi-yuer commented 6 years ago

Fatal error: Uncaught Tinify\ClientException: Unable to connect: unable to verify the first certificate (HTTP 400/Source not found) in /imgurl/functions/tinypng/Tinify/Exception.php:20 Stack trace: #0 /imgurl/functions/tinypng/Tinify/Client.php(135): Tinify\Exception::create('Unable to conne...', 'Source not foun...', 400) #1 /imgurl/functions/tinypng/Tinify/Source.php(19): Tinify\Client->request('post', 'https://api.tin...', '{"error":"Sourc...') #2 /imgurl/functions/tinypng/Tinify.php(84): Tinify\Source::fromUrl('https://imgurl....') #3 /imgurl/dispose.php(60): Tinify\fromUrl('https://imgurl....') #4 {main} thrown in/imgurl/functions/tinypng/Tinify/Exception.php on line 20

helloxz commented 6 years ago
  1. 检查config.php 域名设置正确没有,API KEY写的几个,最后最后多了一个逗号
  2. functions/tinypng/data/cacert.pem 看下这个文件是否存在
chi-yuer commented 6 years ago
  1. functions/tinypng/data/cacert.pem 看下这个文件存在
  2. config.php 之前填的反代的域名,但是改成自定义端口也不行
  3. config.php 中 API KEY 只填了一个,已经把逗号删掉了
helloxz commented 6 years ago

访问 http://xxx.com/check.php 填写看到的域名,检查和配置文件里面的域名是否一致.

chi-yuer commented 6 years ago

已经是一致的,还是没有用