Jump to content

[SOLVED] mail() Inside a Cron Job


chigley

Recommended Posts

Hey all.

 

I've been having some problems when using the mail() in a PHP script being executed with a Cron job.

 

When I type the filename into my browser, I receive the email. Yet for some reason the email is not sent when the file is executed by the Cron demon.

 

Any suggestions?

 

Cheers

Link to comment
Share on other sites

OK well I decided to try doing it the way it's worked in the past on another project (I didn't realise I was doing it differently to last time):

 

/usr/local/bin/php /path/to/file.php

 

And now I get errors along these lines:

 

Warning: include(../includes/mysql.php): failed to open stream: No such file or directory in /home/zignet/public_html/sitefunctions/update.php on line 3

Warning: include(): Failed opening '../includes/mysql.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/zignet/public_html/sitefunctions/update.php on line 3

 

Advice appreciated :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.