• Resolved ThomasKlein

    (@thomasklein)


    Hello,
    that is a fresh install.

    On a post: https://108.61.210.226/hello-world/
    I get the following header:
    X-Cache-Engine: WP-FFPC with memcached via PHP

    But on the homepage: https://108.61.210.226/
    I get only a blank page and the following header:
    X-Cache-Engine: not cached

    I use your plugin with nginx and php memcached.

    Here is my nginx-conf:

    upstream memcached-servers {
      server 127.0.0.1:11211;
    }
    
    upstream php-fpm {
      server 127.0.0.1:9000;
    }
    
    server {
      listen 80 default_server;
      listen [::]:80 default_server ipv6only=on;
    
      root /var/www/html;
      index index.php index.html index.htm;
    
      server_name _;
    
      location / {
          try_files $uri $uri/ /index.php?q=$uri&$args;
      }
    
      location ~ \.php$ {
    
        fastcgi_split_path_info ^(.+\.php)(/.+) $;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    
        default_type text/html;
        set $memcached_key data-$scheme://$host$request_uri;
        set $memcached_request 1;
    
        if ($request_method = POST)
        {
          set $memcached_request 0;
        }
    
        if ($uri ~"/wp-")
        {
            set $memcached_request 0;
        }
    
        if ($args)
        {
            set $memcached_request 0;
        }
        if ($http_cookie ~* "comment_author_|wordpressuser_|wp-postpass_|wordpress_logged_in_")
        {
            set $memcached_request 0;
        }
    
        if ($memcached_request = 1)
        {
          add_header X-Cache-Engine "WP-FFPC with memcached via nginx";
          memcached_pass memcached-servers;
          error_page 404 = @nocache;
          break;
        }
        fastcgi_pass unix:/var/run/php5-fpm.sock;
      }
    
      location @nocache {
          add_header X-Cache-Engine "not cached";
          fastcgi_pass unix:/var/run/php5-fpm.sock;
      }
    }

    Thank you in advance
    Thomas

    https://www.ads-software.com/plugins/wp-ffpc/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Best guess on looking at your nginx setup:
    fastcgi_split_path_info ^(.+\.php)(/.+) $;

    The space between last ) and $ is breaking your script_name recognition.

    Try with
    fastcgi_split_path_info ^(.+\.php)(/.+)$;

    Thread Starter ThomasKlein

    (@thomasklein)

    Thank you for your help, it was a formatting error.

    The problem still exists.

    Did you a) reload/restart nginx and b) flush the memcache server after making the fix?

    Plugin Author petermolnar

    (@cadeyrn)

    Hey,

    What’s in the error log?

    Thread Starter ThomasKlein

    (@thomasklein)

    @aizar
    restarted nginx: service nginx restart
    flushed memcache server: echo 'flush_all' | nc localhost 11211
    Problem still exists.

    @petermolnar

    nginx/error.log

    2014/12/16 16:47:16 [error] 19502#0: *45 FastCGI sent in stderr: "PHP message: PHP Warning:  wp-ffpc not clearing unidentified post  in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 126" while reading response header from upstream, client: 80.187.100.33, server: _, request: "POST /wp-admin/options-general.php?page=wp-ffpc-settings&flushed=true HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "108.61.210.226", referrer: "https://108.61.210.226/wp-admin/options-general.php?page=wp-ffpc-settings&flushed=true"
    
    2014/12/16 16:49:40 [error] 19502#0: *67 FastCGI sent in stderr: "PHP message: PHP Warning:  wp-ffpc not clearing unidentified post  in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 126" while reading response header from upstream, client: 80.187.100.33, server: _, request: "POST /wp-admin/options-general.php?page=wp-ffpc-settings&precached=true HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "108.61.210.226", referrer: "https://108.61.210.226/wp-admin/options-general.php?page=wp-ffpc-settings&precached=true"

    Precache log

    permalink	                           generation time (s) size ( kbyte )
    https://108.61.210.226/hello-world/	                0.04	       10.97
    https://108.61.210.226/sample-page/	                0.04	        9.92
    https://108.61.210.226/category/uncategorized/           0.02	        7.51
    PHP Warning: file_get_contents(https://108.61.210.226/uncategorized/): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
    in /tmp/wp-ffpc-precache.php on line 14
    https://108.61.210.226/uncategorized/	                0.02	           0

    WordPress with WP_DEBUG

    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc init starting in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc 127.0.0.1:11211 added in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc checking server statuses in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc 127.0.0.1:11211 server is up & running in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc checking server statuses in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc 127.0.0.1:11211 server is up & running in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc original key configuration: $scheme://$host$request_uri in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc setting key to: meta-https://108.61.210.226/hello-world/ in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc get meta-https://108.61.210.226/hello-world/ in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc failed to get entry: meta-https://108.61.210.226/hello-world/ in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Warning:  mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50540 Library:100015 in /var/www/html/wp-includes/wp-db.php on line $
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  PluginUtils  – getting option wp-ffpc in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc init starting in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc 127.0.0.1:11211 added in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc checking server statuses in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc 127.0.0.1:11211 server is up & running in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc clearing scheduled hook wp-ffpc-precache-task in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc original key configuration: $scheme://$host$request_uri in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc setting key to: meta-https://108.61.210.226/hello-world/ in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line 131
    [16-Dec-2014 17:28:13 UTC] PHP Notice:  wp-ffpc set meta-https://108.61.210.226/hello-world/ expiration time: 300 in /var/www/html/wp-content/plugins/wp-ffpc/wp-common/plugin_utils.php on line$
    Plugin Author petermolnar

    (@cadeyrn)

    I’m not sure, but it might be the case:

    location ~ \.php$ {
    
        fastcgi_split_path_info ^(.+\.php)(/.+) $;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    The fastcgi information is missing in:

    location @nocache {
          add_header X-Cache-Engine "not cached";
          fastcgi_pass unix:/var/run/php5-fpm.sock;
      }

    Could you try adding the fastcgi params to the @nocache location as well?

    I′m maybe a bit late, since this thread is older, but i had the ?blank page problem“ as well and solved ist with this line of code:
    fastcgi_cache_key $host$request_method$request_uri;

    By the way, the best cache plugin for me!

    Plugin Author petermolnar

    (@cadeyrn)

    Thank you for posting the solution!

    This took me awhile to figure out. It was strange, the WP site worked but trying to run a phpinfo check, <?php php.info(); ?>, just returned a blank page.

    But this solved my problem:

    location @nocache {
    add_header X-Cache-Engine “not cached”;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    include fastcgi_params;
    }

    and my fastcgi_params file contains the following:

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;

    fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    fastcgi_param REQUEST_URI $request_uri;
    fastcgi_param DOCUMENT_URI $document_uri;
    fastcgi_param DOCUMENT_ROOT $document_root;
    fastcgi_param SERVER_PROTOCOL $server_protocol;
    fastcgi_param HTTPS $https if_not_empty;

    fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

    fastcgi_param REMOTE_ADDR $remote_addr;
    fastcgi_param REMOTE_PORT $remote_port;
    fastcgi_param SERVER_ADDR $server_addr;
    fastcgi_param SERVER_PORT $server_port;
    fastcgi_param SERVER_NAME $server_name;

    # PHP only, required if PHP was built with –enable-force-cgi-redirect
    fastcgi_param REDIRECT_STATUS 200;

    fastcgi_index index.php;
    fastcgi_connect_timeout 10;
    fastcgi_send_timeout 180;
    fastcgi_read_timeout 180;
    fastcgi_buffer_size 512k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 512k;
    fastcgi_temp_file_write_size 512k;
    fastcgi_intercept_errors on;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    fastcgi_keep_conn on;

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Blank homepage, but other sites working’ is closed to new replies.