60a41e7018c55517192919f9bb1a3d0a975cf44a
David Blume Fix typo in README.md

David Blume authored 8 years ago

1) # Key Value Store PHP
David Blume first commit

David Blume authored 8 years ago

2) 
David Blume Fix typo in README.md

David Blume authored 8 years ago

3) kvs-php is a rudimentary key/value store written in PHP.
David Blume first commit

David Blume authored 8 years ago

4) 
5) # Getting the project
6) 
7) You can get a copy of this project by clicking on the
8) [ZIP](http://git.dlma.com/kvs-php.git/zipball/master)
9) or [TAR](http://git.dlma.com/kvs-php.git/tarball/master) buttons
10) near the top right of the GitList web page.
11) 
12) If you're me, and you want to contribute to the repo, then you can clone it like so:
13) 
14)     git clone ssh://USERNAME@dlma.com/~/git/kvs-php.git
15) 
16) # Building it
17) 
18) 1. Ensure your server's version of PHP supports PDO and SQLite.
19) 2. Move config.php.sample to config.php, and replace `replaceme` with a passcode you choose.
20) 3. Optional: Use secure HTTP. I recommend getting a free SSL certificate from [Let's Encrypt](https://letsencrypt.org/).
21) 
22) # Using it
23) 
24) Here is [a live instance that serves an index page](https://kvs-php.dlma.com/).  You can send a key to get a value like so:
25) 
26)     https://kvs-php.dlma.com/?k=1Gxxxxxxxxxx
27) 
28) Special use case, here's how to get the value for the most-recently updated key of a list of keys. The list could contain any number of keys, but only one value will be returned. 
29) 
30)     https://kvs-php.dlma.com/?k=1Gxxxxxxxxxx,1Gxxxxxxxxxz
31) 
32) Here's the recipe for a cURL command to store a new value for a key: 
33) 
34)     curl --data "key=value&auth={authorization}" https://{url}
35) 
36) Here's [the source code for a Roku channel client of such a service](http://git.dlma.com/roku_ip_tagger.git/). 
37) 
David Blume Add a trouble shooting sect...

David Blume authored 7 years ago

38) # Trouble shooting
39) 
David Blume Fix markdown typo for GitLi...

David Blume authored 7 years ago

40) If you get the error "Exception : SQLSTATE\[HY000] \[14] unable to open database file", then [PHP's owner probably doesn't match the directory's owner](https://stackoverflow.com/questions/5165183/apache-permissions-php-file-create-mkdir-fail). You may be able to fix it by noting PHP's owner from phpinfo(), and then invoke "sudo chown phpowner:phpowner (appropriate\_target)".
David Blume Add a trouble shooting sect...

David Blume authored 7 years ago

41)