解决WordPress的Warning: Cannot modify header information

没有评论 2010年2月10日

在从自己的 Windows 服务器迁移到远程的 Linux 服务器过程中,出现 "Warning: Cannot modify header information – headers already sent by (***)" 错误。

这很可能是由于在 Windows 下用记事本修改过 wp-config.php 文件,导致该文件出现 BOM 字符,而 PHP 无法识别。

解决方法:将 wp-config.php 文件用记事本打开,另存为 ANSI 编码格式,重新上传覆盖,搞定。

飞信用户已停机

没有评论 2010年2月6日

刚刚登陆飞信,提示“用户已停机”,网上充值重开机之后,仍提示停机无法登陆。打10086,得到“您再等等”的扯蛋答复。

解决方法:点飞信上的“设置密码”,发送验证码,重置密码,重新登录,恢复正常。

再见了,Sun

1条评论 2010年1月28日

Subject: Thanks for a great 28 years
Date: Tue, 26 Jan 2010
From: Scott McNealy
To: [all Sun employees]

Gang,

    When I interviewed many of you for employment at Sun over the years, one commitment often made was that things will change above, below, and around you faster than any place you have ever been. Looks like this was one area we exceeded plan for 28 years. While it was never the primary vision to be acquired by Oracle, it was always an interesting option. And this huge event is upon us now. Let's all embrace it with all of the enthusiasm and class and talent that we have to offer.

    This combination has the potential to put Sun, its people, and its technology at the center of yet another industry and game-changing inflection point. The opportunity is well-documented and articulated by Larry and the Oracle folks. Not much I can add on this score. This is a very powerful merger. And way better than some of the alternatives we were facing.

    So what do I say to all of you, now this is happening?

    It turns out that one simple message to the large and diverse Sun community is actually quite hard to craft. Even for a big mouth who is always ready with a clever quip. The community includes our resellers and customers, our current and former employees, their friends and families who supported our employees on their mission to change the industry, our investors, our supply and service partners, students and educators, and even our competitors with whom we often collaborated.

    But let me try. Though nothing I could write comes close to matching the unbelievably strong and positive emotions I have for you all. See, I never was able to master dispassion. I truly loved starting, running, and living Sun. And the last four years have not been without serious withdrawal. And the EU approval rocked me more than it should have.

    So, to be honest, this is not a note this founder wants to write. Sun, in my mind, should have been the great and surviving consolidator. But I love the market economy and capitalism more than I love my company.

    And I sure "hope" America regains its love affair with capitalism. And except for the auto industry, financial industry, health care, and some other places (I digress), the invisible hand is doing its thing quite efficiently. So I am more than willing to accept this outcome.

    And my hat is off to one of the greatest capitalists I have ever met, Larry Ellison. He will do well with the assets that Sun brings to Oracle.

    What we did right and wrong at Sun over the years might make for interesting reading. However, I am not a book writer. I am a husband, father of four, and a builder and leader of people who want to make a difference.

    But spare me a bit of nostalgia. Not of the mistakes we made, and lord knows I made a ton. But of the things we did right and well.

    First and foremost, Sun innovated like crazy. We took it to the limit (see Eagles). And though we did not monetize our inventions as well as we could have, few companies have the track record in R&D that we had over the last 28 years. This made working at Sun really cool. Thanks to all of you inventors and risk takers who changed how we live.

    Sun cared about its customers. Even more than we cared about our own company at times. We looked at our customer's mission as more important than ours. Maybe we should have asked for more revenue in return, but our employees were always ready to help first. I love this about Sun, which I guess makes me a good capitalist, if not a great capitalist.

    Sun did not cheat, lie, or break the rule of law or decency. While we enjoyed breaking the rules of conventional wisdom and archaic business practice, and for sure loved to win in the market, we did so with a solid reputation for integrity. Nearly three decades of competing without a notable incident of our folks going off course morally or legally. Not all executives and big companies are bad. Really. There are good companies out there. Special thanks to all of my employees for this. I never had to hide the newspaper in shame from my children.

    Sun was a financial success. We paid billions in taxes, salaries, purchases, leases, training, and even lawyers and accountants for devastatingly cumbersome SOX and legal compliance (oops, more classic digression). Long-term and smart investors made billions in SUNW. And our customers generated revenue and savings using our equipment in countless ways. Many employees started families, bought homes, and put them through school while working at Sun. Our revenues over 28 years exceeded $200B. Few companies make it to the F200. We did. Nice.

    Sun employees had way more fun than any other company. By far. From our dress code ("You must!") to beer busts to our April Fools' pranks to SunRise to our quiet enjoyment at night of a long, hard, well-done day of work, no company enjoyed "work" more than Sun. Thanks to all of our employees past and present for making Sun such a blast.

    I could go on for a long time reminiscing about the good and great stuff we did at Sun, but just allow me one last one. We shared. Not the greatest attribute for a capitalist. But one I could not change and was not willing to change about Sun while I was in charge. We shared in the success of Sun with our resellers. With our employees through stock options, SunShare, beer busts, and the like (for as long as Congress would allow) and through our efforts to keep as many of them on board for as long as possible during the inevitable down cycles. With our partners through the Java Community Process, through our open-source collaborations, and licensing strategies. With our customers through our commitments to low barriers to exit. Sun was never just about us. It was about we. And that may be a bit of the reason we are where we are today.

    But I have few regrets (see Sinatra's "My Way") and will always look back at Sun and its gang with only pride. Enormous pride. You are the best this industry ever had, though few outside of Sun recognized it.

    And what we are about will live on in Sparc, Solaris, Java, our products, and our spirit. Well past everyone's recollections of what we did together. I will never forget, though.

    Oracle is getting a crown jewel of the technology industry. They will do great things with Sun. Do your best to support them, and keep the Sun spirit alive and well in the industry. Our children will be better for it.

    Thanks for the off-the-charts support to everyone who ever carried a Sun badge, used our products, or helped our company through the years.

    And thanks to my wonderful wife, Susan, who gave this desperado (see Eagles) a chance to choose the Queen of Hearts before it was too late.

    Someday, hopefully, you will all get to see or meet her and my other life's works named Maverick, Dakota, Colt, and Scout. If you do, perhaps you will understand why I stepped back from the CEO role four years ago. And why I feel like the luckiest guy in the whole world.

    My best to all of you, and remember:

    Kick butt and have fun!

    Scott

神雕侠侣

没有评论 2010年1月23日

Leonard Bosack和他的前妻Sandra Lerner一起,是Cisco Systems公司的创建者。

1969年,Bosack毕业于宾夕法尼亚州的一所名叫La Salle的高中,同年进入宾州大学,并且在1973年获得学士学位。毕业后,他进入了Digital Equipment Corporation (DEC)公司并参与一个和36bit系统有关的项目。1979年,Bosack离开DEC公司进入斯坦福大学并于之后的1981年获得计算机科学专业硕士学位。在那里,他遇到了他的同学Sandra Lerner并于1980年与之结婚。

Cisco Systems公司的创建者 Leonard Bosack和他当时的妻子, Sandra Lerner,被认为是为完善有史以来第一台路由器的设计做出了主要的贡献,正是路由器使得构建internet成为了可能。不过,发明第一台路由器的殊荣并不属于这对夫妇,它属于一个叫William Yeager的人,他是当时斯坦福医学中心的工程师。正是此人写出了一个名叫Internetwork Operating System (IOS)的软件来控制一种专用的计算机使之可以实现路由的功能。Bosack和他的小组接手了这个软件的源代码并完善了其中的设计思路,最终利用它造出了成功商用的路由器。

设计有史以来第一台路由器的诱因源于当时的Bosack管理着斯坦福大学计算机科学系的电脑,而他的妻子Lerner管理着远在校园另一头的商业研究所的电脑。他们之间可以利用校园局域网(campus LAN)收发Email,但他们的电脑由于分别使用不同的操作系统因而不能直接连通。于是,两人在自己的电脑上使用了一块由后来的SUN Microsystems的创始人Andy Bechtolsheim设计的网卡并使用了经过升级的IMP操作系统,在大楼之间架设网线并且使电脑之间直接相连。

在架网的过程中,Bosack和Lerner的团队不断地改进整个系统的连通性以使得它可以连接不同的网络、不同的计算机操作系统和不同的协议。很快,消息不胫而走,很多其他大学的机构开始向他们索要这种全新的改进的系统,当时,这台机器被称为“multiprotocol router”。

Bosack和Lerner夫妇意识到了这台新机器背后可能蕴藏的巨大商机,他们开始向斯坦福大学申请将这台机器以及相关技术投入正式的商业销售。由于斯坦福大学是非赢利性机构,它不能够进入一个商业投机领域,因此它理所当然地拒绝了这个要求并禁止这个小组出售这个技术。

关于这个故事还有许多有趣的有争议版本,包括斯坦福大学自己。它在之后宣布Bosack和其他人篡夺了原本属于自己的路由器设计理念并非法地投入商用。在提出诉讼之余,斯坦福大学于1987年的4月就路由器软件的license和两块电脑主板向Cisco公司收取了19300美元的现金和150000美元的版税,并且还能享有在Bosack夫妇离开之后使用Cisco公司产品的折扣,服务,以及产品的完善升级之类的特权。

1984年,Bosack和Lerner夫妇正式组建了Cisco Systems公司并且开始在他们家的客厅制造路由器。Cisco这个名字取自美国城市San Francisco,其公司Logo也来自那个著名的金门大桥。1986年,Bosack正式从斯坦福辞职。同年,Bosack和Lerner得到了Sequoia Capital公司二百五十万美金的风投,这是他们俩经历了77次在其他风投公司申请失败之后才得到的。

从1984年到1992年,Cisco以平均每年200%的速度增长,而这些增长是在几乎没有做任何广告的条件下取得的。1990年8月28日,公司的管理层解雇了Lerner。在得知这个消息后,Bosack立刻主动辞职以示对妻子的支持。他们俩也立即卖掉了属于自己的Cisco股票并获利一亿七千万美金。第二年,Bosack在华盛顿Redmond创建了自己的公司名叫XKL (http://www.xkl.com/),他在那里工作至今。

- Hshen2007 选译自维基百科公开发表文章:http://en.wikipedia.org/wiki/Len_Bosack

Tomcat 无法启动

没有评论 2010年1月20日

Windows 环境中 Tomcat 无法正常启动。查看日志文件,报错:Failed creating java e:\jdk1.6\jre\bin\server\jvm.dll

解决方法:复制 jdk\bin\msvcr71.dll 到 tomcat 安装目录下的 bin 目录。

Solaris 网络监控

没有评论 2010年1月13日

刚刚在外面有人问 Solaris 网络监控,一时有点犯懵,在回家的路上想起来了 snoop 和 netstat 命令。一个是用来抓包的,一个是用来查看连接状况的。其实当时也想到了 netstat,就是只在 Windows 上用过。另外在 Solaris/Linux 上可以借助 chaosreader 分析网络数据包日志。

IIS FastCGI PHP 环境下搭建 WordPress

1条评论 2010年1月12日

2009年年底最郁闷的事情除了离开 Sun 以外莫过于自己的博客站点被无故关停。服务商给的解释是 CPU 和流量超负荷。这个理由非常搞笑,因为我的站点上只放了一个 WordPress 博客程序。如果我的博客 CPU 和流量能达到超负荷的级别,那这个站点绝对 PR >=4 了。

几经波折,从服务商那边要回了站点文件和数据库备份脚本。新申请了 DreamHost,但是至今状态还在 pending。正值前段时间在家里部署了一台 Windows Server 2008,遂尝试在自己的服务器上恢复博客应用。

Windows Server 2008 (SP2) + IIS 7

添加 Web 服务器角色,需要安装 CGI 扩展支持。

FastCGI + PHP (5.2.12) + MySQL (5.1) + Zend (3.3)

先从 php.net 官网下载Windows 版本安装程序,这里使用的版本是 5.2.12。本人 5.2 和 5.3 版本均做过尝试,发现 5.3 非常不稳定,会出现程序卡住的现象,建议还是 5.2 版本。另外压缩版本的配置文件也不太好用,调整的地方过多,建议使用 MSI 版本。安装的时候在向导中选择 IIS FastCGI,扩展 ext 不要乱选,有些组件还需要下载其他文件支持,容易出现缺少文件的问题。

安装后,打开 PHP.ini 配置如下选项,注意把前面的;注释去掉:

fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0
open_basedir = Web 根目录
date.timezone ="Asia/Shanghai"

short_open_tag = On

其中后两个配置选项是在部署 WordPress 碰到问题时需要添加的。

“开始” - “运行” - 进入 PHP 安装目录,运行:php -info,正常情况下会输出各种参数变量。

打开 IIS 管理器,找到“处理程序映射”,右侧面板中选择“添加模块映射”,路径 *.php,模块 FastCgiModule,可执行文件 php-cgi.exe 所在路径,名称可以写为 PHP_via_FastCGI。弹出提示选择“是”。PHP 支持添加完成。

注意,wwwroot 文件权限需要设定好,否则应用将无法正常上传或修改文件。

MySQLZend 的安装比较轻松,根据向导一路 Next 即可。

MySQL 数据库中涉及到 WordPress 域名变换的问题,可以使用 mysqldump 先导出 SQL,文本替换旧域名,然后 mysqlimport  导入。

Serv-U (9.2) PASV 设定

IIS 的 FTP 服务器比较简单,Serv-U 更为强大,而且支持 FTPS 和 SFTP。在 Serv-U 搭建中一个比较常见的问题是“被动模式”端口因为防火墙而无法正常访问。这将导致 WordPress 不能自动更新和自动安装插件。建议在设置中设定 PASV 端口范围,并添加防火墙例外。

其他尚待解决的问题

  1. WordPress Flash 上传图片组件运行不正常。
  2. WordPress XML-RPC 不正常,无法使用 Windows Live Writer。

产品管理

没有评论 2009年10月30日

Donald R. Lehmann 和 Russell S. Winer 的 Product Management 是一本比较经典的产品管理著作,但面向传统制造业,缺乏信息经济、网络经济和知识经济的背景成分。前不久暑假的时候,有幸拜读了北大前辈微软首席产品官周宏桥博士的最新著作,他从孙子兵法的战略眼光描述了软件产品的实践方法,令我获益匪浅。

首先,要先明确一个概念,产品和项目是有区别的。项目一般是特定的客户定义了特定的需求,在商业合同的约束下,公司为其定制的软件系统。而产品一般是没有具体的客户存在,也没有商业合同的约束,公司为了拓展某个细分市场而开发的通用性软件系统。所以,产品经理和项目经理的职责不尽相同。

就我个人理解,一个好的项目经理的目标是最大程度的满足利害关系者的不同需求,而一个好的产品经理的目标应该是有能力对需求加以引导和满足。

从过程角度上看,产品经理职责可以分为:调研、设计、管理、运营、改进五个部分。通过不同广度、深度和高度的市场调研中收集基本、期望和兴奋性需求;然后,根据相应的定位设计差异化产品;接下来,将该产品投入开发实施,加以管理控制;之后,开展各种层次的推广运营;而后,根据市场反馈加以产品改进和升级。

在互联网时代,速度就意味着优势。敏捷这个词显得尤重要。好的调研报告不等于好的设计模型,好的设计模型也不等于好的产品。苹果的产品在问世前几乎不做市场调查,乔布斯说的很直接,“所有公司都能作出接近完美的模型,但很少有公司能作出品质优良的产品”。

好产品的灵魂是用户体验。好的用户体验来源在于功能的务实和带有点理想主义色彩的创意。

以常用的输入法产品为例,基本功很重要,像资源占用、响应速度、界面友好、词库丰富都是很重要的硬指标。做好了这些,可能只是满足了基本用户的基本需求。另外有不少期望或兴奋性需求是尚未满足的,甚至还有一些需求是我们可以加以引导的。

下面简单说几个想法:

在桌面系统输入法上,将输入法和系统“运行”和“搜索”命令相结合。比方说,不少人会经常用到 ping 这个命令测试网络连通状况。传统的方式是打开开始菜单,然后点击“运行”,在弹出窗口中输入 ping 命令。如果输入法通过“i+命令”的方式就可以达到效果,将会极大的方便一些专业用户,以此树立良好口碑。

另外,将输入法和翻译相结合,也是一个不错的主意。在输入句子的之后,结合翻译引擎将该句子做翻译处理,然后直接将翻译后的英文句子上屏,可以做到即打即译。

在手写输入法的改进也很值得关注。手写输入有手机也有桌面。未来,触摸屏的应用很可能会大规模的延伸到个人电脑或是上网本领域,甚至有一天,键盘彻底消失而被屏幕虚拟取代也不是没有可能,就像 iPhone 一样。

还有语音识别输入、图像识别输入,以及为残障人士提供的定制产品等等。

当然,在互联网行业,仅有想法还是远远不够的,正如360周鸿祎所言,这是一个需要不断运营、不断持续打磨的过程。

最后借用一句毛主席语录,“从群众中来,到群众中去”。

互联网产品设计的“马化腾法则”

没有评论 2009年10月29日

1. 为产品订立优先级和先后次序。
2. 不强迫用户。不为1%的需求骚扰99%的用户。
3. 保证研发机制,产品迭代要快,快速实现、快速响应。
4. 图案和简洁并不是一对矛盾体。
5. 要丰富自己的角色,做最挑剔的用户、最笨的用户。
6. 产品经理第一要关注产品的硬指标。
7. 技术核心能力不可复制性强,让极致核心能力产生口碑。
8. 对局部、细小之处的创新要永不满足。

北大校徽新解

1条评论 2009年10月24日

title-new

校徽解释:我顶你个肺