[PHP] Re: Installing PHP

2011-07-05 Thread David Robley
Jim Giner wrote:

> Hi all,
> (Hopefully I posted this in a place that can/will help me)
> 
> I got curious about running php / apache on my own laptop in order to help
> my devl process, instead of writing, uploading and testing on my site.
> 
> Found a nice pair of docs from "thesitewizard.com" that appeared to be
> pretty well-written instructions on installing each of these systems. 
> btw-
> I'm running XpSp2.  Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per
> the recommendations.
> 
> Went thru all instructions step-by-step, testing all the way.  Apache
> works - PHP doesn't.  When I bring up IE and type in localhost I get the
> default apache page as I was told I should see.  When I type
> "localhost/test.php" I get a windows dialog asking what program should run
> the php script.
> 
> In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
> got the expected result from my script - so PHP works.
> 
> End result - they each work separately, but php is not working under
> apache.
> 
> As part of the docs instructions I added the following code to the apache
> conf file:
> 
> 1 - I chose the "configure apache to run php as an apache module.
> 2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
> those lines
> 3 - added "AddType application/x-httpd-php .php" as the last of those
> lines 4 - added "PHPIniDir "c:/php" as the last line of the conf file.
> 
> Upon adding these lines apache will no longer restart.  In fact adding any
> ONE of these lines breaks Apache.
> 
> Ideas welcome.
> 
> And for those who still love the USofA, Happy Independence Day!

If you are having problems starting apache, the first place to look is your
apache error log.


Cheers
-- 
David Robley

On a radiator repair shop: Best place to take a leak.
Today is Sweetmorn, the 40th day of Confusion in the YOLD 3177. 


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




[PHP] Re: Installing PHP

2011-07-05 Thread Jim Giner
Thanks David!  The error log tells me that I have installed a version of PHP 
that is not "thread-safe".  My bad - I mis-read the download page and did in 
fact acquire the wrong version.  Am beginning PHP install all over again!

"David Robley"  wrote in message 
news:b0.f0.00402.e9df2...@pb1.pair.com...
>
> If you are having problems starting apache, the first place to look is 
> your
> apache error log.
>
>



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



[PHP] Foreach question

2011-07-05 Thread Dajka Tamas
Hi all,

 

I've bumped into an interesting thing with foreach. I really don't know, if
this is normal working, or why it is, so I got curious.

 

The script:

 

foreach ( $cats as &$c ) {

   echo $c['id'];

   if ( $c['id'] < 5 ) {

  $c['id']++;

  $cats[] = $c;

   }

}

 

Input 1:

 

$cats = array( array( 'id' => 1 ) );

 

Output 1:

 

1

 

Input 2:

 

$cats = array( array( 'id' => 1 ), array( 'id' => 2 ) );

 

Output 2:

 

122334455

 

 

Why is this? Is this normal behaviour?

 

 

Thanks,

 

   Tamas



Re: [PHP] Foreach question

2011-07-05 Thread Louis Huppenbauer
Hi there

I think that foreach in your first example just knowns that this
should be the last loop (as the array only contains 1 element at
start) and so stops there.
In your 2nd example however the first loop isn't the last, so the
array get's checked again, and now there's another element, so...

I think that's more or less normal behaviour.

Sincerely yours
Louis

2011/7/5 Dajka Tamas :
> Hi all,
>
>
>
> I've bumped into an interesting thing with foreach. I really don't know, if
> this is normal working, or why it is, so I got curious.
>
>
>
> The script:
>
>
>
> foreach ( $cats as &$c ) {
>
>               echo $c['id'];
>
>               if ( $c['id'] < 5 ) {
>
>                              $c['id']++;
>
>                              $cats[] = $c;
>
>               }
>
> }
>
>
>
> Input 1:
>
>
>
> $cats = array( array( 'id' => 1 ) );
>
>
>
> Output 1:
>
>
>
> 1
>
>
>
> Input 2:
>
>
>
> $cats = array( array( 'id' => 1 ), array( 'id' => 2 ) );
>
>
>
> Output 2:
>
>
>
> 122334455
>
>
>
>
>
> Why is this? Is this normal behaviour?
>
>
>
>
>
> Thanks,
>
>
>
>               Tamas
>
>

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



[PHP] Re: Installing PHP

2011-07-05 Thread Jim Giner
Eureka!

The whole problem was my unfamiliarity with the php download page.  To 
others - read the choices there very carefully (which I thought I did!) to 
be sure you get the "thread-safe" version.

Thanks to all who contributed, but David gets the kudos for telling me to 
check the error logs first. 



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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings


On 11-07-05 09:40 AM, Dajka Tamas wrote:

Hi all,



I've bumped into an interesting thing with foreach. I really don't know, if
this is normal working, or why it is, so I got curious.



The script:



foreach ( $cats as&$c ) {

echo $c['id'];

if ( $c['id']<  5 ) {

   $c['id']++;

   $cats[] = $c;

}

}


That's a bizarre loop... you're feeding references to elements of the 
array back into the array over which the loop is iterating. If you 
REALLY want to do what you are doing, then do the following:




Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Foreach question

2011-07-05 Thread Louis Huppenbauer
Or maybe he tried to do the following?

 ($c['id'] + 1));
   }
}
?>

2011/7/5 Robert Cummings :
>
> On 11-07-05 09:40 AM, Dajka Tamas wrote:
>>
>> Hi all,
>>
>>
>>
>> I've bumped into an interesting thing with foreach. I really don't know,
>> if
>> this is normal working, or why it is, so I got curious.
>>
>>
>>
>> The script:
>>
>>
>>
>> foreach ( $cats as&$c ) {
>>
>>                echo $c['id'];
>>
>>                if ( $c['id']<  5 ) {
>>
>>                               $c['id']++;
>>
>>                               $cats[] = $c;
>>
>>                }
>>
>> }
>
> That's a bizarre loop... you're feeding references to elements of the array
> back into the array over which the loop is iterating. If you REALLY want to
> do what you are doing, then do the following:
>
> 
> foreach( array_keys( $cats ) as $key )
> {
>    $c = &$cats[$key];
>
>    echo $c['id'];
>
>    if( $c['id'] < 5 )
>    {
>        $c['id']++;
>        $cats[] = $c;
>    }
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> E-Mail Disclaimer: Information contained in this message and any
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure,
> copying, and distribution are prohibited unless authorized.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] Foreach question

2011-07-05 Thread Dajka Tamás
Hi,

Yeah, I'm really want to do that, since I'm working with the elements of the 
original array ( skipped that part in sample code ).

I've tried your suggestion, but it gives the same result, so on just one input 
is just gives back '1'.

What troubles me, that foreach gives an inconsistent working. Why is 'foreach' 
checking element count at all and working differently with different element 
counts? That's not normal is my opinion. 'foreach' shouldn't do this:

if ( count($elements) == 1 ) then loop 1;
else loop normally;

and that's what is does now, since when it's more than one element it's working 
like a while loop, with checking the condition before ( and after ) every run. 
( if 'foreach' would check that the current run is the last one before 
executing the current loop, the results would be the same with each case )

Cheers,

Tamas

