I’m using captcha helper from CodeIgniter to generate Captcha image for registration user. I’ve some value like this:
$vals = array(
'word' => $rand_word,
'img_path' => 'resources/captcha/',
'img_url' => 'http://localhost/fitinline/resources/captcha/',
'font_path' => './path/to/fonts/texb.ttf',
'img_width' => 150,
'img_height' => 40,
'expiration' => 7200
);
The captcha image automatically saved to ‘img_path’ when I generate captcha using create_captcha($vals) function. There is expiration index that I set default to 2 hours (7200). But after more than two hours, I check the image in ‘img_path’, the image are still saved on it. Is there any missing configuration to enable automatically delete those captcha image or what,.?
Thanks
Based on CI Documentation:
The “expiration” (in seconds) signifies how long an image will remain in the captcha folder before it will be deleted. The default is two hours.