iis windows phpstudy安裝redis擴充

來源:互聯網
上載者:User

標籤:red   read   set   安裝redis擴充   mic   現在   不用   安裝redis   壓縮   

說明,我的伺服器是2008 64位 php5.4.33

首先下載合格redis擴充,是否符合條件可以參考https://pecl.php.net/package/redis,進入之後,點擊"DLL"

 

可以看到紅圈裡面的就是適合iis的non thread safe就是非安全線程

下面那個thread safe適合apache

下面兩個就是下載所需要的,一個是redis一個是igbinary

https://windows.php.net/downloads/pecl/releases/redis/

https://windows.php.net/downloads/pecl/releases/igbinary/

redis我找不到64版的,所以直接下載了86版①https://windows.php.net/downloads/pecl/releases/redis/2.2.7/php_redis-2.2.7-5.4-nts-vc9-x86.zip

igbinary我也找不到64版,②https://windows.php.net/downloads/pecl/releases/igbinary/1.2.0/php_igbinary-1.2.0-5.4-nts-vc9-x86.zip直接下了86版

然後下載服務端的msi檔案③https://github.com/MicrosoftArchive/redis/releases

msi和zip都可以,只是我覺得msi安裝完就能用,不用想zip一樣配置了(zip裡面的exe雙擊運行後可以使用redis但是一關掉dos就不能用了,應該是我沒配置好)

現在解壓①②的壓縮包,把php_redis.dll,php_redis.pdb,php_igbinary.dll,php_igbinary.pdb 四個檔案放到php所在目錄(我的是study/php54n/ext)的ext檔案夾

修改php.ini  ,在最後加上

 

; php_redis
extension=php_igbinary.dll
extension=php_redis.dll

要按這個順序寫,顛倒了可能會出錯

然後安裝③

安裝完後可以寫個php檔案測試

<?php
$redis = new Redis();
$redis->connect(‘127.0.0.1‘,6379);
$redis->set(‘test‘,‘hello redis‘);
echo $redis->get(‘test‘);

 

 

出現hello redis就說明ok了

 

iis windows phpstudy安裝redis擴充

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.