-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com] 
Sent: Tuesday, July 05, 2011 4:06 PM
To: Dajka Tamas
Cc: php-general@lists.php.net
Subject: Re: [PHP] Foreach question


On 11-07-05 09:40 AM, Dajka Tamas wrote:
> Hi all,
>
>
>
> I've bumped into an interesting thing with foreach. I really don't know, if
> this is normal working, or why it is, so I got curious.
>
>
>
> The script:
>
>
>
> foreach ( $cats as&$c ) {
>
> echo $c['id'];
>
> if ( $c['id']<  5 ) {
>
>$c['id']++;
>
>$cats[] = $c;
>
> }
>
> }

That's a bizarre loop... you're feeding references to elements of the 
array back into the array over which the loop is iterating. If you 
REALLY want to do what you are doing, then do the following:



Cheers,
Rob.
-- 
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.


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



RE: [PHP] Foreach question

2011-07-05 Thread Dajka Tamás
Tried, gives the same result with one element :(

What's working:

$cats = array( array( 'id' => 1 ) );
while ( $c = array_shift($cats) ) {
echo $c['id'];
if ( $c['id'] < 5 ) {
$c['id']++;
$cats[] = $c;
}
}

But this is 'while' and it pops all elements from the array...

Cheers,

Tamas



-Original Message-
From: Louis Huppenbauer [mailto:louis.huppenba...@gmail.com] 
Sent: Tuesday, July 05, 2011 4:12 PM
To: Robert Cummings
Cc: Dajka Tamas; php-general@lists.php.net
Subject: Re: [PHP] Foreach question

Or maybe he tried to do the following?

 ($c['id'] + 1));
   }
}
?>

2011/7/5 Robert Cummings :
>
> On 11-07-05 09:40 AM, Dajka Tamas wrote:
>>
>> Hi all,
>>
>>
>>
>> I've bumped into an interesting thing with foreach. I really don't know,
>> if
>> this is normal working, or why it is, so I got curious.
>>
>>
>>
>> The script:
>>
>>
>>
>> foreach ( $cats as&$c ) {
>>
>>echo $c['id'];
>>
>>if ( $c['id']<  5 ) {
>>
>>   $c['id']++;
>>
>>   $cats[] = $c;
>>
>>}
>>
>> }
>
> That's a bizarre loop... you're feeding references to elements of the array
> back into the array over which the loop is iterating. If you REALLY want to
> do what you are doing, then do the following:
>
> 
> foreach( array_keys( $cats ) as $key )
> {
>$c = &$cats[$key];
>
>echo $c['id'];
>
>if( $c['id'] < 5 )
>{
>$c['id']++;
>$cats[] = $c;
>}
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> E-Mail Disclaimer: Information contained in this message and any
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure,
> copying, and distribution are prohibited unless authorized.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings

On 11-07-05 10:20 AM, Dajka Tamás wrote:

Hi,

Yeah, I'm really want to do that, since I'm working with the elements of the 
original array ( skipped that part in sample code ).

I've tried your suggestion, but it gives the same result, so on just one input 
is just gives back '1'.


Ahhh... you want the behaviour of the multiple elements... I presumed 
you wanted the other way around.



What troubles me, that foreach gives an inconsistent working. Why is 'foreach' 
checking element count at all and working differently with different element 
counts? That's not normal is my opinion. 'foreach' shouldn't do this:

if ( count($elements) == 1 ) then loop 1;
else loop normally;

and that's what is does now, since when it's more than one element it's working 
like a while loop, with checking the condition before ( and after ) every run. 
( if 'foreach' would check that the current run is the last one before 
executing the current loop, the results would be the same with each case )


You're making an assumption that it is checking the count. It may just 
be pre-determining whether another element exists for the next 
iteration. Consider the following pseudo code:


nextItem = items->reset();
while( nextItem )
{
item = nextItem;
nextItem = items->next();

// Do stuff.
}

There's lots of ways to program a loop... and your PHP foreach loop is 
being converted to something entirely different internally. The above 
doesn't count elements, but it will result in the same behaviour as you 
are experiencing.


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



[PHP] Top Posting

2011-07-05 Thread admin
Since this is the 3rd time I have been chewed out for top posting.

Anyone know how to make Outlook changes its reply position.

 

I am using outlook  2007 and I do not find an option for this.

I have to scroll down to the bottom of the email and it considers that to be
an adjustment to the original email , plus I have to manually write my
signature block.

 

Assuming this is what they mean about top posting!!!

 

Richard L. Buskirk

 



Re: [PHP] Foreach question

2011-07-05 Thread Louis Huppenbauer
I don't think that it does this:

if ( count($elements) == 1 ) then loop 1;
else loop normally;

It's probably more something like that:

$i=count($elements);
loop:
$i--;
if($i == 0)
$last_loop = true;
else
$last_loop = false

if($last_loop)
   exit;
else
   goto loop;



But aside from that, I would propose you the same thing Robert already
did - Just use while or some other loop (for maybe?).

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




RE: [PHP] Foreach question

2011-07-05 Thread Dajka Tamás
Ok, but if it would be that way I shouldn't get '122334455' for second output, 
no? The item count increments with every iteration of the loop.

Or you're saying that, it checks for an existance of nextitem before every 
loop, and that will fail with just one element, but will always return true 
with two elements? ( since the first elements copy is pushed as third element, 
etc )


-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com] 
Sent: Tuesday, July 05, 2011 4:28 PM
To: Dajka Tamás
Cc: php-general@lists.php.net
Subject: Re: [PHP] Foreach question

On 11-07-05 10:20 AM, Dajka Tamás wrote:
> Hi,
>
> Yeah, I'm really want to do that, since I'm working with the elements of the 
> original array ( skipped that part in sample code ).
>
> I've tried your suggestion, but it gives the same result, so on just one 
> input is just gives back '1'.

Ahhh... you want the behaviour of the multiple elements... I presumed 
you wanted the other way around.

> What troubles me, that foreach gives an inconsistent working. Why is 
> 'foreach' checking element count at all and working differently with 
> different element counts? That's not normal is my opinion. 'foreach' 
> shouldn't do this:
>
> if ( count($elements) == 1 ) then loop 1;
> else loop normally;
>
> and that's what is does now, since when it's more than one element it's 
> working like a while loop, with checking the condition before ( and after ) 
> every run. ( if 'foreach' would check that the current run is the last one 
> before executing the current loop, the results would be the same with each 
> case )

You're making an assumption that it is checking the count. It may just 
be pre-determining whether another element exists for the next 
iteration. Consider the following pseudo code:

 nextItem = items->reset();
 while( nextItem )
 {
 item = nextItem;
 nextItem = items->next();

 // Do stuff.
 }

There's lots of ways to program a loop... and your PHP foreach loop is 
being converted to something entirely different internally. The above 
doesn't count elements, but it will result in the same behaviour as you 
are experiencing.

Cheers,
Rob.
-- 
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



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



[PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
outlook doesn't offer an option for that. 



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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings



On 11-07-05 10:39 AM, Dajka Tamás wrote:

Ok, but if it would be that way I shouldn't get '122334455' for second output, 
no? The item count increments with every iteration of the loop.

Or you're saying that, it checks for an existance of nextitem before every 
loop, and that will fail with just one element, but will always return true 
with two elements? ( since the first elements copy is pushed as third element, 
etc )


Exactly... it's not counting at all. If it were, you wouldn't get to so 
many iterations with only 2 entries in the array. I can't remember 
exactly how PHP stores arrays (some kind of bucket structure), but it's 
likely it traverses the items like a linked list using pointers from one 
to the next for efficiency.


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings

On 11-07-05 10:39 AM, Dajka Tamás wrote:

Ok, but if it would be that way I shouldn't get '122334455' for second output, 
no? The item count increments with every iteration of the loop.

Or you're saying that, it checks for an existance of nextitem before every 
loop, and that will fail with just one element, but will always return true 
with two elements? ( since the first elements copy is pushed as third element, 
etc )


BTW, there are reasons you might calculate next item before iterating. 
If the current iteration removes the current item, then nextItem would 
still be valid (theoretically :). It's more often the case you might 
remove the current item, than try to remove the next item in a foreach 
iteration.


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Robert Cummings

On 11-07-05 10:42 AM, Jim Giner wrote:

outlook doesn't offer an option for that.


I'm pretty sure it has a scrollbar on the side ;)

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Top Posting

2011-07-05 Thread Paul M Foster
On Tue, Jul 05, 2011 at 10:29:12AM -0400, ad...@buskirkgraphics.com wrote:

> Since this is the 3rd time I have been chewed out for top posting.
> 
> Anyone know how to make Outlook changes its reply position.
> 
> I am using outlook  2007 and I do not find an option for this.
> 
> I have to scroll down to the bottom of the email and it considers that to be
> an adjustment to the original email , plus I have to manually write my
> signature block.
> 
> Assuming this is what they mean about top posting!!!
> 
> Richard L. Buskirk

As far as I know, you're stuck with exactly what you described. However,
you can make life easier both on yourself and the rest of us by snipping
content not relevant to your reply (that doesn't mean *all* preceding
content).

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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



RE: [PHP] Foreach question

2011-07-05 Thread Dajka Tamás
Thanks, that was interesting :) I think I got one step further in understanding 
PHP :)

BTW, I've changed the loop to 'for' and it's working well :)

-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com] 
Sent: Tuesday, July 05, 2011 4:45 PM
To: Dajka Tamás
Cc: php-general@lists.php.net
Subject: Re: [PHP] Foreach question

On 11-07-05 10:39 AM, Dajka Tamás wrote:
> Ok, but if it would be that way I shouldn't get '122334455' for second 
> output, no? The item count increments with every iteration of the loop.
>
> Or you're saying that, it checks for an existance of nextitem before every 
> loop, and that will fail with just one element, but will always return true 
> with two elements? ( since the first elements copy is pushed as third 
> element, etc )

BTW, there are reasons you might calculate next item before iterating. 
If the current iteration removes the current item, then nextItem would 
still be valid (theoretically :). It's more often the case you might 
remove the current item, than try to remove the next item in a foreach 
iteration.

Cheers,
Rob.
-- 
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



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



[PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
And besides - I'm sure there are PLENTY of people here who despise scrolling 
thru endless repeated paragraphs from a long list of posts just to get the 
the latest contribution to the topic.:)

This newgroup may have its rules, but if bottom-posting was such a wise and 
preferred method, why do millions of business users subscribe to a product 
such as Outlook, that top-posts by default, to conduct their daily business 
via emails flying back and forth with the latest post at the beginning so 
that readers don't have to re-hash old news unless they want to? 



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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings

On 11-07-05 09:40 AM, Dajka Tamas wrote:


foreach ( $cats as&$c ) {

echo $c['id'];

if ( $c['id']<  5 ) {

   $c['id']++;

   $cats[] = $c;

}

}


Given that you seem to want the above functionality obtained when more 
than one element exists in the input array... the simplest way (I can 
bother to think up) to achieve what you want with little extra work is 
to do the following:




Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings

On 11-07-05 10:48 AM, Dajka Tamás wrote:

Thanks, that was interesting :) I think I got one step further in understanding 
PHP :)

BTW, I've changed the loop to 'for' and it's working well :)


Can you show us your for loop? I'm not immediately sure how you use a 
for loop to traverse a growing number of entries in an array without 
either updating the extents of the traversal or using for( ; ; ) which 
is the same as while( 1 ). Or are you now using the low level array 
traversal functions like reset() and next()?


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Curtis Maurand



Jim Giner wrote:
> outlook doesn't offer an option for
that.

ctrl-END gets you to the bottom of a message.



Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 3:48 PM, Jim Giner wrote:

> And besides - I'm sure there are PLENTY of people here who despise
> scrolling
> thru endless repeated paragraphs from a long list of posts just to get the
> the latest contribution to the topic.:)
>
> This newgroup may have its rules, but if bottom-posting was such a wise and
> preferred method, why do millions of business users subscribe to a product
> such as Outlook, that top-posts by default, to conduct their daily business
> via emails flying back and forth with the latest post at the beginning so
> that readers don't have to re-hash old news unless they want to?


If you're looking for a sane reason why Microsoft software is popular in the
business world you're not going to find one. If you're looking for a logical
reason it's simply because they built software that ran on the cheapest
boxes available and then put a lot of money into marketing it. That doesn't
make it good software, and it certainly doesn't give them any authority over
the "right" way to do things.

This mailing list requires selective quoting and bottom posting for the
following reasons...

1) It provides context to that contributors' contribution without requiring
the rest of the thread.
2) There is no second reason.

That's it, and it's a strong argument. I use gmail for mailing lists and as
such have access to the complete thread in a logical format. The most
popular email clients don't feature decent threading, if any at all. Would
you seriously rather wade through a date-sorted list to work out what the
hell the latest email is talking about and responding to? As an example,
your email to which I am replying starts "And besides..." Erm, besides what?
While a stretch of an example I think it illustrates the point.

In addition, these emails we send back and forth get archived on more
websites than you know about, and they're usually near the top of results
for any search you'll do for help with PHP. Upon visiting one of these
results, is it more helpful for that single page to contain the relevant
parts of the thread or do you really think it's better to have that page
only contain that one post and links to the rest of the thread? If you
really side with the latter, consider that a lot of the more useful threads
on this list end up covering a number of different subjects in its various
branches.

Public archive requirements don't generally apply to business users - very
few of them are generous/daft enough to publish their emails. It's also
worth pointing out that for me, top posting in the business world annoys me
just as must as bottom posting annoys you in this world.

One final thing... you keep calling this a newsgroup. The PHP mailing lists
are mailing lists first, and a newsgroup second - that's kinda why they're
called the PHP mailing lists.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Top Posting

2011-07-05 Thread Tim Streater
On 05 Jul 2011 at 15:29, ad...@buskirkgraphics.com wrote: 

> Since this is the 3rd time I have been chewed out for top posting.
>
> Anyone know how to make Outlook changes its reply position.
>
> I am using outlook 2007 and I do not find an option for this.
>
> I have to scroll down to the bottom of the email and it considers that to be
> an adjustment to the original email, plus I have to manually write my
> signature block.

What is meant by "an adjustment to the original mail"? You could try switching 
to another email client.

--
Cheers  --  Tim

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

Re: [PHP] Re: Top Posting

