A
A
Ainur Shakirov2014-09-02 20:41:18
PHP
Ainur Shakirov, 2014-09-02 20:41:18

A direct link runs the script, but not with cron. Where to dig?

There is a data processing script, running from the browser, it opens, processes the data, sends the results.
I set it to "cron", but instead of a message about successful work, the following message comes to the mail: ""
What could be the incompatibility of the cron with the script?
I visited 2 ways:
/home/httpd/fcgi-bin/a123456_serv/php-cli /home/httpd/vhosts/site.ru/httpdocs/papka/file.php
and
/usr/bin/wget -O - -q -t 1 site.ru/papka/file.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
s1dney, 2014-09-02
@Fqyeh29

Excuse me, but this has been discussed a hundred thousand times, you could use the search:
the command line in cron should not contain relative paths, because the PATH variable in the cron runtime environment differs from the standard
/usr/bin/php file.phpin place

file.php 
#или
php file.php

and if there are relative paths in the body of the script, then
cd /path/to/script && /usr/bin/php file.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question