Webmaster Key - Discussion Forums


Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 02:05:49 PM

Login with username, password and session length
Welceome to Forums!

Important information for guests and new members:

In order to understand the full benefits of becoming an active member of this forum, please review the following information on guest and new member restrictions. These forum changes have been prompted by an overwhelming and unreasonable amount of bot postings and incoherent guest spam messages. We wish to prevent these events from happening in the future and make our community a more comfortable place for all of our members.

For guests:

Guests are not allowed to open new topics, polls, or posts attachments.
If you wish to open up new discussions on this forum, we encourage you to register.

For new members:

New members with less than five posts are not allowed to modify additional profile information such as avatars, contact information, biographies, and signatures. However, new members are encouraged to post their own topics or reply to topics initiated by other members. Become active on the forums and 5 posts should be an easy task!

We are a diverse community with members from all over the world. We encourage new ideas and interesting conversation. Do not be afraid to post webmaster/computer-related questions or problems, as our active members are always willing to help when they are able. Interested? Join us.

+ Webmaster Key Forums
|-+ Website Marketing
| |-+ Promotion Ideas and Strategies (Moderator: Andy)
| | |-+ PHPlist
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print
Author Topic: PHPlist  (Read 3639 times)
Andy
Administrator
Veteran
*****
Posts: 5 752



« on: May 17, 2005, 07:11:10 PM »

I started using PHPlist for newsletters but I'm struggling with the advanced features. I edited the config.php file to batch process the emails and disabled the manual option for the processqueue. So I want to schedule the "processqueue" action with a cron job. But the php script refuses to execute from the cron job command line:

php /home/mydomain/public_html/path/admin/index.php?page=processqueue login=user password=pass > /dev/null

A test .php file I used worked with:
#!/usr/local/bin/php -q

on the first line but I just need to know how to kick phplist into sending the queue of emails.

Help!!!
Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #1 on: May 17, 2005, 09:23:29 PM »

Hi Andy! can you tell me how you compiled your PHP as CGI or Apache module? I ask this just do double check this that you compiled it as CGI, sicne you've mentioned that run script with following line "#!/usr/local/bin/php -q".
Anyway I'm not 100% sure but think that problem is in cron, you shouldn't pass to it query with ? and other parameters, just put your query in file which have executive rights and run it from cron. Hope this would helps, let me know the result please.
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #2 on: May 17, 2005, 09:57:01 PM »

Hi Senso! Looks like you maybe can solve this problem for me and many other people!

The first ray of light appeared after I found this site: htmlcenter.com

Then I ran phpinfo and found my PHP was compiled as CGI.

So I made a test file (cron-test.php) with this code in it:

#!/usr/local/bin/php -q
<?php
$content= 'hello';
// open file
$fp = fopen("cron.txt","w+");
if (fwrite($fp, $content) === FALSE) {
   echo "Cannot write to file ($filename)";
   exit;
}
//close file
fclose($fp);

echo "Done!\n";
?>

My web host has a command line input box for the cron jobs. This command line worked with the above file:
php /home/intern52/public_html/db/cron-test.php > /dev/null

I set a time of 5 minute updates and noticed that the cron.txt file was created ok.

But now I want to execute the phplist script in a similar manner but I cannot get it to run. It doesn't help that I don't know how to see any error messages.
Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #3 on: May 17, 2005, 10:12:33 PM »

aha, now I understand your problem better. What about this string "php /home/mydomain/public_html/path/admin/index.php?page=processqueue login=user password=pass > /dev/null" have you tried to execute it in command line, or you don't have SSH access to your server? I'm talking from PDA now and don't have SSH client on it, so I couldn't connect to my Linux box and check my theory Tongue Anyway my point is that if you can run this line from SSH and it would work well you can write simple BASH script, something like this:
Quote
#!/bin/sh

php /home/mydomain/public_html/path/admin/index.php?page=processqueue login=user password=pass > /dev/null
so only thing you need to put this in the file change it's permissions so it could be executed for test you can use 777 and later tighten them if needed, and run this script from the cron.
If this doesn't work please wait till tomorrow and I'll check it on my home PC and try to give you some solution.
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #4 on: May 17, 2005, 10:29:21 PM »

