[how to] make phplist work with Cron Jobs

Solutions for other advanced phplisters

Solution worked?

Yes
17
30%
No
14
25%
Still working on it
26
46%
 
Total votes : 57

Success!

Postby bruce7890 » 4:34pm, Mon 21 Apr, 2008

I just got the info from wspademan and it worked first time :-)
bruce7890
phpLister
 
Posts: 5
Joined: 8:37am, Mon 21 Apr, 2008

For BlueHost users

Postby JMH » 2:45am, Tue 13 May, 2008

On my BlueHost hosted site, I finally got cron to work with the following command:

USER=listprocessor; export USER; /usr/local/bin/php /home/USERNAME/public_html/PATH_TO_PHPLIST/admin/index.php -pprocessqueue -c/home/USERNAME/public_html/PATH_TO_PHPLIST/config/config.php

replacing USERNAME and PATH_TO_PHPLIST with the appropriate information.

The /usr/local/bin/php path is very important; somebody above mentioned that that was where they found the CLI version of PHP. So it was for me, and I would suppose it to be so for others on BlueHost.
JMH
phpLister
 
Posts: 5
Joined: 11:35am, Wed 07 Feb, 2007

Re: success on 2.9.4 - need to set USER environment variable

Postby five5 » 11:12am, Sat 17 May, 2008

Julianna wrote:I finally got it to work for me!

For reference, I am using CPanel and this is what I did:


Thanks very much Julianna, your discoveries and explanation helped me out and IT WORKS!!!
five5
phpLister
 
Posts: 6
Joined: 11:51pm, Sat 03 May, 2008

Re: Some errors occurred in the PHPlist Mailinglist System

Postby Guest » 12:17am, Sun 21 Sep, 2008

vincentnjara wrote:I have configured cron for processqueue as mentioned above, still I receive error below through mail.


Some errors occurred in the PHPlist Mailinglist System
URL:
Error message(s):

Error: You do not have enough privileges to access this page

==== debugging information

SERVER Vars
SHELL=
USER=xyz
PATH=
PWD=
SHLVL=1
HOME
LOGNAME=xyz
_=PHP_SELF=
argv=Array
argc=4

thanks in advance for any help

I have found out a solution for this error.

1) Go to database table ‘phplist_task’ and get the id of the row for processqueue.
2) Then in table ‘phplist_admin_task’ search for the row that has admin user Id (Id of user who suppose to access the processqueue through cron) and the Id mentioned in the step 1.
3) If such a row exists then edit the value of ‘level’ column to 1(if the value is 0).
4) If such a row do not exists the create a new row with a admin user Id (Id of user who suppose to access the processqueue through cron) and the Id mentioned in the step 1 and the ‘level’ column value as 1.

Hope this information will be usefull to All
Vincent
[/code]



Hi
I can not see any value for processqueue in table ‘phplist_task’

But when I run the process manually through my browser / admin area - the process runs.

Am I missing something here. My cron is throwing message - Error: You do not have enough privileges to access this page

regards / Prafulla
Guest
 

Status: 404 Not Found

Postby BraveDave » 11:14pm, Fri 23 Jan, 2009

Hello guys, im grateful 4 all ur help.
I implemented this crob job fix.
I did the whole steps,
Command to run:
php /home/albawtaka.com/public_html/mailinglist/admin/index.php page=processqueue login=albawtaka password=password

but i keep getting this email:
Status: 404 Not Found
X-Powered-By: PHP/5.2.8
Content-type: text/html

No input file specified.


what seems to be the problem?!!!
thanks for ur time guys...

Dave
BraveDave
PL Nut
 
Posts: 19
Joined: 4:17pm, Mon 03 Apr, 2006
Location: New York

Re: [how to] make phplist work with Cron Jobs

Postby Tharina » 10:53pm, Thu 11 Jun, 2009

I can not find the following line:
output("Sending $messageid to $useremail");
sendEmail($messageid,$useremail,$userhash,$htmlpref,$rssitems);

do I have the wrong version of phplist or am I looking in the wrong file....
"processqueue.php" in the directory /public_html/fountain/admin/

I am not getting this to work and desperately trying to figure out what Im missing

regrds
T
Tharina
phpList newbie
 
Posts: 1
Joined: 3:29pm, Thu 11 Jun, 2009

Re: [how to] make phplist work with Cron Jobs (help required)

Postby brianstorm » 12:32pm, Fri 10 Jul, 2009

hi,
i'm in need of debugging help please (for php cgi)... i think i have followed every variation of the cron processqueue instructions and i can't get any of them to run from cron... (using webmin) i can manually run the jobs, using this line

/usr/local/bin/php-list-process-q.sh -p processqueue >> /dev/null

which refers to this script

Code: Select all
    #!/bin/bash

    # script to run PHPlist from commandline. You may need to edit this to make it work
    # with your shell environment. The following should work for Bash

    # in commandline mode, access is restricted to users who are listed in the config file
    # check README.commandline for more info

    # identify the config file for your installation
    CONFIG=/var/coorcet-path/config/config.php
    export CONFIG

    # alternatively you can use -c <path> on the commandline

    # run the PHPlist index file with all parameters passed to this script
    /usr/bin/php /var/correct-path/admin/index.php page=processqueue login=USERNAME password=PASSWORD       $*

end of script.... (note that i had to change the permissions on the script and convert it using dos2unix to get it to run from the command line - MANUALLY_PROCESS_QUEUE in config.php had to be set at 1)

So, this works fine when I run it within webmin but when I run it on a cron job, I get the following message

Some errors occurred in the PHPlist Mailinglist System
URL:
Error message(s):
Error: You do not have enough privileges to access this page

==== debugging information

SERVER Vars
SHELL=/bin/sh
USER=smtpd-domain
CONFIG=/var/www/html/www.thevoodoorooms.com/www/nu-list/config/config.php
PATH=/usr/bin:/bin
PWD=/home/smtpd-domain
HOME=/home/smtpd-domain
SHLVL=2
LOGNAME=smtpd-domain
_=/usr/bin/php
PHP_SELF=
argv=Array
argc=6

I believe that I must be close, but can't figure out how to fix this error... I'd be very grateful for some advice...
Many thanks
Brian
Replacement Projector Lamps & Accessories in the UK
http://www.london-projectors.co.uk/projector-lamps.php
brianstorm
PL Geek
 
Posts: 138
Joined: 9:12am, Fri 26 Jun, 2009

Re: [how to] make phplist work with Cron Jobs

Postby H2B2 » 4:11pm, Sun 12 Jul, 2009

Have you looked at this tutorial? [tutorial] crontab queue processing with php-cgi
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: [how to] make phplist work with Cron Jobs

Postby brianstorm » 10:06am, Mon 13 Jul, 2009

Thank you very much!

That's me got it working... I have tried some php-cgi instructions but I definitely didn't create the new user, once I had that step in place I was able to run straight from cron (no script required)....

H2B2 you are the don!
Replacement Projector Lamps & Accessories in the UK
http://www.london-projectors.co.uk/projector-lamps.php
brianstorm
PL Geek
 
Posts: 138
Joined: 9:12am, Fri 26 Jun, 2009

Re: [how to] make phplist work with Cron Jobs (Blue Host Users)

Postby entertainas » 12:07pm, Fri 11 Sep, 2009

OMG!!! Just to say that the blue host solution posted by JMH works perfectly for all those on Blue Host... and I tried every solution posted here before I used this simple easy solution (yes I feel stupid I do all coding and everything myself so finding solutions from forum is so important for me)
-------------
JMH wrote:On my BlueHost hosted site, I finally got cron to work with the following command:

USER=listprocessor; export USER; /usr/local/bin/php /home/USERNAME/public_html/PATH_TO_PHPLIST/admin/index.php -pprocessqueue -c/home/USERNAME/public_html/PATH_TO_PHPLIST/config/config.php

replacing USERNAME and PATH_TO_PHPLIST with the appropriate information.

