Not Equal C && !=C && 不等于西
RSS icon Email icon Home icon
  • How to fix comments submitting problem on WordPress

    Posted on May 1st, 2010 Sean Add comments

         When submit a comment on WordPress, if you see an error massage like “Error 404 Not Found” something, most likely need to modify the “.htaccess” file of PHP.
         The “.htaccess” file is located on the root directory of your hosting. find the line like showing below:

         This is a function to protect your blog from spam. You can simply just comment the line, then you are all set:

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    407 views
  • PHP None-Thread Safe & Thread Safe区别(非线程安全与线程安全)

    Posted on April 22nd, 2010 Sean 1 comment

         由于PHP是在Linux/Unix系统下开发的,而又由于Linux/Unix系统是采用多进程(process)的工作方式而Windows系统是采用多线程(thread)的工作方式。如果在IIS下以CGI方式运行PHP会非常慢,这是由于CGI模式是建立在多进程的基础之上的,而非多线程。一般我们会把PHP配置成以ISAPI的方式来运行,ISAPI是多线程的方式,这样就快多了。但存在一个问题,很多常用的PHP扩展是以Linux/Unix的多进程思想来开发的,这些扩展在ISAPI的方式运行时就会出错搞垮IIS。因此在IIS下CGI模式才是 PHP运行的最安全方式,但CGI模式对于每个HTTP请求都需要重新加载和卸载整个PHP环境,其消耗是巨大的。
         为了兼顾IIS下PHP的效率和安全,微软给出了FastCGI的解决方案。FastCGI可以让PHP的进程重复利用而不是每一个新的请求就重开一个进程。同时FastCGI也可以允许几个进程同时执行。这样既解决了CGI进程模式消耗太大的问题,又利用上了CGI进程模式不存在线程安全问题的优势。
         因此,如果是使用ISAPI的方式来运行PHP就必须用Thread Safe(线程安全)的版本;而用FastCGI模式运行PHP的话就没有必要用线程安全检查了,用None Thread Safe(NTS,非线程安全)的版本能够更好的提高效率。

  • 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
    Loading...Loading...
    5,523 views
  • WordPress with internal server error on 1and1 hosting

    Posted on March 3rd, 2010 Sean Add comments

         For some reason, wordpress will always display “Error 500 – internal server error” for some PHP pages. My webhosting is on 1and1, so somehow the setting of PHP server is not correct.
    Finally, got a solution and it works:

    Modify the file .htaccess on the root directory:

    1. Add the code following at top of .htaccess:
      AddType x-mapp-php5 .php
    2. Changing:
      RewriteEngine on
      to:
      RewriteEngine ON

         Save the file, upload to the server. Here you go.

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    516 views
  • How to convert Cisco Aironet 1130 to autonomous

    Posted on January 23rd, 2010 Sean 1 comment

         I got some Cisco Aironet 1130 AP’s from Amazon a couple of month ago. but even those are brand new, it seems like there is no Cisco OS inside of the AP. From Cisco website, It sounds like the AP that we are using may be a LWAPP (Lightweight) AP. This is why we can’t configure it via the web. The solution is follow these steps showing below to revert them from LWAPP mode to autonomous mode by loading a Cisco IOS release using a TFTP server:

    1. Set the static IP address of your PC on which your TFTP server software runs to 10.0.0.2
    2. Download the TFTP server software. (e.g. one software called TFTPD32 can be downloaded from here)
    3. Make sure that the PC contains the access point image file (can download from Cisco website) in the TFTP server root folder and that the TFTP server is activated.
    4. Disable any software firewall products, such as Windows firewall etc.
    5. Rename the access point image file in the TFTP server folder to c1130-k9w7-tar.default.
    6. Connect the PC to the Ethernet port of access point.
    7. Disconnect power from the access point.
    8. Press and hold MODE while you reconnect power to the access point.
    9. Hold the MODE button until the status LED turns red (might be 20 to 30 seconds) and then release.
    10. The access point should receive the img file from the TFTP server
    11. Wait until the file has been transferred, the access point will reboot as indicated by all LEDs turning green followed by the Status LED blinking green.
    12. After the access point reboots, connect it to the DHCP server, and get the IP of AP by DHCP server.
    13. use IE to connect the AP GUI by typing the IP
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    1,798 views
  • Ubuntu网络设置

    Posted on February 18th, 2009 Sean 2 comments

         今天早上打开电脑,发现Ubuntu系统的网络设置出现故障,系统栏的网络图标上出现了一个红色的叉叉,点击后出现的解释是:wired network device is unmanaged.
         打开我的网络配置文件”/etc/network/interface”,内容如下:

    auto lo
    iface lo inet loopback
    iface eth0 inet dhcp
    auto eth0

         google了半天,大部分的解释是:network-manager is supposed to ignore any interfaces that have configuration entries in the file /etc/network/interfaces,解决的办法基本上如下:

         这样根本就是治标不治本嘛!最后我尝试把网卡的设置直接变成:

    auto lo
    iface lo inet loopback

    也就是说,保留loopback网络设置。
         reboot后,一切正常!

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    529 views