由于要使用guzzle发送json数据 ,请求正文是一张图片的base64数据,2.8Mb左右,尝试过如果随便输入字符几个一下子发送;但是真正打包数据发送则会卡住curl一直不返回。

于是通过尝试使用curl发送也一样,后来想到了修改curl的配置,分别设置如下curl配置,则可以马上执行。

CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_0, // 使用1.0的http版本
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4 ,
CURLOPT_HTTPHEADER => array('Expect: '),

首先配置配置php命令行,

安装xdebug, 如果要在postman调试,那么要在postman的get参数加上如下图所示

XDEBUG_SESSION_START = PHPSTORM

php7.4的xdebug配置如下

[XDebug]
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir ="D:\BtSoft\temp\xdebug"
xdebug.trace_output_dir ="D:\BtSoft\temp\xdebug"
xdebug.profiler_output_name = "cache.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
zend_extension=php_xdebug.dll