English 中文(简体)
PHP: 装甲运兵车已启用, 但仍然不起作用吗?
原标题:PHP: APC enabled, but still doesn t work?
  • 时间:2012-05-23 08:29:54
  •  标签:
  • php
  • apc

在我新的Xubuntubox我安装了 lamp-server 工具, php , php , php-apc ,在php.ini上添加了 extension=apc.so 线,并重新启动了系统。 Apache和PHP似乎运作良好,但APC没有这样做。

所以我检查了Apc.php文件会说:

No cache info available. APC does not appear to be running.

但在 php 信息中, 它似乎已被启用 。 看看 < code> php -i > \ \ \ \ grep apc 说 :

Additional .ini files parsed => /etc/php5/cli/conf.d/apc.ini,
apc
apc.cache_by_default => On => On
apc.canonicalize => On => On
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On             <- it is enabled
apc.file_md5 => Off => Off
apc.file_update_protection => 2 => 2
apc.filters => no value => no value
apc.gc_ttl => 3600 => 3600
apc.include_once_override => Off => Off
apc.lazy_classes => Off => Off
apc.lazy_functions => Off => Off
apc.max_file_size => 1M => 1M
apc.mmap_file_mask => no value => no value
apc.num_files_hint => 1000 => 1000
apc.preload_path => no value => no value
apc.report_autofilter => Off => Off
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS
apc.rfc1867_prefix => upload_ => upload_
apc.rfc1867_ttl => 3600 => 3600
apc.serializer => default => default
apc.shm_segments => 1 => 1
apc.shm_size => 32M => 32M
apc.slam_defense => On => On
apc.stat => On => On
apc.stat_ctime => Off => Off
apc.ttl => 0 => 0
apc.use_request_time => On => On
apc.user_entries_hint => 4096 => 4096
apc.user_ttl => 0 => 0
apc.write_lock => On => On

预计 php -m * grep apc 也会找到 apc

你知道缺少什么吗? 我不能正确使用吗?

最佳回答

运行 PHP 的方法有 < 强 < two

您正在显示 PHP 的 CLI 配置, 而 apc.php 没有使用它 。

事实上,如果您通过浏览器检查 phpinfo () ,您可以看到没有装入任何 APC 扩展名 。

解决方案 : open at /etc/php5/cgi/conf.d/apc.ini ( cgi not cli ), 并再次粘贴您的配置。 重新启动网络服务器( sudo service httpd start ) 和 voilà!

希望这有帮助!

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...