CRON Problem

Once you've installed phpList Version 2... 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. This is for Version 2 of phpList (the orange one).

CRON Problem

Postby ironman » 1:31am, Mon 12 Mar, 2007

I'm trying to set up a cron using:

php/home/USERNAME/public_html/lists/admin/index.php?page=processqueue&login=USERNAME&password=PASSWORD

I get the following:

Status: 404
X-Powered-By: PHP/4.4.4
Content-type: text/html

No input file specified.

If I use http://www.example.com/lists/admin/?page ... d=PASSWORD

I get the process page and message goes out.

What am I doing wrong or missing?
ironman
phpLister
 
Posts: 11
Joined: 2:46am, Sat 24 Feb, 2007

Re: CRON Problem

Postby H2B2 » 4:52pm, Thu 15 Mar, 2007

ironman wrote:php/home/USERNAME/public_html/lists/admin/index.php?page=processqueue&login=USERNAME&password=PASSWORD

It seems to me that line is missing the call to PHP, e.g.:
For PHP-cgi, something like this should work:
/bin/usr/php /home/domain.com/lists/admin/index.php page=processqueue login=myusername password=mypassword >/dev/null

For PHP-cli, you could try something like this:
USER=listprocessor; export USER; /usr/bin/php /home/mydomain/lists/admin/index.php -pprocessqueue -c/home/mydomain/lists/config/config.php

Ref:
http://docs.phplist.com/PhpInterfacesInfo
http://docs.phplist.com/SetupCronJob
http://docs.phplist.com/CronJobExamples
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby bekabug » 3:25pm, Thu 05 Apr, 2007

Please forgive my ignorance, but what does the second part of your PHP CLI example do? Most of the cron examples I have looked at have > dev/null/ and I am assuming that stops it when there is nothing else to process.

Your example doesn't have that, but it does have -c /home/domain/list/etc....

Also, should USER=listprocessor be set to one of my users or should that be left alone?

Thanks!

Beka
bekabug
PL Nut
 
Posts: 34
Joined: 3:21pm, Thu 05 Apr, 2007

Postby H2B2 » 5:30pm, Thu 05 Apr, 2007

> dev/null/ pipes (sends) screen output to device null, i.e. it only stops output from being shown, either on PHP-cli or PHP-cgi. For testing purpouses you can leave it out, so you can check what's happening.

bekabug wrote:Your example doesn't have that, but it does have -c /home/domain/list/etc....
The -c parameter loads the config.php configuration settings.

bekabug wrote:Also, should USER=listprocessor be set to one of my users or should that be left alone?
Yes, you should enter the name of an admin which should also appear in the $commandline_users setting in config.php.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby bekabug » 2:18am, Fri 06 Apr, 2007

My server emails me this whenever the job runs. The queue is never processed. What am I doing wrong??

I believe that it is the login page...

Code: Select all
Content-type: text/html
X-Powered-By: PHP/4.3.11
Set-Cookie: PHPSESSID=87d228105ef0d77c9ec2045b59c220c9; 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

<using>
<DOCTYPE>

<html><head>
<meta>
<meta>
<link>
<link>
<link>
<link>
<meta>
<meta>
<meta>
<meta>

<script></script><meta><meta><title>phplist :: PHPlist :: Main Admin Page</title>
<link>
</head>
<body>
<a></a>
<div>
<table>
<tr>
<td><img></td>
<td><img></td>
<td><img></td>
</tr>

<tr>
<td>
<TOP>
<TABLE>
  <TR>
    <TD><a><img></a></TD>
    <TD><FONT>&nbsp;<I>powered by: </I><BR>&nbsp;<B>[<A><I>PHP</I></A>]</B> + <B>[<A>mySQL</A>]</B></FONT></TD></TR>
  <TR>
    <TD><SPAN>phplist</SPAN></TD></TR>
  <TR>
    <TD><IMG></TD>
    <TD><IMG></TD>
    <TD><IMG></TD></TR>
  <TR>
    <TD>&nbsp;</TD>
<td><div>
<br>
<p>phplist - main admin page</p><div><br><form><input><select><option>Deutsch </option><option>English </option><option>espa&ntilde;ol</option><option>fran&ccedil;ais </option><option>portugu&ecirc;s </option><option>Traditional Chinese</option></select></form></div><p>This document requires you to log in<br>
<font></font>


<script>

if (!navigator.cookieEnabled) {
  document.writeln('<div>In order to login, you need to enable cookies in your browser</div>');
}

</script>
<form><input>
<input>
<table>

<tr><td><span>Name:</span></td></tr>
<tr><td><input></td></tr>

<tr><td><span>Password:</span></td></tr>
<tr><td><input></td></tr>

<tr><td><input></td></tr></table>
</form>


