Bug #60196 [Opn->Csd]: Session Upload Progress - doesn't work

2011-12-17 Thread martin at psinas dot com
Edit report at https://bugs.php.net/bug.php?id=60196&edit=1

 ID: 60196
 User updated by:martin at psinas dot com
 Reported by:martin at psinas dot com
 Summary:Session Upload Progress - doesn't work
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Session related
 Operating System:   Ubuntu 10.04 / Apache2
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

I believe my installation was not configured correctly. I re-installed 5.4 
following the instructions of a friend and everything worked.


Previous Comments:

[2011-12-17 19:06:35] crmalibu at gmail dot com

This seems like expected behavior if session.upload_progress.cleanup = On, 
which is default. By the time his var_dump() script executes(even with a huge 
file), the upload is finished, and cleanup has already occurred. 

Even though the setting is documented here
http://www.php.net/manual/en/session.configuration.php#ini.session.upload-progress.cleanup
I feel strongly it needs to be mentioned here too, or you will get swarmed with 
bogus bug reports soon when this feature goes live.
http://www.php.net/manual/en/session.upload-progress.php


[2011-11-02 08:51:08] martin at psinas dot com

How do you define "huge"? I've modified the form to contain 8 fields instead of 
2, and in each field I'm uploading the php-5.4.0beta2.tar.gz (13.6 MB * 8). The 
form hangs for a few seconds while loading, then I get the empty array.


[2011-11-02 03:18:05] larue...@php.net

plz use a huge size file to test.

----
[2011-11-01 23:34:07] martin at psinas dot com

Description:

Trying to test this new feature documented here:
http://php.net/manual/en/session.upload-progress.php

Can't seem to get it working.

Test script:
---
// form.php


" value="123" />





// upload.php


Expected result:

I expect the following session values to be populated:

 1234567890,   // The request time
 "content_length" => 57343257, // POST content length
 "bytes_processed" => 453489,  // Amount of bytes received and processed
 "done" => false,  // true when the POST handler has finished, 
successfully or not
 "files" => array(
  0 => array(
   "field_name" => "file1",   // Name of the  field
   // The following 3 elements equals those in $_FILES
   "name" => "foo.avi",
   "tmp_name" => "/tmp/phpxx",
   "error" => 0,
   "done" => true,// True when the POST handler has finished 
handling this file
   "start_time" => 1234567890,// When this file has started to be processed
   "bytes_processed" => 57343250, // Amount of bytes received and processed for 
this file
  ),
  // An other file, not finished uploading, in the same request
  1 => array(
   "field_name" => "file2",
   "name" => "bar.avi",
   "tmp_name" => NULL,
   "error" => 0,
   "done" => false,
   "start_time" => 1234567899,
   "bytes_processed" => 54554,
  ),
 )
);
?>

Actual result:
--
I get this:

array(0) {}






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60196&edit=1


[PHP-BUG] Bug #62497 [NEW]: array_intersect doesn't work properly when data is reversed with duplicates

2012-07-06 Thread martin at psinas dot com
From: martin at psinas dot com
Operating system: Linux
PHP version:  5.4.4
Package:  Arrays related
Bug Type: Bug
Bug description:array_intersect doesn't work properly when data is reversed 
with duplicates

Description:

As mentioned here:
http://us3.php.net/manual/en/function.array-intersect.php#92900

array_intersect doesn't work properly when data is reversed with duplicates

Test script:
---
';
print_r($preserved1);
print_r($deleted);
print_r($preserved2);
print_r($inserted);
echo '';
?>

Expected result:

Array
(
[0] => one
[1] => two
)
Array
(
[2] => three
)
Array
(
[0] => one
[1] => two
)
Array
(
[2] => three
)

Actual result:
--
Array
(
[0] => one
[1] => two
[2] => two
)
Array
(
)
Array
(
[0] => one
[1] => two
)
Array
(
[2] => three
)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62497&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62497&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62497&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62497&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62497&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62497&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62497&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62497&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62497&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62497&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62497&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62497&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62497&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62497&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62497&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62497&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62497&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62497&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62497&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62497&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62497&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62497&r=mysqlcfg



Bug #62497 [Opn->Csd]: array_intersect doesn't work properly when data is reversed with duplicates

