首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

关于php_memcache.dll 扩展安装的有关问题。 新手求指点

2012-06-11 
关于php_memcache.dll 扩展安装的问题。。新手求指点我用的是win7操作系统。。php的版本是 5.2.17然后下载了ph

关于php_memcache.dll 扩展安装的问题。。 新手求指点
我用的是win7操作系统。。

php的版本是 5.2.17

然后下载了php_memcache-2.2.6-5.3-nts-vc9-x86 放在php扩展文件夹里,然后在 php.ini 中打开扩展,重启appache,但是在phpinfo()函数中没有这个库。

然后又下载了 php_memcache-2.2.6-5.3-vc9-x86 问题和上面的一样。


谁能告诉我怎么回事?

[解决办法]
只需把其中的.dll文件拷贝至ext目录下。

打开php.ini(确保是php加载的按个ini文件)添加一行

extension=php_memcache.dll 去前面分号是必须的。

重启apache
[解决办法]
把php升级到5.3 以后版本再看吧.
另外确认你修改的php.ini 是phpinfo 內同路径的文件

探讨

恩 就是这么做的,可是不行引用:

只需把其中的.dll文件拷贝至ext目录下。

打开php.ini(确保是php加载的按个ini文件)添加一行

extension=php_memcache.dll 去前面分号是必须的。

重启apache

[解决办法]
应该有。谷歌搜去吧。
[解决办法]
http://zhidao.baidu.com/question/392263442.html
[解决办法]
static struct i2c_algorithm i2c_dw_algo = {
.master_xfer= i2c_dw_xfer,
.functionality= i2c_dw_func,
};

static int __devinit dw_i2c_probe(struct platform_device *pdev)
{
struct dw_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem, *ioarea;
int irq, r;

/* NOTE: driver uses the static register mapping */
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) {
dev_err(&pdev->dev, "no mem resource?\n");
return -EINVAL;
}

irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "no irq resource?\n");
return irq; /* -ENXIO */
}

ioarea = request_mem_region(mem->start, resource_size(mem),
pdev->name);
if (!ioarea) {
dev_err(&pdev->dev, "I2C region already claimed\n");
return -EBUSY;
}

dev = kzalloc(sizeof(struct dw_i2c_dev), GFP_KERNEL);
if (!dev) {
r = -ENOMEM;
goto err_release_region;
}

init_completion(&dev->cmd_complete);
mutex_init(&dev->lock);
dev->dev = get_device(&pdev->dev);
dev->irq = irq;
platform_set_drvdata(pdev, dev);
[解决办法]
dev->clk = clk_get(&pdev->dev, "i2c_fck");
if (IS_ERR(dev->clk)) {
dev_err(&pdev->dev, "error getting i2c_fck\n");
r = -ENODEV;
goto err_free_mem;
}
clk_enable(dev->clk);

dev->base = ioremap(mem->start, resource_size(mem));
if (dev->base == NULL) {
dev_err(&pdev->dev, "failure mapping io resources\n");
r = -EBUSY;
goto err_unuse_clocks;
}
{
#if 0
u32 param1 = readl(dev->base + DW_IC_COMP_PARAM_1);

dev->tx_fifo_depth = ((param1 >> 16) & 0xff) + 1;
dev->rx_fifo_depth = ((param1 >> 8) & 0xff) + 1;
#endif
dev->tx_fifo_depth = DW_IC_TX_FIFO_TL + 1;
dev->rx_fifo_depth = DW_IC_RX_FIFO_TL + 1;
}

dev->clock = STANDERD_MODE;

i2c_dw_init(dev);

writel(0, dev->base + DW_IC_INTR_MASK); /* disable IRQ */
r = request_irq(dev->irq, i2c_dw_isr, IRQF_DISABLED, pdev->name, dev);
if (r) {
dev_err(&pdev->dev, "failure requesting irq %i\n", dev->irq);
goto err_iounmap;
}

adap = &dev->adapter;
/* BEGIN: Modified by lizhaoyang l63203, 2010/5/17 */
phy_adap = adap;


/* END: Modified by lizhaoyang l63203, 2010/5/17 */
i2c_set_adapdata(adap, dev);
adap->owner = THIS_MODULE;
adap->class = I2C_CLASS_HWMON;
strlcpy(adap->name, "Synopsys DesignWare I2C adapter",
sizeof(adap->name));
adap->algo = &i2c_dw_algo;
adap->dev.parent = &pdev->dev;

//adap->nr = pdev->id;
r = i2c_add_numbered_adapter(adap);
if (r) {
dev_err(&pdev->dev, "failure adding adapter\n");
goto err_free_irq;
}

return 0;

err_free_irq:
free_irq(dev->irq, dev);
err_iounmap:
iounmap(dev->base);
err_unuse_clocks:
clk_disable(dev->clk);
clk_put(dev->clk);
dev->clk = NULL;
err_free_mem:
platform_set_drvdata(pdev, NULL);
put_device(&pdev->dev);
kfree(dev);
err_release_region:
release_mem_region(mem->start, resource_size(mem));

return r;
}
[解决办法]
static int __devexit dw_i2c_remove(struct platform_device *pdev)
{
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
struct resource *mem;

platform_set_drvdata(pdev, NULL);
i2c_del_adapter(&dev->adapter);
put_device(&pdev->dev);

clk_disable(dev->clk);
clk_put(dev->clk);
dev->clk = NULL;

writel(0, dev->base + DW_IC_ENABLE);
free_irq(dev->irq, dev);
kfree(dev);

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem->start, resource_size(mem));
return 0;
}

/* work with hotplug and coldplug */
MODULE_ALIAS("platform:i2c_designware");

static struct platform_driver dw_i2c_driver = {
.remove= __devexit_p(dw_i2c_remove),
.driver= {
.name= "i2c_designware",
.owner= THIS_MODULE,
},
};

static int __init dw_i2c_init_driver(void)
{
return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe);
}

subsys_initcall(dw_i2c_init_driver);

static void __exit dw_i2c_exit_driver(void)
{
platform_driver_unregister(&dw_i2c_driver);
}
module_exit(dw_i2c_exit_driver);

MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter");
MODULE_LICENSE("GPL");

热点排行