Open kakuilan opened 4 years ago
对比了下PHP7.4的代码,里面zend_stream_type这个枚举类型跟以前不一样了,没有了ZEND_HANDLE_FD这个类型。我目前的解决方案是把beast.c里面
` if (h->type == ZEND_HANDLE_FP) fclose(h->handle.fp); if (h->type == ZEND_HANDLE_FD) close(h->handle.fd);
/*
* Get file handler and free context
*/
switch (default_file_handler->type) {
case BEAST_FILE_HANDLER_FP:
h->type = ZEND_HANDLE_FP;
h->handle.fp = default_file_handler->get_fp(default_file_handler);
break;
case BEAST_FILE_HANDLER_FD:
h->type = ZEND_HANDLE_FD;
h->handle.fd = default_file_handler->get_fd(default_file_handler);
break;
}
`
注释掉了部分代码,变成以下的代码,编译过去了。准备测一下好不好用。
` if (h->type == ZEND_HANDLE_FP) fclose(h->handle.fp); //if (h->type == ZEND_HANDLE_FD) close(h->handle.fd);
/*
* Get file handler and free context
*/
switch (default_file_handler->type) {
case BEAST_FILE_HANDLER_FP:
h->type = ZEND_HANDLE_FP;
h->handle.fp = default_file_handler->get_fp(default_file_handler);
break;
//case BEAST_FILE_HANDLER_FD:
//h->type = ZEND_HANDLE_FD;
//h->handle.fd = default_file_handler->get_fd(default_file_handler);
//break;
}
`
改下来好用吗?
@shushenghong 目前一个线上项目用下来,没有发现什么问题。
@kakuilan 已解决 #136