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 appear that I could set the variable using:
SERVER_ENV="production"
but I've tried various methods and this does not appear to be picked up.
Can anybody shed any light as to where I can include this within the command string?