Set php environment variable for cron via Plesk admin interface

view full story

http://serverfault.com – Within our application we make use of a environment variable named SERVER_ENV that is used to set whether we are in a production or development environment. This is set through the httpd.conf file for apache. The issue we are having is that using the scheduled task command below set through the Plesk administration interface there is of course no interaction with apache and so the environment variable is not set. The command used is as follows: /usr/bin/php -d safe_mode=Off /var/www/vhosts/example.com/httpdocs/index.php cron file-cleanup Having spent some time researching it would appea (HowTos)