2012-07-06 Thread martin at psinas dot com
Edit report at https://bugs.php.net/bug.php?id=62497&edit=1

 ID: 62497
 User updated by:martin at psinas dot com
 Reported by:martin at psinas dot com
 Summary:array_intersect doesn't work properly when data is
 reversed with duplicates
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Arrays related
 Operating System:   Linux
 PHP Version:5.4.4
 Block user comment: N
 Private report: N

 New Comment:

not a bug.


Previous Comments:

[2012-07-06 22:30:27] martin at psinas dot com

Description:

As mentioned here:
http://us3.php.net/manual/en/function.array-intersect.php#92900

array_intersect doesn't work properly when data is reversed with duplicates

Test script:
---
';
print_r($preserved1);
print_r($deleted);
print_r($preserved2);
print_r($inserted);
echo '';
?>

Expected result:

Array
(
[0] => one
[1] => two
)
Array
(
[2] => three
)
Array
(
[0] => one
[1] => two
)
Array
(
[2] => three
)

Actual result:
--
Array
(
[0] => one
[1] => two
[2] => two
)
Array
(
)
Array
(
[0] => one
[1] => two
)
Array
(
[2] => three
)






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62497&edit=1


[PHP-BUG] Bug #60172 [NEW]: make fails

2011-10-29 Thread martin at psinas dot com
From: 
Operating system: Ubuntu 10.04 / Apache2
PHP version:  5.4SVN-2011-10-29 (snap)
Package:  Compile Failure
Bug Type: Bug
Bug description:make fails

Description:

I already have PHP installed, trying to upgrade to latest development
version. 
I'm using Ubuntu 10.04 w/ Apache2.

Test script:
---
worm@worm-desktop:~$ wget http://snaps.php.net/php5.4-201110292230.tar.gz
worm@worm-desktop:~$ tar -xvzf php5.4-201110292230.tar.gz
worm@worm-desktop:~$ cd php5.4-201110292230
worm@worm-desktop:~/php5.4-201110292230$ ./configure
worm@worm-desktop:~/php5.4-201110292230$ sudo make

Actual result:
--
/php5.4-201110292230/ext/sqlite3/libsqlite
-I/home/worm/php5.4-201110292230/TSRM 
-I/home/worm/php5.4-201110292230/Zend-I/usr/include -g -O2 -
fvisibility=hidden -DZEND_SIGNALS  -c /home/worm/php5.4-
201110292230/Zend/zend_ini_parser.c -o Zend/zend_ini_parser.lo 
cc: /home/worm/php5.4-201110292230/Zend/zend_ini_parser.c: No such file or

directory
cc: no input files
make: *** [Zend/zend_ini_parser.lo] Error 1

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60172&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60172&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60172&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60172&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60172&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60172&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60172&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60172&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60172&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60172&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60172&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60172&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60172&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60172&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60172&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60172&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60172&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60172&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60172&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60172&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60172&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60172&r=mysqlcfg



[PHP-BUG] Bug #60196 [NEW]: Session Upload Progress - doesn't work

2011-11-01 Thread martin at psinas dot com
From: 
Operating system: Ubuntu 10.04 / Apache2
PHP version:  5.4.0beta2
Package:  Session related
Bug Type: Bug
Bug description:Session Upload Progress - doesn't work

Description:

Trying to test this new feature documented here:
http://php.net/manual/en/session.upload-progress.php

Can't seem to get it working.

Test script:
---
// form.php


" value="123" />





// upload.php


Expected result:

I expect the following session values to be populated:

 1234567890,   // The request time
 "content_length" => 57343257, // POST content length
 "bytes_processed" => 453489,  // Amount of bytes received and processed
 "done" => false,  // true when the POST handler has finished,

successfully or not
 "files" => array(
  0 => array(
   "field_name" => "file1",   // Name of the  field
   // The following 3 elements equals those in $_FILES
   "name" => "foo.avi",
   "tmp_name" => "/tmp/phpxx",
   "error" => 0,
   "done" => true,// True when the POST handler has
finished 
handling this file
   "start_time" => 1234567890,// When this file has started to be
processed
   "bytes_processed" => 57343250, // Amount of bytes received and processed
for 
this file
  ),
  // An other file, not finished uploading, in the same request
  1 => array(
   "field_name" => "file2",
   "name" => "bar.avi",
   "tmp_name" => NULL,
   "error" => 0,
   "done" => false,
   "start_time" => 1234567899,
   "bytes_processed" => 54554,
  ),
 )
);
?>

Actual result:
--
I get this:

