php-general Digest 22 Mar 2008 20:30:32 -0000 Issue 5362

Topics (messages 271964 through 271990):

Re: problem with sessions config.
        271964 by: Nilesh Govindrajan

Memory Leaks
        271965 by: Nilesh Govindrajan

best method for relative linking in php
        271966 by: Sudhakar
        271975 by: Brandon Orther

Re: Double click problem [SOLVED]
        271967 by: tedd
        271968 by: tedd

Re: fwrite/fclose troubles
        271969 by: Mark Weaver
        271970 by: Mark Weaver
        271971 by: Al
        271972 by: Mark Weaver

strange list behavior when replying to message on list
        271973 by: Mark Weaver
        271974 by: Greg Bowser
        271976 by: Nilesh Govindrajan
        271977 by: Mark Weaver
        271979 by: Brandon Orther
        271980 by: Nilesh Govindrajan
        271981 by: Mark Weaver
        271982 by: Mark Weaver
        271983 by: Andrew Ballard
        271984 by: tedd
        271985 by: Mark Weaver
        271986 by: Mark Weaver

Comparing file creating dates...
        271978 by: Ryan S
        271988 by: Jim Lucas

Re: Procmail Recipe to INSERT reply-to header (was: strange list behavior when 
replying to message on list)
        271987 by: Mark Weaver
        271989 by: tedd

Re: Returned mail: see transcript for details
        271990 by: L-Soft list server at AudetteMedia (1.8d)

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
N . Boatswain wrote:
Hello guys; i'm having a problem with session behavior; i'm going straight to 
it, but first some considerations:
PHP Version 5.2.5IIF 5.1Running on localhost (XP machine)I start sessions at the top of every page.
A the start of a test page, just as example, i do the assignment:   $_SESSION["username"] 
= "aaa";

At the end of the same page i print it's value:  echo $_SESSION["username"];

And i get the layout: "aaa", as expecteed.

Then I redirect to another page. On that one, after initializating the session 
("session_start();") print again the $_SESSION["username"] content and the 
result is empty. If i try the same code on a server (all this is on my local machine), the code 
works as expected; so i think it is a configuration problem, here is my php.ini part that 
correspond to session configuration, so you can tell my if i'm doing anything wrong, long comments 
where removed:

[Session]; Handler used to store/retrieve data.session.save_handler = files;session.save_path = 
"/tmp" BC 13/12/07session.save_path="/tmp"; Whether to use 
cookies.session.use_cookies = 1;session.cookie_secure = ; This option enables administrators to 
make their users invulnerable to; attacks which involve passing session ids in URLs; defaults to 
0.session.use_only_cookies = 1; Name of the session (used as cookie name).session.name = PHPSESSID; 
Initialize session on request startup.session.auto_start = 1; Lifetime in seconds of cookie or, if 
0, until browser is restarted.session.cookie_lifetime = 0; The path for which the cookie is 
valid.session.cookie_path = /; The domain for which the cookie is valid.session.cookie_domain =; 
Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser 
scripting languages such as JavaScript.session.cookie_httponly = ; Handler used to serialize data.  
php is the standard serializer of PHP.session.serialize_ha
ndler = php; Define the probability that the 'garbage collection' process is 
started; on every session initialization.; The probability is calculated by 
using gc_probability/gc_divisor,; e.g. 1/100 means there is a 1% chance that 
the GC process starts; on each request.session.gc_probability = 
1session.gc_divisor     = 1000; After this number of seconds, stored data will 
be seen as 'garbage' and; cleaned up by the garbage collection 
process.session.gc_maxlifetime = 1440session.bug_compat_42 = 
0session.bug_compat_warn = 1; Check HTTP Referer to invalidate externally 
stored URLs containing ids.; HTTP_REFERER has to contain this substring for the 
session to be; considered as valid.session.referer_check =; How many bytes to 
read from the file.session.entropy_length = 0; Specified here to create the 
session id.session.entropy_file =;session.entropy_length = 
16;session.entropy_file = /dev/urandom; Set to {nocache,private,public,} to 
determine HTTP caching aspects; or leave this empt
y to avoid sending anti-caching headers.session.cache_limiter = nocache; Document expires after n 
minutes.session.cache_expire = 180session.use_trans_sid = 0; Select a hash function; 0: MD5   (128 bits); 1: SHA-1 (160 
bits)session.hash_function = 0; Define how many bits are stored in each character when converting; the binary hash data to 
something readable.;; 4 bits: 0-9, a-f; 5 bits: 0-9, a-v; 6 bits: 0-9, a-z, A-Z, "-", 
","session.hash_bits_per_character = 5; The URL rewriter will look for URLs in a defined set of HTML tags.; 
form/fieldset are special; if you include them here, the rewriter will; add a hidden <input> field with the info which 
is otherwise appended; to URLs.  If you want XHTML conformity, remove the form entry.; Note that all valid entries require a 
"=", even if no value follows.url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

