A PHP snippet for managing htpasswd file of Apache

Are you looking for a tool for managing AuthUserFile of Apache? if so, here's a mini php-based htpasswd admin tool for you. maybe it helps.

 http://code.google.com/p/phphtpasswdadmin/

 For now, it's just a draft, if you like it, please reach me and let's make it better.

贴士吧

最近没事,搞了个‘贴士吧’用来记录自己的Tips,还未完工。

http://moretips.cn

Wordpress, tinyMCE, realpath

昨,搭建一个WordPress,发现tinyMCE不能使用,原来是虚拟主机提供商为了安全起见,把realpath函数屏蔽了,realpath的安全漏洞令商家不得不这么做,而这样将导致WP的后台管理不能使用WYSIWYG编辑文章。下面是解决这个问题的方法,如有朋友遇到,也许对您有帮助:

  1. 取得你的虚拟主机目录的物理路径,方法有多种,一般主机提供商给你开通服务的时候,会告诉你,假设这里是 /home/www/imchina.net/
  2. 找到 wp-includes\js\tinymce\ 下的 tiny_mce_gzip.php
  3. 打开tiny_mce_gzip.php,搜索realpath,将第一个替换为:“$cachePath = "/home/www/imchina.net/wp-includes/js/tinymce/";”,将第二个realpath替换为:“$path = "/home/www/imchina.net/wp-includes/js/tinymce/".$path;”。