$commandline_users = array("cpanel username");
/path/to/bin/phplist.txt -p processqueue
Cafamily wrote:I got cron jobs to work on 2.9.4 so i thouht I'd report what I did and make a couple of comments on the original post by Daniela (which was helpful)...
1. why create a script called "phplist" if you're not going to use it? The cronjob line given runs the /lists/admin/index.php directly so the phplist file is superfluous unless you use that ( as I have ).
2. with 2.9.4 a MAILQUEUE_THROTTLE variable exists in the config file so I used that, my settings are :
- Code: Select all
define("MAILQUEUE_BATCH_SIZE",200);
define("MAILQUEUE_BATCH_PERIOD",3600);
define('MAILQUEUE_THROTTLE',5);
this will send a message every 5 seconds, batching no more than 200 message per hour. This is fine for us as we have 800+ subscribers and two lists.
3. with 2.9.4 (at least) a phplist file is included in the download - it's under the bin directory. I relocated this to a location away from my public html files ( say /usr/local/cron_scripts ) and point to this in my cronjob line:
- Code: Select all
# every hour at 15 minutes past we process the queued messages
15 * * * * /usr/local/scripts/phplist -p processqueue
I then edited the phplist file to reflect the locations of my config.php and admin/index.php file.
3. I found no need to include any login or password variables in the call to the admin/index.php file. The problem for me was that a cronjob does not have a USER environment variable set and it is from this that the admin/index.php file checks against commandline_users.
The solution was to create a pseudo (non existent) user in the commandline_users variable in the config.php file. so ...
- Code: Select all
$commandline_users = array("listprocessor","any other","users,"you want","to set");
I then inserted the following in my phplist file which would set the USER environment varibale (if it wasn't already set)
- Code: Select all
# Check the USER variable is set
if [$USER]; then
echo found USER variable
else
USER=listprocessor
export USER
fi
this went just below the line
- Code: Select all
export CONFIG
finally make sure the phplist file is executable (chmod 755)
That did it for me - hope it helps
X-Powered-By: PHP/4.4.4
Set-Cookie: PHPSESSID=dd64053669ad70b2ed79fa2dfec6681b; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html
vincentnjara wrote:Error: You do not have enough privileges to access this page
PHPlist version 2.10.4 (c) 2000-2007 Tincan Ltd, http://www.phplist.com
Usage: /home/chibiswitch/public_html/phplist/admin/index.php -p page [other parameters]
staticfiends wrote:now it gives me this sent to me:![]()
- Code: Select all
Content-type: text/html
X-Powered-By: PHP/4.3.10
Set-Cookie: PHPSESSID=b5f14d33e1a5c188f1fed91fb37e5baf; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Return to Advanced Answers, Howtos, Tips & Tricks
Users browsing this forum: No registered users and 1 guest