Well, thanks and sorry for my english;

Nicolás.


_________________________________________________________________
Watch “Cause Effect,” a show about real people making a real difference.  Learn 
more.
http://im.live.com/Messenger/IM/MTV/?source=text_watchcause

It works for me; I am using php-5.2.5 with lighttpd and FastCGI.

I called session_start() on both the pages.

and

I have enabled session.use_trans_sid.

You can temporarily override it from the php script by using this -
<?
//...other code
ini_set("session.use_trans_sid",1);
//...other code
?>

Try and report again.

--- End Message ---
--- Begin Message --- I am having 2 memory leaks while calling phpinfo() via FastCGI (lighttpd) when session.auto_start is 1. Otherwise there is no memory leak.

Here are the two memory leaks -

[Sat Mar 22 14:07:49 2008]  Script:  '/var/www/lighttpd/test.php'
/root/php-5.2.5/ext/standard/url_scanner_ex.c(305) : Freeing 0x097BD7E0 (79 bytes), script=/var/www/lighttpd/test.php
[Sat Mar 22 14:07:50 2008]  Script:  '/var/www/lighttpd/test.php'
/root/php-5.2.5/ext/standard/url_scanner_ex.c(316) : Freeing 0x097BD85C (79 bytes), script=/var/www/lighttpd/test.php

Is this a security threat ?

--- End Message ---
--- Begin Message ---
i have a registration page where a user fills a form and i display an error
message if a validation message needs to be displayed which i have written
in php. everything works fine. the way the form is made presently is there
is a huge amount of information relating to general information about the
form and its terms and conditions which is compulsory. so if i have to
display any validation message the user has to scroll the page from the top
again all the way till they see the validation message.

i have used relative linking as it is done in html, so that the user does
not have to scroll from the top of the page, rather the page stops where i
want it to so the user see the message and does not have to scroll the page.

following are the 2 methods i have used and both of them work fine. however
in method 2 as it is based on javascript and if
javascript is turned off the relative linking will not work and the user
will have to scroll from the top of the page again and i have tested this
myself.

method 1

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>#indrel" method="POST"
id="test2" name="registrationform" >
<a name="indrel"></a>

 if($error)
 {
 echo $error;
 }