2011-07-05 Thread Paul M Foster
On Tue, Jul 05, 2011 at 10:48:34AM -0400, Jim Giner wrote:

> And besides - I'm sure there are PLENTY of people here who despise scrolling 
> thru endless repeated paragraphs from a long list of posts just to get the 
> the latest contribution to the topic.:)
> 
> This newgroup may have its rules, but if bottom-posting was such a wise and 
> preferred method, why do millions of business users subscribe to a product 
> such as Outlook, that top-posts by default, to conduct their daily business 
> via emails flying back and forth with the latest post at the beginning so 
> that readers don't have to re-hash old news unless they want to? 

Seriously? That behavior is dictated by Microsoft and could be simply a
shortcut, making it easier on Microsoft. (They don't have to scan down
the email and place the cursor at the end of the email. They can just
put it at the top, easy-peasy.) Or it could have been dictated by Bill
Gates, who didn't want to scroll down. One thing's for sure: Microsoft's
rarely met a standard they liked or willingly followed. Business users
simply went along with this behavior, mostly because they had no
knowledge of anything else. It was the default behavior of the only
email client that came with their operating system. They learned to live
with it and even appreciate it.

My point is, I seriously doubt that business users (who were not the
original target audience for Outlook) dictated to Microsoft that they
arrange their email client so that the cursor defaulted to the top. And
by many accounts, Outlook (et al) is an appalling broken email client
for many reasons. Business users don't "subscribe" to the Microsoft
email client. It comes with their operating system for free and it
pretty much does what they want, even if it has gaping holes in it. Why
retrain and spend billions to install something else on every computer
in their company?

A similar question might be, if Unix/Linux is so great, why do millions
of business owners stick with Windows year after year? Answer: because
it comes with their computer and pretty much does what they want. And
Microsoft actively blocks, discourages and prevents the installation of
any other operating system on hardware from anyone they can possibly
control.

Questioning bottom-posting is one thing. Holding up the widespread
adoption of Outlook as a reason why top-posting is superior (because
business people demand it) is silly. No offense, but it's pretty weak
reasoning.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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



Re: [PHP] Foreach question

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 2:40 PM, Dajka Tamas  wrote:

> I've bumped into an interesting thing with foreach. I really don't know, if
> this is normal working, or why it is, so I got curious.
>
> The script:
>
> foreach ( $cats as &$c ) {
> echo $c['id'];
> if ( $c['id'] < 5 ) {
>$c['id']++;
>$cats[] = $c;
> }
>  }
>
> Input 1:
>
> $cats = array( array( 'id' => 1 ) );
>
> Output 1:
>
> 1
>
> Input 2:
>
> $cats = array( array( 'id' => 1 ), array( 'id' => 2 ) );
>
> Output 2:
>
> 122334455
>
> Why is this? Is this normal behaviour?
>

Looking at the implementation of foreach in the source, the pointer to the
next item in the array is calculated after evaluating the condition but
before executing that loop. Thus, with a single array element it decides
it's at the end of the array before the first loop. My C is a little rusty
so I might have the details slightly wrong, but that's the crux of what's
happening.

Whether that's normal and expected or a bug is one of the internals team,
but my guess is that it's a "feature" rather than a bug.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
not what he was asking for.
""Curtis Maurand""  wrote in message 
news:4e7755d57a7a032c39e44598f3660ac7.squir...@www.xyonet.com...
>
>
>
> Jim Giner wrote:
>> outlook doesn't offer an option for
> that.
>
> ctrl-END gets you to the bottom of a message.
>
> 



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



[PHP] XML array

2011-07-05 Thread Kanishka
hi this is my first post on php general mailing list, i want to read a xml
file to retrieve data. i tried by using "DOM" and "simple xml" but i
couldn't.
the xml file looks like this..

*

   the the title
   7-6-2011




book 1
author 1



book 2
auther 2



*

i want to put both "name" and "author" values in a multy dimensional array.
what dimension is suitable? what should i do for resolve my problem?
thanks.


Re: [PHP] Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 3:29 PM,  wrote:

> Anyone know how to make Outlook changes its reply position.
>
> I am using outlook  2007 and I do not find an option for this.
>

Google delivers...
http://sourceforge.net/apps/mediawiki/macros4outlook/index.php?title=QuoteFix_Macro

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
Actually business user do subscribe to use Outlook as their client.  It does 
not come with the OS, it is purchased on a per seat basis by every 
corporation using it in the form of a license.

On the other hand Outlook Express is available as part of the os, or is 
easily obtained for free.  It is not however the preferred 'business' client 
for those stuck on M$ products.

"Paul M Foster"  wrote in message 
news:20110705152457.gk21...@quillandmouse.com...

> Business users don't "subscribe" to the Microsoft
> email client. 



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



Re: [PHP] Foreach question

2011-07-05 Thread Louis Huppenbauer
Just use count($arr) in your for-header, as it get's executed again
for each loop.

1), array('id'=>2));
for($i=0;$i $arr[$i]['id']+1);
}
}
?>

2011/7/5 Robert Cummings :
> On 11-07-05 10:48 AM, Dajka Tamás wrote:
>>
>> Thanks, that was interesting :) I think I got one step further in
>> understanding PHP :)
>>
>> BTW, I've changed the loop to 'for' and it's working well :)
>
> Can you show us your for loop? I'm not immediately sure how you use a for
> loop to traverse a growing number of entries in an array without either
> updating the extents of the traversal or using for( ; ; ) which is the same
> as while( 1 ). Or are you now using the low level array traversal functions
> like reset() and next()?
>
> Cheers,
> Rob.
> --
> E-Mail Disclaimer: Information contained in this message and any
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure,
> copying, and distribution are prohibited unless authorized.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] XML array

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 4:36 PM, Kanishka  wrote:

> hi this is my first post on php general mailing list, i want to read a xml
> file to retrieve data. i tried by using "DOM" and "simple xml" but i
> couldn't.
> the xml file looks like this..
>
> *
> 
>   the the title
>   7-6-2011
> 
>
> 
> 
> book 1
> author 1
> 
>
> 
> book 2
> auther 2
> 
>
> 
> *
>
> i want to put both "name" and "author" values in a multy dimensional array.
> what dimension is suitable? what should i do for resolve my problem?




the the title
7-6-2011



book 1
author 1


book 2
auther 2



END;

$xml = simplexml_load_string($data);

$arr = array();
foreach ($xml->data->book as $book)
{
$arr[] = array('name' => (string)$book->name, 'author' =>
(string)$book->author);
}

var_dump($arr);
?>

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner

"Stuart Dallas"  wrote in message
> If you're looking for a sane reason why Microsoft software is popular in 
> the
> business world you're not going to find one. >

No - you missed my statement's point.  Not looking for anything - just 
saying it is what it is.  You won't find me defending M$ software designs - 
I was simply pointing out that the product is setup that way and nobody over 
the years has made any effort (?) to have it altered.  I wonder why. :)

> One final thing... you keep calling this a newsgroup. The PHP mailing 
> lists
> are mailing lists first, and a newsgroup second - that's kinda why they're
> called the PHP mailing lists.
>
It looks like all the newsgroups I've ever belonged to.  It acts like a 
newsgroup.  And - funny ha ha - its name begins with the word "news", not 
"mailing".  BTW - what does a mailing list look like?

