存档

文章标签 ‘PHP’

偶尔美工设计师使用Dreamweaver时会加BOM, 这样写PHP程序时会因为BOM头输出产生错误: 如 header() , session_start() 时会提 : Header may not contain more than a single header, new line detected … 所以上网搜索了一下,知道BOM文件开头的三个字符是0xEF, 0xBB, 0xBF 所以可以使用下边的代码清除BOM.代码如下:

六 14th, 2009 | Filed under PHP
标签: , ,

1.安装CentOS, 我的是CentOS5.0 – DVD 最小化安装不安装任何软件. 2. 关闭selinux A.运行命令setup,可以在图形化界面进行关闭 B. vi /etc/sysconfig/selinux SELINUX=enforcing 改成 SELINUX=disabled 3. 关闭不需要服务 A:运行命令setup B:运行命令ntsysv 只启用下面9个服务(autofs是为了方便使用光驱,其实可以不启用这个服务) acpid anacron autofs cpuspeed crond network sshd syslog yum-updatesd 4. 配置ssh 修改两个地方 vi /etc/ssh/sshd_config #PermitRootLogin yes 改为 PermitRootLogin yes #UseDNS yes 改为 UseDNS no

十二 9th, 2008 | Filed under PHP

我的windows xp2 系统安装的 php-5.2.6-win32-installer.msi 安装后发现没有mbstring扩展 在使用phpmyadmin 提示 : The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results. 没有发现 PHP 的扩展设置mbstring, 而当前系统好像在使用宽字符集。 没有 mbstring 扩展的 phpMyAdmin 不能正确识别字符串, 可能产生不可意料的结果. 但是在安装过程就是没找到mbstring 惭愧! 没办法重新下载 [...]

七 8th, 2008 | Filed under PHP
标签:

先找到 apache php mysql proftpd 源码包下载的URL地址 请浏览 http://www.apache.org http://www.php.net http://www.mysql.com http://www.proftpd.org/ 等官方网站 第一步:安装apache 注:当前目录为/tmp, 目录下有httpd-2.2.4.tar.gz, php-5.2.3.tar.gz等二进制源码包 #号代表为root 根权限,#后是输入的一条命令 执行下列命令 解压源码包 # tar -zxf httpd-2.2.4.tar.gz 进入安装目录 # cd httpd-2.2.4 配置apache安装信息 # ./configure –prefix=/usr/local/apache –enable-modules=so –enable-rewrite 执行make安装 # make; make install 安装完后 # vi /usr/local/apache/conf/httpd.conf 找到 prefork.c 下的 MaxClients 150 改为 ServerLimit 2000 MaxClients 1000 apache默认工作在prefork.c模式下,并发进程为150,超过后就无法访问,150是远远不够的,所以这里按自己网站的需求改, 如1000 [...]

十二 31st, 2007 | Filed under Apache, Linux, PHP