method 2

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" id="test2"
name="registrationform" >
<a name="indrel"></a>

 if($error)
 {
 echo ("
 <script language='javascript' type='text/javascript'>
 window.location.href='http://website.com/filename.php#indrel'
 </script>
 ");

 echo $error;
 }

please comment if method 1 is correct in terms of the syntax of the form tag
if it is correct or not though i know this method is working the way i want
it to, i wanted to confirm before i implement it for my website.

please advice.

thanks.

--- End Message ---
--- Begin Message ---
Hello Sudhakar,

I have added #firstError to the end of my script url and then if I have an
error, I add that anchor to the first error on the page.  This way I don't
have to use any javascript to leap the person forward to the first error.

I think this is what you are doing with your first method.  That should be 

Kind Regards,
Brandon Orther

-----Original Message-----
From: Sudhakar [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 22, 2008 4:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] best method for relative linking in php

i have a registration page where a user fills a form and i display an error
message if a validation message needs to be displayed which i have written
in php. everything works fine. the way the form is made presently is there
is a huge amount of information relating to general information about the
form and its terms and conditions which is compulsory. so if i have to
display any validation message the user has to scroll the page from the top
again all the way till they see the validation message.

i have used relative linking as it is done in html, so that the user does
not have to scroll from the top of the page, rather the page stops where i
want it to so the user see the message and does not have to scroll the page.

following are the 2 methods i have used and both of them work fine. however
in method 2 as it is based on javascript and if
javascript is turned off the relative linking will not work and the user
will have to scroll from the top of the page again and i have tested this
myself.

method 1

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>#indrel" method="POST"
id="test2" name="registrationform" >
<a name="indrel"></a>

 if($error)
 {
 echo $error;
 }

method 2

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" id="test2"
name="registrationform" >
<a name="indrel"></a>

 if($error)
 {
 echo ("
 <script language='javascript' type='text/javascript'>
 window.location.href='http://website.com/filename.php#indrel'
 </script>
 ");

 echo $error;
 }

please comment if method 1 is correct in terms of the syntax of the form tag
if it is correct or not though i know this method is working the way i want
it to, i wanted to confirm before i implement it for my website.

please advice.

thanks.


--- End Message ---
--- Begin Message ---
At 4:23 PM -0700 3/21/08, Jim Lucas wrote:
It would require a little JS, but you could use the onUnload feature and pop up a warning that would tell them the problem(s) of leaving this page. Then use the confirm() method from JS to either allow or deny them to leave the current page.

I don't know if you can limit this action to only take affect when they press the back button, but it might help in any event.

Jim:

I tried that.

The problem is that you'll get that notice if the user submits the form as well. IOW, no matter what the user does, as soon as they leave that page they get the notice.

I might be able to put a hidden input field to cancel the notice, but like everything -- one thing leads to another.

Thanks,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 7:21 AM +0000 3/22/08, Lester Caine wrote:
tedd wrote:
Hi gang:

This is probably trivial for most of you, but here's my solution to the problem I presented earlier.

The problem was, I just wanted to be certain that if a use clicked a button that they could only do it once. Sounds simple enough, huh?

Certainly, one can use javascript, but I wanted something that was basic php and html -- here's my solution with code (please provide critical review):

I had been tracking an intermittent bug for some considerable time and having finally identified the underlying problem - double click sends the page request twice, but the second request is processed before first has updated things! We have tightened up the server end as much as possible, but not eliminated the problem.

The javascript solution is the only reliable one that I've found but some sites do not allow it to be enabled. Since having finally identified the source of the problem, we have improved education and can now 'spot' a double clicker who in many cases does not even know they are doing it! People get so used TO double clicking things on the desktop :( But in some case we suspect that the BROWSER send two requests perhaps because of a noisy keyboard! On one site that we pinned down to a particular counter position, changing the keyboard fixed the problem ( enter was pressing the button ).

Just a word of warning that may explain the occasional double order ;)

--
Lester Caine - G8HFL

Well that sounds good enough reason to use javascript.

I'll add that too.

Thanks,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Dave Goodchild wrote:
Why are you writing a logging class? Why not use error_log and enable error
logging?


two reasons actually,

1. learning OOP for PHP, so the more I practice at it the better I get.

2. the logging that's being done with this class is done primarily for debugging during the development phase of the application itself. That way during run-time I can tail the log file and see where a portion of the app is failing if it fails or simply tell me where it's at and what it's doing.

Standard error logging wasn't giving me the feedback that I needed at the time and debug logging is a habit I got into when I learned PERL to help tell me where things were failing.

Mark

--- End Message ---
--- Begin Message ---
Al wrote:
int file_put_contents ( string $filename, mixed $data [, int $flags [, resource $context]] )

This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file.

This native function does it for you


Very nice! I wasn't aware of this one. Thank you!!

Mark


--- End Message ---
--- Begin Message ---
Seems like this does what you are attempting.
if(DEBUG_MODE) // TRUE for debug only
{
    ini_set("display_errors", "on"); //use off if users will see them

    error_reporting(E_ALL);

    echo '<span style="color:red">Error display and logging on</span>  ';
}


Mark Weaver wrote:
Hi all,

I've been lurking and reading now for some time, but have decided to
come out of the shadows cause I've got an issue that's gonna drive me crazy!

I'm developing an application and within this application is a class
that is very simple and only serves a singular purpose - to make log
entries to help with debugging. Problem is, now I'm debugging the damned
logging class that is supposed to be helping me debug the application as
I'm putting it together! <sigh> I've looked and looked all over the
place, but I don't seem to be able to find an answer to this problem.
The only information that I have found so far deals with permissions and
I don't think that's the problem. At first I was getting an access
denied error but since setting dir perms and log file perms so that both
apache and my user can right to both the directory and the file that one
has gone away.

Log Directory permissions: /mystuff/logs                  rwx-rwx-rwx (777)
Log file permissions            : /mystuff/logs/run.log   rwx-rwx-rwx
(777)

At any rate, the following is the information I'm getting in the apache
error_log while working on this particular portion of the application:

PHP Warning:  fwrite(): supplied argument is not a valid stream resource
in /mystuff/inc/Log.inc on line 22,
PHP Warning:  fclose(): supplied argument is not a valid stream resource
in /mystuff/inc/Log.inc on line 23,

The Log class:
-----------------------------
class Log{
    public $path, $entry, $logfile;
public function Log(){} public function setLog($path,$file){
        $this->path = $path;
        $this->logfile = $file;
    }
public function writeLog($entry){
        // open the file, in this case the log file
        $h = "$this->path/$this->logfile";
        fopen($h, 'a+');
        fwrite($h,$entry);
        fclose($h);
    }
}

Code snippet where attempting to write log entry from program:
--------------------------------------------------------------------------------------------
        $pl_log = new Log;
        $pl_log->setLog($logpath,"run.log");
$usernanme = $_POST['username'];
        $password = $_POST['secret'];
/**
           * (debugging)     logging incoming values from form:
           */
        $pl_log->writeLog("getDateTime(): Incoming values from Login Form:
blah...blah...blah\n");

Any help with this would be most appreciated. (be gentle... I'm a PERL
program learning PHP OOP)


--- End Message ---
--- Begin Message ---
Al wrote:
Seems like this does what you are attempting.
if(DEBUG_MODE) // TRUE for debug only
{
    ini_set("display_errors", "on"); //use off if users will see them

    error_reporting(E_ALL);

    echo '<span style="color:red">Error display and logging on</span>  ';
}


If I understand this correctly this "if" statement directs php to check the main ini config file and if certain conditions are met then it displays the information in the browser window. Useful, but it would seem, at least to me at the moment, that if the script fails before it's even able to get anything to the screen then nothing gets displayed.

Mark

--- End Message ---
--- Begin Message ---
Hi all,

I'm wondering if anyone else happens to be using Mozilla Thunderbird and seeing this behavior, and also if this behavior is a feature or a bug.

When I hit the reply button to respond to a message most of the time the actual sender's address is the one the message is being sent to rather than the list itself. This is the first mailing list I've been on that I've seen this behavior; all other lists I'm on when one hits the reply button, or CTRL+R the mailing list's address is inserted as it should be and is expected.

I know with some email clients there is a menu item specifically there for responding "to the list" based on whether or not there is a list-header in the header information but that isn't an available option with Thunderbird. Is anyone else seeing this behavior or is there something I'm missing?

Mark

--- End Message ---
--- Begin Message ---
Yeah.  I always forget to reply to all.

The problem is with the headers.  Whereas other lists have a reply-to:
<mailing list address> in the email headers, this list does not.  It annoys
the hell out of me.

On Sat, Mar 22, 2008 at 11:13 AM, Mark Weaver <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I'm wondering if anyone else happens to be using Mozilla Thunderbird and
> seeing this behavior, and also if this behavior is a feature or a bug.
>
> When I hit the reply button to respond to a message most of the time the
> actual sender's address is the one the message is being sent to rather
> than the list itself. This is the first mailing list I've been on that
> I've seen this behavior; all other lists I'm on when one hits the reply
> button, or CTRL+R the mailing list's address is inserted as it should be
> and is expected.
>
> I know with some email clients there is a menu item specifically there
> for responding "to the list" based on whether or not there is a
> list-header in the header information but that isn't an available option
> with Thunderbird. Is anyone else seeing this behavior or is there
> something I'm missing?
>
> Mark
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Greg Bowser wrote:
Yeah.  I always forget to reply to all.

The problem is with the headers.  Whereas other lists have a reply-to:
<mailing list address> in the email headers, this list does not.  It annoys
the hell out of me.

On Sat, Mar 22, 2008 at 11:13 AM, Mark Weaver <[EMAIL PROTECTED]> wrote:

Hi all,

I'm wondering if anyone else happens to be using Mozilla Thunderbird and
seeing this behavior, and also if this behavior is a feature or a bug.

When I hit the reply button to respond to a message most of the time the
actual sender's address is the one the message is being sent to rather
than the list itself. This is the first mailing list I've been on that
I've seen this behavior; all other lists I'm on when one hits the reply
button, or CTRL+R the mailing list's address is inserted as it should be
and is expected.

I know with some email clients there is a menu item specifically there
for responding "to the list" based on whether or not there is a
list-header in the header information but that isn't an available option
with Thunderbird. Is anyone else seeing this behavior or is there
something I'm missing?

Mark

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Doesn't happen with me because I use Newsgroup type subscription system. I.e. I have created a newsgroup account for news.php.net
--- End Message ---
--- Begin Message ---
Nilesh Govindrajan wrote:
Greg Bowser wrote:
Yeah.  I always forget to reply to all.

The problem is with the headers.  Whereas other lists have a reply-to:
<mailing list address> in the email headers, this list does not. It annoys
the hell out of me.


Why in the bloody hell doesn't the list admin simply "add" that reply-to header. As far as I know Sendmail adds that auto-magically by default. (I'm assuming they're not using Sendmail as the lists' MTA). It sure would make life easier wouldn't it? How long has it been this way?

--
Mark

"If you have found a very wise man, then you've found a man that at one time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

--- End Message ---
--- Begin Message ---
I just signed back up to the list recently, but it was like this 5 years ago
when I was still on it.  I have always wondered why they didn't have that.
It seems like they are pushing people to submit their solutions to the
person with the question.

Kind Regards,
Brandon Orther


-----Original Message-----
From: Mark Weaver [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 22, 2008 10:57 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] strange list behavior when replying to message on list

Nilesh Govindrajan wrote:
> Greg Bowser wrote:
>> Yeah.  I always forget to reply to all.
>>
>> The problem is with the headers.  Whereas other lists have a reply-to:
>> <mailing list address> in the email headers, this list does not.  It 
>> annoys
>> the hell out of me.
>>

Why in the bloody hell doesn't the list admin simply "add" that reply-to 
header. As far as I know Sendmail adds that auto-magically by default. 
(I'm assuming they're not using Sendmail as the lists' MTA). It sure 
would make life easier wouldn't it? How long has it been this way?

-- 
Mark

"If you have found a very wise man, then you've found a man that at one 
time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Brandon Orther wrote:
I just signed back up to the list recently, but it was like this 5 years ago
when I was still on it.  I have always wondered why they didn't have that.
It seems like they are pushing people to submit their solutions to the
person with the question.

Kind Regards,
Brandon Orther


-----Original Message-----
From: Mark Weaver [mailto:[EMAIL PROTECTED] Sent: Saturday, March 22, 2008 10:57 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] strange list behavior when replying to message on list

Nilesh Govindrajan wrote:
Greg Bowser wrote:
Yeah.  I always forget to reply to all.

The problem is with the headers.  Whereas other lists have a reply-to:
<mailing list address> in the email headers, this list does not. It annoys
the hell out of me.


Why in the bloody hell doesn't the list admin simply "add" that reply-to header. As far as I know Sendmail adds that auto-magically by default. (I'm assuming they're not using Sendmail as the lists' MTA). It sure would make life easier wouldn't it? How long has it been this way?


The list admin, if uses a program called ezlm (or something similar), it adds the List-Id or the Newsgroups header which also helps.

They must have it.

--- End Message ---
--- Begin Message ---
Brandon Orther wrote:
I just signed back up to the list recently, but it was like this 5 years ago
when I was still on it.  I have always wondered why they didn't have that.
It seems like they are pushing people to submit their solutions to the
person with the question.

Kind Regards,
Brandon Orther

Boy! is this tempting...

I've got a sendmail server running with Mailman installed on it that I'm already running lists on it.

--
Mark

"If you have found a very wise man, then you've found a man that at one time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

--- End Message ---
--- Begin Message ---
Nilesh Govindrajan wrote:

The list admin, if uses a program called ezlm (or something similar), it adds the List-Id or the Newsgroups header which also helps.

They must have it.


hmmm... I wonder if Sylpheed for Windows will handle this? I'll have to take a look.

--
Mark

"If you have found a very wise man, then you've found a man that at one time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

--- End Message ---
--- Begin Message ---
On Sat, Mar 22, 2008 at 11:13 AM, Mark Weaver <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  I'm wondering if anyone else happens to be using Mozilla Thunderbird and
>  seeing this behavior, and also if this behavior is a feature or a bug.
>
>  When I hit the reply button to respond to a message most of the time the
>  actual sender's address is the one the message is being sent to rather
>  than the list itself. This is the first mailing list I've been on that
>  I've seen this behavior; all other lists I'm on when one hits the reply
>  button, or CTRL+R the mailing list's address is inserted as it should be
>  and is expected.
>
>  I know with some email clients there is a menu item specifically there
>  for responding "to the list" based on whether or not there is a
>  list-header in the header information but that isn't an available option
>  with Thunderbird. Is anyone else seeing this behavior or is there
>  something I'm missing?
>
>  Mark
>

It's not specific to Thunderbird or any other mail client. I'm pretty
sure it was configured that way on purpose. Have a look at this
thread:

http://marc.info/?l=php-general&m=105700032521606&w=2

Andrew

--- End Message ---
--- Begin Message ---
At 11:22 AM -0400 3/22/08, Greg Bowser wrote:
Yeah.  I always forget to reply to all.

I always reply to all and then cut out everything that isn't [EMAIL PROTECTED]

I know, there's probably a better way, but that's what I do.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Andrew Ballard wrote:
On Sat, Mar 22, 2008 at 11:13 AM, Mark Weaver <[EMAIL PROTECTED]> wrote:
Hi all,

 I'm wondering if anyone else happens to be using Mozilla Thunderbird and
 seeing this behavior, and also if this behavior is a feature or a bug.

 When I hit the reply button to respond to a message most of the time the
 actual sender's address is the one the message is being sent to rather
 than the list itself. This is the first mailing list I've been on that
 I've seen this behavior; all other lists I'm on when one hits the reply
 button, or CTRL+R the mailing list's address is inserted as it should be
 and is expected.

 I know with some email clients there is a menu item specifically there
 for responding "to the list" based on whether or not there is a
 list-header in the header information but that isn't an available option
 with Thunderbird. Is anyone else seeing this behavior or is there
 something I'm missing?

 Mark


It's not specific to Thunderbird or any other mail client. I'm pretty
sure it was configured that way on purpose. Have a look at this
thread:

http://marc.info/?l=php-general&m=105700032521606&w=2

Andrew


well, obviously since the issue still exists it's clear that this never got resolved. I just don't understand the obstenant behavior of some folks in the presence of clear and plain logic. Especially from a programmer. Makes no sense at all.

Guess I'm off to create the necessary recipe for Procmail to do the adult thing and make sense of the non-sense.

--
Mark

"If you have found a very wise man, then you've found a man that at one time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

--- End Message ---
--- Begin Message ---
tedd wrote:
At 11:22 AM -0400 3/22/08, Greg Bowser wrote:
Yeah.  I always forget to reply to all.

I always reply to all and then cut out everything that isn't [EMAIL PROTECTED]

I know, there's probably a better way, but that's what I do.

Cheers,

tedd

That's what I've been doing as well until I get procmail setup to do it for me.

--
Mark

"If you have found a very wise man, then you've found a man that at one time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

--- End Message ---
--- Begin Message ---
Hey all,

Heres what i am trying to do:

When someone sends a message from my site, i take their ip address and make a 
file with their ip address in a directory called "hash-directory", the file 
looks like this: 169.34.534.243.txt

I want to make sure they cant send too many messages because of the potential 
to spam, so I want to limit them to sending a message every X number of 
minutes... heres what i have written (its not working for some damn reason)

############# Start PHP file ################

if(isset($_SERVER['REMOTE_ADDR']))
{$rem_address=$_SERVER['REMOTE_ADDR'];}

$directory_with_files="hash-directory/";
$threshold = strtotime('-2 minutes');

echo "File created on: <b>".$rem_address .".txt - ". date("F d Y H:i:s.", 
filectime($directory_with_files.$rem_address.".txt"))." 
".$file_time_details[0]."</b><br><br>";

if (file_exists($directory_with_files.$rem_address.".txt")) 
    {

        if (getdate(filectime($directory_with_files.$rem_address.".txt")) < 
$threshold)
            {echo "<b>Please wait more than 1 minute before posting.</b><br>";}
                else{echo "<b>Enough time has elapsed.</b><br>";}
    }

############# END PHP file ################


Where am I going wrong?

Thanks!
Ryan
 
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)




      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

--- End Message ---
--- Begin Message ---
Ryan S wrote:
Hey all,

Heres what i am trying to do:

When someone sends a message from my site, i take their ip address and make a file with 
their ip address in a directory called "hash-directory", the file looks like 
this: 169.34.534.243.txt

I want to make sure they cant send too many messages because of the potential 
to spam, so I want to limit them to sending a message every X number of 
minutes... heres what i have written (its not working for some damn reason)

############# Start PHP file ################

if(isset($_SERVER['REMOTE_ADDR']))
{$rem_address=$_SERVER['REMOTE_ADDR'];}

$directory_with_files="hash-directory/";
$threshold = strtotime('-2 minutes');

echo "File created on: <b>".$rem_address .".txt - ". date("F d Y H:i:s.", 
filectime($directory_with_files.$rem_address.".txt"))." ".$file_time_details[0]."</b><br><br>";

if (file_exists($directory_with_files.$rem_address.".txt")) {

        if (getdate(filectime($directory_with_files.$rem_address.".txt")) < 
$threshold)


From the manual

This returns a timestamp
int strtotime  ( string $time  [, int $now  ] )

This returns an hash array with all the date/time info in it.
array getdate  ([ int $timestamp  ] )

You are trying to compare two things that are completely different.

Get rid of the getdate() function. All you need is the filectime() call, it returns a unix timestamp.

            {echo "<b>Please wait more than 1 minute before posting.</b><br>";}
                else{echo "<b>Enough time has elapsed.</b><br>";}
    }