<form><input>
<input>
<p><hr>

Forgot Password?:

Enter your email: <input>


<input>

</form></div>
</td>
<td>
<div>
<span><a>main page</a><br></span><span><a>about phplist</a><br></span></div>
</td>
</tr>




<tr><td>&nbsp;</td></tr>



<tr><td>&nbsp;</td></tr>
</table>
<TOP>

</td></tr>


<tr>
<td><img></td>
</tr>

<tr>
<td><img></td>
<td>&copy; <a>tincan limited</a> | <span>phplist powered by </span><a>phplist</a> - version 2.10.4</td>
<td><img></td>
</tr>

<tr>
<td><img></td>
</tr>

<tr>
<td><img></td>
</tr>

<tr>
<td>
&nbsp;
</td>
</tr>
</tbody>
</table>

</div>
</body></html>


My cron job looks like this... all on one line...

Code: Select all
00 * * * * USER=changedtouser; export USER; /usr/bin/php /home/user/public_html/mailing/admin/index.php -pprocessqueue -c/home/user/public_html/mailing/config/config.php


Various settings in config.php ...
Code: Select all
$commandline_users = array("changedtolistuser");
define ("MANUALLY_PROCESS_QUEUE",0);
define("MAILQUEUE_BATCH_SIZE",200);
define("MAILQUEUE_BATCH_PERIOD",3600);
define('MAILQUEUE_THROTTLE',5);


Any ideas/help is appreciated...
bekabug
PL Nut
 
Posts: 34
Joined: 3:21pm, Thu 05 Apr, 2007

Postby H2B2 » 2:36am, Fri 06 Apr, 2007

Yes, that looks like the login page. Apparently you can't login.

Did you check the $commandline_users setting in config.php? You might try adding an additional user in that array, and use the name of that user in your crontab file.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

White Flag

Postby bekabug » 3:35pm, Mon 09 Apr, 2007

Will the process queue page reload itself indefinitely until it has finished?

I have been completely unable to get any form of cron job to work with PHPlist so I am giving up. I have other cron jobs on other domains that work just fine (PHP 4.3.11 cli). I don't know why I'm having so much trouble with this.

I've set my hourly batch to 1000 emails with a 3 second space between every message.

The list is 2270+ right now and I don't think it will adversely affect the server using the web interface, but we'll see. Thanks for your help...
bekabug
PL Nut
 
Posts: 34
Joined: 3:21pm, Thu 05 Apr, 2007

Cron vs PHPList

Postby robi2106 » 10:31pm, Mon 23 Apr, 2007

bekabug wrote:I have been completely unable to get any form of cron job to work with PHPlist so I am giving up.


I am at this stage myself. My client has ~2400 users on two lists and no matter what settings I use adn no matter what changes I make to the config files, cron jobs, shell files run through the cron reference, automatic processing has NEVER worked for me.

I have entered a user for commandline_users. I have tried with "commandline_users" set to an empty array. I have tried making a shell script to run the processqueue. It seems like I have tried everything on every forum to get cron processing / batch processing to function and none of it has worked for my server.

Does this functionality even work or is it still too experimental to be available on installs that aren't highly specialized / tweaked?
robi2106
PL Geek
 
Posts: 63
Joined: 6:42am, Wed 07 Mar, 2007
Location: Idaho

Postby thisisit3 » 11:12pm, Tue 01 May, 2007

I'm having the same problem, cron jobs return the login page (can't login) while when i run the command in the shell it works fine.
thisisit3
PL Nut
 
Posts: 27
Joined: 12:32pm, Thu 26 Apr, 2007

Lucky

Postby robi2106 » 12:17am, Wed 02 May, 2007

thisisit3 wrote:I'm having the same problem, cron jobs return the login page (can't login) while when i run the command in the shell it works fine.


You are lucky. At least you have shell access and can run it from the command line. If I tr that, I get the errors specified all over the place regarding user names / privileges even if I have the user & password specified on the shell script that CRON kicks off. It is a loose loose situation for me!
robi2106
PL Geek
 
Posts: 63
Joined: 6:42am, Wed 07 Mar, 2007
Location: Idaho

Postby H2B2 » 9:34pm, Mon 21 May, 2007

You could take a look at the fix suggested in this post: http://forums.phplist.com/viewtopic.php?t=9856
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Close.....

Postby robi2106 » 9:49pm, Mon 21 May, 2007

H2B2 wrote:You could take a look at the fix suggested in this post: http://forums.phplist.com/viewtopic.php?t=9856


The hack states that simply using the empty set should work but does so with out authentication. I cannot even get that to work.

jason
robi2106
PL Geek
 
Posts: 63
Joined: 6:42am, Wed 07 Mar, 2007
Location: Idaho


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 11 guests