swoole-src icon indicating copy to clipboard operation
swoole-src copied to clipboard

用cygwin安装的php7.3 编译的时候报错

Open happyyyyyyyyy opened this issue 5 months ago • 1 comments

/swoole-src-4.8.x/ext-src/swoole_http_response.cc: In function ‘void php_swoole_http_response_cookie(zend_execute_data*, zval*, bool)’: /swoole-src-4.8.x/ext-src/swoole_http_response.cc:1055:45: error: ‘php_time’ was not declared in this scope; did you mean ‘php_mktime’? 1055 | double diff = difftime(expires, php_time()); | ^~~~~~~~ | php_mktime make: *** [Makefile:227: ext-src/swoole_http_response.lo] Error 1

happyyyyyyyyy avatar Jun 07 '25 05:06 happyyyyyyyyy

需要检查有没有php_date.h这个头文件存在,或者头文件是否存在php_time()

NathanFreeman avatar Jun 07 '25 14:06 NathanFreeman

建议使用 swoole-cli

php 7.4 , swoole 4.8 已经停止维护了

matyhtf avatar Jun 19 '25 11:06 matyhtf