AND - instead of coming down on people who top post, why not come down on 
the vast majority of people of DON'T post ONLY the pertinent part(s) of the 
past emails in their own response?  Cutting down on the amount of chaff in 
the postings here would certainly eliminate the biggest reluctance to having 
to bottom-post.  To scroll thru 60-100 lines of quoted and re-quoted text 
only to read a two line contribution is tedious and wasteful.

Let the new mantra be - "Snip Your Posts!"

PS - note the bottom post. 



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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Richard Quadling
On 5 July 2011 16:48, Jim Giner  wrote:
> Let the new mantra be - "Snip Your Posts!"

Consider your post snipped.

OOI. If you use Google Mail, highlighting the part of the message you
want to use and then clicking reply-all will embed only that part in
the reply.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 4:48 PM, Jim Giner wrote:

>
> "Stuart Dallas"  wrote in message
> > If you're looking for a sane reason why Microsoft software is popular in
> > the
> > business world you're not going to find one. >
>
> No - you missed my statement's point.  Not looking for anything - just
> saying it is what it is.  You won't find me defending M$ software designs -
> I was simply pointing out that the product is setup that way and nobody
> over
> the years has made any effort (?) to have it altered.  I wonder why. :)
>

I didn't miss the point. As I said later on, mailing lists with archives
have different requirements to business users - you can't compare the two.

In addition, most "business users" live with what they're given because they
don't have a loud enough voice. I'd also bet good money that most people
haven't even considered the possibility of doing it differently.

> One final thing... you keep calling this a newsgroup. The PHP mailing
> > lists
> > are mailing lists first, and a newsgroup second - that's kinda why
> they're
> > called the PHP mailing lists.
> >
> It looks like all the newsgroups I've ever belonged to.  It acts like a
> newsgroup.  And - funny ha ha - its name begins with the word "news", not
> "mailing".  BTW - what does a mailing list look like?
>

http://php.net/mailing-lists - this is what you're reading. They're also
"available as newsgroups on our news server." Note that they're not
newsgroups that are also available as mailing lists.

A mailing list server is a managed one-to-many distribution system. Google
it!

AND - instead of coming down on people who top post, why not come down on
> the vast majority of people of DON'T post ONLY the pertinent part(s) of the
> past emails in their own response?  Cutting down on the amount of chaff in
> the postings here would certainly eliminate the biggest reluctance to
> having
> to bottom-post.  To scroll thru 60-100 lines of quoted and re-quoted text
> only to read a two line contribution is tedious and wasteful.
>

When you post at the top of a thread where most people have bottom posted,
that's a bigger problem than untrimmed quotes.

Find out what key combination gets you to the end of the message in your OS
and learn how to use it. Oh, and bear in mind that you may miss inline
responses by skipping to the end.

Oh, so you're saying that the need to cut out the chaff is what stops you
from bothering to cut out the chaff? Curious logic at work there.

PS - note the bottom post.


*clap* *clap* You after a medal or summink?!!

-Stuart
-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
Again, please include the list when replying!

On Tue, Jul 5, 2011 at 4:56 PM, Jim Giner wrote:

> **
> if they weren't on the list, then how did they get involved in the first
> place?
>

You don't need to be subscribed to post.

I see the bottom posting lasted a headline-worthy amount of time!

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
"Stuart Dallas"  wrote in message 
news:CAJgGj58OkZLiakMMo8qmuhg68BamYOi+TLNGyzze=iyppbj...@mail.gmail.com...
> Again, please include the list when replying!
>

But don't include the poster's email if you're replying to the list!
 



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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Richard Quadling
On 5 July 2011 17:08, Stuart Dallas  wrote:
> Again, please include the list when replying!
>
> On Tue, Jul 5, 2011 at 4:56 PM, Jim Giner wrote:
>
>> **
>> if they weren't on the list, then how did they get involved in the first
>> place?

And Jim, your anti-spam measures are spamming me.

So, I've blocked your anti-spam as spam.




-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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



Re: [PHP] Foreach question

2011-07-05 Thread Robert Cummings

On 11-07-05 11:46 AM, Louis Huppenbauer wrote:

Just use count($arr) in your for-header, as it get's executed again
for each loop.

1), array('id'=>2));
 for($i=0;$i  $arr[$i]['id']+1);
 }
 }
?>



Ok, so the extents are being updated on each pass of the loop :)

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Mike Mackintosh

On Jul 5, 2011, at 12:06, Stuart Dallas  wrote:

> On Tue, Jul 5, 2011 at 4:48 PM, Jim Giner wrote:
> 
>> 
>> "Stuart Dallas"  wrote in message
>>> If you're looking for a sane reason why Microsoft software is popular in
>>> the
>>> business world you're not going to find one. >
>> 
>> No - you missed my statement's point.  Not looking for anything - just
>> saying it is what it is.  You won't find me defending M$ software designs -
>> I was simply pointing out that the product is setup that way and nobody
>> over
>> the years has made any effort (?) to have it altered.  I wonder why. :)
>> 
> 
> I didn't miss the point. As I said later on, mailing lists with archives
> have different requirements to business users - you can't compare the two.
> 
> In addition, most "business users" live with what they're given because they
> don't have a loud enough voice. I'd also bet good money that most people
> haven't even considered the possibility of doing it differently.
> 
>> One final thing... you keep calling this a newsgroup. The PHP mailing
>>> lists
>>> are mailing lists first, and a newsgroup second - that's kinda why
>> they're
>>> called the PHP mailing lists.
>>> 
>> It looks like all the newsgroups I've ever belonged to.  It acts like a
>> newsgroup.  And - funny ha ha - its name begins with the word "news", not
>> "mailing".  BTW - what does a mailing list look like?
>> 
> 
> http://php.net/mailing-lists - this is what you're reading. They're also
> "available as newsgroups on our news server." Note that they're not
> newsgroups that are also available as mailing lists.
> 
> A mailing list server is a managed one-to-many distribution system. Google
> it!
> 
> AND - instead of coming down on people who top post, why not come down on
>> the vast majority of people of DON'T post ONLY the pertinent part(s) of the
>> past emails in their own response?  Cutting down on the amount of chaff in
>> the postings here would certainly eliminate the biggest reluctance to
>> having
>> to bottom-post.  To scroll thru 60-100 lines of quoted and re-quoted text
>> only to read a two line contribution is tedious and wasteful.
>> 
> 
> When you post at the top of a thread where most people have bottom posted,
> that's a bigger problem than untrimmed quotes.
> 
> Find out what key combination gets you to the end of the message in your OS
> and learn how to use it. Oh, and bear in mind that you may miss inline
> responses by skipping to the end.
> 
> Oh, so you're saying that the need to cut out the chaff is what stops you
> from bothering to cut out the chaff? Curious logic at work there.
> 
> PS - note the bottom post.
> 
> 
> *clap* *clap* You after a medal or summink?!!
> 
> -Stuart
> -- 
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/


Don't forget that apple mail doesn't have an option for default bottom posting 
and the indents suck. (yes I have a Mac)

