php-windows Digest 9 Apr 2002 23:02:42 -0000 Issue 1085
Topics (messages 12979 through 12989):
Re: Rounding
12979 by: Svensson, B.A.T. (HKG)
12982 by: Mike Flynn
12986 by: Svensson, B.A.T. (HKG)
12987 by: Mike Flynn
12989 by: Ross Fleming
Session information not stored in php 4.1.2
12980 by: Martin Kemp
12981 by: Fabian Deutsch
12983 by: Lee, Ford
FDF- how do I install?
12984 by: Thomas Holm
R: [PHP-WIN] FDF- how do I install?
12985 by: Alberto. Sartori
The directory name is invalid.
12988 by: dumbsnail
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 ---
> -----Original Message-----
> From: Mike Flynn
> Sent: Tuesday, April 09, 2002 1:30 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Rounding
>
>
> At 09:43 PM 4/8/02 +0100, Ross Fleming wrote:
> >Multiply by 100, take the absolute value and divide by 100 again
>
> That will round down to 2 decimal places. To round to the nearest 2
> decimal places, to what Ross said but instead of getting the absolute
> value, just round it normally.
What's "normal" rounding??????
One can round with a roof function, or one can round with a sealing function,
or one can round always towards odd numbers, or always even number, or one can
round by adding or subtracting a factor 0,5 to the multiple before rounding,
or one can use a combination of the above, so I am curious about to know what's
normal, and why it is normal then?
//Anders - former financial programmer....
--- End Message ---
--- Begin Message ---
Well, I suppose rounding by the dictionary's definition can mean any kind
of approximation to a number of less significant digits, so I see your
point. But by the popular vernacular and by the default precision for any
programming language's "round" function that I've encountered (including
PHP's), the default precision is to round to the nearest integer. Thus, by
both of these modest leaps of assumption, normal rounding to me is rounding
to the nearest integer.
-Mike
At 11:50 AM 4/9/2002 +0200, Svensson, B.A.T. (HKG) wrote:
> > That will round down to 2 decimal places. To round to the nearest 2
> > decimal places, to what Ross said but instead of getting the absolute
> > value, just round it normally.
>
>What's "normal" rounding??????
--- End Message ---
--- Begin Message ---
> Well, I suppose rounding by the dictionary's definition can mean any kind
> of approximation to a number of less significant digits, so I see your
> point.
To be a bit philosophical about it, yes. Rounding is always a matter of losing
information (e.g. precision), and you can never tell in what "direction" the
information was lost.
Ex:
The number '2' I now have, was it - to be extreme - it '1,1' (a sealing
function) or was it '2,9' (a floor function) before? You can never really
tell...
> But by the popular vernacular and by the default precision for any
> programming language's "round" function that I've encountered (including
> PHP's), the default precision is to round to the nearest integer.
Which integer is "nearest" for 1,5? 1 or 2? To round a decimal number is not
as straight forward as it might appear in the first case.
Anybody who happens to know what Kunts Handbook says in this issue?
> Thus, by
> both of these modest leaps of assumption, normal rounding to me is rounding
> to the nearest integer.
I agree that most rounding functions probably performs a sealing function
when the less significant decimal is >5 and a floor function when it is <5.
But what is a normal behavior when it is ==5 ???
In the bitter end this choice is up to the API writers own whim, but in most
case I guess (s)he ignore this case, and I would guess that most rounding
function then perform a floor function in the case of ==5 (????).
The point I want to make is this: You'll never know until you tested it!
Because of this I believe it a bit ambiguous to say "normal" since it hardly
can't exist a "normal" way to perform a rounding. Or??
Secondly, because of this "phenomena" some programmers might frequently find
them self having to answers question from customer like:
"Why does we miss $xxxx in this last summary report?".
> At 11:50 AM 4/9/2002 +0200, Svensson, B.A.T. (HKG) wrote:
> > > That will round down to 2 decimal places. To round to the nearest 2
> > > decimal places, to what Ross said but instead of getting the absolute
> > > value, just round it normally.
> >
> >What's "normal" rounding??????
>
--- End Message ---
--- Begin Message ---
At 05:49 PM 4/9/02 +0200, Svensson, B.A.T. (HKG) wrote:
>The number '2' I now have, was it - to be extreme - it '1,1' (a sealing
>function) or was it '2,9' (a floor function) before? You can never really
>tell...
If it was by the rule we've settled on below, then if you have 2, then the
number you previously had was >=1.5 and < 2.5. :)
>Which integer is "nearest" for 1,5? 1 or 2? To round a decimal number is not
>as straight forward as it might appear in the first case.
1.5 is the only special case.
>In the bitter end this choice is up to the API writers own whim, but in most
>case I guess (s)he ignore this case, and I would guess that most rounding
>function then perform a floor function in the case of ==5 (????).
As far as I know, .5 always gets rounded up, not down. In school we were
taught, "Four to the floor, Five to the sky". :)
>Because of this I believe it a bit ambiguous to say "normal" since it hardly
>can't exist a "normal" way to perform a rounding. Or??
I guess. The dictionary defines normal, though, as "Conforming with,
adhering to, or constituting a norm, standard, pattern, level, or type;
typical". So if there is a standard, typical, etc. way that rounding is
done, then you can certainly make a case that there is a normal kind of
rounding. In ALL of my experiences, rounding has been defined as going to
the nearest integer, and rounding UP on .5. And, like I said, all
programming languages I have encountered perform a standard rounding the
same way. That's why we as societies settle on norms -- so we can
communicate without having to resort to academic analyses of every term we
use. :) There's no need to feel the need to one-up everything I say. :)
>Secondly, because of this "phenomena" some programmers might frequently find
>them self having to answers question from customer like:
>
>"Why does we miss $xxxx in this last summary report?".
Hehe.. brings to mind the movie "Office Space".
-Mike
--- End Message ---
--- Begin Message ---
Shall we settle this argument once and for all?...
The answer is
$value = round($value, 2);
Which I found after a quick look in the manual. Silly me expected the
original poster to have actually searched this far and found there WASN'T a
pre-written function.
Really irritates me that, and I'm sure we'll all agree on that! ;D
Ross
-----Original Message-----
From: Mike Flynn [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2002 18:23
To: Svensson, B.A.T. (HKG)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Rounding
At 05:49 PM 4/9/02 +0200, Svensson, B.A.T. (HKG) wrote:
>The number '2' I now have, was it - to be extreme - it '1,1' (a sealing
>function) or was it '2,9' (a floor function) before? You can never really
>tell...
If it was by the rule we've settled on below, then if you have 2, then the
number you previously had was >=1.5 and < 2.5. :)
>Which integer is "nearest" for 1,5? 1 or 2? To round a decimal
number is not
>as straight forward as it might appear in the first case.
1.5 is the only special case.
>In the bitter end this choice is up to the API writers own whim,
but in most
>case I guess (s)he ignore this case, and I would guess that most rounding
>function then perform a floor function in the case of ==5 (????).
As far as I know, .5 always gets rounded up, not down. In school we were
taught, "Four to the floor, Five to the sky". :)
>Because of this I believe it a bit ambiguous to say "normal" since
it hardly
>can't exist a "normal" way to perform a rounding. Or??
I guess. The dictionary defines normal, though, as "Conforming with,
adhering to, or constituting a norm, standard, pattern, level, or type;
typical". So if there is a standard, typical, etc. way that rounding is
done, then you can certainly make a case that there is a normal kind of
rounding. In ALL of my experiences, rounding has been defined as going to
the nearest integer, and rounding UP on .5. And, like I said, all
programming languages I have encountered perform a standard rounding the
same way. That's why we as societies settle on norms -- so we can
communicate without having to resort to academic analyses of every term we
use. :) There's no need to feel the need to one-up everything I say. :)
>Secondly, because of this "phenomena" some programmers might
frequently find
>them self having to answers question from customer like:
>
>"Why does we miss $xxxx in this last summary report?".
Hehe.. brings to mind the movie "Office Space".
-Mike
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi folks,
I recently wrote a website that stores session information using PHP 4.0.6
on win2k, with php as a module in apache.
However, I've just moved the same site across to another machine again using
win2k, with php as a module in apache but this time with PHP 4.1.2 and now
the session information does not seem to be stored.
The session file gets created in the session directory and the array
$_SESSION exists and stores my data within a page, but the information
doesn't get stored in the session file.
I've checked the php.ini files between versions and the session information
is the same.
Does anyone know whether there's an issue with session on 4.1.2, or does the
session stuff work differently in 4.1.x?
thanks in advance,
Martin Kemp
Cambridge UK
Email: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hey Martin,
I've got the same problem with php4.1.2 as an apache module.
As far as i could find out the whole thing depends on the php4ts.dll (using
win2k).
Probably it's a bug in 4.1.2?
fabian deutsch
"Martin Kemp" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000801c1dfac$32985ea0$[EMAIL PROTECTED]">news:000801c1dfac$32985ea0$[EMAIL PROTECTED]...
> Hi folks,
>
> I recently wrote a website that stores session information using PHP 4.0.6
> on win2k, with php as a module in apache.
>
> However, I've just moved the same site across to another machine again
using
> win2k, with php as a module in apache but this time with PHP 4.1.2 and now
> the session information does not seem to be stored.
>
> The session file gets created in the session directory and the array
> $_SESSION exists and stores my data within a page, but the information
> doesn't get stored in the session file.
>
> I've checked the php.ini files between versions and the session
information
> is the same.
>
> Does anyone know whether there's an issue with session on 4.1.2, or does
the
> session stuff work differently in 4.1.x?
>
> thanks in advance,
>
> Martin Kemp
> Cambridge UK
> Email: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
check bug fix 16435 for php in the bug database. I've encountered this
prob and it's a recurring theme but it's fixed in the Release Candidate
1 and 2 for php 4.2.....have to patch the php4ts.dll and php4apache.dll
with these new ones in the RC.
bug and fix: http://bugs.php.net/bug.php?id=16435
At http://www.php.net/~derick/ you can find RC2.
-----Original Message-----
From: Fabian Deutsch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 8:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Session information not stored in php 4.1.2
Hey Martin,
I've got the same problem with php4.1.2 as an apache module.
As far as i could find out the whole thing depends on the php4ts.dll
(using
win2k).
Probably it's a bug in 4.1.2?
fabian deutsch
"Martin Kemp" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000801c1dfac$32985ea0$[EMAIL PROTECTED]">news:000801c1dfac$32985ea0$[EMAIL PROTECTED]...
> Hi folks,
>
> I recently wrote a website that stores session information using PHP
4.0.6
> on win2k, with php as a module in apache.
>
> However, I've just moved the same site across to another machine again
using
> win2k, with php as a module in apache but this time with PHP 4.1.2 and
now
> the session information does not seem to be stored.
>
> The session file gets created in the session directory and the array
> $_SESSION exists and stores my data within a page, but the information
> doesn't get stored in the session file.
>
> I've checked the php.ini files between versions and the session
information
> is the same.
>
> Does anyone know whether there's an issue with session on 4.1.2, or
does
the
> session stuff work differently in 4.1.x?
>
> thanks in advance,
>
> Martin Kemp
> Cambridge UK
> Email: [EMAIL PROTECTED]
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have downloaded the FDF Toolkit from Adobe fdftkv5win - but there is no
installer nor a document which describes how to install.
So any help is apreciated
Regards,
Thomas Holm
--- End Message ---
--- Begin Message ---
You've to install one od the two dll (fdfacx.dll and fdftk.dll) included in the
adobe's package. Use "regsvr32 fdfacx.dll"
Now you can use the toolkit...why don't you use the pdflib extension?
-----Messaggio originale-----
Da: Thomas Holm [mailto:[EMAIL PROTECTED]]
Inviato: marted́ 9 aprile 2002 17.21
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] FDF- how do I install?
I have downloaded the FDF Toolkit from Adobe fdftkv5win - but there is no
installer nor a document which describes how to install.
So any help is apreciated
Regards,
Thomas Holm
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi there. I just started with php a week ago. And I have a little problem:
my system:
win 2000 professional workstation
personal web serbel installed from win cd
also IIS 5
Internet Explorer 5.5 sp2
lastest php downloaded from www.php.net
my problem.. AFTER I hit refresh button I get "The directory name is
invalid.".. That mean works in the first place. But after refresh..
Where can look for a fix?
many thanks in advance
--- End Message ---