Uncaught Error: Call to undefined function putenv() /wp-content/plugins/woocommerce/includes/class-wc-regenerate-images-request.php:37

Fatal error: Uncaught Error: Call to undefined function putenv() in /www/wwwroot/wp-content/plugins/woocommerce/includes/class-wc-regenerate-images-request.php:37

这个错误,导致一直维护的woocommerce商店不能启用PHP8及以上。

解决方案:

宝塔面板,PHP配置中,删除这个函数限制 。

Warning: curl_setopt_array(): cannot represent a stream of type Output as a STDIO FILE

Warning: curl_setopt_array(): cannot represent a stream of type Output as a STDIO FILE* in \aliyun\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 70
注释掉: ->debug(true) // Enable the debug will output detailed information 这行就解决了。