编辑:我已经重新安装Ubuntu服务器,它不工作,因为它应该。 无论如何,对Gentoo不感到舒服;) 我是Gentoo noob所以请温柔:) 我正尝试在我的主机上的VPS上提供基于Gentoo(2006)的LAMP堆栈上安装APC。 我跑了 emerge -av php5-dev / pecl-apc 安装它,它似乎被正确编译等。 编辑:这是emerge的最后几行: http : //pastebin.com/MMjtjhrz 我已经将这些行添加到/usr/local/lib64/php5/php.ini: [apc] apc.enabled = 1 apc.shm_size = 32 并重新启动Apache(重新启动罚款,build议好的configuration),但APC不运行。 无法在phpinfo()或使用php -m中看到它。 编辑:不知道是否重要,但.so文件位于/ usr / local / php5 / lib / php / extensions / no-debug-non-zts-20060613 /,这似乎有点奇怪。 Suhosin也在那里,但是也没有运行。 谁能帮忙? 非常感激! 🙂
我试图根据这个教程来安装apc扩展php: http : //2bits.com/articles/installing-php-apc-gnulinux-centos-5.html,但不能成功运行第一个命令。 这是我得到的: Loaded plugins: fastestmirror Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository contrib is listed more than once […]
有没有人成功安装了PHP 5.4的APC ? 根据我在StackOverflow上find的另一个线程,似乎可以使用最新的trunk 。 我抓住主干, phpize , ./configure ,但是当我尝试运行make我得到以下错误: >/bin/sh /root/trunk/libtool –mode=compile cc -I. -I/root/trunk -DPHP_ATOM_INC -I/root/trunk/include -I/root/trunk/main -I/root/trunk -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/trunk/apc.c -o apc.lo libtool: compile: cc -I. -I/root/trunk -DPHP_ATOM_INC -I/root/trunk/include -I/root/trunk/main -I/root/trunk -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/trunk/apc.c -fPIC -DPIC […]
我已经安装了APC,但是我并没有像预期的那样对性能产生巨大的影响。 其实,我不确定我是否观察到任何好处,但也许只是因为与执行我自己的代码相比,花在解释php代码上的CPU时间可以忽略不计。 所以我想知道:这可能是因为我运行PHP作为一个Apache模块(而不是fastcgi)和/或因为PHP使用prefork(而不是工人)? 这些都会以某种方式打败通过APC可以实现的性能提升?
apccaching计入php内存使用情况? 我正在使用php-fpm,但我不确定这是否相关。 如果APC的内存设置为256MB和个人工人的PHP内存限制也是256MB这是否意味着APC可以把所有的内存的PHP进程?
我正在使用CMS站点的共享主机。 这个共享的主机可以select使用“APC”。 我只是在testing网站上试过这个选项,因为只需在共享主机的帐户页面上点击一下就可以启用它。 看来这个选项加快了网站的速度。 不过我只是担心它有一些我还没有意识到的副作用。 一般情况下,启用“APC”安装共享主机是否有不良影响?
关于如何和文档,我通常find这种格式 apc.shm_size=512M 但在我的服务器之一APC 3.0.19不喜欢“M”和崩溃的Apache [apc-error] apc_mmap: mmap failed: Cannot allocate memory 使用相同的Debian Lenny,相同的PHP 5.2.17-dotdeb,但是apc 3.1.6,运行良好,不pipe有没有“M”。 用apc 3.1.7,我得到每个PHP-cli执行或apache重新启动的警告 PHP Warning: PHP Startup: apc.shm_size now uses M/G suffixes, please update your ini files in Unknown on line 0 女巫APC版本需要的单位,至less有一个不喜欢它?
我在云中有自己的虚拟服务器,运行nginx和APC。 在这个服务器上,我有一个使用W3TC插件的WordPress博客。 我使用APC启用了页面caching和对象caching。 当访问首页,页面和post来自服务器的响应几乎立即。 但是在search时,响应需要1秒钟。 我想知道是否有可能使响应更快。 使用debugging查询WP插件我已经分析了searchSQL查询,它只需要0.002完成。 根据W3TC的大部分对象被caching。 事实上,Debug Queries插件给出了以下关于search结果的报告: Total query time: 0,01482s for 120 queries. Page generated in 0,00000s, 0,00% PHP, 0,00% MySQL 所以看起来好像页面生成得非常快。 但是服务器的响应仍然需要1秒钟才能完成。 即使页面生成速度很快,我怎样才能知道它是什么让响应花费很长时间? 注:我只是谈论从服务器的响应时间,而不是在浏览器中生成页面的时间。 以下是我的网站的示例search结果 。 这是我目前的php-fpmconfiguration: http : //snipt.org/AiHg7 # tail /var/log/php5-fpm.log [05-Oct-2013 20:20:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 […]
当试图安装php5-apc时,得到这个错误: root@x-fr-1:/etc/apt# apt-get install php5-apc Reading package lists… Done Building dependency tree Reading state information… Done The following NEW packages will be installed: php5-apc 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 70.4 kB of archives. After this operation, 211 kB of additional disk space will be used. […]
我刚安装了php-pecl-apcu : # yum info php-pecl-apcu Loaded plugins: amazon-id, priorities, rhui-lb 4 packages excluded due to repository priority protections Installed Packages Name : php-pecl-apcu Arch : x86_64 Version : 4.0.4 Release : 1.el7 Size : 138 k Repo : installed From repo : epel Summary : APC User Cache URL : http://pecl.php.net/package/APCu License : PHP […]