php-windows Digest 14 Sep 2001 02:39:20 -0000 Issue 753

Topics (messages 9342 through 9350):

mbstring (Multybyte string) module
        9342 by: Ivan Pavlov

Re: is it bug ?
        9343 by: Svensson, B.A.T.

uninstall php404pl1
        9344 by: Hugo

Re: Latest version of PHP
        9345 by: Mitja Pagon

Re: IIS 5.1 error
        9346 by: Eric R. Gavin

PARSE ERROR: line number listed is n+1?!?
        9347 by: leo g. divinagracia iii
        9348 by: Hugh Bothwell
        9349 by: leo g. divinagracia iii

New PHP Guest Book Program
        9350 by: Gaylen Fraley

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]


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


I need the mbstring (Multybyte string) functions and I can't find the
appropriate module for Windows.

Please help.







>
>Hello php-windows,
>
>for example..
>look at this simple script..
>====================================
><?
>        $old=10003.28;
>        $new=$old-10000;
>        echo $new;
>
>?>
>====================================
>it returns
>3.2800000000007
>it must return
>3.28
>does anyone know what is problem..
>i know that number_format function can ne used here...
>but i want to know that is it bug in php

Computers uses discrete numbers so there are not able to
represent an real numbers properly, because of the hardware
architecture. Therefor computers need to use a fractal
representation for real number. This line is not smooth,
but cut with regions of irregularities considering the
discrete steps between the numbers.


It does not like

1.00001
1.00002
1.00003
1.00004
1.00005
1.00006
1.00007
1.00008
1.00009
1.00010

But more like

1.00001
1.00002
1.00003
1.000035
1.00004
1.00005
1.00006
1.00007
1.00008
1.000095
1.00010

If you imagine the last digit, and plot this,
you will mostly have a smooth straight line, but some times
small hills. Or rather small region with a little bit
higher granularity and other with less granularity.

So when the granularity get smaller and smaller you will
start to experience jumps between the "real" numbers. This
will not happen all the time, but often enough to be notable.

These "bugs" might be the cause of rounding errors while
big transaction is done. But there is techniques to work
around it.

Anyhow, one can esily test this to convinve you self about
where the critical regions appears with a program simlar
to the one below:


void main (void)
{
  float i = 1;

  while (i > 0.999) {
    i -= 0.0000005;
    cout << i << endl;
  }
}

When the program runs it look fine in the begining.


1
0.999999
0.999999
0.999998
0.999998
0.999997
0.999997
0.999996
0.999996
0.999995
0.999995
0.999994
0.999994
0.999993
0.999993
0.999992
0.999992
0.999991
0.999991
0.999990 <-
0.999990 <-
0.999990 <-
0.999989
0.999989

But check out what happens above here.

0.999988
0.999988
0.999987
0.999987
0.999986
0.999986
0.999985
0.999985
0.999984
0.999984
0.999983
0.999983
0.999982
0.999982
0.999981
0.999981
0.999980
0.999980

Then it looks nice again... But future down we find:


0.999054
0.999054
0.999053 <-
0.999053 <-
0.999053 <-
0.999052
0.999052

And a little bit futher down:

0.999044
0.999044
0.999043 <-
0.999043 <-
0.999043 <-
0.999042
0.999042

And then a bit normal again until:

0.999033
0.999033
0.999032 <-
0.999032 <-
0.999032 <-
0.999031
0.999031

And elsewhere:

0.999280
0.999280
0.999279 <-
0.999279 <-
0.999279 <-
0.999278
0.999278


And just before we quits execution we
still find anomalies:

0.999075
0.999075
0.999074 <-
0.999074 <-
0.999074 <-
0.999073
0.999073
...
0.999023
0.999023
0.999022 <-
0.999022 <-
0.999022 <-
0.999021
0.999021
...
0.999003
0.999003
0.999002 <-
0.999002 <-
0.999002 <-
0.999001
0.999001
0.999000
0.999000






how to uninstall php404pl1 ?
I'm using Windows 98 SE with PWS .

thanks..

CryoGen







I just wanted to express my appologies to [php4win] team, since my remark
was out of place.

"Mitja Pagon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello!
>
> I was wondering if there is a way of getting the latest dev version of PHP
> for win already compiled. I know about www.php4win.com, but I don't think
> that their site is updated regulary.
>
> Also, is the any documentation on the dev versions, like descriptions of
new
> features and so??
>
> Thanks,
>
> Mitja Pagon
>
>






> i've installed php as isapi filter under winXP's IIS 5.1
> all script run ok, but the strange bug appears time-to-time: at END of
file
> adds strng like
> 'HTTP/500 Error IIS 5.1....'

I believe that Error 500s are still an issue with the ISAPI .DLL.  I'm quite
surprised to hear it's at the END of your file however.

I'm not involved in the solving of this problem, but I've heard about it
quite a bit, and as I understand the issue is involving multi-threaded code
and the ISAPI .DLL.  It is still an open bug (if this is indeed the same
thing) and the workaround is to make use of the CGI executable instead for
the time being.  (I think.)

Eric Gavin






so i write this script.  all syntax errors are taken care of.  but now i
get a PARSE ERROR wit the  line number given as one more than the total
number of lines.

for example, there's a total of 100 lines in the script. and the error
message is PARSE ERROR: 101 line.

i check to make sure there are no "phantom" lines after the last one. 
nothing.

anyone else run into this before?

-- 
Leo G. Divinagracia III
[EMAIL PROTECTED]





"Leo G. Divinagracia III" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> so i write this script.  all syntax errors are taken care of.  but now i
> get a PARSE ERROR wit the  line number given as one more than the total
> number of lines.
>
> for example, there's a total of 100 lines in the script. and the error
> message is PARSE ERROR: 101 line.
>
> i check to make sure there are no "phantom" lines after the last one.
> nothing.
>
> anyone else run into this before?

The interpreter is surprised that the file
has ended, it still expects something -
maybe you left out a closing bracket somewhere.






yeah... that's what i thought too.  so i went and checked stuff.  even
doubled made sure that the closing "?>" was retyped.

wouldnt the PHP.EXE catch that and report diff error, if it were a
bracket or something?

well i'll over the thing again.  guess i'll print it instead of staring
at a screen, scrolling up... down... for an hour or so...   ;-(


Hugh Bothwell wrote:
> 
> "Leo G. Divinagracia III" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > so i write this script.  all syntax errors are taken care of.  but now i
> > get a PARSE ERROR wit the  line number given as one more than the total
> > number of lines.
> >
> > for example, there's a total of 100 lines in the script. and the error
> > message is PARSE ERROR: 101 line.
> >
> > i check to make sure there are no "phantom" lines after the last one.
> > nothing.
> >
> > anyone else run into this before?
> 
> The interpreter is surprised that the file
> has ended, it still expects something -
> maybe you left out a closing bracket somewhere.
> 

-- 
Leo G. Divinagracia III
[EMAIL PROTECTED]




** I asked a few of the regulars here and found no objections to this
posting **

I am making available a Guest Book program that I have written.

My KISGB (Keep It Simple Guest Book)  is a guest book program that does not
require an rdbms.  Fully customizable, clean, and fast.  Includes web-based
password protected Admin functionality, along with email notification,
greeting, ip logging, etc.  IE 4.x and higher has no problems with the
displaying.  I am still working with some idiosyncrasies with NN 4.7x <sigh>

If you are interested in demoing it, please goto
http://www.gaylenandmargie.com/publicscripts

Thanks,

--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com







Reply via email to