|
 |
|
memcache ติดตั้งยังไงครับ ลองหมดทุกเว็บแล้วครับ ใครพอมีวิธีติดตั้งแบบง่ายๆ บ้างครับ |
|
 |
|
|
 |
 |
|
ตัวนี้น่าสนใจมากเลยครับ ไว้ว่าง ๆ ผมจะเขียนเป็นบทความซะหน่อย' ครับ
|
 |
 |
 |
 |
Date :
2013-06-19 15:27:34 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อย่าลืมนะครับ ผมรอๆๆๆๆๆๆๆๆๆๆ ถ้าให้ดีติดตั้งกับคนที่ลง AppServ ก็จะดีมากเลยครับ
ผมลองหลายแบบแล้วครับ ติดตั้งใช้งานไม่ได้ครับ
ติดตั้งแล้ว มี service โผล่ขึ้นมาแล้ว แต่ พอ start service มันกลับบอกว่าไม่สามารถสตาทเซอร์วิส ได้
รอ เทพมาตอบกันนี่แหละครับ จะได้ทำ memcache สักที
ขอบคุณมากครับ เขียนวันไหนส่งมาบอกด้วยได้มั้ยครับ
[email protected] ขอบคุณมากๆ เลยครับ
|
 |
 |
 |
 |
Date :
2013-06-19 15:35:49 |
By :
tux2524 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
พอดีได้แบบ งง เลยเอามาเขียนไว้เผื่อใครติดปัญหาเหมือนผมนะ
1. download memcache from http://code.jellycan.com/memcached/
2. Unzip แล้ว Copy ไปไว้ที่ c:\memcached\
3. คลิกขวาที่ memcached.exe ไปที่่ Properties->Compatibility->Privilege Level->check “Run this program as an administrator”
4. เปิด comand prompt ไปที่ all program->Accessories->คลิกขวาที่ comand prompt ->run admin
5. c:\memcached\memcached.exe -d install
6. ไปที่ http://www.pureformsolutions.com/pureform.wordpress.com/2008/06/17/php_memcache.dll แล้ว save php_memcache.dll ไปที่ C:\AppServ\php5\ext\
7. แก้ไขไฟล์ php.ini เพิ่มคำสั่ง extension=php_memcache.dll
8. restart apache แล้ว เปิด comand prompt พิมพ์คำสั่ง start service memcache "c:\memcached\memcached.exe -d start"
9. souce code example :
<?php
$memcache = new Memcache;
$memcache->connect("localhost",11211); # You might need to set "localhost" to "127.0.0.1"
echo "Server's version: " . $memcache->getVersion() . "<br />\n";
$tmp_object = new stdClass;
$tmp_object->str_attr = "test";
$tmp_object->int_attr = 123;
$memcache->set("key",$tmp_object,false,10);
echo "Store data in the cache (data will expire in 10 seconds)<br />\n";
echo "Data from the cache:<br />\n";
var_dump($memcache->get("key"));
?>
10. แล้วลองรันดูนะ
|
 |
 |
 |
 |
Date :
2013-06-19 16:24:37 |
By :
tux2524 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|