VC调用JavaScript函数--处理QQ网页登录密码加密

WebQQ登录过程分析

http://topic.csdn.net/u/20090713/20/b81dcd0f-6eeb-417a-8cea-12f20296e6de.html

今天没事看了一下QQ校友的登录流程,最主要的就是密码的加密算法,算法如下: var F=”"; F+=E.verifycode.value; F=F.toUpperCase(); B+=md5(md5_3(E.p.value)+F) 再看看md5_3的JS实现,恐怖的惊人,用了几百行代码实现。于是想用PHP实现一下这个md5_3,网上搜了一下有答案,参考第三个链接,用PHP实现就是调用几个函数的事: <?php function preprocess($password,$verifycode) { return strtoupper(md5(md5_3($password).strtoupper($verifycode))); } function md5_3($str) { return strtoupper(md5(md5(md5($str,true),true))); } ?>

Tags: , ,

http://alanstorm.com/category/magento

http://yanggaojiao.javaeye.com/category/110266

http://hi.baidu.com/lezi52042/blog/category/Magento

Tags: ,

安装magento1.4.0.1的时候其中有一个步骤一直报错过不去,

Exception printing is disabled by default for security reasons

但又不知道是什么情况,谷歌了一下看到了一些解决方法。

http://screencastworld.com/2010/04/articles/magento-commerce-exception-printing-is-disabled-by-default-for-security-reasons

简单的说就是可以把错误的信息以发邮件的形式记录。

把errors/local.xml.sample改名为local.xml,再把内容改成下面,两个地方:

1 action里面填 email

2 email_address里面填自己的电子邮箱

<config> <skin>default</skin> <report> <action>email</action> <subject>Store Debug Information</subject> <email_address>jackywdx@163.com</email_address>

<trash>leave</trash> </report> </config>

Tags: ,

今天一个同事发出邮件讨论我们使用的框架上下文切换过多,主要因为是epoll_wait设置的超时过短导致。

抱着好奇的心态我在一个测试机(强悍的服务器)上也vmstat看了一下,看到的CS也是8K觉得比较奇怪,这个服务器上跑着100多个我们的框架进程,按他的道理好像不成立,后来才在另一台测试机上(普通PC)看结果,这台服务器上也跑着100多个进程,不过CS是到了5万多。后来才细心一想,才发现前者是真正的服务器16核CPU,后者是普通的CPU才2核。

重新man了一下vmstat,才发现vmstat很强大,可以查看服务器的各种数据(CPU、内存、硬盘、网络IO)。

google了一下,看到两篇不错的文章,主要内容是如何监控linux系统以及一些tips,都是E文不过还挺好理解的。

Performance Monitoring on Linux

Linux Tips

Tags: , ,

原文:http://www.itlearner.com/article/4554

有时候nginx,apache,mysql,php编译完了想看看编译参数可以用以下方法 nginx编译参数:

#/usr/local/nginx/sbin/nginx -V

nginx version: nginx/0.6.32 built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42) configure arguments: –user=www –group=www –prefix=/usr/local/nginx/ –with-http_stub_status_module –with-openssl=/usr/local/openssl

apache编译参数:

# cat /usr/local/apache2/build/config.nice

#! /bin/sh # # Created by configure “./configure” \ “–prefix=/usr/local/apache2″ \ “–with-included-apr” \ “–enable-so” \ “–enable-deflate=shared” \ “–enable-expires=shared” \ “–enable-rewrite=shared” \ “–enable-static-support” \ “–disable-userdir” \ “$@”

php编译参数: # /usr/local/php/bin/php -i |grep configure

Configure Command => ‘./configure’ ‘–prefix=/usr/local/php’ ‘–with-apxs2=/usr/local/apache2/bin/apxs’ ‘–with-config-file-path=/usr/local/php/etc’ ‘–with-mysql=/usr/local/mysql’ ‘–with-libxml-dir=/usr/local/libxml2/bin’ ‘–with-gd=/usr/local/gd2′ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-bz2′ ‘–with-xmlrpc’ ‘–with-freetype-dir’ ‘–with-zlib-dir’

mysql编译参数: # cat “/usr/local/mysql/bin/mysqlbug”|grep configure

# This is set by configure CONFIGURE_LINE=”./configure ‘–prefix=/usr/local/mysql’ ‘–localstatedir=/var/lib/mysql’ ‘–with-comment=Source’ ‘–with-server-suffix=-H863′ ‘–with-mysqld-user=mysql’ ‘–without-debug’ ‘–with-big-tables’ ‘–with-charset=gbk’ ‘–with-collation=gbk_chinese_ci’ ‘–with-extra-charsets=all’ ‘–with-pthread’ ‘–enable-static’ ‘–enable-thread-safe-client’ ‘–with-client-ldflags=-all-static’ ‘–with-mysqld-ldflags=-all-static’ ‘–enable-assembler’ ‘–without-isam’ ‘–without-innodb’ ‘–without-ndb-debug’”

« Previous posts 返回顶部