Php 检查是否安装了memcached?

Php 检查是否安装了memcached?,php,installation,memcached,syntax-error,Php,Installation,Memcached,Syntax Error,我使用指南在Centos 6.5上安装memcached 我先查了一下 /etc/init.d/memcached status and memcached (pid 14784) is running... 然后重新开始 service httpd restart 但当我尝试在软件(prosper202)上使用memcached时,我得到了 我不知道是什么引起的 这是我的WURFL配置文件 <?php include($_SERVER['DOCUMENT_ROOT'] . '

我使用指南在Centos 6.5上安装memcached

我先查了一下

/etc/init.d/memcached status and 

memcached (pid  14784) is running...
然后重新开始

service httpd restart
但当我尝试在软件(prosper202)上使用memcached时,我得到了

我不知道是什么引起的

这是我的WURFL配置文件

<?php

include($_SERVER['DOCUMENT_ROOT'] . '/202-config.php');

$configuration = array(
    // WURFL File Configuration
    'wurfl' => array(
        'main-file' => 'wurfl.zip',
        'patches' => array("web_browsers_patch.xml"),
    ),
    // Persistence (Long-Term Storage) Configuration
    'persistence' => array(
        'provider' => 'mysql',
        'params' => array('host'=>$dbhost,
                  'port'=>3306,
                  'db'=>$dbname,
                  'user'=>$dbuser,
                  'pass'=>$dbpass),
    ),
    // Cache (Short-Term Storage) Configuration
    'cache' => array(               
        'provider' => 'memcache',
        'params' => 'host='.$mchost.',port=11211,namespace=wurfl',
    ),
);
数组(
“提供者”=>“mysql”,
'params'=>array('host'=>$dbhost,
“端口”=>3306,
'db'=>$dbname,
'user'=>$dbuser,
“通过”=>$dbpass),
),
//缓存(短期存储)配置
“缓存”=>数组(
“提供程序”=>“memcache”,
“params'=>“host=”.$mchost',port=11211,namespace=wurfl',
),
);

啊哈!您的问题不在于
memcached
的安装。请记住,
memcache
memcached
是两种不同的缓存机制


您需要确保服务器安装了
memcache
apc
,以便WURFL能够正确缓存

键入以下内容以查看memcached是否存在:
哪个memcached

检查memcached版本:
memcached-h

您可以发布WURFL的配置设置吗?我相信您的问题在于WURFL的配置,而不是memcached本身的安装。我明白了。我添加了配置。谢谢,由于某些原因,我在任何地方都找不到为centOS安装“memcache”的指南。你认识导游吗?
<?php

include($_SERVER['DOCUMENT_ROOT'] . '/202-config.php');

$configuration = array(
    // WURFL File Configuration
    'wurfl' => array(
        'main-file' => 'wurfl.zip',
        'patches' => array("web_browsers_patch.xml"),
    ),
    // Persistence (Long-Term Storage) Configuration
    'persistence' => array(
        'provider' => 'mysql',
        'params' => array('host'=>$dbhost,
                  'port'=>3306,
                  'db'=>$dbname,
                  'user'=>$dbuser,
                  'pass'=>$dbpass),
    ),
    // Cache (Short-Term Storage) Configuration
    'cache' => array(               
        'provider' => 'memcache',
        'params' => 'host='.$mchost.',port=11211,namespace=wurfl',
    ),
);