• It seems there are issues clearing fastcgi_cache (using path) with PHP 8+. Might be for other clearing methods as well.. but that is what I noticed. I believe it is due to the deprecated use of arrays.

    2022/02/27 16:29:58 [error] 39#39: *811 FastCGI sent in stderr: “PHP message: PHP Warning: foreach() argument must be of type array|object, bool given in /siteroot/wp-content/plugins/nginx-cache/nginx-cache.php on line 210” while reading response header from upstream, client: 10.10.10.1, server: servername, request: “GET /wp-admin/ HTTP/1.1”, upstream: “fastcgi://10.11.0.1:9000”, host: “urlhere”, referrer: “urlhere”

    • This topic was modified 2 years, 9 months ago by dethknite.
Viewing 1 replies (of 1 total)
  • Thread Starter dethknite

    (@dethknite)

    Fixed it for you… it is the fact that the array could be null.. and there were no checks. nginx-cache.php, Line 210:

    if (is_array($list) || is_object($list))
    		{
    			foreach ( $list as $item ) {
    
    				// abort if file is not a MD5 hash
    				if ( $item[ 'type' ] === 'f' && ( strlen( $item[ 'name' ] ) !== 32 || ! ctype_xdigit( $item[ 'name' ] ) ) ) {
    					return false;
    				}
    
    				// validate subdirectories recursively
    				if ( $item[ 'type' ] === 'd' && ! $this->validate_dirlist( $item[ 'files' ] ) ) {
    					return false;
    				}
    
    			}
    		}
Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8 and 8.1’ is closed to new replies.