Page 1 of 1

hesk_pop3.php.xxxx fourty thousands times

Posted: Wed Jul 08, 2015 1:10 am
by J_E_F_F
I logged into my linux hesk server today and for some reason did an ls on the /root directory.

I have over 40 thousand files such as

hesk_pop3.php.44810

It looks like it is generated every 5 minutes for the pop mail check.

the file contains
#!/usr/bin/php -q

any idea why?
and I'm assuming all are safe to delete?

My crontab entry look like the following
*/5 * * * * wget http://mywebserver/hesk/inc/mail/hesk_pop3.php /dev/null > /dev/null 2>&1

Re: hesk_pop3.php.xxxx fourty thousands times

Posted: Wed Jul 08, 2015 12:26 pm
by J_E_F_F
looks like adding -O to the cronjob suppressed the file creation.

*/5 * * * * wget http://mywebserver/hesk/inc/mail/hesk_pop3.php -O /dev/null > /dev/null 2>&1

Re: hesk_pop3.php.xxxx fourty thousands times

Posted: Wed Jul 08, 2015 3:52 pm
by Klemen
Why are you using wget to call a local file?

You should use something like this instead:
*/5 * * * * /usr/bin/php -q /home/user/public_html/hesk/inc/mail/hesk_pop3.php >/dev/null 2>&1

Re: hesk_pop3.php.xxxx fourty thousands times

Posted: Wed Jul 08, 2015 6:46 pm
by J_E_F_F
I forget why I used wget. I'll try a local call and see if it works this time.

Re: hesk_pop3.php.xxxx fourty thousands times

Posted: Wed Jul 08, 2015 7:01 pm
by J_E_F_F
working this time around, there was a reason in the past, don't remember why, but it just wasn't working from cron