Add all files needed to bring up VM and run agaric.com locally
This commit is contained in:
parent
52c8b60bac
commit
4d2bc0ee24
742 changed files with 24037 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test if Redis is available and working.
|
||||
*/
|
||||
|
||||
$success = FALSE;
|
||||
$key = 'test';
|
||||
$value = 'Success';
|
||||
|
||||
if (class_exists('Redis')) {
|
||||
$redis = new Redis;
|
||||
$redis->connect('127.0.0.1', 6379);
|
||||
|
||||
// Test adding a value to redis.
|
||||
if ($redis->set($key, $value)) {
|
||||
$result = $redis->get($key);
|
||||
|
||||
// If we get the expected result, it was a success.
|
||||
if ($result == $value) {
|
||||
$success = TRUE;
|
||||
print "Redis connection successful.\r\n";
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
print "Redis not working properly.\r\n";
|
||||
exit(1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue