0

I have a php script mailing me the contents of some logfiles.

If I run: php maillogs.php on the command line through SSH it mails me the logs perfectly fine.

When I run the same script as a cronjob, I still get mailed (so the script runs) but its seems it no longer has access to the http logs.

can I change my command in DirectAdmin so that the PHP script is ran as root so it gets access to this folder?

My current command in the DirectAdmin input field for cronjobs is:

/usr/local/bin/php /home/davine/cronjobs/maillogs.php
Flion
  • 10,468
  • 13
  • 48
  • 68

1 Answers1

1

I think cron is not working correctly on your server. Please check cron logs of your server and try to enable SSH access of your user.

Also if you have root access, You can setup this cron under the root user if you want.

24x7servermanagement
  • 2,520
  • 1
  • 13
  • 11