############# END PHP file ################


Where am I going wrong?

Thanks!
Ryan
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)




      
____________________________________________________________________________________
Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping



--- End Message ---
--- Begin Message ---
tedd wrote:
At 11:22 AM -0400 3/22/08, Greg Bowser wrote:
Yeah.  I always forget to reply to all.

I always reply to all and then cut out everything that isn't [EMAIL PROTECTED]

I know, there's probably a better way, but that's what I do.

Cheers,

tedd

Just in case you "Do" have access to procmail the recipe below should do the trick for fixing this annoying "feature". Just keep telling yourself it's a feature and not a bug. :)

-------------------------------------------------

 # fixing the MISSING reply-to header on PHP list messages
 # This adds a Reply-To: header
:0 fhw
* ^Received:.*from lists.php.net
|formail -I "Reply-To: [EMAIL PROTECTED]"


--
Mark

"If you have found a very wise man, then you've found a man that at one time was an idiot and lived long enough to learn from his own stupidity."
==============================================
Powered by CentOS5 (RHEL5)

--- End Message ---
--- Begin Message ---
At 2:30 PM -0400 3/22/08, Mark Weaver wrote:
tedd wrote:
At 11:22 AM -0400 3/22/08, Greg Bowser wrote:
Yeah.  I always forget to reply to all.

I always reply to all and then cut out everything that isn't [EMAIL PROTECTED]

I know, there's probably a better way, but that's what I do.

Cheers,

tedd

Just in case you "Do" have access to procmail the recipe below should do the trick for fixing this annoying "feature". Just keep telling yourself it's a feature and not a bug. :)

-------------------------------------------------

 # fixing the MISSING reply-to header on PHP list messages
 # This adds a Reply-To: header
:0 fhw
* ^Received:.*from lists.php.net
|formail -I "Reply-To: [EMAIL PROTECTED]"


I use Eudora, so I haven't a clue.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
> JOIN I-WINSOFT
Sorry, the  I-WINSOFT list  is closed.  Contact the  list owner
([EMAIL PROTECTED]) for more information.


--- End Message ---

Reply via email to