imgurl
imgurl copied to clipboard
压缩500错误
使用TinyPNG API 的时候报了 500 错误
检查config.php
API 密钥这些设置正确没有
可编辑php.ini
开启详细报错查看一下
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
- 检查
config.php
域名设置正确没有,API KEY写的几个,最后最后多了一个逗号 -
functions/tinypng/data/cacert.pem
看下这个文件是否存在
-
functions/tinypng/data/cacert.pem
看下这个文件存在 -
config.php
之前填的反代的域名,但是改成自定义端口也不行 -
config.php
中 API KEY 只填了一个,已经把逗号删掉了
访问 http://xxx.com/check.php
填写看到的域名,检查和配置文件里面的域名是否一致.
已经是一致的,还是没有用