xorred
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] memcached not workingyep. Overall I think this thread can be closed. Thanks a LOT for your help so far!
Forum: Plugins
In reply to: [LiteSpeed Cache] memcached not workingAlso, changed your code to reflect a socket connection and now it works (seems to)
$mem = new Memcached(); #$mem->addServer("127.0.0.1", 0); $mem->addServer('/var/www/memcached.sock',0); //$mem->connect("/var/www/memcached.sock", 0); $mem->set('key1', 'This is first value', 60); $val = $mem->get('key1'); echo "Get key1 value: " . $val ."<br />"; $mem->replace('key1', 'This is replace value', 60); $val = $mem->get('key1'); echo "Get key1 value: " . $val . "<br />"; $arr = array('aaa', 'bbb', 'ccc', 'ddd'); $mem->set('key2', $arr, 60); $val2 = $mem->get('key2'); echo "Get key2 value: "; print_r($val2); echo "<br />"; $mem->delete('key1'); $val = $mem->get('key1'); echo "Get key1 value: " . $val . "<br />"; $mem->flush(); $val2 = $mem->get('key2'); echo "Get key2 value: "; print_r($val2);
Forum: Plugins
In reply to: [LiteSpeed Cache] memcached not workingThought to share the memcached conf here: (ps. I *JUST* changed the port to 0, figured out 11211 was wrong. Output of the test file is still the same…
# memcached default config file # 2003 - Jay Bonci <[email protected]> # This configuration file is read by the start-memcached script provided as # part of the Debian GNU/Linux distribution. # Run memcached as a daemon. This command is implied, and is not needed for the # daemon to run. See the README.Debian that comes with this package for more # information. -d # Log memcached's output to /var/log/memcached logfile /var/log/memcached.log # Be verbose -v # Be even more verbose (print client commands as well) # -vv # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default # Note that the daemon will grow to this size, but does not start out holding this much # memory -m 128 # Default connection port is 11211 -p 0 # Run the daemon as root. The start-memcached will default to running as root if no # -u command is present in this config file -u www-data # Specify which IP address to listen on. The default is to listen on all IP addresses # This parameter is one of the only security measures that memcached has, so make sure # it's listening on a firewalled interface. -l 127.0.0.1 # Limit the number of simultaneous incoming connections. The daemon default is 1024 # -c 1024 # Lock down all paged memory. Consult with the README and homepage before you do this # -k # Return error when memory is exhausted (rather than removing items) # -M # Maximize core file limit # -r # Use a pidfile -P /var/run/memcached/memcached.pid -s /var/www/memcached.sock -a 0766 -p /tmp/memcached.pid
Forum: Plugins
In reply to: [LiteSpeed Cache] memcached not workingphp user is www-data
permissions on the sock file:
srwxrwx— 1 www-data www-data 0 Aug 18 16:27 memcached.sockForum: Plugins
In reply to: [LiteSpeed Cache] memcached not workingGet key1 value: Get key1 value: Get key2 value: Array ( [0] => aaa [1] => bbb [2] => ccc [3] => ddd ) Get key1 value: Get key2 value:
This is the file’s output.
Forum: Plugins
In reply to: [LiteSpeed Cache] memcached not working@qtwrk – can you please clarify how I could make sure of that besides the ls -lah, showing the right permissions, same as the webserver and Memcached ‘-u’ user switch? Is there a test I could run?
@eric780217 thanks, Redis works, but I would really like to use Memcached.resolved, thanks!
removing the options line fixes it.
# BEGIN Tweaks # Rules to disable directory browsing Options -Indexes <IfModule mod_rewrite.c> RewriteEngine On # Rules to prevent php execution in uploads RewriteRule ^(.*)/uploads/(.*).php(.?) - [F] </IfModule> # END Tweaks
I don’t think it’s the apache. The apache error logs show this is not allowed in .htaccess in the way the plugin writes it, on apache 2.4.7
[Sun May 31 20:23:46.392140 2015] [core:alert] [pid 32695] [client
58812] .htaccess: Options not allowed hereActually it’s any setting added in “Tweaks” Besides “disable php in uploads” – only that one does not break the site…..
I found out the culprit.
# Rules to disable directory browsing Options -Indexes
It is when I turn “disable directory browsing” in Tweaks.
also, note, that this happens on a brand new install with 0 banned hosts. Well, with the option ‘include hackrepair hosts’ but still.
there is no file common.php in the plugin folder.
That’s false. None are for nginx.
I am appaled by the lack of how-to guides – not even a single one – on configuring nginx with the security plugin.
The security plugin author promised that once it gets to version 4, there will be such a guide – so far, nothing.
When I upgraded to latest wordpress and latest plugin, nginx redirects stopped working – besides that, nginx.conf is now Worldwide visible!!!!!