2012年11月2日

Linux下php连接sql server 2008

摘要: 1、安装配置freetds wget http://mirrors.xmu.edu.cn/ubuntu/archive/pool/main/f/freetds/freetds_0.82.orig.tar.gz tar zxf freetds_0.82.orig.tar.gz cd freetds_0.82 ./configure --prefix=/sxmobi/Software/common/freetds --enable-msdblibmake && make install 2、编译mssql扩展,假设PHP安装源码包为/usr/local/src/php-5.3.11 阅读全文

posted @ 2012-11-02 22:48 E猫 阅读(1239) 评论(0) 推荐(0) 编辑

2012年10月16日

ibmcrypt was not found解决方案

摘要: configure: error: *** libmcrypt was not found解决方案./configure提示出错,首先提示*** Could not run libmcrypt test program, checking why…*** The test program failed to compile or link. See the file config.log for the*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed*** or that y 阅读全文

posted @ 2012-10-16 14:35 E猫 阅读(280) 评论(0) 推荐(0) 编辑

Linux下解决php扩展模块mcrypt的问题

摘要: php安装mcrypt在Windows下加载mcryptphp_mcrypt.dll需要libmcrypt.dll支持1,在php.ini配置文件中,搜索 ;extension=php_mcrypt.dll将php_mcrypt.dll前的 " ; "分号去掉改成extension=php_mcrypt.dll2, 从php5中复制 libmcrypt.dll 到system32目录下3,修改完后重起iis(iis必须在cmd下用iisreset 命令重起服务器,在“Internet 信息服务”重启无效)或Apache。在Centos中加mcrypt这里注意的是mcrypt 阅读全文

posted @ 2012-10-16 14:32 E猫 阅读(3272) 评论(0) 推荐(0) 编辑

2012年10月9日

php实现无限级树型菜单(函数递归算法)

摘要: 大概步骤如下:首先到数据库取数据,放到一个数组,然后把数据转化为一个树型状的数组,最后把这个树型状的数组转为html代码。也可以将第二步和第三步合为一步。详细如下:1。数据库设计:脚本如下:CREATETABLE`bg_cate`(`cate_Id`int(30)unsignedNOTNULLAUTO_INCREMENT,`cate_ParentId`int(30)unsignedDEFAULT'0',`cate_Name`varchar(100)NOTNULL,`cate_Intro`varchar(500)DEFAULTNULL,`cate_Order`int(30)uns 阅读全文

posted @ 2012-10-09 14:59 E猫 阅读(1895) 评论(0) 推荐(0) 编辑

2012年9月8日

apache动态库加载出错:cannot restore segment prot after reloc: Permission denied

摘要: 目中碰到的问题,编译好的so文件,放到其他机器上去加载,报了错误,cannot restore segment prot after reloc: Permission denied。网上查了一下,原因是selinux的问题,selinux的设置太过严格导致的。解决的办法是在root用户下,修改/etc/selinux/config 文件,把SELINUX=enforcing 改成 SELINUX=disabled。然后,保存关闭,重启机器就可以了。 阅读全文

posted @ 2012-09-08 11:21 E猫 阅读(167) 评论(0) 推荐(0) 编辑

2012年9月7日

PHP编译安装参数介绍

摘要: 在Linux下安装PHP,源代码方式安装,总需要配置很多参数。这里列出常用配置参数,并详细用中文解释说明了。给大家一些参考./configure--prefix=/usr/local/PHP php 安装目录--with-apxs2=/usr/local/apache/bin/apxs 让Apache服务器能够支持PHP--with-config-file-path=/usr/local/PHP/etc 指定php.ini位置数据库扩展--with-MySQL=/usr/local/mysql mysql安装目录,对mysql的支持--with-MySQLi=/usr/lo... 阅读全文

posted @ 2012-09-07 14:12 E猫 阅读(234) 评论(0) 推荐(0) 编辑

Apache编译参数注解

摘要: Apache编译参数注解./configure //配置源代码树--prefix=/usr/local/apache2 //体系无关文件的顶级安装目录PREFIX ,也就Apache的安装目录。--enable-module=so //打开 so 模块,so 模块是用来提 DSO 支持的 apache 核心模块--enable-deflate=shared //支持网页压缩--enable-expires=shared //支持 HTTP 控制--enable-rewrite=shared //支持 URL 重写--enable-cache //支持缓存--enable-file-cache 阅读全文

posted @ 2012-09-07 14:10 E猫 阅读(191) 评论(0) 推荐(0) 编辑

2012年6月9日

Apache配置文件中的deny和allow的使用

摘要: Apache配置文件中的deny和allow的使用由于产品的需要,最近在配置apache的负载均衡功能,但是在配置虚拟主机的访问权限的时候我们遇到了一些问题。主要问题是deny和allow的执行顺序,抽时间研究了下这两个参数的使用,现把deny和allow的使用情况总结如下。一、使用情况总结我们来看下下面的apache的一个配置,具体代码如下:<Directory "D:/TRS/Apache2.2.17/cgi-bin">Order allow,deny#1Allow from all#2deny from 192.9.200.69#3</Directo 阅读全文

posted @ 2012-06-09 19:22 E猫 阅读(235) 评论(0) 推荐(0) 编辑

2012年3月29日

sql用法例子

摘要: 1.一道SQL语句面试题,关于group by表内容:2005-05-09 胜2005-05-09 胜2005-05-09 负2005-05-09 负2005-05-10 胜2005-05-10 负2005-05-10 负如果要生成下列结果, 该如何写sql语句?胜 负2005-05-09 2 22005-05-10 1 2------------------------------------------create table #tmp(rq varchar(10),shengfu nchar(1))insert into #tmp values('2005-05-09', 阅读全文

posted @ 2012-03-29 10:02 E猫 阅读(242) 评论(1) 推荐(0) 编辑

SQLServer时间日期函数详解

摘要: SQLServer时间日期函数详解1. 当前系统日期、时间 select getdate()2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值 例如:向日期加上2天 select dateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.0003. datediff 返回跨两个指定日期的日期和时间边界数。 select datediff(day,'2004-09-01','2004-09-18') --返回:17 select datediff(day,' 阅读全文

posted @ 2012-03-29 09:19 E猫 阅读(608) 评论(0) 推荐(0) 编辑

导航