醉爱PHP

linux

修改Windows下的Memcached下的服务端口

by admin on 六.23, 2008, under linux, windows

一直耿耿于本地的Memcached端口与服务器的不一样,老是要修改配置文件。

看了N久memcached.exe的帮助,在安装服务的时候,都没有办法指定参数。

在命令模式下,可以使用 memcached -p 12345 去指定端口,可服务安装后,却总是只有 -d runservice 的参数。

后来想到,可以通过修改注册表来达到这个修改端口的目的。

然后在 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\memcached Server 下面找到一个 ImagePath 的字符串项,正好是服务的执行路径的字符串,双击该串,在后面加入 -m 45 -p 12345 (使用45M内存,12345为端口),再启动服务。

搞掂!

Leave a Comment : more...

看看Google都用什么服务器

by admin on 四.09, 2008, under linux

[转自:http://www.dotcomunderground.com/blogs/2006/09/02/gws21-google-web-server/ ]

Google Web Server

www.google.com的头信息如下:

URL: http://www.google.com/
HTTP Header:
Status: HTTP/1.0 200 OK
Cache-Control: private
Content-Type: text/html
Set-Cookie: PREF=ID=90107988a9ae4a88:TM=1157210262:LM=1157210262:S=ltFJ-O9yIsDIPVaS; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Server: GWS/2.1
Content-Length: 0
Date: Sat, 02 Sep 2006 15:17:42 GMT
Connection: Keep-Alive

List of Google Server Types - Services and Server Software used by Google
Main Search: GWS/2.1
Google Accounts: GFE/1.3*
Google AdSense: GFE/1.3*
Google AdWords: GFE/1.3*
Google Analytics (Login Page): GWS/2.1
Google Analytics (Auth Page): GFE/1.3*
Google Analytics (Other Pages): ucfe*
Google Analytics (Analysis Image and JS): ucfe
Google Analytics (Images/JS/CSS/Flash): ga-reporting-fe
Google Answers: GFE/1.3
Google Base: asfe
Blogger: Apache
Google Book Search: OFE/0.1
Google Calendar: GFE/1.3
Google Catalogs: OFE/0.1
Google Code: codesite/2104877
Google Desktop: GFE/1.3
Google Directory: GWS/2.1
Google Downloads: GWS/2.1
Google Finance: SFE/0.8
Google Finance Stock Charts (Images): FTS (C)1997-2006 IS.Teledata AG
Froogle: cffe
Google Groups: GWS-GRFE/0.50
Hello: Apache/2.0.53
Google Help Pages: TrakhelpServer/1.0a
Google Images: GWS/2.1
Google Labs: Apache
Google Local / Maps: mfe
Google Local/Maps (Images): tfe
Google Mail: GWS/2.1
Google Mobile: GWS/2.1
Google Moon: mfe
Google Moon (Images): GWS/2.1
Google Music Search: mws
Google News: NFE/1.0
Orkut: GFE/1.3*
Google Pack: COMINST/1.0
Picasa (.com): Apache/2.0.53
Picasa (.google.com): GWS/2.1
Google Page Creator (Sign-up page): GFE/1.3*
Google Page Creator (User pages): GFE/1.3
Google Personalized Homepage: igfe
Google Scholar: GWS/2.1
Google Search History: Search-History HTTP Server
Google Sets: Apache
Google Site-Flavored: GWS/2.1
Google Sitemaps: GFE/1.3
Google SMS: GWS/2.1
Google SMS Search Requests: SMPP server 1.0
Google SMS (GMail Registration): GFE/1.3*
Google SMS (Page Viewer): GFE/1.3
Google Suggest: Auto-Completion Server
Google Transit: mfe
Google Translate: TWS/0.9
Google Video: GFE/1.3
Google Reader: GFE/1.3
Google Ride Finder: Apache
Google Talk: GWS/2.1
Google Toolbar: GFE/1.3
Google Toolbar (PR Lookup): GWS/2.1
Google Web Accelerator: GFE/1.3
Google Web Alerts: PSFE/4.0

Blogger and Google Labs also gives a little diffrent “HTTP Header” reply than usual Apache gives. (version number missing).

Please do share if you know more about GWS

Leave a Comment : more...

为Windows2008的IIS7添加PHP FastCgiModule

by admin on 四.06, 2008, under linux, php, windows

2008年的愚人节,cnBeta.com 出了一篇文章。说Windows2008下的IIS7已经完全很好的支持FastCGI,PHP在Windows2008下运行的性能超出在Linux下130%之多。[相关链接:http://www.cnbeta.com/articles/52507.htm ]

一直喜欢Linux与PHP的我,即使那天是4.1 ,也禁不住想去测试一下,无奈我的本本太老了,不完全支持ACPI,不能安装在本本的这个老年硬件上。

趁着假期有空,我把2008架到了虚拟机上,初次接触2008,觉得它与之前的2003有着非常大的差别,我像是重新去适应这样的一个系统,说不上特别的好,只是觉得它有进步,有改进而已。

把php以FastCGI方式配置在IIS7上,其实比以往的IIS5或者IIS6都要来得简单。

安装步骤:
1. 下载php5 [链接地址:http://cn2.php.net/get/php-5.2.5-Win32.zip/from/this/mirror]
2. 把压缩包解压到C:\php5,并在该目录下建立一个子目录:C:\php5\sess
3. 打开Internet信息服务(IIS)管理器 (如图1)

4. 双击“处理程序映射”,并在右侧点击“添加模块映射…”(如图2)

5. 填入PHP模块的相关信息(如图3)

6. 把C:\php5目录下的 php.ini.recommended 复制一个复件,并重命名为php.ini。
7. 打开php.ini文件,把 “;session.save_path = “/tmp””更改为 “session.save_path = “C:/php5/sess” ”;把 “extension_dir = “./””更改为“extension_dir = “C:/php5/ext” ”;然后打开常用的扩展模板:例如:extension=php_gd2.dll,extension=php_mysql.dll 等。
8. 修改系统的“环境变量”的 path,在后面增加了个 C:\php5。然后重启IIS7

这样,你的IIS7并以FastCGI的模式运行着PHP5了。

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...