I have installed the massmailer with phplist. I set up two list members and a list, I created a message and sent it to the list. After working through a couple of errors in configuration (from http://wiki.atomicworkshop.org/civicspace/massmailer)

* "Error, cannot find config file"
o Copy the config.php in modules/phplist/config.php to a new directory at /modules/phplist/phplist/config/config.php

# NEW Edit line 25 on \modules\phplist\phplist\admin\index.php to read:

* if (PHP_SAPI == “cgi”) {
* not “cli”

Now when I run the massmailer I get:

Content-type: text/html
X-Powered-By: PHP/4.3.10

PHPlist version 2.9.4 (c) 2000-2005 Tincan Ltd, http://www.phplist.com
Usage: -p page [other parameters]

I assume that this is not working correctly (the mail didn't go out).

Comments

killes@www.drop.org’s picture

Priority: Critical » Normal

What version of massmailer.module are you running?
Open the file in an editor and look at the second line. it should read:

/* $Id: massmailer.module,v 1.13 2005/07/01 17:27:20 killes Exp $ */

(at least the date should be fairly recent)

If it does, then the instructions at http://wiki.atomicworkshop.org/civicspace/massmailer are probably no longer fully correct.

Please read and follow the instructions that come with the new version.

drob’s picture

I have pulled the latest version - I believe I was using the latest before - if not it was off by only a few hours. After re-installing I get:

Content-type: text/html
X-Powered-By: PHP/4.3.10
Cache-Control: no-cache, must-revalidate
Pragma: no-cache

Error, cannot find config file

I tried moving the config.php into phplist/phplist per atomicworkshop - no luck

drob’s picture

Ok - so I followed the same instructions as I did for the first install - and now I'm getting the same result -

Content-type: text/html
X-Powered-By: PHP/4.3.10

PHPlist version 2.9.4 (c) 2000-2005 Tincan Ltd, http://www.phplist.com
Usage: -p page [other parameters]

So to recap - I created the /modules/phplist/phplist/config/config.php file and I edited admin/index.php to change "cli" to "cgi"

gerhard killesreiter’s picture

You are essentially trying to do something that is not supported by phplist.

phplist requires the CLI php and you try to use it with the CGI one.

Ask your support person to install theCLI interface and all will be good.

drob’s picture

Well currently we only support CGI - I think that our guys are going to have some issues with CLI. What are the requirements of this solution end-to-end? Is it documented somewhere (sorry if I've missed it so far). Obviously I knew that there was an issue with CLI/CGI when I changed that code. The "atomicworkshop" postings certainly imply that you can get it to work with CGI - is this not true anymore? I believe he was working with the same version of PHPList as is currently supported by the phplist massmailer engine.

bensheldon’s picture

I'm the maintainer of the wiki at http://wiki.atomicworkshop.org/civicspace/massmailer

I am at a loss for what is causing this exact error message (I cannot reproduce it):

Content-type: text/html
X-Powered-By: PHP/4.3.10

PHPlist version 2.9.4 (c) 2000-2005 Tincan Ltd, http://www.phplist.com
Usage: -p page [other parameters]

But for the record, I just did a clean install of Drupal 4.6.1 and the 4.6 Massmailer module (there is a newer one in the Drupal CVS that Killes is referring to), with PHPlist 2.9.3 (as per the module's instructions). To get it working, it required copying modules/phplist/config.php to /modules/phplist/phplist/config/config.php (a symbolic link is a better longterm solution) and updating the 'cli' to 'cgi'. It then did work for me.

So I guess the problem may be with the new massmailer module released on 7.1.05 in CVS (the one in the 4.6 module downloads is from 1.8.05, and that is the one I got working). I will install that ASAP and see if I get this problem.

The problem may also be with the PHP you are running. I rolled my own and the phpinfo can be found here: http://drupal.atomicworkshop.org/node/13 and instructions for rolling your own (I use Dreamhost, but it should work anywhere else) can be found here: http://wiki.atomicworkshop.org/civicspace/dreamhost

The fixes that have worked for me have all been reactive and mostly gleaned from other discussion forums (they're listed on the atomicworkshop wiki page). If I *really* knew what I was doing, I would submit code fixes, but I have little clue of where stuff is actually broken. This also means that if it's a problem with the new version of MassMailer, I don't know where to begin (other than to suggest downgrading).

Long story short, the old version DOES work (on my Dreamhost account at least), I may not be the best person to get it working for you, but I am eager to help.

drob’s picture

I was able to get a little further using php "cli" which we installed to support mailhandler - however it is right now a hack and I'm getting a wierd error message:

p = processqueue
c = ../../config.php
d = /mass/index.php
h = dev.civicactions.net

Then it spits out some phplist html and I'm seeing an error message:

Database error 1146 Table 'mass.phplist_subscribepage' doesn't exist

Which from what I can tell doesn't exist. As I mentioned before - I've really had to patch a bunch of stuff to get this far. To re-cap:

1) I changed the phplist shell file to use "php-cli" which is php in php-cli mode.
2) I had to alter a bunch of the path statements in phplist config.php to find the drupal config.php as well as a bunch of other includes needed - for some reason the pathing assumptions didn't work

So it sounds like I should scrap what I've got and start over with the version you are using. Is there a discreet listing of all of the settings that PHP needs to work with this?

Also It seems that the code makes a lot of assumptions about the location of the config files etc. It may be preferable to remove these dependencies in favor of a configurable approach.

Dan

bensheldon’s picture

OK, I just pulled the newest version of MassMailer I could find from Drupal CVS with date Killes is referring to (7.1.05). And after the same steps I've been taking, I got it working.

This leads me to be more confident that the problem may be with PHP as configured on your server (see my earlier comment for more info on this).

Also, the fixes on the atomiworkshop wiki are still valid as far as I can tell. (Have these actually gotten the massmailer working for anyone besides myself?)

What I did:

1. I used the same Drupal install as before, but deactivated and deleted the massmailer and phplist module directories, and dropped all database tables with the prefix 'phplist'. I hope this means there was nothing left over from the old versions.

2. Installed the massmailer and phplist engine (downloaded phplist-2.9.4) as per the instructions along with the SQL file (note, phplist.sql refers to old phplist-2.9.3)

3) Activated the modules and went to Process Message Queue

4) Got a blank box -> chmod -R 0755 phplist/bin/

5) Went back to Process Message Queue and got the error: "Error, cannot find config file." ->copied phplist/config.php to phplist/phplist/config/config.php (note that the phplist module now resides within the massmailer module, no more copying it into the modules directory)

6) Went back to Process Message Queue and got this error:
http://atomicworkshop.org/wp-content/myimages/Ben/civicspace/screenshot%...
-> changed 'cli' to 'cgi' as noted in this thread and atomicworkshop wiki