Hi Senso,

I don't want to spoil your evening with this problem. It can wait!

Your suggestion is just like what I used before. To check if anything happened I log in to phplist and check the messages and find they are still in the queue.

If I can't get this to work then it's really easy for me to enable the manual mode. I configured the config.php vaiables to send the emails in batches at intervals that are ok with my web host. The reason I wanted to do it via the cron script is because everyone on the phplist forums seem to say don't use the manual option to send more than (I forget) ~1000 emails at a time?
Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #5 on: May 17, 2005, 11:01:02 PM »

so let make this clear, you did try to issue such command from shell and it doesn't work? if so maybe you're not permitted to execute php module under /usr/local/bin ?(just guessing)
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #6 on: May 18, 2005, 09:55:46 PM »

Hi,

I don't have direct access to the command line. I think I'm using cpanel and I get an input box to enter the command line. I Log into this system on the web.

Like I said before, I did manage to execute my own php script but I can't seem to get phplist to process the queue of emails.
Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #7 on: May 18, 2005, 10:08:07 PM »

Sorry Andy, I forgot to look into it today, I've write note to myself to check it tomorrow Tongue
As for hosting I understand your situation, will see tomorrow if I can find solution for this.
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #8 on: May 18, 2005, 10:39:12 PM »

Great! If you can solve this then you will be a hero going by how many confused people I found on the web.
Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #9 on: May 20, 2005, 08:15:45 PM »

Andy, seems like I've found what was the problem. As was my first guess you couldn't pass variables name to cron via URL. if you need to run script with variables I see two ways to do this:
1st is to use _SERVER["argv"] version for passing arguments, just create usual PHP script with all these variables and modify index script.
or 2nd way is to create copy of the script in the directory which isn't accessible from the web and remove from it authorization request. I'm not familiar with PHPList script so don't sure which method would work and need less script modification.
Hope this info would help you out to resolve this issue, if you had problems with modifying script, let me know and I'll try to install it locally and see if I can make it work.
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #10 on: May 20, 2005, 08:52:45 PM »

Hi Dennis,

the phplist script is one of the sourceforge open source projects that is very complicated so it's much more than a simple script.

From what you are saying, maybe all I need to do is remove the ? and add a space to:
php /home/mydomain/public_html/path/admin/index.php?page=processqueue login=user password=pass > /dev/null

I will do some experiments over the weekend and report back, thanks!

Report to moderator   Logged

SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #11 on: May 20, 2005, 09:56:16 PM »

Guess adding space wouldn't help since Cron isn't apache and it's not accepting parameters same way... anyway, as I said before if you fail to start it let me know, an when I got time I'll try to check script and see if it could be modified somehow to run from cron.
Report to moderator   Logged

Denis
Andy
Administrator
Veteran
*****
Posts: 5 752



« Reply #12 on: July 11, 2005, 09:44:57 PM »

I don't think I will be doing this email marketing anymore. Once you have x number of subscribers. n% will be crazy people which you have to deal with to avoid being closed down each time you send an email. It's a statisical certainty. I fell for the rants of some of the big earning marketing gurus who preach that you must build a list and market them until they submit or unsubscribe. But most people are afraid to unsubscribe since the scammers tell them to never click on an unsubscribe link!  Tongue But it is the law to provide this sort of link.
Report to moderator   Logged

Pages: [1] Go Up Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print 
+ Webmaster Key Forums
|-+ Website Marketing
| |-+ Promotion Ideas and Strategies (Moderator: Andy)
| | |-+ PHPlist

Jump to:  
« previous next »


Our Partners
RelmaxTOP Ranking System Web Hosting RelmaxTOP Ranking System
Staff Sites
12Noon[12Noon Gallery] Andy[Urgentclick]
Tamuril[Tamuril's Digital Art Exhibit] Sensovision
Powered by MySQL Powered by PHP We are hosted by Relmax Inc. |Our Privacy Policy | Sitemap
Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Forum design by Tamuril © 2005.
Valid XHTML 1.0! Valid CSS!