0

我使用亚马逊 EC2 实例。我遇到了 PHP 上传目录的问题,我在 error_log 上收到了这条消息:

[Mon May 27 21:25:26 2013] [error] [client xxx.96.169.198] Can't find a temporary directory: Internal error  [500, #20014]
[Mon May 27 21:26:13 2013] [error] [client xxx.96.169.198] The state report gatherer could not be created.  [500, #20014]

所以我想通过尝试在 php.ini 文件上将“upload_tmp_dir”设置为“/opt/phptmp/”来修复它。(这个目录存在,我把它改成 777)

我已经搜索了所有 php.ini 文件

[mybox@mybox /]# find -name php.ini
./etc/php.ini

而且只有1个。

我编辑了upload_tmp_dir 值并上传了修改后的php.ini,停止了httpd,然后启动了它。

但它似乎仍然没有工作。我遇到了其他问题,即写在 php.ini 上的 APC 配置没有被 PHP 正确加载。例如,在 php.ini 中,您可以看到我将“apc.shm_size”设置为“512M”,但是当您访问 APC 信息页面 (apc.php) 时,SHM 大小仅为 32M。

(这是我的 php.ini 中的一些行)

[APC]
apc.enabled = 1
apc.shm_size = 512M
apc.slam_defense = 0
apc.stat=0
apc.enable_cli = 1
apc.user_entries_hint = 16384

从 PHP Info 结果来看,加载的 php.ini 似乎是正确的

Loaded Configuration File ----- /etc/php.ini

任何人有建议如何解决这个问题?

谢谢你的时间。

4

2 回答 2

0

The problem was i got no available disk space, so when i uploaded the php.ini with winscp, the file size is 0. That's why the APC value is being read in wrong way. And that solves the temp directory too. What i did was deleting some unused log files.

于 2013-05-30T07:20:02.057 回答
0

此错误看起来不像 php 错误。这是由您的网络服务器抛出的。检查您的(nginx?)配置。

/etc/php.d/apc.ini关于 APC,您可能有一个覆盖php.ini配置的附加文件

于 2013-05-29T21:53:24.323 回答