Archive for July, 2010

HTTP/1.1 New session failed

Got the above error message on the mail server this afternoon which was a new one on me. Apparently it is caused by the lack of available memory on the server. We have 1.5GB of physical memory, the STORE.exe process was taking 900MB of that and there was a console message (not much use when [...]

Posted on July 30, 2010 at 11:13 am by admin · Permalink · Leave a comment
In: IIS

linux查看系统版本和系统位数

1. uname -a you will view  kernel name、network node hostname、kernel release、kernel version、machine hardware name、processor type 、hardware platform、operating system 2. cat /proc/version his file will not show you the name of the actual OS release, but will instead give you specifics about the version of Linux kernel used in your distribution, and confirm the version of [...]

Posted on July 8, 2010 at 4:15 pm by admin · Permalink · Leave a comment
In: Linux管理维护

[转]SQUID FOR WIN + DNSPOD 搭建CDN服务器手记

呵呵,今天没事做,学了下搭建CDN,先用公司的一个域名试了一下,成功.www.uduu.sh.cn 说名一下,www.uduu.sh.cn主服务器IP为61.129.33.42为上海电信 因为中国网络问题,一些网通用户访问速度较慢, 所以,我选择了用大连网通服务器做CDN,服务器IP为218.61.10.172 也就是 主服务器:61.129.33.42 CDN服务器:218.61.10.172 首先下载squid for windows安装包 squid-2.7.STABLE5-bin.zip 然后解压缩,放到C盘squid目录内. 进入目录C:\squid\etc内,将所有文件的.default全部删掉 编辑下squid.conf,将所有内容删掉,替换以下内容,并保存 http_port 80 vhost vport=80 acl apache rep_header Server ^Apache broken_vary_encoding allow apache cache_mem 1024 MB maximum_object_size 4096 KB minimum_object_size 0 KB maximum_object_size_in_memory 256 KB cache_dir ufs c:/squid/var/cache 40960 16 256 cache_swap_low 80 cache_swap_high 97 strip_query_terms off request_body_max_size 5 MB memory_pools on [...]

Posted on July 8, 2010 at 2:00 pm by admin · Permalink · Leave a comment
In: 杂七杂八

Smarty 配置文件中的相对路径

<?php //include_once(“Smarty/libs/Smarty.class.php”); require_once $_SERVER['DOCUMENT_ROOT'].”/Smarty/libs/Smarty.class.php”; $smarty=new smarty(); $smarty->compile_check=true; $smarty->config_dir=$_SERVER['DOCUMENT_ROOT'].”Smarty/libs/Config_File.class.php”; $smarty->caching=false; $smarty->template_dir=$_SERVER['DOCUMENT_ROOT'].”/Smarty/templates”; $smarty->compile_dir=$_SERVER['DOCUMENT_ROOT'].”/Smarty/templates_c”; $smarty->cache_dir=$_SERVER['DOCUMENT_ROOT'].”/Smarty/cache”; //  ————————————– $smarty->left_delimiter=”<{“; $smarty->right_delimiter=”}>”; ?>

Posted on July 7, 2010 at 5:29 pm by admin · Permalink · Leave a comment
In: Smarty

Windows 2003下配置IIS+PHP4+Mysql4+zend

一、下载PHP 4.4.9 zip package http://mirrors.sohu.com/php/php-4.4.9-Win32.zip(注意如果下载的是installer版,就只要直接双击安装了,这里记录的是手动安装的方法。) 二、解压缩到你要安装的目录,例如c:\php 三、将c:\php\sapi\phpisapi.dll与c:\php\phpts.dll拷贝到系统盘windows\system32目录下面 四、将c:\php\php.ini-dist拷贝到系统盘windows目录下面,改名为php.ini 五、打开控制面板-管理工具-Internet 信息服务, 右键点击“默认网站”-属性,点击“ISAPI筛选器”选项卡,点击添加,筛选器名称填php,可执行文件选择c:\php\sapi\phpisapi.dll,点击确定。(Internet信息服务需要安装IIS,插入xp pro的安装光盘选择安装组件,勾选IIS,即可安装。) 六、点击“主目录”选项卡,点击右下角的“配置”,在“映射”选项卡里面点击添加,可执行文件同样选择c:\php\sapi\phpisapi.dll,扩展名填写.php(注意别少了点),点击确定。 七、编辑刚才的php.ini文件,找到extension_dir,改为php安装目录,例如c:\php\extensions, 然后如果需要打开一些库,只要将相应的语句前面分号去除即可,例如;extension=php_gd2.dll去掉前面分号之后就支持gd库了。 八、添加Web服务扩展,右击添加一个新的Web服务扩展。扩展名选择php,另外再选择要求的文件时,选择c:\php\sapi\phpisapi.dll 九、重启IIS,最傻瓜的方法当然是重启电脑了。 十、编写测试程序,查看phpinfo,例如:建立phpinfo.php,放置到IIS虚拟目录下,其中撰写代码如下: <?php phpinfo(); ?> 然后就可以通过http://localhost/phpinfo.php 查看了, 如果看到了php信息说明安装成功了。如果不行,检查上面操作是否正确。 这是php已经安装在IIS上了,默认是支持mysql的,不用像php5那样,得加载DLL文件。 我们只需单独下载MYSQL4和Zend即可。Zend会自动匹配php.ini并做相应的修改。 done

Posted on July 2, 2010 at 4:50 pm by admin · Permalink · Leave a comment
In: Mysql基础