You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.markdown
+15-20Lines changed: 15 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,12 @@
1
-
PhpRedis
2
-
========
1
+
# PhpRedis
3
2
4
3
The phpredis extension provides an API for communicating with the [Redis](http://redis.io/) key-value store. It is released under the [PHP License, version 3.01](http://www.php.net/license/3_01.txt).
5
4
This code has been developed and maintained by Owlient from November 2009 to March 2011.
6
5
7
6
You can send comments, patches, questions [here on github](https://github.com/nicolasff/phpredis/issues) or to [email protected] ([@yowgi](http://twitter.com/yowgi)).
@@ -54,8 +51,8 @@ You can generate a debian package for PHP5, accessible from Apache 2 by running
54
51
55
52
This extension exports a single class, `Redis` (and `RedisException` used in case of errors). Check out https://github.com/ukko/phpredis-phpdoc for a PHP stub that you can use in your IDE for code completion.
56
53
57
-
Installation on OSX
58
-
-------------------
54
+
55
+
## Installation on OSX
59
56
60
57
If the install fails on OSX, type the following commands in your shell before trying again:
61
58
<pre>
@@ -73,8 +70,8 @@ Taken from [Compiling phpredis on Zend Server CE/OSX ](http://www.tumblr.com/tag
73
70
74
71
See also: [Install Redis & PHP Extension PHPRedis with Macports](http://www.lecloud.net/post/3378834922/install-redis-php-extension-phpredis-with-macports).
75
72
76
-
PHP Session handler
77
-
-------------------
73
+
74
+
## PHP Session handler
78
75
79
76
phpredis can be used to store PHP sessions. To do this, configure `session.save_handler` and `session.save_path` in your php.ini to tell phpredis where to store the sessions:
80
77
<pre>
@@ -95,25 +92,23 @@ Sessions have a lifetime expressed in seconds and stored in the INI variable "se
95
92
The session handler requires a version of Redis with the `SETEX` command (at least 2.0).
96
93
97
94
98
-
Distributed Redis Array
99
-
-----------------------
95
+
## Distributed Redis Array
100
96
101
97
See [dedicated page](https://github.com/nicolasff/phpredis/blob/master/arrays.markdown#readme).
102
98
103
99
104
-
Error handling
105
-
--------------
100
+
## Error handling
106
101
107
102
phpredis throws a `RedisException` object if it can't reach the Redis server. That can happen in case of connectivity issues, if the Redis service is down, or if the redis host is overloaded. In any other problematic case that does not involve an unreachable server (such as a key not existing, an invalid command, etc), phpredis will return `FALSE`.
0 commit comments