The /usr/local/bin/php path is very important; somebody above mentioned that that was where they found the CLI version of PHP. So it was for me, and I would suppose it to be so for others on BlueHost.

Try this and don't miss out the USER=listprocessor; export USER; part as it is important.

Thanks JMH
WAR - Entertainas
entertainas
phpList newbie
 
Posts: 1
Joined: 11:55am, Fri 11 Sep, 2009

Re: [how to] make phplist work with Cron Jobs

Postby endjo » 12:13pm, Sat 19 Sep, 2009

Hi guys,

I could not make this cron working, so

1st:
config.php
Code: Select all
$commandline_users = array();
-
Code: Select all
define("MAILQUEUE_BATCH_SIZE",360);
define("MAILQUEUE_BATCH_PERIOD",3600);
define('MAILQUEUE_THROTTLE',1);


2nd:
I made file cron.php wich i placed in /lists/admin/

Code: Select all
#!/usr/bin/php
<?php
system("/usr/local/bin/php /users/xxxxx/public_html/lists/admin/index.php -pprocessqueue -c/users/xxxxx/public_html/lists/config/config.php")
?>


3rd:
cronjob -
Code: Select all
/usr/local/bin/php -q /users/xxxxxx/public_html/lists/admin/cron.php


message I get from cron:

PHPlist version 2.10.10 (c) 2000-2009 Tincan Ltd, http://www.phplist.com
Usage: /users/xxxxx/public_html/lists/admin/index.php -p page [other parameters]


can anyone help, please !!!!

P.S. - I appologize I posted this twice.
endjo
PL Nut
 
Posts: 18
Joined: 6:52pm, Mon 31 Aug, 2009

Re: [how to] make phplist work with Cron Jobs

Postby indidginus » 1:36pm, Mon 19 Apr, 2010

Now we have to create a file called "phplist" (without the quotes please) in the same directory as the phplist installation.


Just to clarify - I should copy & paste that text into something like notepad & save it as "phplist" with no extension? And then upload it to the lists directory on my webhost?
indidginus
PL Nut
 
Posts: 44
Joined: 11:27am, Sun 18 Apr, 2010
Location: Cape Town, South Africa.

Re: [how to] make phplist work with Cron Jobs

Postby popovici » 12:59pm, Thu 22 Apr, 2010

endjo, I'm not sure if you're on a shared server or a private one, but in any case, ask your hosting service support if using lynx to run the cron is allowed and if so, ask for an example for your cron. I was using the same installation as yours and that's what made the crons run for me.

Good luck!
popovici
PL Nut
 
Posts: 25
Joined: 7:40am, Sat 28 Mar, 2009

Re: [how to] make phplist work with Cron Jobs

Postby drideur » 10:03am, Fri 23 Apr, 2010

Hi, every body.
i just param all correctly but the cron repense : /bin/sh: php: command not found
so i modify the command like this : /home/content/s/f/d/sfdev/html/lists/admin/index.php page=processqueue login=login password=passeword (without php)
and i have this message : /bin/sh: /home/content/s/f/d/sfdev/html/lists/admin/index.php: Permission denied


what can i do ?

sos please
thank's
drideur
phpList newbie
 
Posts: 3
Joined: 6:45pm, Fri 16 Apr, 2010

Re: [how to] make phplist work with Cron Jobs

Postby drideur » 10:39am, Fri 23 Apr, 2010

Hi every body,

please help,
in configuration cron of godaddy hosting , i try to put the line command : /web/cgi-bin/php5 "$HOME/html/lists/index.php page=processqueue login=XXXX password=XXXXX", but in the reponse of cron it say :

/web/cgi-bin/php5: Symbol `client_errors' has different size in shared object, consider re-linking
Status: 404 Not Found
Content-type: text/html
No input file specified.

in file phplist :
CONFIG= /HOME/html/lists/config/config.php
export CONFIG

/web/cgi-bin/php5 /HOME/html/list/admin/index.php $*

what can i do to resolve this problem??

thank' a lot
drideur
phpList newbie
 
Posts: 3
Joined: 6:45pm, Fri 16 Apr, 2010

PreviousNext

Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest