user1630162
user1630162

Reputation:

Centos /tmp directory has php*** file with large size

I have got Cent-Os and When I have checked my /tmp directory I have found that a lot php**** files are there and they are of also big size.More interesting thing is that they are updated every-day (I got it from Last Modified date).

I found by googling "tmpwatch" can solve it but the problem is how to use it and files are modified every day and we need to give time interval in "tmpwatch" command.

So,How to stop creating such big files and if I delete them all I afraid of system crash

Below is the image of files are being created in /tmp :files are being created in /tmp

Upvotes: 4

Views: 1332

Answers (1)

ali abdzad
ali abdzad

Reputation: 130

this files are related to io . since i am using "fopen($filePath, 'rb')" in my code , these files are creating by system and will be delete automatically (if it has enough space on /tmp folder)

if you want to change /tmp for these type of file you can change below params in your .ini file and restart apache

upload_tmp_dir='/tmp2/' sys_temp_dir='/tmp2/'

and be sure your folder has 777 + t permission , and user/group can be 'root'

Upvotes: 1

Related Questions