[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4761: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
phplist forums • View topic - [how to] get phplist working with cpanel cron

[how to] get phplist working with cpanel cron

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

[how to] get phplist working with cpanel cron

Postby crowdofone » 1:40am, Fri 31 Aug, 2007

Last edited by crowdofone on 12:41pm, Mon 07 Jun, 2010, edited 19 times in total.
crowdofone
PL Nut
 
Posts: 16
Joined: 9:20pm, Thu 30 Aug, 2007

Many thanks!

Postby geoffb63 » 5:56pm, Fri 07 Sep, 2007

Your setup for cpanel cronjobs is a lifesaver!

I have tried all the suggested setups with no luck.

This is the first mention I have seen of editing the config.php file and it made all the difference.

Thank you so much, I can finally use the program.
Geoff
geoffb63
phpList newbie
 
Posts: 1
Joined: 5:48pm, Fri 07 Sep, 2007

Postby crowdofone » 12:15am, Sat 08 Sep, 2007

crowdofone
PL Nut
 
Posts: 16
Joined: 9:20pm, Thu 30 Aug, 2007

Postby darren1 » 1:39pm, Thu 20 Sep, 2007

Hi guys............ ive tried for the last week to get this up and running to send a mail out automatically once a week........ still no luck :( desperate now to get it up and running, i dont think i can be that far away! just for the record i have searched the forums etc, tried different advice and im posting here as a last resort....

Heres what ive done so far......

Turned on the repetition option in config file.

Set up a test list with 1 email (my email) to send the message.

Created a new message as normal, go to the schedule screen and set the embargo until time i want to send the first message, repeat hourly (just to test it working), then set the embargo until as 2 days later.

I then go to lists select my test list and hit send to selected mailing lists. I DONT PROCESS THE QUEUE. I understand that this is the part where the cron should kick in, and me pressing process queue is what i would do manually to send the message. i want to send it automatically without any intervention from me.

ive then gone to my cPanel STANDARD cron jobs entered the following info:

public_html/MY DIRECTORY/admin/index.php -p processqueue -c/home/MY SERVER/public_html/MY DIRECTORY/config/config.php

Then set it to every 15 mins, every hour, every day, every weekday, every month.

also for the record, ive edited my config file so this is showing:

$commandline_users = array();

and coded out with a # the following:

#$commandline_users = array("MY SERVER");


========================

Ive been using php fine manually for the last 12 months and dont have any problems sending messages. All im hoping to achieve by doing this is to send the same message, every week, to all people on my list, without me needing to do it manually. I want to send the message repeatedly (each week) even if the user has received it the week before.

All in all nothing seemed to be happening.... no message sent, no cron report recieved or send report from phplist.

I hope this all makes sense and someone can point me in the right direction as ive hit a brick wall now and any help is appreciated :(

Thank you in advance!
darren1
phpList newbie
 
Posts: 3
Joined: 10:17am, Sun 23 Apr, 2006

Postby crowdofone » 10:44pm, Mon 24 Sep, 2007

Looks like the cron part isn't working :x

First I'd double check the email address that Cron messages are meant to be appearing at ... Right at the top of the 'Standard' Cron page there's a text box and the words 'Please enter an email address where the cron output will be sent:'. Check that!

Else just try playing around with Cron. Another command I tried using (unsuccessfully) but that did at at least send me messages was:

curl -s http://MYDOMAIN/phplist/admin/?page=processqueue

Also .. considering you've got come this far it's probably worth hitting up your ISP to ask if Cron jobs are supported and to have them check n see whether their actually being processed.

[Edits due to previous link spam checking (even though i've been registered way over 10 days). Seems to be working today so have removed original obfuscation ... Was funny that it wouldn't even accept the word ' curl ' before tho!]

Last edited by crowdofone on 12:49pm, Tue 25 Sep, 2007, edited 4 times in total.
crowdofone
PL Nut
 
Posts: 16
Joined: 9:20pm, Thu 30 Aug, 2007

Postby flyerfixer » 4:55am, Tue 25 Sep, 2007

thanks for the help I will need to use that very soon!
flyerfixer
phpLister
 
Posts: 13
Joined: 12:05pm, Thu 06 Sep, 2007

Postby missp » 4:42am, Sat 29 Mar, 2008

missp
PL Nut
 
Posts: 33
Joined: 2:48am, Mon 10 May, 2004

Postby crowdofone » 7:23pm, Sun 30 Mar, 2008

I'm not familiar with batch processing 'on/off' being an option in config.php.

AFAIK you can just set the length of a batch session and the maximum number of emails sent during that session.

I would imagine that batch processing is simply a result of having a working cron implementation.

If you can start the mailout manually (by clicking on process queue) and the messages are arriving then it's unlikely to be an issue with the server sending out mail, as all the cron command is doing is pressing the 'process queue' button for you.

I sometimes find that if I send a message and then
edit & requeue it in order to send to a different list then it won't actually send anything even though it says in the eventlog that those messages were sent successfully.

Therefore for each test I'd recommend you always create new messages and try sending them rather than requeuing an old test newsletter that didn't arrive.

Also try:

Sending to email addresses with a different domain from the one(s) your currently using.

Checking that your 'from:' address actually exists (never known this to be a problem ...)

Checking that the two emails addresses you are using are properly separated in the admin.

Posting an email with your cron output here so we can see what messages you are receiving.
crowdofone
PL Nut
 
Posts: 16
Joined: 9:20pm, Thu 30 Aug, 2007

Postby missp » 11:47pm, Sun 30 Mar, 2008

Well for starters, here's the email I get from Cron:

Usage: php [options] [-f] <file> [args...]
php [options] -r <code> [args...]
php [options] [-- args...]
-a Run interactively
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>.
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-r <code> Run PHP <code> without using script tags <?..?>
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.

args... Arguments passed to script. Use -- args when first argument
starts with - or script is read from stdin
missp
PL Nut
 
Posts: 33
Joined: 2:48am, Mon 10 May, 2004

Postby crowdofone » 12:51am, Mon 31 Mar, 2008

crowdofone
PL Nut
 
Posts: 16
Joined: 9:20pm, Thu 30 Aug, 2007

Postby missp » 1:42am, Mon 31 Mar, 2008

That's what I thought -- just generic cron info. But my path is correct:

My phplist is installed in the directory: /public_html/lists/

So the cron looks like this:

/usr/local/bin/php -q/home/mysiteusername/public_html/lists/admin/index.php -p processqueue -c/home/mysiteusername/public_html/lists/config/config.php

And is set for every 5 minutes * every hour * every day * every month

I created a new message, clicked to send to the selected list which is my Test list. 3 addresses, one gmail, two are on the same VPS but different domain names from the one I am trying to send from.

My "From" address does exist.

Yes, mail goes out when I do it manually (although I am usually forced to push it again several times throughout the process as my browser times out and it can take 3 days to get 6,000 messages sent (at 500/hour) which is ridiculous! It's as if they will process themselves up to a point, but then stop).

So I'm rather desperate to get cron working so I can just rest easy knowing my full list will receive a message without my spending the weekend checking up on it.

So with the above info, I just tried again and got the same cron email sent to my "send From" admin address. The "subject line" displays the actual cron command. And no emails have been delivered.

Thinking the issue might be with the usr/local/bin/php path, I just tried usr/bin/php

which had the same results (or should I say, non-results).

Then I looked at the PHP Configuration from this domain's cpanel and it shows for paths and directories:
.:/usr/lib/php:/usr/local/lib/php

So trying again with usr/local/lib/php

and this time the cron output returned:
/bin/sh: /usr/local/lib/php: is a directory

Just stumped here. I guess the path problem is the pointer to php though so maybe I need to go to my host for that end of the info. Yes?
missp
PL Nut
 
Posts: 33
Joined: 2:48am, Mon 10 May, 2004

Postby Ernesto » 2:40am, Mon 31 Mar, 2008

Search first, Ask questions later...
Ernesto
PL Freak!
 
Posts: 592
Joined: 2:25am, Thu 08 Jun, 2006

Postby missp » 3:14am, Mon 31 Mar, 2008

missp
PL Nut
 
Posts: 33
Joined: 2:48am, Mon 10 May, 2004

Postby Ernesto » 4:52pm, Mon 31 Mar, 2008

Glad to have been of help, though major credit should be given to Crowdofone for posting and supporting this [how to] thread!

Cheers! 8)
Search first, Ask questions later...
Ernesto
PL Freak!
 
Posts: 592
Joined: 2:25am, Thu 08 Jun, 2006

Postby missp » 4:57pm, Mon 31 Mar, 2008

Oh absolutely! Crowdofone has finally resolved what was feeling like an impossible issue! I am immensely grateful for this thread and all the support. THANK YOU
missp
PL Nut
 
Posts: 33
Joined: 2:48am, Mon 10 May, 2004

Next

Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest