FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Using maillist.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon9.gif  Using maillist.php [message #11298] Thu, 26 June 2003 11:55 Go to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #11306 is a reply to message #11298] Thu, 26 June 2003 13:03 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

Hello,

i just have an ftp access so i can't launch anything manually Crying or Very Sad .




Gaëtan
Re: Using maillist.php [message #11308 is a reply to message #11306] Thu, 26 June 2003 13:32 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #11309 is a reply to message #11298] Thu, 26 June 2003 13:37 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

The file is empty (size 0)

Gaëtan
Re: Using maillist.php [message #11312 is a reply to message #11309] Thu, 26 June 2003 13:49 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #11314 is a reply to message #11298] Thu, 26 June 2003 14:05 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

Yes, no msg imported and no error logged.

No i don't have set this option to YES. I tried but it does not change anything.



Gaëtan
Re: Using maillist.php [message #11409 is a reply to message #11298] Fri, 27 June 2003 14:15 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

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
icon12.gif  Re: Using maillist.php [message #11517 is a reply to message #11298] Fri, 04 July 2003 06:44 Go to previous messageGo to next message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

Hi,

with a few modification of maillist.php now the script pop my mail account. It works very fine !

Therefore my provider (which have a **** support) doesn't accept calling a php script through a shell_exec command. I don't know why.
So i had to call maillist.php in an include() command.


Gaëtan
Re: Using maillist.php [message #11540 is a reply to message #11517] Sat, 05 July 2003 20:03 Go to previous messageGo to next message
aeto is currently offline  aeto   United States
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 Go to previous message
Gaëtan is currently offline  Gaëtan   France
Messages: 22
Registered: March 2003
Karma: 0
Junior Member

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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Permissions on a single thread?
Next Topic: How to use rdf_parser.php?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 16:06:26 GMT 2024

Total time taken to generate the page: 0.02791 seconds