易截截图软件、单文件、免安装、纯绿色、仅160KB

Installing PHP APC on GNU/Linux Centos 5

原贴:http://2bits.com/articles/installing-php-apc-gnulinux-centos-5.html
Published Mon, 2008/03/24 - 13:49, Updated Wed, 2009/07/15 - 23:40
Complex PHP applications, such as Drupal, can gain a lot of performance benefits from running a PHP op-code cache/accelerators
.
APC,
Alternate PHP Cache, is now the most maintained free/open source
op-code cache, and is being used more and more as it emerges to be the
most stable.
The instructions here detail how to get APC running on a CentOS 5
server. The server happened to have Plesk on it as well, which
initially made me hesitant to install APC "normally", since Plesk is so
picky on what other software is installed on the server. However, it
seems to have worked out well.
First, we need the pecl
command so we can download and install APC from the repositories.
Do to so, we execute the following command:
yum install php-pear
But, this will not run on its own, we need the following package for the phpize
command:
yum install php-devel
We also need the apxs
command, which is installed via the following package:
yum install httpd-devel
Now we have all the software we need, so we install apc via the pecl command:
pecl install apc
Once that finishes, we need to enable apc in Apache's configuration. the following command should do this for us.
echo "extension=apc.so" > /etc/php.d/apc.ini
Then we restart Apache:
/etc/init.d/httpd start
And we are all done. Watch for less execution time per page,
and decreased memory usage per Apache process compared to what you had
before.
Links
You can find some additional tips at Setting up Alternative PHP Caching APC support on Centos server
.
‹ Increasing Drupal's speed via the Squid caching reverse proxy
up
Installing PHP APC on GNU/Linux Ubuntu Gutsy Gibbon 7.10 (and Debian) ›

»
Add new comment
Pecl may not be able to perform the


相关文档:

确保PHP安全的四条安全规则

有关PHP
安全的几条规则
规则 1:绝不要信任外部数据或输入
关于 Web 应用程序安全性,必须认识到的第一件事是不应该信任外部数据。外部数据(outside data) 包括不是由程序员在 PHP

代码中直接输入的任何数据。在采取措施确保安全之前,来自任何其他来源(比如 GET 变量、表单 POST、数据库、配置文件、会话变量或 ......

我选择的PHP开源网上商城

这段时间在一个电子商务公司待在,所以接触到很多电子商务的概念。
也接触到了一个全新的电子商务模式。这里由于涉及到了公司的营销
策略方面的商务机密,所以不便过多的谈及。
不过一个好的idea,总是会勾起很多的不畏失败的尝试。我就从最基
础的电子商务开始叻。
刚好有个朋友准备做手机的电子商务,用前几篇文章提 ......

PHP的ereg()与eregi()的不同及相同点。对比

ereg()
字符串比对解析。
语法: int ereg(string pattern, string string, array [regs]);
返回值: 整数/数组
函数种类: 资料处理
内容说明
本函数以 pattern 的规则来解析比对字符串 string。比对结果返回的值放在数组参数 regs 之中,regs[0] 内容就是原字符串 string、regs[1] 为第一个合乎规则的字符串、regs[2 ......

在生产环境中使用php性能测试工具xhprof

xhprof是facebook开源出来的一个php性能测试工具,也可以称之为profile工具,这个词不知道怎么翻译才比较达意。跟之前一直使用的xdebug相比,有很多类似之处。以前对xdebug有一些记录还可以供参考,但是它的缺点是对性能影响太大,即便是开启了profiler_enable_trigger参数,用在生产环境中也是惨不忍睹,cpu立刻就飙到high ......

面向对象开发学习(五)(PHP第二十一讲)

这一节课的内容比较少,主要讲了抽象类和抽象方法。
抽象类是指含有抽象方法的类,抽象类至少要包含一个抽象方法。用abstract关键字定义抽象方法和类。
抽象方法的特点是只有方法名,不包含方法体,即没有方法实现,具体体现在代码中就是抽象方法不包含大括号{}。
抽象类不能被实例化,只能被继承,继承的子类必须重载父 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号