[PHP-DEV] Bug #14402: round() outputs too many digits

2001-12-11 Thread michiel

From: [EMAIL PROTECTED]
Operating system: slack 7.1
PHP version:  4.1.0
PHP Bug Type: Math related
Bug description:  round() outputs too many digits

?
$int = 0.293847289472983; 
echo $int .\n; 
echo round($int,2) . \n; 
echo round((int)$int,2) . \n; 
echo round((float)$int,2) . \n; 
echo round((double)$int,2) . \n; 
?
outputs on php 4.0.6: 
0.29384728947298 
0.29 
0 
0.29 
0.29 

however, using php 4.1.0, it outputs: 
0.29384728947298299761570206101168878376483917236328125 
0.289980015985556747182272374629974365234375 
0 
0.289980015985556747182272374629974365234375 
0.289980015985556747182272374629974365234375 

is this a bug, or a new 'feature' ? Closest report I found was
http://marc.theaimsgroup.com/?l=php-devm=100750316722784w=2 on the
php-dev mailinglist.
-- 
Edit bug report at: http://bugs.php.net/?id=14402edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14402 Updated: round() outputs too many digits

2001-12-11 Thread michiel

ID: 14402
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Math related
Old Operating System: slack 7.1
Operating System: Linux-2.4.14 (Slackware 8.0)
Old PHP Version: 4.1.0
PHP Version: 4.1.0RC5
New Comment:

Changed distro/php version for clarity.

Previous Comments:


[2001-12-10 09:47:24] [EMAIL PROTECTED]

?
$int = 0.293847289472983; 
echo $int .\n; 
echo round($int,2) . \n; 
echo round((int)$int,2) . \n; 
echo round((float)$int,2) . \n; 
echo round((double)$int,2) . \n; 
?
outputs on php 4.0.6: 
0.29384728947298 
0.29 
0 
0.29 
0.29 

however, using php 4.1.0, it outputs: 
0.29384728947298299761570206101168878376483917236328125 
0.289980015985556747182272374629974365234375 
0 
0.289980015985556747182272374629974365234375 
0.289980015985556747182272374629974365234375 

is this a bug, or a new 'feature' ? Closest report I found was 
http://marc.theaimsgroup.com/?l=php-devm=100750316722784w=2 on the php-dev 
mailinglist.





Edit this bug report at http://bugs.php.net/?id=14402edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14056 Updated: Large amounts of fileuploads in a page cause segmentation fault

2001-11-15 Thread michiel

ID: 14056
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: Reproducible crash
Operating System: Redhat 7.0
PHP Version: 4.0.6
New Comment:


Yes, it is fixed in the current CVS, I used, php4-2005

I could even increase max to 300 and it worked. However, when submitting my test 
script with no files inserted for upload, the values of the file uploads were not 
none, but a temporary file. Unexpected behaviour which may lead to problems. The 
size of the (temp)files is 0, but the value of the variable should be none or .

Previous Comments:


[2001-11-14 13:13:00] [EMAIL PROTECTED]

Cannot reproduce with current CVS.



[2001-11-14 12:30:14] [EMAIL PROTECTED]

Can you try a snapshot from snaps.php.net and report back if that fixes the problem?

Derick



[2001-11-14 12:08:47] [EMAIL PROTECTED]

!-- example that causes the error --
!-- you don't need to upload any files, just clicking Submit will cause the crash --
form method=post enctype=multipart/form-data
?

if (is_array($file))
  while (list($key,$val) = each($file))
print $key = $valbr\n;

# changing max to 33 will not cause the segfault, 34 will.
$msx = 34;

for ($i=0;$i$msx;$i++) {
  print $i.'Upload file: input type=file name=file['.$i.']br';
}

?
input type=submit
/form

--end of example --

--with-mysql=/usr --enable-sysvshm=yes --enable-sysvsem=yes --enable-versioning 
--with-gd=/usr --enable-track-vars=yes --enable-force-cgi-redirect=yes 
--enable-memory-limit=yes --with-apache=../apache_1.3.19 --enable-debug=no 
--with-mcrypt

Page works if I switch back to php 4.0.4-pl1








Edit this bug report at http://bugs.php.net/?id=14056edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14056: Large amounts of fileuploads in a page cause segmentation fault

2001-11-14 Thread michiel

From: [EMAIL PROTECTED]
Operating system: Redhat 7.0
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  Large amounts of fileuploads in a page cause segmentation fault

!-- example that causes the error --
!-- you don't need to upload any files, just clicking Submit will cause
the crash --
form method=post enctype=multipart/form-data
?

if (is_array($file))
  while (list($key,$val) = each($file))
print $key = $valbr\n;

# changing max to 33 will not cause the segfault, 34 will.
$msx = 34;

for ($i=0;$i$msx;$i++) {
  print $i.'Upload file: input type=file name=file['.$i.']br';
}

?
input type=submit
/form

--end of example --

--with-mysql=/usr --enable-sysvshm=yes --enable-sysvsem=yes
--enable-versioning --with-gd=/usr --enable-track-vars=yes
--enable-force-cgi-redirect=yes --enable-memory-limit=yes
--with-apache=../apache_1.3.19 --enable-debug=no --with-mcrypt

Page works if I switch back to php 4.0.4-pl1



-- 
Edit bug report at: http://bugs.php.net/?id=14056edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]