imgurl icon indicating copy to clipboard operation
imgurl copied to clipboard

压缩500错误

Open chi-yuer opened this issue 6 years ago • 6 comments

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

chi-yuer avatar May 07 '18 07:05 chi-yuer

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

helloxz avatar May 07 '18 12:05 helloxz

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

chi-yuer avatar May 07 '18 14:05 chi-yuer

  1. 检查config.php 域名设置正确没有,API KEY写的几个,最后最后多了一个逗号
  2. functions/tinypng/data/cacert.pem 看下这个文件是否存在

helloxz avatar May 07 '18 14:05 helloxz

  1. functions/tinypng/data/cacert.pem 看下这个文件存在
  2. config.php 之前填的反代的域名,但是改成自定义端口也不行
  3. config.php 中 API KEY 只填了一个,已经把逗号删掉了

chi-yuer avatar May 07 '18 14:05 chi-yuer

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

helloxz avatar May 07 '18 14:05 helloxz

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

chi-yuer avatar May 07 '18 14:05 chi-yuer