php - Cron job won't process require_once -
i have cron job setup run every 5min. cron job follows:
php /var/www/vhosts/default/htdocs/mail-test/index.php
at end of index.php script following:
$path = $base_path . trim($row['company']) . '/users/' . trim($row['name']) . '/upload/'; $zip_processing_file = $path . 'zip.php'; require_once "zip_processing_file";
however when cron job run, error stating following directory = $zip_processing_file
not exist in /var/www/vhosts/default/htdocs/mail-test/
i can't seem figure out problem. have tried include gives same problem. way got work putting
header("location: $zip_processing_file");
and hitting mail-test/index.php
web browser, cycle through whole process, can't through web browser, need cron job work. thanks!
the error message mentions /var/www/vhosts/default/htdocs/mail-test/ doesn't seem pertain path stored in $zip_processing_file
(which contains users
, upload
) may separate issue.
however, require_once
issue may due fact code isn't interpolating $zip_processing_file
variable.
change:
require_once "zip_processing_file";
to:
require_once $zip_processing_file;
Comments
Post a Comment