Opened 11 years ago

Closed 11 years ago

#710 closed Bug/Something is broken (fixed)

Drupal Cron Jobs

Reported by: tskudlark@… Owned by: Jamie McClelland
Priority: Medium Component: Tech
Keywords: sharedsoftware phpmailer drupal Cc: tskudlark@…
Sensitive: no

Description

I am attempting to configure Cron Jobs for the following domain: "http://utla.mayfirst.org" However my browser is returning the following error when I attempt to load the cron configuration page "http://utla.mayfirst.org.cron.php"

Complete error message: Fatal error: Class 'phpmailer' not found in /home/members/utla/sites/utla.net/web/sites/default/modules/notify/notify.inc on line 370

I need further assistance or direction from within the CP in setting up cron jobs to run automatically upon the mentioned domain.

The error message above also appears after certain modules are turned on in the drupal core. I would like to isolate the cause of this issue and correct the problem if possible.

Thank you

I have also run into this same error message while configuring other modules.

Change History (11)

comment:1 Changed 11 years ago by Daniel Kahn Gillmor

Keywords: sharedsoftware phpmailer drupal added

Which modules are you trying to use which trigger this error?

phpmailer is not currently installed on malcolm, which would explain the error. Do you think that PHP library should be installed and maintained separately?

[0  dkg@malcolm ~]$ apt-cache search phpmailer
libphp-phpmailer - full featured email transfer class for PHP
[0 dkg@malcolm ~]$ apt-cache policy libphp-phpmailer
libphp-phpmailer:
  Installed: (none)
  Candidate: 1.73-2etch1
  Version table:
     1.73-2etch1 0
        500 http://ftp.us.debian.org etch/main Packages
        500 http://security.debian.org etch/updates/main Packages
[0 dkg@malcolm ~]$ 

comment:2 Changed 11 years ago by Jamie McClelland

I think phpmailer is a reasonable library to have installed server-wide. I just installed it via aptitude. Are you still getting the error?

As for cron - have you seen our cron job faq? Cron jobs cannot be set from the control panel - but the cron faq explains how to set them via secure shell.

comment:3 Changed 11 years ago by utla

Yes I tried to run "http://utla.mayfirst.org/cron.php" and the same error still occurs.

comment:4 Changed 11 years ago by utla

I read the notes on setting up cron from ssh. I will attempt to SSH into the server and configure the cron that way.

comment:5 Changed 11 years ago by Jamie McClelland

Does the notify module have a settings page in Drupal? It may allow you to set the path to phpmailer. If so - it should be set to:

/usr/share/php/libphp-phpmailer

comment:6 in reply to:  5 ; Changed 11 years ago by utla

Replying to https://id.mayfirst.org/jamie:

Does the notify module have a settings page in Drupal? It may allow you to set the path to phpmailer. If so - it should be set to:

/usr/share/php/libphp-phpmailer

I set up cron via SSH and the terminal, although it appears that the crontab write took, I am still receiving the same error.

Notify has a module settings page, however the module administration doesn't allow configuration of paths in this version of Drupal (notify module). This may require that the path in the file root module.inc be set to the phpmailer, I will check that resource in addition and post what I find.

comment:7 in reply to:  6 ; Changed 11 years ago by utla

Replying to https://id.mayfirst.org/utla:

Replying to https://id.mayfirst.org/jamie:

Does the notify module have a settings page in Drupal? It may allow you to set the path to phpmailer. If so - it should be set to:

/usr/share/php/libphp-phpmailer

I set up cron via SSH and the terminal, although it appears that the crontab write took, I am still receiving the same error.

the following is the command line used when configuring cron via SSH.

5 * * * * wget -q -O- http://utla.mayfirst.org/cron.php

Notify has a module settings page, however the module administration doesn't allow configuration of paths in this version of Drupal (notify module). This may require that the path in the file root module.inc be set to the phpmailer, I will check that resource in addition and post what I find.

comment:8 in reply to:  7 Changed 11 years ago by utla

This is what i found. The Notify module doesn't allow path configuration via the web GUI in Drupal. What i did find when looking in "notify.ini" that there is an external path set to a file named "class.phpmailer.php". would the path to phpmailer possibly be within this document? If so what variable would this be considered? Any info on this will be very helpful.

Thanks

comment:9 Changed 11 years ago by Jamie McClelland

Yup- that's the one. It should be set to:

/usr/share/php/libphp-phpmailer/class.phpmailer.php

comment:10 in reply to:  9 Changed 11 years ago by utla

BINGO, that did it, I ran "http://utla.mayfirst.org/cron.php" and the error message has gone away. I set the cron interval and will now wait to see if indeed the cron job will run successfully. I will close this ticket if the cron job executes successfully. I have a strong feeling this did the trick, Thank you for your help!

comment:11 Changed 11 years ago by utla

Resolution: fixed
Status: newclosed

The Drupal server log indicates that the Cron Job ran successfully! THANK YOU!

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.