RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Cronjob executes but no e-mails are generated
Posted:  12 Apr 2012 08:10
I have iniatiated a cronjob on our server to generate e-mail reminders.
The cronjob was started, I received a cronjobreport at 2.00 am.
Did I forget to configure some settings?
[If I press "send e-mail notification now" in the calendar the appropiate persons get an e-mail directly. So, that works].
The report I received was:
PHP Warning:  file(): Unable to access lcaldbc.dat in /var/www/vhosts/omroeplogos.nl/subdomains/agenda/httpdocs/common/toolbox.php on line 101
PHP Warning:  file(lcaldbc.dat): failed to open stream: No such file or directory in /var/www/vhosts/omroeplogos.nl/subdomains/agenda/httpdocs/common/toolbox.php on line 101
PHP Warning:  mysql_query(): Access denied for user 'calendar_admin'@'localhost' (using password: NO) in /var/www/vhosts/omroeplogos.nl/subdomains/agenda/httpdocs/common/toolbox.php on line 131
PHP Warning:  mysql_query(): A link to the server could not be established in /var/www/vhosts/omroeplogos.nl/subdomains/agenda/httpdocs/common/toolbox.php on line 131
PHP Warning:  file_put_contents(): Unable to access logs/mysql.log in /var/www/vhosts/omroeplogos.nl/subdomains/agenda/httpdocs/common/toolbox.php on line 133
PHP Warning:  file_put_contents(logs/mysql.log): failed to open stream: No such file or directory in /var/www/vhosts/omroeplogos.nl/subdomains/agenda/httpdocs/common/toolbox.php on line 133

The calendar is installed in a subdomain, but that shouldn't be a problem I guess.
Posted:  12 Apr 2012 11:27   Last Edited By: Roel B.
The fact that the calendar is installed in a sub-domain should be no problem.
Apparently the lcalcron.php script (which includes the "common/toolbox.php" script) cannot find or open the file "lcaldbc.dat" (database credentials) in the directory ". . . /omroeplogos.nl/subdomains/agenda/httpdocs/".
Can you confirm that the directory "httpdocs/"  is indeed the root directory of the calendar where the file lcaldbc.dat is located?
Roel
Posted:  12 Apr 2012 17:19
lcalcron.php and lcaldbc.dat are both in both in the root of ..../httpdocs
I have made a screenshot.
http://dl.dropbox.com/u/1206023/luxcal260.jpg

André
Posted:  12 Apr 2012 19:28
Hallo André,
Could you try to set the file permissions (rechten) to 0755 for the file lcaldbc.dat. It's currently the only file with permissions 0644. File permissions are sometimes a bit tricky.

To test the effect, you can just launch the file lcalcron.php via your browser.
Groeten, Roel
Posted:  12 Apr 2012 21:33
If I launch lcalcron.php through a webbrowser it works fine.
But using 644 or 755 on lcaldbc.dat doesn't make a difference.
Posted:  12 Apr 2012 22:12
If it works when you launch lcalcron.php through the browser, then apparently your cron job changes the "current working directory".
Are you using LuxCal 2.6.0?
Could you tell me if line 52 of the file lcalcron.php reads: chdir(dirname(__FILE__));

I suggest to set the rights back to 644; that should do.
Posted:  12 Apr 2012 22:52
I am using 2.60 of LuxCal. Line 52 of lcalcron.php:

require 'common/toolbox.php';

I did not change anything in lcalcron.php.
As far as I know it is the original lcalcron.php
Posted:  13 Apr 2012 11:31
It looks like a problem one other user had before (something with the context in which cron jobs are run).
Send me your email address via the Contact Us page and I will send you a changed lcalcron.php file, which may solve your problem.
(Please as soon as possible; I'm away for a week after today).
Roel
Posted:  13 Apr 2012 14:22
I have send the mail via the e-mail adress on the contact page.

Thanks in advance,
André