I use amazon EC2 instance. I had an issue with PHP upload directory & i got this message on 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]
So i wanted to fix it by trying to set the "upload_tmp_dir" to "/opt/phptmp/" on the php.ini file. (this directory exists and i have chmod it to 777)
I have searched all php.ini file
[mybox@mybox /]# find -name php.ini
./etc/php.ini
And there is only 1.
I edited the upload_tmp_dir value and uploaded modified php.ini, stopped httpd, and started it.
But it seems it still didn't work. And i got additional issue, which is the APC configuration which is written on the php.ini is not loaded properly by PHP. For example on the php.ini you can see that i set "apc.shm_size" to "512M" But when you visit the APC info page (apc.php) the SHM size is only 32M.
(here are some lines from my 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
And from the PHP Info result, it seems the loaded php.ini is correct
Loaded Configuration File ----- /etc/php.ini
Anyone has suggestion how to fix this?
Thanks for your time.
This error doesn't look like a php error. This is thrown by your webserver. Check your (nginx?) configuration.
Concerning APC, you probably have an additional file /etc/php.d/apc.ini
which overwrites the php.ini
configuration
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.