Logically, to developers bottom posting makes more sense, but to businesses, 
they don't want to cut scroll and quote, so top posting became big.

The preference is that of the administrators and the community or business just 
need to deal with it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 5:10 PM, Jim Giner wrote:

> "Stuart Dallas"  wrote in message
> news:CAJgGj58OkZLiakMMo8qmuhg68BamYOi+TLNGyzze=iyppbj...@mail.gmail.com...
> > Again, please include the list when replying!
> >
>
> But don't include the poster's email if you're replying to the list!


The guidelines say I should, and I try to be a good netizen.

This "discussion" is going nowhere, so I'm out.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Richard Quadling
On 5 July 2011 17:10, Jim Giner  wrote:
> "Stuart Dallas"  wrote in message
> news:CAJgGj58OkZLiakMMo8qmuhg68BamYOi+TLNGyzze=iyppbj...@mail.gmail.com...
>> Again, please include the list when replying!
>>
>
> But don't include the poster's email if you're replying to the list!

But that is what "reply-all" is about.

Person A sends an message to List B.

I reply-all and Person A and List B get replies.

Hmm.

GMail sucks at this. Reply should be first Reply-To-List.

Having said that, the PHP lists should proxy the sender so a "reply"
is to the list and not the original poster.


-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
If you resisted sending what amounts to a duplicate email to the posters who 
are 'on' the list, you wouldn't have to deal with spam filters.  Don't 
understand the purpose of a reply all when in essence our replies are to the 
list wherein the topic originated.  Those on the list will surely see any 
and all posts without having another one in their inbox, won't they?
"Richard Quadling"  wrote in message 
news:CAKUjMCW9rcqZodVe7dx2R9Rew5bQ5-5xcHgHxMmtzqc_z=a...@mail.gmail.com...
>
> And Jim, your anti-spam measures are spamming me.
>
> So, I've blocked your anti-spam as spam.
>



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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner

"Richard Quadling"  wrote in message 
news:CAKUjMCVbhbXO=ngr1lnzo-6fdahdj-r8hc73b-esotfqg+k...@mail.gmail.com...
>
> But that is what "reply-all" is about.
>
> Person A sends an message to List B.
>
> I reply-all and Person A and List B get replies.
>
> Hmm.

A new level of complexity!  A person sends to the list, hoping for a 
response, but fails to subscribe to the list? 



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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Lucas
On 7/5/2011 9:11 AM, Richard Quadling wrote:
> And Jim, your anti-spam measures are spamming me.
> 
> So, I've blocked your anti-spam as spam.

I noticed this the other day and I blocked him as well.

Maybe this is why his mail server IP is listed as a source of spam...

http://www.mxtoolbox.com/SuperTool.aspx?action=blacklist%3a64.118.87.45

Jim Lucas

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner
It's certainly not spam - it's a spam filter offered by my ISP and works 
great.  The mail you are getting from it is a query asking you to reply if 
you are real and once you do, you'll never get the request again.

"Jim Lucas"  wrote in message 
news:4e134676.7090...@cmsws.com...
> On 7/5/2011 9:11 AM, Richard Quadling wrote:
>> And Jim, your anti-spam measures are spamming me.
>>
>> So, I've blocked your anti-spam as spam.
>
> I noticed this the other day and I blocked him as well.
>
> Maybe this is why his mail server IP is listed as a source of spam...
>
> http://www.mxtoolbox.com/SuperTool.aspx?action=blacklist%3a64.118.87.45
>
> Jim Lucas 



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



Re: [PHP] XML array

2011-07-05 Thread Tamara Temple


On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote:



$arr[] = array('name' => (string)$book->name, 'author' =>
(string)$book->author);
}


Interesting -- is the casting to string type necessary there? I  
haven't done that before, and it seems to have worked ok...



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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Ashley Sheridan


Jim Giner  wrote:

>It's certainly not spam - it's a spam filter offered by my ISP and
>works
>great.  The mail you are getting from it is a query asking you to reply
>if
>you are real and once you do, you'll never get the request again.
>
>"Jim Lucas"  wrote in message
>news:4e134676.7090...@cmsws.com...
>> On 7/5/2011 9:11 AM, Richard Quadling wrote:
>>> And Jim, your anti-spam measures are spamming me.
>>>
>>> So, I've blocked your anti-spam as spam.
>>
>> I noticed this the other day and I blocked him as well.
>>
>> Maybe this is why his mail server IP is listed as a source of spam...
>>
>>
>http://www.mxtoolbox.com/SuperTool.aspx?action=blacklist%3a64.118.87.45
>>
>> Jim Lucas
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

I've seen fake messages do that before as a way of harvesting good live email 
addresses, so I regard all such messages spam now.

Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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



Re: [PHP] XML array

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 6:43 PM, Tamara Temple wrote:

>
> On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote:
>
>
>> $arr[] = array('name' => (string)$book->name, 'author' =>
>> (string)$book->author);
>> }
>>
>
> Interesting -- is the casting to string type necessary there? I haven't
> done that before, and it seems to have worked ok...


Depends whether you want strings or not. $book->name is a SimpleXMLElement
object, so if you want the string value it needs to be cast to a string.
This will be implicitly done if you use the variable where PHP would expect
a string, but in the name of defensive programming I always cast XML values
to the type I expect/want them to be.

Remove the casts in that snippet and run it - you'll see the variables are
not strings.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


Re: [PHP] Re: Top Posting

2011-07-05 Thread Jim Giner

"Ashley Sheridan"  wrote in message 
news:21e916f2-2a1f-4982-bc4d-9a574da92...@email.android.com...
I've seen fake messages do that before as a way of harvesting good live 
email addresses, so I regard all such messages spam now.

oh, well... 



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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Tamara Temple
Business e-mail did not start with Outlook. Businesses have been using  
e-mail long before it even showed up as an option. The de jure  
standard on the Internet before that time, and before several other  
clients came about was either bottom posting or intermixed responses.  
This was true in e-mail, Usenet postings, and other similar things.  
Mailing lists have been around for a long, long time and the reasons  
things are done that way is pretty well established. Now, however, not  
everyone who comes along is aware of and certainly was not party to  
the discussions that happened back then about how best to do things.  
But there are reasons beyond just mere "it's the way we do it" and  
most certainly beyond "it's the way my mail client acts".



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



Re: [PHP] XML array

2011-07-05 Thread Tamara Temple


On Jul 5, 2011, at 12:48 PM, Stuart Dallas wrote:

On Tue, Jul 5, 2011 at 6:43 PM, Tamara Temple  
 wrote:


On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote:


$arr[] = array('name' => (string)$book->name, 'author' =>
(string)$book->author);
}

Interesting -- is the casting to string type necessary there? I  
haven't done that before, and it seems to have worked ok...


Depends whether you want strings or not. $book->name is a  
SimpleXMLElement object, so if you want the string value it needs to  
be cast to a string. This will be implicitly done if you use the  
variable where PHP would expect a string, but in the name of  
defensive programming I always cast XML values to the type I expect/ 
want them to be.


Remove the casts in that snippet and run it - you'll see the  
variables are not strings.


Ah, thanks for that information. I guess I have just been lucky so  
far. I will update my code and my style there to make it more accurate  
and defensible.





RE: [PHP] Re: Top Posting

2011-07-05 Thread admin
> -Original Message-
> From: Jim Giner [mailto:jim.gi...@albanyhandball.com]
> Sent: Tuesday, July 05, 2011 1:53 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Re: Top Posting
> 
> 
> "Ashley Sheridan"  wrote in message
> news:21e916f2-2a1f-4982-bc4d-9a574da92...@email.android.com...
> I've seen fake messages do that before as a way of harvesting good live
> email addresses, so I regard all such messages spam now.
> 
> oh, well...
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

I have made a few changes in Outlook to make this a little easier. Since
this is the only time I would ever bottom post. 
I will manually do it, I am sorry but Outlook should have an option for
this 
I was not complaining about bottom posting I just thought maybe someone knew
a setting to make it happen in outlook.

:) Happy FRY Casey Anthony Day!



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



Re: [PHP] Top Posting

2011-07-05 Thread James Moe
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/05/2011 07:48 AM, Jim Giner wrote:
> And besides - I'm sure there are PLENTY of people here who despise scrolling
> thru endless repeated paragraphs from a long list of posts just to get the
> the latest contribution to the topic.:)
>
  I often do not bother to read posts from those how cannot trim all of
the irrelevant portions of a response. I have noticed that the response
is usually trivial and not worth scrolling to find.

> This newgroup may have its rules, but if bottom-posting was such a wise and
> preferred method, why do millions of business users subscribe to a product
> such as Outlook, that top-posts by default, to conduct their daily business
> via emails flying back and forth with the latest post at the beginning so
> that readers don't have to re-hash old news unless they want to?
>
  I suspect one reason top posting is popular is that responders do not
have to think about tidying up, just spit out a reply and move on. The
result is a message that grows in size with every reply containing every
useless bit since the thread began. It becomes quite a mess.

- -- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4TU/MACgkQzTcr8Prq0ZP2OwCfUj8Hw7cFkkYMey6EdknZ60/E
ahgAoJnaxil40kOqps1WhWF6lP6d/Ve5
=pedd
-END PGP SIGNATURE-

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



RE: [PHP] Re: Top Posting

2011-07-05 Thread Ashley Sheridan
On Tue, 2011-07-05 at 14:04 -0400, ad...@buskirkgraphics.com wrote:

> > -Original Message-
> > From: Jim Giner [mailto:jim.gi...@albanyhandball.com]
> > Sent: Tuesday, July 05, 2011 1:53 PM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] Re: Top Posting
> > 
> > 
> > "Ashley Sheridan"  wrote in message
> > news:21e916f2-2a1f-4982-bc4d-9a574da92...@email.android.com...
> > I've seen fake messages do that before as a way of harvesting good live
> > email addresses, so I regard all such messages spam now.
> > 
> > oh, well...
> > 
> > 
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> I have made a few changes in Outlook to make this a little easier. Since
> this is the only time I would ever bottom post. 
> I will manually do it, I am sorry but Outlook should have an option for
> this 
> I was not complaining about bottom posting I just thought maybe someone knew
> a setting to make it happen in outlook.
> 
> :) Happy FRY Casey Anthony Day!
> 
> 
> 


There is another way...

Have you looked into using Evolution as an email client? It's what I use
on Linux, and the last time I checked there were Windows binaries
available for it. It connect to MS Exchange Server if that's what you
use in the office, it's completely free, and it lets you set up your
posting options very easily. It also looks very similar to Outlook,
although it behaves itself a darn sight better, and tends not to crash
or drop connections as much as Outlook, oh and there are the added
security benefits you get when you realise that email viruses tend to be
targeting MS products!

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Re: Top Posting

2011-07-05 Thread Tamara Temple


On Jul 5, 2011, at 1:14 PM, Ashley Sheridan wrote:
Have you looked into using Evolution as an email client? It's what I  
use

on Linux, and the last time I checked there were Windows binaries
available for it. It connect to MS Exchange Server if that's what you
use in the office, it's completely free, and it lets you set up your
posting options very easily. It also looks very similar to Outlook,
although it behaves itself a darn sight better, and tends not to crash
or drop connections as much as Outlook, oh and there are the added
security benefits you get when you realise that email viruses tend  
to be

targeting MS products!


This may or may not be an option for people -- when I was working at a  
business, I did not get to have a choice about what email client I  
used, nor much choice about any other software. In fact, I was  
chastized for loading cygwin onto my laptop because it wasn't an  
authorized piece of software. However, I learned long ago to only use  
my work machine for work emails, and had other systems for getting at  
email and Usenet and the rest of network that did not involve the use  
of my employer's machine and software.



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



Re: [PHP] Top Posting

2011-07-05 Thread Jim Giner
"James Moe"  wrote in message 
news:4e1353f3.6090...@sohnen-moe.com...
>
>  I suspect one reason top posting is popular is that responders do not
> have to think about tidying up, just spit out a reply and move on. The
> result is a message that grows in size with every reply containing every
> useless bit since the thread began. It becomes quite a mess.
>
> - -- 
> James Moe


oh, so true. 



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



[PHP] Re: Top Posting

2011-07-05 Thread Michelle Konzack
Hello Jim Giner,

Am 2011-07-05 10:48:34, hacktest Du folgendes herunter:
> And besides - I'm sure there are PLENTY of people here who despise scrolling 
> thru endless repeated paragraphs from a long list of posts just to get the 
> the latest contribution to the topic.:)
> 
> This newgroup may have its rules, but if bottom-posting was such a wise and 
> preferred method, why do millions of business users subscribe to a product 
> such as Outlook, that top-posts by default, to conduct their daily business 
> via emails flying back and forth with the latest post at the beginning so 
> that readers don't have to re-hash old news unless they want to? 

Imagine here a quoting of 200 lines and then a

ME TOO!

Thanks, Greetings and nice Day/Evening
Michelle Konzack

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet Franceitsystems@tdnet
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice) Gewerbe Straße 3
50, rue de Soultz 77694 Kehl/Germany
67100 Strasbourg/France   Tel: +49-177-9351947  mobil
Tel: +33-6-61925193 mobil Tel: +49-176-86004575 office

  
 

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


[PHP] Re: Re: Top Posting

2011-07-05 Thread Michelle Konzack
Hello Richard Quadling,

Am 2011-07-05 17:14:18, hacktest Du folgendes herunter:
> But that is what "reply-all" is about.
> Person A sends an message to List B.
> I reply-all and Person A and List B get replies.

I do not like to get PMs on my cellphone from the LIST

> Hmm.
> GMail sucks at this. Reply should be first Reply-To-List.

This is, WHY  exist

My Web-Mailer does support it.  SQUIRRELMAIL rocks! :-D

> Having said that, the PHP lists should proxy the sender so a "reply"
> is to the list and not the original poster.

NO!

Thanks, Greetings and nice Day/Evening
Michelle Konzack

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet Franceitsystems@tdnet
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice) Gewerbe Straße 3
50, rue de Soultz 77694 Kehl/Germany
67100 Strasbourg/France   Tel: +49-177-9351947  mobil
Tel: +33-6-61925193 mobil Tel: +49-176-86004575 office

  
 

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


[PHP] Re: Re: Top Posting