7) Went back to Process Message Queue and it worked!

bensheldon’s picture

Drob - That error message (gobbledygook with "Database error 1146 Table 'mass.phplist_subscribepage' doesn't exist") is really interesting because that is the exact same error I recieve when I DO NOT change 'cli' to 'cgi' (i.e. changing 'cli' to 'cgi' fixes that problem for me). I have some screenshots of it on the atomicworkshop wiki.

PHP wise, I unfortunately do not have a discrete list for what PHP requires (other than it doesn't need IMAP support, which I added for mailhandler/listhandler). I compiled mine and it runs as a CGI, though I am not sure if this is related to the problem at hand.

These are the options I use to configure PHP(http://wiki.atomicworkshop.org/civicspace/dreamhost). None of them seem to scream out CGI or CLI and my rationalle for choosing them was 99% someone else saying these were generally useful (not Drupal-centric).

--prefix=$HOME/php --with-config-file-path=$HOME/etc/php4 --enable-force-cgi-redirect --with-xml --with-libxml-dir=$HOME/php --enable-soap --with-xsl=$HOME/php --with-openssl=/usr --with-mhash=$HOME/php --with-mcrypt=$HOME/php --with-zlib-dir=$HOME/php --with-jpeg-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --enable-ftp --enable-sockets --enable-wddx --with-iconv=$HOME/php --enable-sqlite-utf8 --enable-calendar --with-curl=$HOME/php --enable-mbstring --enable-mbregex --with-mysql=/usr --with-mysqli --with-imap=$HOME/src/php/php4libs/imap-2004e

How massmailer finds its configuration files is a real mess. That's why I do a bunch of copying stuff around as I have no clue what is going on in the actual code. For your earlier problem, (#2 comment in the thread ) I think the problem was that you copied config.php into phplist/phplist, not phplist/phplist/config/ (you need to make a new 'config' directory), though judging from your error messages, you may have figured that out already.

drob’s picture

This is great. Thanks for all the support. I did have the index.php set to "cgi" - so that wasn't the problem (I tried both). But the fact that you have gotten it to work with your original instructions gives me hope ( :) ). I will blow away what I have and try again. Yes the pathing needs to be fixed - it is a real hack (from what I can see in the code).

Dan

drob’s picture

This is a belated follow-up to this thread. Drupal was down in the middle of all this and we took the conversation off line. The latest is that we were able to get Massmailer installed - using the latest svn HEAD from CSL. The only hitch was that we use non-default MySQL port assignments in our environment and these were not supported by PHPList - really a shame.

killes@www.drop.org’s picture

Status: Active » Fixed

This has been solved and works now.

orangechicken’s picture

I still can't get massmailer to work. I've followed all the steps and now, after changing 'cli' to 'cgi', I'm getting a message that I can't find referenced in the forum at all.

phplist.module runs this when processing the queue:

env -i modules/massmailer/engines/phplist/bin/phplist -p processqueue -c ../../config.php -d /civicspace/index.php -h mydomain.org

And the output of that is:

Content-type: text/html
X-Powered-By: PHP/4.3.11

PHPlist version 2.9.3 (c) 2000-2005 Tincan Ltd, http://www.phplist.com
Usage:  -p page  [other parameters]

I think that the -p processqueue should satisfy this. *BUT* that also seems like a CLI thing and not a CGI thing. Am I correct?

Anybody have any idea how to get around this problem?

killes@www.drop.org’s picture

Changing cli to cgi is a bad, bad idea. cgi is not supported my the phplist engine. You _need_ cli to run massmailer.

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)