Blog

  • Windows更新安装失败的解决办法

    Windows毛病还不少,而且还摸不着原因,这不是,Windows更新下载来安装却总是失败。幸好,尽管原因不明(真搞不懂,Windows设计出这么复杂的自动更新,却无法把自己装上去,那还叫自动更新吗?),办法还是有的。

    办法一,把以下命令一个个敲一遍(太多了吧?!那看看办法二)

    1. regsvr32 wuweb.dll
    2. regsvr32 wuapi.dll
    3. regsvr32 wucltui.dll
    4. regsvr32 wuaueng.dll
    5. regsvr32 wups.dll
    6. regsvr32 wups2.dll
    7. net stop wuauserv
    8. net start wuauserv
    9. net stop bits
    10. net start bits
    11. net stop w32time
    12. net start w32time
    13. net stop msiserver
    14. net start msiserver

    办法二:(与办法一出处不同,对比之下只是办法一的简化版,可能办法一适用性更广,但我只用办法二就能解决我自个儿碰到的问题)

    1. net stop wuauserv (停止自动更新服务)
    2. 32位版的用户:regsvr32 %windir%\system32\wups2.dll
      64位版的用户:regsvr32 %windir%\syswow64\wups2.dll
    3. net start wuauserv (这里当然是重启自动更新服务啦)
  • 系统还原和安全模式

    办公室有台电脑得了怪病:如IE能正常访问网页,但打印不出网页,每次打印都是空白,而且页脚的url不是网址,而是本地缓存的internet临时文件名;又如outlook express里试图直接打开一些.doc附件,word启动以后就停止响应…

    我实在google不到解决方案,只好用上系统还原。无奈,无论我选择哪个还原点,电脑重启以后都遗憾地通知我系统无法还原到这个系统检查点。难道要我用绝招——重装系统?汗,幸好用”system restore not working”搜到一个方案:进入安全模式,然后再运行系统还原。一试,果然管用!

  • 信经济专家还不如信自己

    很久以前下载了第一财经的经济学人2007年做的节目,在硬盘上保留着一直没时间去看。今天静心下来清理硬盘,没看就删了吧? 比较可惜,于是把这些节目看了一遍。

    如果看直播,看看这些经济专家来头都不小,说的道理头头是道,叫人的思路不由跟着走。可是现在是2008年底了,专家们说的预测对不对?我不是专家也有权判断了:一无是处。

    于是,删,让硬盘干净,让耳根清静。

  • 我们放弃了微软,还是微软放弃了我们

    我们指的是有较高的计算机操作能力,但不是专业的IT从业人员。

    微软有很好的产品,比如 Windows (不包括Vista)和 Office 。微软产品好就好在细微之处,比如双击普通文件,如.doc, .xls,打开的是文件本身;双击模板文件,如.dot, .xlt,打开的是模板的空白文档。因为.doc, .xls的默认操作是open,而.dot, .xlt的默认操作是new,要打开模板本身(编辑模板),得右击、从context menu里选择一个非默认操作open。

    微软还有很多好的产品,可惜,我们都不熟悉。不知从什么时候开始,在很多应用上,我们想当然地决定不用微软的东西。真的很可惜,其实,平心而论,这是因为我们除了 Windows 和 Office,其他的微软产品都玩不转。

    是我们放弃了微软,还是微软放弃了我们?

  • 关于WordPress一次安装,多处使用的构想

    首先,我不能用WordPress Mu版。因为某些plugin 和 theme不支持Mu版。况且,WordPress Mu版相对于WordPress的特有功能是用户自助申请Blog功能,而我所谓“多处使用”,只需要集中管理一个WordPress框架下多个网站,多个网站能同步升级WordPress程序部分,所以,Mu版在此没有优势。

    其次,我肯定不是有WordPress一次安装,多处使用需求的第一人。我参照了前人的做法,但觉得它们不够完善。不完善之处主要是前人的想法要求多个网站指向同一个document root,而不同的网站很可能装有其他程序,还会有不同的图片等其他文件。例如,domain1和domain2共用一个WordPress,那WordPress以外的静态页面或静态文件,比如domain1/static-page-or-file-outside-of-wordpress,就会被domain2/ static-page-or-file-outside-of-wordpress访问到。

    再次,我的构想适合在独立服务器LAMP环境下实现。以下是具体的实现步骤:

    1. 在一个主控域名上按常规安装WordPress。假设主控域名是domain1,它的document root是/www/domain1。
    2. 假设第二个域名是domain2,它的document root是/www/domain2,WordPress甚至可以安装在子目录/www/domain2/wp。
    3. 除.htaccess和index.php以外,把/www/domain1下WordPress其他文件和文件夹用软连接的方式连接到/www/domain2/wp。多数情况下,不同网站会有不同.htaccess的要求,所以我建议.htaccess还是单独建立为好;domain2的index.php则需要稍作修改(大家看着改吧,应该是很简单的)。
    4. Domain1的wp-config.php则需要为新增的domain2添加一些配置,为不同的域名启动不同的数据库、表、keys等。
    5. Domain2的WordPress安装完成后,进入后台,调整uploads目录的位置,默认是wp-content/uploads,应该改为绝对路径,如/www/domain2/wp/wp-uploads。Full URL path to files (optional)不再是optional,必须作相应修改以便前台能访问到上传的文件。我曾经为隔离domain1和domain2的uploads考虑得死去活来,为了属于domain1 的 static-page-or-file-outside-of-wordpress 不被 domain2/static-page-or-file-outside-of-wordpress访问到,我想过在domain1下建立软连接到domain2的uploads目录,然后用防盗链的方式防止 domain1 和 domain2 对各自 uploads 目录的相互访问。但最后才发现,WordPress uploads folder本来就支持绝对路径(默认值是相对路径),一个复杂的问题就这样轻松解决了。
  • 播放器画面偏暗

    不知道从什么时候起,我的播放器(K-Lite)不管放电影或电视剧,色彩总是很暗,再好的片源看起来都像抢先版。

    听从网上的一个建议,把显卡的驱动更新了一下,播放器的画面立即清新了起来。我的心情也好了起来。

  • 奇妙的价格

    买一送一我已经见惯了。今天发现一个标价更有意思:Tesco卖海飞丝 shampoo,买一瓶£4.59,买两瓶共£4.50。

  • 802.11n果然不同凡响

    我不是追新族。在802.11g还大行其道的今天,我本没有打算升级至802.11n。但因为需要在一幢大楼内组网,我想了好多方案,比如:

    • 用homeplug(怕途中电表太多干扰太大,觉得这个方案不好)
    • 用WDS,也就是wireless repeater(买了belkin的802.11g repeater,经常死机,换了一个也是如此,退货;linksys也有一款repeater,贵于belkin,但我对linksys的产品没信心,懒得买来再退了)
    • 用高增益天线(ebay HK有人卖得很便宜,贪便宜买来发现是烂货,教训啊,千万别上ebay买东西——其实我知道的,但就是禁不住便宜的诱惑,抱着反正几镑钱,就当扔水里也不太心疼的心理又去买了个教训)
    • 用高功率无线路由(恰好我有一台2Wire 2700HGV,但就算调到100mw效果也不理想)

    802.11n的优越的传输性能我有耳闻,但百闻不如一见,我用买一个linksys repeater同样的价格买了一套Tenda 802.11n (draft 2)无线路由加USB无线网卡,两地用802.11n接通以后,效果出奇得好,已经完美解决我中长距离组网的需求。尽管走了很多弯路才落实这个方案,但我还是非常高兴。

    而且,我发现Tenda的无线路由还带有WDS功能,这可是802.11n级别的WDS啊,比起单纯一个linksys repeater,仅是802.11g级的,要划算好多好多啊。

  • Godaddy mod_rewrite

    I have two Godaddy accounts now. One is for a dedicated server, the other is for a deluxe share hosting package. Actually I do not need any share hosting once I get a dedicated server, but someone bought this for me, so I spent some time inspecting how good / bad it is.

    I should regard myself as a Godaddy loyal client. I am 100% satisfied with their dedicated server service, and also, Godaddy domain management is the most powerful and convenient I have ever seen. However, Godaddy share hosting is definitely not something workable for me.

    I am recently struggling at setting up magento in Godaddy share hosting. Magento setup is 50% successful. I mean, magento can run homepage, wishlist, popular search, etc all right, but it run into blank pages at many points, e.g. about us, customer service, etc. Initially I thought it was mod_rewrite problem, so I used phpinfo to check. I did not find mod_rewrite enabled. I quickly installed wordpress to double check, and if I enable wordpress search engine friendly url features, it runs into 404 error. I searched Godaddy Knowledge Base (FAQ centre). It says:

    Mod_rewrite is an Apache web server module installed on all of our Linux servers by default; it does not have to be installed or enabled. Our Linux hosting accounts support most mod_rewrite functionality.

    You do not need to enable mod_rewrite in your httpd.conf, as this is handled at a global level. All you need to do is add the desired code to the body of your .htaccess file.

    For more information about mod_rewrite see the Apache Module mod_rewrite documentation.

    NOTE:The .htaccess file containing the rewrite rules must be in the same directory as the target files.

    This article did not help me. So I had to submit a ticket. Within several hours, I got the reply (I am satisfied with Godaddy support reponse speed) but it only contained the same words as the answer from Godaddy Knowledge Base. I googled “godaddy mod_rewrite” after I could not get a clear reply from Godaddy. I should have googled it earlier because soon I found someone mentioned rewrite rules in .htaccess with Godaddy share hosting DO NOT TAKE IMMEDIATE EFFECT.

    This solved all my queries. Although I still do not know how Godaddy hide mod_rewrite from phpinfo, after several hours of being installed, wordpress is working properly.

    However, magento is still not running properly. I assume it has nothing to do with mod_rewrite settings. By all means, to my opinion, magento is not suitable to run on a share hosting package. Installing magento on Godaddy share hosting account is only for my curiosity. I have been running magento successfully on my dedicated server.

  • 英国的立秋日

    google autumn logo
    google autumn logo

    今天留意到google的logo换了一个,alt说明这是为the first day of autumn制作的。

    中国的中秋节都已经过了,英国怎么还刚入秋?英国秋天的第一天是怎么计算的?google了一下才知道,英国是拿autumnal exquinox (秋分日) 作为the first day of autumn。