Execute PHP via cron - No Input file specified

后端 未结 6 1207
醉梦人生
醉梦人生 2021-01-14 02:13

I\'m using the following command to execute a PHP file via cron

php -q /home/seilings/public_html/dvd/cron/mailer.php

The problem is that I

6条回答
  •  日久生厌
    2021-01-14 03:12

    You're probably getting a different set of environment variables when you execute your command via cron, versus the command line. You might need to write a wrapper script that sets the environment up the way you want it before running your PHP command.

提交回复
热议问题