PHPList Version v3.0.12 - Cron Job Not Working. HELP PLEASE

Once you've installed phpList... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

PHPList Version v3.0.12 - Cron Job Not Working. HELP PLEASE

Postby guest » 2:39pm, Fri 03 Apr, 2015

Hi,

I've been reading all around the forums and have tried every suggestions on setting up a cron job with cPanel, but not even a single cron command is working.

I am using the latest version -v3.0.12. Now I can't figure out what is missing since I've tried everything being suggested to put in the command line for the cron job to run.

I am badly needing your help on this matter. Can you paste here the exact cron command line for the email queue to run using cron job?

I would appreciate your help.

Thanks.
guest, working from home
http://csl.ink/cVj
guest
phpLister
 
Posts: 10
Joined: 5:07am, Sun 15 May, 2011

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby danwaterloo » 2:50pm, Fri 03 Apr, 2015

It all depends on your hosting provider, the type of account that you have (what it's features are), and what version/interfaces(php, php-cli, or php-cgi) of php are installed.

Can you provide any info on the above?
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby guest » 3:37pm, Fri 03 Apr, 2015

Hi danwaterloo,

Thank you for your comment. How would I know if it's php-cli or php-cgi?

I'm on a linux server:
Apache version 2.2.27
PHP version 5.3.27

Thanks.
guest, working from home
http://csl.ink/cVj
guest
phpLister
 
Posts: 10
Joined: 5:07am, Sun 15 May, 2011

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby danwaterloo » 3:56pm, Fri 03 Apr, 2015

is it your own server? can you get to the command line?

if so, php -v will provide the results. if you paste it, I can provide (hopefully) something that will work

also what is the result of :

which php
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby guest » 4:01pm, Fri 03 Apr, 2015

Hi,

Yes, it's my own server. Here are the results:

PHP 5.3.27 (cli) (built: Jul 13 2014 03:35:42)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo

Hope to get it working as I've spent almost a week to get my PHPList running the cron but to no avail.

Thanks.
guest, working from home
http://csl.ink/cVj
guest
phpLister
 
Posts: 10
Joined: 5:07am, Sun 15 May, 2011

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby danwaterloo » 6:02pm, Fri 03 Apr, 2015

the basic process is to figure out what the command is.... then put it into a cron job.

here's what worked on my machine... this is what I put in my /etc/crontab file...

Code: Select all
# added for phplist
*/10 12-13  * * 1,2,3 root /usr/bin/php -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php
0 0,4 * * * root /usr/bin/php -q /var/www/html/lists/admin/index.php -p processbounces -c /var/www/html/lists/config/config.php


here are the values I got from my machine:

[root]# which php
/usr/bin/php

[root]# php -v
PHP 5.3.29 (cli) (built: Aug 14 2014 19:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies

You should first test the command on the command line:

Code: Select all
/usr/bin/php -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php


Once that works (you'll have to check all of the paths, etc. and modify for your specific server (mine is centos 5). when it works you should get a response that indicates it could find everything...

when that is working, you can put the command in the crontab file, with whatever timing you want.

Can you figure out what the command is that processes the queue? let me know
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby guest » 6:18pm, Fri 03 Apr, 2015

Hi,

Thank you for getting back. Here's my which php:
[root] # which php
/usr/local/bin/php

Now I've tried this command line:
/usr/local/bin/php -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php

Still not working...

I'm on Centos 5 also. But my phpList is installed on another domain (not the root). Can you guide on what command should be executed?

Thanks.
guest, working from home
http://csl.ink/cVj
guest
phpLister
 
Posts: 10
Joined: 5:07am, Sun 15 May, 2011

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby danwaterloo » 7:21pm, Fri 03 Apr, 2015

your almost there... match the red part of below to whatever the exact path is on your machine...

/usr/local/bin/php -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php
Last edited by danwaterloo on 1:07am, Mon 06 Apr, 2015, edited 1 time in total.
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby guest » 9:26pm, Fri 03 Apr, 2015

Hi Dan,

Thank you for getting back.

As per your instruction, I've tried this line:
/usr/local/bin/php -q /var/home/*cpaneluser*/public_html//lists/admin/index.php -p processqueue -c /var/home/*cpaneluser*/public_html//lists/config/config.php

Is that how it looks like or this one:
/usr/local/bin/php -q /var/home/*cpaneluser*/public_html//lists/admin/index.php -p processqueue -c /home/*cpaneluser*/public_html//lists/config/config.php

Still did not work.

My hosting provider told me that this one is the correct path:
php /home/cpaneluser/public_html/lists/admin/index.php -p processqueue -c /home/cpaneluser/public_html/lists/config/config.php

I will try this and will get back then.

Thanks.
guest, working from home
http://csl.ink/cVj
guest
phpLister
 
Posts: 10
Joined: 5:07am, Sun 15 May, 2011

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby MarkA. » 12:13am, Mon 06 Apr, 2015

Hello,
I too am a long time user and occasional poster to this forum. I have used PHPList successfully for many years and am very thankful to all the developers and people who have made this possible.

I cannot figure out why my cron job is not working in 3.0.12 and is not firing and starting or sending the emails.

I am using:
PHP version 5.4.39
MySQL version 5.5.42-37.1-log
all on Bluehost.com

My cron is set to fire every two minutes and previously worked fine with these settings in my config.php file:
define("MAILQUEUE_BATCH_SIZE",10);
define("MAILQUEUE_BATCH_PERIOD",69);
define('MAILQUEUE_THROTTLE',2);

I was using PHPList version 3.0.5 with no issues until I upgraded to 3.0.12

My previous cron job that previously worked fine was:
Code: Select all
/usr/bin/curl -s 'http://www.mississauga4sale.com/lists/admin/index.php?page=pageaction&action=processqueue&login=***my admin name***&password=***my password***//' >/dev/null 2>&1


This did not work with version 3.0.12

After researching this forum to see what the issue may be, I found very limited information that talked about secret and "Secret for remote processing" on the Settings page so I tried this:
Code: Select all
/usr/bin/curl -s 'http://www.mississauga4sale.com/lists/admin/index.php?page=pageaction&action=processqueue&secret=***my secret code***' >/dev/null 2>&1


and this did not work or fire the cron job. It gives me an email that states:

Code: Select all
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0This page can only be called from the commandline

<!---->


and goes on and on, but not sure if any of it has passwords or sensitive information contained in it so I am not sending the entire email.

I read the post at https://forums.phplist.com/viewtopic.php?f=34&t=42068&hilit=cron and then I tried this for the cron:

Code: Select all
curl 'http://www.mississauga4sale.com/lists/admin/index.php?page=processqueue&secret=***my secret code***'


and this did not begin the job or fire the emails either. I tried many variation of this cron code but could not get the job to begin sending.

Luckily, when I upgraded to 3.0.12 I only renamed the old 3.0.5 version to /lists-previous so I was able to rename the current version to a temporary name and change the name of /lists-previous back to /lists and it's now working, but certainly not as I would like to have 3.0.12 online. (Aside: I'm telling you this as others may also be upgrading and this is the easiest method to revert back if the new version doesn't work as it should)

I've tried to find information regarding this secret code and cron jobs for version 3.0.12 but the information is limited and the

I've read the post at https://forums.phplist.com/viewtopic.php?f=35&t=42139 but timouts or exceeding emails/hour is not my problem, it just won't fire or start sending at all.

I looked in the documentation but I cannot find help using this secret code and cron jobs.

Any help would be appreciated to solve this issue.

Thanks again!
Mark :mrgreen:
A. Mark Argentino, P.Eng., Broker
http://www.mississauga4sale.com
MarkA.
PL Geek
 
Posts: 80
Joined: 1:36pm, Thu 17 Feb, 2005
Location: Mississauga, Ontario, Canada

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby danwaterloo » 1:03am, Mon 06 Apr, 2015

Here's an example of what works for the command line on my machine...

/usr/bin/php -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php

I don't use curl. You might want to try php, or php-cli The curl command receives a cookie and sessionid, and so that might be the cause of your problem.

make sure you adjust the full path to match exactly what your path is on your machine. depending on your machine, you might need to use the php-cli command instead of php.
set the cron period to every minute, and have it send the email to you. it will tell you what's wrong. once it's working, you can stop sending emails to yourself via the cron, and adjust the timing on the cron to meet your needs... (i.e. every 5 or 10 minutes for processqueue, and about once or twice a day for processbounces).
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby MarkA. » 1:33am, Mon 06 Apr, 2015

Hi Dan

Thanks for the help and suggestion. I'll give this a try once my current job is complete, takes about 25 hours to send 9000 emails, so it will be tomorrow evening.

If I try what you have suggested below, how will the job work if there is no login name or password or no "secret" string to authenticate, or is this not necessary with version 3.0.12?

Just to confirm, using your code suggestion, if my host is mississauga4sale.com and I have to use www. then the correct cron code would be:
Code: Select all
/usr/bin/php -q /var/www/http://www.mississauga4sale.com/lists/admin/index.php -p processqueue -c /var/www/http://www.mississauga4sale.com/lists/config/config.php


is this correct? I know html, but php and cron code is not my best area

PHPList is installed in my http://www.mississauga4sale.com/lists/ folder

Thanks again,
Mark :mrgreen:
A. Mark Argentino, P.Eng., Broker
http://www.mississauga4sale.com
MarkA.
PL Geek
 
Posts: 80
Joined: 1:36pm, Thu 17 Feb, 2005
Location: Mississauga, Ontario, Canada

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby danwaterloo » 1:37am, Mon 06 Apr, 2015

no, the path is going to be the file system path on your server... starting with the / directory.
it won't have the http: etc....
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby MarkA. » 2:18am, Mon 06 Apr, 2015

Hi Dan,

OK, does this look correct?

Code: Select all
/usr/bin/php -q /var/www/xxxxxxxx/public_html/lists/admin/index.php -p processqueue -c /var/www/xxxxxxxx/public_html/lists/config/config.php


where xxxxxxxx is the home directory. (I just edited this part)

I can try this tomorrow night and variations, to see if I can get this working.

I'll post back here once I've experimented.

Thank you,
Mark
A. Mark Argentino, P.Eng., Broker
http://www.mississauga4sale.com
MarkA.
PL Geek
 
Posts: 80
Joined: 1:36pm, Thu 17 Feb, 2005
Location: Mississauga, Ontario, Canada

Re: PHPList Version v3.0.12 - Cron Job Not Working. HELP PLE

Postby guest » 5:08am, Mon 06 Apr, 2015

Hi Dan and Mark,

Finally, my cron job has started running yesterday. The command line that my hosting provider gave me did work fine.

Here's the code:

Code: Select all
php /home/CPANELUSER/public_html/lists/admin/index.php -p processqueue -c /home/CPANELUSER/public_html/lists/config/config.php


Note: You may replace the part CPANELUSER with your own. So if your cPanel username is Mark, the complete command line would look like:

**Assuming that your phpList is installed on the same directory where mine was installed: home/public_html/lists

Code: Select all
php /home/Mark/public_html/lists/admin/index.php -p processqueue -c /home/Mark/public_html/lists/config/config.php


This is for PHP-cli users. I don't know if it works with PHP-cgi. I am not an expert in any of the two interfaces. I just want to share this so we could at least help those fellow phpList users who are having the same problem.

By the way, Dan... do you know what's the best set up for speeding up the sending by batch? I am on a VPS server but I don't want to overload my server by sending unlimited emails per hour. So I want to send using the batch processing. So what I did was to configure my phpList to be able to send 480 emails per hour. Please correct me if this is not the right configuration, as I noticed that the result did not correspond to what I've configured my phpList to do. After 24 hours, my phpList did only send 2,229 emails out of 11,520 (480/hour*24=11,520).

Here's my Queue and Load management:

("MAILQUEUE_BATCH_SIZE",120);

("MAILQUEUE_BATCH_PERIOD",900);

('MAILQUEUE_THROTTLE',5);

('MAILQUEUE_AUTOTHROTTLE',0);

('USE_DOMAIN_THROTTLE',1);
('DOMAIN_BATCH_SIZE',1);
('DOMAIN_BATCH_PERIOD',120);

('DOMAIN_AUTO_THROTTLE',1);

('MAX_PROCESSQUEUE_TIME',0);
-----------------------------------------

Please correct this if you have the best option to make the sending at least send the correct amount of emails per hour.

Your advice would be greatly appreciated.

Regards.
guest, working from home
http://csl.ink/cVj
guest
phpLister
 
Posts: 10
Joined: 5:07am, Sun 15 May, 2011

Next

Return to Questions and Problems after Installing

Who is online

Users browsing this forum: No registered users and 0 guests

cron