2011-07-05 Thread Michelle Konzack
Hello Jim Giner,

Am 2011-07-05 13:30:31, hacktest Du folgendes herunter:
> It's certainly not spam - it's a spam filter offered by my ISP and works 
> great.  The mail you are getting from it is a query asking you to reply if 
> you are real and once you do, you'll never get the request again.

Do you realy believe, that we like to click a dozen links per  day  only
that we are allowed to respond to a querry?

This is idiot thinking, because YOU need the answer!

Thanks, Greetings and nice Day/Evening
Michelle Konzack

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet Franceitsystems@tdnet
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice) Gewerbe Straße 3
50, rue de Soultz 77694 Kehl/Germany
67100 Strasbourg/France   Tel: +49-177-9351947  mobil
Tel: +33-6-61925193 mobil Tel: +49-176-86004575 office

  
 

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


[PHP] Re: Top Posting

2011-07-05 Thread Michelle Konzack
Hello James Moe,

Am 2011-07-05 11:12:03, hacktest Du folgendes herunter:
>   I suspect one reason top posting is popular is that responders do not
> have to think about tidying up, just spit out a reply and move on. 

Replying to what if s/he does not scroll down to read the answer of  the
previous person?  I do not understand, HOW someone can answer by TP.

It makes no sense...

Oh, I am Electronic Engineer and have to write  many  E-Mails  to  tech-
support of Microchip manufacturers and the  technics  there,  prefer  my
method (striping replied message and answer inside or bottom)

Thanks, Greetings and nice Day/Evening
Michelle Konzack

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet Franceitsystems@tdnet
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice) Gewerbe Straße 3
50, rue de Soultz 77694 Kehl/Germany
67100 Strasbourg/France   Tel: +49-177-9351947  mobil
Tel: +33-6-61925193 mobil Tel: +49-176-86004575 office

  
 

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


Re: [PHP] Re: Top Posting

2011-07-05 Thread Tamara Temple


On Jul 5, 2011, at 4:37 PM, Michelle Konzack wrote:



Imagine here a quoting of 200 lines and then a

ME TOO!

Thanks, Greetings and nice Day/Evening
   Michelle Konzack

--  
# Debian GNU/Linux Consultant  
##

  Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet Franceitsystems@tdnet
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice) Gewerbe Straße 3
50, rue de Soultz 77694 Kehl/Germany
67100 Strasbourg/France   Tel: +49-177-9351947  mobil
Tel: +33-6-61925193 mobil Tel: +49-176-86004575 office

  
 


Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


And then, we have the case of a signature being 3 times as long as the  
reply



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



Re: [PHP] vend-bot?

2011-07-05 Thread Kirk Bailey



On 7/3/2011 4:53 PM, Stuart Dallas wrote:
Only allowing them to access the URL once is a bad idea. If their 
download fails, is corrupt, or any number of other things go wrong 
(think accelerators, browser accelerators, etc) then you end up 
with a lot of support mail. Better to give them access for a short 
period of time.


Ok, so it just got more complex- if we let them do it twice, ior 
three times, we have a more complex design specification; if we let 
them do it unlimited times, we just defeated thepurpose of the 
exercise. How about this: if it fails, the customer can email us, 
adn we can reply with a copy as an attachment; a ripoff artist will 
not be in the log, and a complaint of failure to download gets them 
nothing.
Personally I would generate a unique token linked to their 
account, or if no user system exists then link it to their order 
number. Stick that in a URL and forward them to it. That URL shows 
them the thanks page and links to download the product(s). Each of 
those links also contains the token. Expire that token after 24 
hours, and on the page telling them it's expired give them a way 
to contact you just in case they haven't successfully downloaded 
the product yet.


There is no need to use cookies. There is no need to use basic 
authentication (which is a horrible user experience). They come 
back from PayPal to a script that sets up their unique URL, then 
you take them to that URL. KISS it - the more complicated you make 
this the worse the user experience will be and it won't be any 
more secure than a time-limited unique token as described above.


-Stuart

--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


--
end

Very Truly yours,
 - Kirk Bailey,
   Largo Florida

   kniht
  +-+
  | BOX |
  +-+
   think


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



[PHP] Re: Re: Top Posting

2011-07-05 Thread Jim Giner
Huh?  You have a problem with a person having a spam filter that requires 
one valid response to ensure that the mail from an address is from a real 
person ONE TIME ONLY?

And what do you use to cut down on spam in your in-box? 



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



Re: [PHP] Re: Re: Top Posting

2011-07-05 Thread Daniel Brown
On Tue, Jul 5, 2011 at 22:52, Jim Giner  wrote:
> Huh?  You have a problem with a person having a spam filter that requires
> one valid response to ensure that the mail from an address is from a real
> person ONE TIME ONLY?

Not that you're asking me, but yes, I do.  It's not a bad idea in
practice, but it's not a good idea either.  If I'm sending an
out-of-the-blue email to you, then I understand that I may have to
introduce myself to the guard in the gatehouse.  If you've sent
something to me and I need permission to reply, that's making you look
sanctimonious and unworthy of my time.  That's not to say that you
are, or that anyone like you is, of course, but if you expect - or
even hope - to receive my reply, you should at least put me on the
guest list first.

(Pardon the analogies, but I've been watching documentaries on
18th Century Statesmanship, in relation to our Independence Day
weekend.)

A better use of everyone's time here would be to collaborate on
ways to reduce SPAM.  So many folks bitch and whine about it, yet so
few seriously invest a few hours per month to help rid the world of it
all.  For the record, though, test($_POSTING['position']='top') will
always return FALSE with a warning here.

Parting words: most programmers still code in a procedural manner,
yet so many can't comprehend reading top-to-bottom on a programming
list.  I'm sure I'm not the only one who's used Google searches for
such intricacies as a minor evaluation of a prospective employee's
potential fit.

-- 

Network Infrastructure Manager
http://www.php.net/

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



[PHP] Self-whitelisting (WAS: Top Posting)

2011-07-05 Thread George Langley
On 2011-07-05, at 8:52 PM, Jim Giner wrote:

> Huh?  You have a problem with a person having a spam filter that requires 
> one valid response to ensure that the mail from an address is from a real 
> person ONE TIME ONLY?
--
I know that I do. I monitor our web site's registration system, and 
will get a number of notices from things like Boxbe, stating that they've 
delayed the email with the confirmation link that we send our clients, until we 
confirm receipt of their notice. But, this can be used against you, as they now 
know that your address is valid, and can in turn spam you! Can read the ugly 
details on Wiki:



I won't subject my company to that nuisance.


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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Lester Caine

Tamara Temple wrote:

And then, we have the case of a signature being 3 times as long as the
reply
Which is less of a problem if the email client correctly trims it! I can 
probably come up with a list of posts just to this list where a top poster has 
included several signatures several times - along with all the advertising :(


The bottom line is that we are not going to get any agreement on this. It's just 
a fact of life that people don't like to accept being told what to do so we have 
to live with that. But as long as lists like this are coming conveniently into 
my inbox *I* can do what I like with them. I have material going back to 1995 
nicely manageable here even when the broadband is down so I'll put up with the 
irritation - actually most top posted messages can simply be culled anyway - I 
have the previous message listed :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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