array(0) {}

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60196&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60196&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60196&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60196&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60196&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60196&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60196&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60196&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60196&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60196&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60196&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60196&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60196&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60196&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60196&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60196&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60196&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60196&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60196&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60196&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60196&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60196&r=mysqlcfg



Bug #60196 [Bgs]: Session Upload Progress - doesn't work

2011-11-02 Thread martin at psinas dot com
Edit report at https://bugs.php.net/bug.php?id=60196&edit=1

 ID: 60196
 User updated by:martin at psinas dot com
 Reported by:martin at psinas dot com
 Summary:Session Upload Progress - doesn't work
 Status: Bogus
 Type:   Bug
 Package:Session related
 Operating System:   Ubuntu 10.04 / Apache2
 PHP Version:5.4.0beta2
 Block user comment: N
 Private report: N

 New Comment:

How do you define "huge"? I've modified the form to contain 8 fields instead of 
2, and in each field I'm uploading the php-5.4.0beta2.tar.gz (13.6 MB * 8). The 
form hangs for a few seconds while loading, then I get the empty array.


Previous Comments:

[2011-11-02 03:18:05] larue...@php.net

plz use a huge size file to test.

----
[2011-11-01 23:34:07] martin at psinas dot com

Description:

Trying to test this new feature documented here:
http://php.net/manual/en/session.upload-progress.php

Can't seem to get it working.

Test script:
---
// form.php


" value="123" />





// upload.php


Expected result:

I expect the following session values to be populated:

 1234567890,   // The request time
 "content_length" => 57343257, // POST content length
 "bytes_processed" => 453489,  // Amount of bytes received and processed
 "done" => false,  // true when the POST handler has finished, 
successfully or not
 "files" => array(
  0 => array(
   "field_name" => "file1",   // Name of the  field
   // The following 3 elements equals those in $_FILES
   "name" => "foo.avi",
   "tmp_name" => "/tmp/phpxx",
   "error" => 0,
   "done" => true,// True when the POST handler has finished 
handling this file
   "start_time" => 1234567890,// When this file has started to be processed
   "bytes_processed" => 57343250, // Amount of bytes received and processed for 
this file
  ),
  // An other file, not finished uploading, in the same request
  1 => array(
   "field_name" => "file2",
   "name" => "bar.avi",
   "tmp_name" => NULL,
   "error" => 0,
   "done" => false,
   "start_time" => 1234567899,
   "bytes_processed" => 54554,
  ),
 )
);
?>

Actual result:
--
I get this:

array(0) {}






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60196&edit=1


[PHP-BUG] Bug #60203 [NEW]: Session upload progress does not work

2011-11-02 Thread martin at psinas dot com
From: 
Operating system: Ubuntu 10.04 / Apache2
PHP version:  5.4.0beta2
Package:  Session related
Bug Type: Bug
Bug description:Session upload progress does not work

Description:

Bogus bug is not bogus: https://bugs.php.net/bug.php?id=60196

I've tried small files and large files, no session data is ever returned.

Test script:
---
// form.php


" value="123" />





// upload.php


Expected result:

Anything other than: array(0) {}

Actual result:
--
array(0) {}

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60203&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60203&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60203&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60203&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60203&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60203&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60203&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60203&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60203&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60203&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60203&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60203&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60203&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60203&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60203&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60203&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60203&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60203&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60203&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60203&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60203&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60203&r=mysqlcfg



[PHP-BUG] Bug #64167 [NEW]: Recursive function using mt_rand sometimes returns NULL

2013-02-06 Thread martin at psinas dot com
From: martin at psinas dot com
Operating system: linux mint
PHP version:  5.4.11
Package:  Variables related
Bug Type: Bug
Bug description:Recursive function using mt_rand sometimes returns NULL

Description:

Variable is properly set but returns as NULL value

Test script:
---
';
return $random_number;
}
mtrand_except($min, $max, $except);
}

$random_arr = array();
for($i=1; $i<=90; $i++) {
$rand = mtrand_except(1, 90, $random_arr);
echo $i.''.$rand.'';
$random_arr[] = $rand;
}

Expected result:

60
1
60
--
19
2
19
--
57
3
57
--
etc...

Actual result:
--
60
1
60
--
19
2
NULL
--
57
3
57
--
etc...

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64167&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64167&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64167&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=64167&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=64167&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=64167&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64167&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=64167&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=64167&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=64167&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=64167&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=64167&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=64167&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=64167&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64167&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=64167&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=64167&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=64167&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64167&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64167&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64167&r=mysqlcfg