Using maillist.php [message #11298] |
Thu, 26 June 2003 11:55 |
|
Hello,
always having pb to use maillist.php.
i tried to call maillist from another script with :
echo shell_exec("cat mail.txt | /usr/local/bin/php -q /www/forum/data/scripts/maillist.php 1");
or
echo shell_exec("cat mail.txt | /www/forum/data/scripts/maillist.php 1");
But nothing happens.
I don't understand what argument i have to give to the script, is it a filename or a string ?
What is the id ? (Missing Forum ID Parameter)
What informations must be present in the mail ?
What could be wrong ? Some file/dir rights ?
Does anyone have an example calling maillist.php from a script ?
How to log maillist.php errors ?
I don't know PHP and i really appreciate any help
Thank's
Gaëtan
|
|
|
Re: Using maillist.php [message #11301 is a reply to message #11298] |
Thu, 26 June 2003 12:45 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The 1st line you've listed appears to be correct. The number '1' represent the mailing list import rule as listed on the mailing list admin control panel.
Have you tried running the script via the console to see if it works?
FUDforum Core Developer
|
|
|
|
Re: Using maillist.php [message #11308 is a reply to message #11306] |
Thu, 26 June 2003 13:32 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
inside the errors directory there is a .mlist directory it should contain a file with any output generated by the mailist script.
FUDforum Core Developer
|
|
|
|
Re: Using maillist.php [message #11312 is a reply to message #11309] |
Thu, 26 June 2003 13:49 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
So you get no errors and no messages are imported? Did you set the mailing list settings in such a way that any new messages must be approved by the admin 1st?
FUDforum Core Developer
|
|
|
|
Re: Using maillist.php [message #11409 is a reply to message #11298] |
Fri, 27 June 2003 14:15 |
|
Hello,
i'm still testing, with no success.
This script works :
$command = "cat /www/forum/mail.txt";
$output = `$command`;
echo "<pre>command = $command</pre>";
echo "<pre>output = $output</pre>";
I've got the command line and the mail.txt file content in result.
But when i try this :
$command = "cat /www/forum/mail.txt | /usr/local/bin/php -q /www/forum/data/scripts/maillist.php 1 ";
";
$output = `$command`;
echo "<pre>command = $command</pre>";
echo "<pre>output = $output</pre>";
I've got :
command = .......
output = Content-type: text/html
X-Powered-By: PHP/4.3.0
command = .......
output = Content-type: text/html
X-Powered-By: PHP/4.3.0
...
X times (as many lines there are in the mail.txt).
Any idea ?
Gaëtan
|
|
|
Re: Using maillist.php [message #11414 is a reply to message #11409] |
Fri, 27 June 2003 18:03 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You are using php-cgi, so you may need to ass -q flag to the command line.
ex. php -q script.php
FUDforum Core Developer
|
|
|
Re: Using maillist.php [message #11471 is a reply to message #11298] |
Mon, 30 June 2003 10:05 |
|
I know, i add this parameters when calling php but i always have these string in result (and nothing added to my forum).
shell_exec("cat /www/forum/mail.txt | /usr/local/bin/php -q /www/forum/data/scripts/maillist.php 1");
Gaëtan
|
|
|
Re: Using maillist.php [message #11472 is a reply to message #11471] |
Mon, 30 June 2003 13:54 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Is your php at /usr/local/bin/php and are you allowed to execute it?
FUDforum Core Developer
|
|
|
Re: Using maillist.php [message #11475 is a reply to message #11298] |
Mon, 30 June 2003 14:15 |
|
Hmmm, exactly the question i've send to my support provider but no reply for the moment.
I guess the pb come from this.
I tried with a toto.php containing :
<?php
echo phpinfo();
?>
When doing :
it does not work
echo shell_exec("...../toto.php");
But
include("...../toto.php");
is ok.
If it is, the only way to use it would be the include() command, but i'll have to chance the maillist.php script (not a good thing).
Do you think i'll have a lot of pb to modify the script ?
Gaëtan
|
|
|
|
Re: Using maillist.php [message #11540 is a reply to message #11517] |
Sat, 05 July 2003 20:03 |
aeto
Messages: 7 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
I am having a problem with the maillist.php script which I am guessing is the same issue as you are having, but can't figure out, from this thread, what the fix actually *is*.
When I run the maillist.php script, it returns without actually doing anything:
%php -q /u0/web/users/forum/.FUDforum2/scripts/maillist.php 2
%
The script doesn't wait for EOF on standard input, or anything. If I put an invalid number in place of "2," it produces an error, as expected. Similarly,
%php -q /u0/web/users/forum/.FUDforum2/scripts/maillist.php 2 < foo.txt
%
doesn't actually do anything, at all. The forum's files are unlocked, and the above were run as the WWW user. Does anyone have any idea what the issue could be?
Thanks!
|
|
|
Re: Using maillist.php [message #11552 is a reply to message #11298] |
Mon, 07 July 2003 07:07 |
|
Hello,
i don't know what's the pb. Maybe a right access pb ?
Have you try to put some trace in maillist.php ?
Which version of fudforum have you ?
Do you try a command like this cat toto.txt | ....php -q ...maillist.php ?
Gaëtan
|
|
|