When I run following program from commandline on CentOS 6.4, I get the 
expected results but when I run it as Apache cgi, I error Couldn't store 
key: SYSTEM ERROR error. I am running Memcached, Apache and program through 
the same user. 

What could I be doing wrong ?

  if (rc == MEMCACHED_SUCCESS)
            printf("Key stored successfully\n");
        else
        printf("Couldn't store key: %s\n",memcached_strerror(memc, rc));

        char *keys[]= {"keystring", "keystring1"};
        size_t key_length[]= {9, 10};
        unsigned int x;
        uint32_t flags;

        char return_key[MEMCACHED_MAX_KEY];
        size_t return_key_length;
        char *return_value;
        size_t return_value_length;

        rc= memcached_mget(memc, keys, key_length, 2);

        x= 0;

     if (rc == MEMCACHED_SUCCESS)
      {
            while ((return_value= memcached_fetch(memc, return_key, 
&return_key_length,
                                              &return_value_length, &flags, 
&rc)))
            {
                if (rc == MEMCACHED_SUCCESS)
                {
                  printf("Key %s returned %s\n",return_key, return_value);
                }
            }
        }

        return 0;
    }

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to