Hi2All again! :)
Есть задача - отправлять php скриптом (из крона) почту зарегистрированным юзверям.
При запуске скрипта
/usr/local/mailsending/email_send.php
ручками - всё ок. Почта уходит.сделал в кроне скрипт
#!/bin/bash
clear
if [ -f /usr/local/mailsending/email_send.php ] ; then
php -f /usr/local/mailsending/email_send.php 1 >> /usr/local/mailsending/mail.log;
else
echo "The mail script file is missing!"
fi
При запуске скприта кроном - на мыло мне крон выпуливает:
TERM environment variable not set.
PHP Warning: PHP Startup: Unable to load dynamic library './php_mysql.so' -
./php_mysql.so: cannot open shared object file: No such file or directory in Unknown
on line 0
Exim is a Mail Transfer Agent. It is normally called by Mail User Agents,
not directly from a shell command line. Options and/or arguments control
what it does when called. For a list of options, see the Exim documentation.
Exim is a Mail Transfer Agent. It is normally called by Mail User Agents,
not directly from a shell command line. Options and/or arguments control
what it does when called. For a list of options, see the Exim documentation.
Exim is a Mail Transfer Agent. It is normally called by Mail User Agents,
not directly from a shell command line. Options and/or arguments control
what it does when called. For a list of options, see the Exim documentation.
(3 раза ругается екзим, потому что php скрипт за 1 запуск 3 письма отправляет).
Делаю
www:/etc/cron.mail # echo $TERM
xterm
www:/etc/cron.mail #
(на сервере через putty).
www:/etc/cron.mail # locate php_mysql.so
www:/etc/cron.mail #
- т.е. такого файла нет вообще (updatedb сделал перед locate). НО, почему всё работает при запуске скприта из консоли?!
Что я делаю не так? в чём косяк? подскажите, гуру plz.