Req #63253 [Asn]: class member access using __invoke() in php5.4

2012-11-01 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=63253&edit=1

 ID: 63253
 Updated by: larue...@php.net
 Reported by:schicker03 at gmail dot com
 Summary:class member access using __invoke() in php5.4
 Status: Assigned
 Type:   Feature/Change Request
 Package:Scripting Engine problem
 Operating System:   MacOSX 10.8
 PHP Version:5.4.7
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

made a PR: https://github.com/php/php-src/pull/225


Previous Comments:

[2012-10-12 04:25:29] larue...@php.net

The following patch has been added/updated:

Patch Name: instance_invoke_003.phpt
Revision:   1350015929
URL:
https://bugs.php.net/patch-display.php?bug=63253&patch=instance_invoke_003.phpt&revision=1350015929


[2012-10-12 04:25:07] larue...@php.net

The following patch has been added/updated:

Patch Name: instance_invoke_002.phpt
Revision:   1350015907
URL:
https://bugs.php.net/patch-display.php?bug=63253&patch=instance_invoke_002.phpt&revision=1350015907


[2012-10-12 04:24:46] larue...@php.net

The following patch has been added/updated:

Patch Name: instance_invoke_001.phpt
Revision:   1350015886
URL:
https://bugs.php.net/patch-display.php?bug=63253&patch=instance_invoke_001.phpt&revision=1350015886


[2012-10-12 04:15:17] larue...@php.net

The following patch has been added/updated:

Patch Name: bug63253.patch
Revision:   1350015317
URL:
https://bugs.php.net/patch-display.php?bug=63253&patch=bug63253.patch&revision=1350015317


[2012-10-12 04:09:27] larue...@php.net

An patch is attached, assign to me, will make a rfc later




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=63253


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


Bug #63411 [Opn]: curl_multi_select() returns invalid value

2012-11-01 Thread reeze
Edit report at https://bugs.php.net/bug.php?id=63411&edit=1

 ID: 63411
 Updated by: re...@php.net
 Reported by:marcel at silverstreet dot com
 Summary:curl_multi_select() returns invalid value
 Status: Open
 Type:   Bug
 Package:cURL related
 Operating System:   CentOS 6.3
 PHP Version:5.3.18
-Assigned To:
+Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

This is related to this
see:
https://github.com/php/php-src/commit/2e8ab65270e7d1ebe1ef0dfe13836c29d72c7010
http://curl.haxx.se/libcurl/c/curl_multi_fdset.html

There is no handles in the test script, it is expected after the patch.


Previous Comments:

[2012-11-01 18:33:41] aa dot vasilenko at gmail dot com

Confirming the same bug. PHP 5.4.8, CentOS 5.8


[2012-11-01 11:10:46] marcel at silverstreet dot com

Description:

curl_multi_select() seems broken in PHP 5.3.18 on CentOS 6.3.

The behavior of the test script below is different than it used to be, 
returning 
immediately without select with a -1 (failure) return value.


Test script:
---
$mh = curl_multi_init();
print curl_multi_select($mh, 1.0);
curl_multi_close($mh);


Expected result:

curl_multi_select() should take 1.0 seconds to complete and returns 0

Actual result:
--
curl_multi_select() returns immediately with return value of -1







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


Bug #63407 [Fbk]: segmentation fault in zval_mark_grey()

2012-11-01 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=63407&edit=1

 ID: 63407
 Updated by: larue...@php.net
 Reported by:ber...@php.net
 Summary:segmentation fault in zval_mark_grey()
 Status: Feedback
 Type:   Bug
 Package:Reproducible crash
 Operating System:   linux
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

I can not reproduce this segfault according to your test steps...


Previous Comments:

[2012-11-02 01:41:12] ber...@php.net

Tried that, still crashes, although now it seems to happen on the line below?

Updated gdb backtrace. Do you need something else?

Program received signal SIGSEGV, Segmentation fault.
zval_mark_grey (pz=0x1a9fafa00) at .../php5.4-201211020030/Zend/zend_gc.c:426
426 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) 
!= &EG(symbol_table)) {
(gdb) bt
#0  zval_mark_grey (pz=0x1a9fafa00) at .../php5.4-
201211020030/Zend/zend_gc.c:426
#1  0x007e43a4 in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:432
#2  0x007e43a4 in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:432
#3  0x007e43a4 in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:432
#4  0x007e43dd in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:407
#5  0x007e51f5 in gc_mark_roots () at .../php5.4-
201211020030/Zend/zend_gc.c:501
#6  gc_collect_cycles () at .../php5.4-201211020030/Zend/zend_gc.c:793
#7  0x007e5584 in gc_zval_possible_root (zv=) at 
.../php5.4-201211020030/Zend/zend_gc.c:166
#8  0x007d4138 in zend_hash_destroy (ht=0x214ea30) at .../php5.4-
201211020030/Zend/zend_hash.c:560
#9  0x007c5787 in _zval_dtor_func (zvalue=0x1db4ba0) at .../php5.4-
201211020030/Zend/zend_variables.c:43
#10 0x0086ca10 in _zval_dtor (zvalue=0x1db4ba0) at .../php5.4-
201211020030/Zend/zend_variables.h:35
#11 i_zval_ptr_dtor (zval_ptr=0x1db4ba0) at .../php5.4-
201211020030/Zend/zend_execute.h:87
#12 zend_vm_stack_clear_multiple () at .../php5.4-
201211020030/Zend/zend_execute.h:339
#13 zend_do_fcall_common_helper_SPEC (execute_data=) at 
.../php5.4-201211020030/Zend/zend_vm_execute.h:736
#14 0x00826cdf in execute (op_array=0x1174570) at .../php5.4-
201211020030/Zend/zend_vm_execute.h:410
#15 0x007c7ea9 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at .../php5.4-201211020030/Zend/zend.c:1279
#16 0x00767763 in php_execute_script (primary_file=0x7fffcd80) at 
.../php5.4-201211020030/main/main.c:2473
#17 0x0086f45f in do_cli (argc=10, argv=0x7fffe168) at .../php5.4-
201211020030/sapi/cli/php_cli.c:988
#18 0x00435dce in main (argc=10, argv=0x7fffe168) at .../php5.4-
201211020030/sapi/cli/php_cli.c:1364


[2012-11-01 02:23:19] larue...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

there is a knew issue of segfault caused by traits alias.

please try with the 5.4-snapshot


[2012-10-31 22:55:43] ber...@php.net

Description:

I'm experiencing segfaults in the mentioned function while working on Drupal 8. 
Here's what I found out so far:

- Happens both with the default ubuntu 12.04 php 5.3.10 and php 5.4.8 from 
https://launchpad.net/~ondrej/+archive/php5
- See http://drupal.org/node/512026#comment-6673974 for the backtrace
- Happens both on my local installation and our automated testbots
- The segfault does not happen if zend.enable_gc is Off.

It's non-trivial to set up, see "script" below, so just tell me what commands 
to 
run in gdb to give you additional information if required.

Test script:
---
git clone g...@git.drupal.org:project/drupal.git --branch=8.x
# Install Drupal, enable Testing module.
wget http://drupal.org/files/form-state-keyvalue-512026-98.patch
git apply form-state-keyvalue-512026-98.patch

php core/scripts/run-tests.sh --class 
"Drupal\views\Tests\Handler\FilterStringTest"


Expected result:

Drupal test run
---

Tests to be run:
 -  (Drupal\views\Tests\Handler\FilterStringTest)

Test run started:
 Wednesday, October 31, 2012 - 23:50

Test summary


Filter: String n passes, 0 fails, and 0 exception

Test run duration: n sec

Actual result:
--
Drupal test run
---

Tests to be run:
 -  (Drupal\views\Tests\Handler\FilterStringTest)

Test run started:
 Wednesday, October 31, 2012 - 23:50

Test summary


Segmentation fault (core dumped)
FATAL Drupal\views\Tests\Handler\FilterStringTest: test runner returned a non-
zero error code (139).
- Found database prefix 'simpletest916618' for

Bug #63414 [Opn->Fbk]: built-in upload progress mechanism does not work with custom session handler

2012-11-01 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=63414&edit=1

 ID: 63414
 Updated by: larue...@php.net
 Reported by:xergin at gmail dot com
 Summary:built-in upload progress mechanism does not work
 with custom session handler
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:*General Issues
 Operating System:   ubuntu 12.04 x86_64
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

could you make a simple test script to illustrate your point? thanks


Previous Comments:

[2012-11-01 18:21:07] xergin at gmail dot com

Description:

By default php stores sessions in files (default filepath is /var/lib/php5).
If we want to store sessions, for example, in database, upload progress info 
doesn't appears there. Even If we change session_save_path to another directory 
we 
will get the same problem.

P.S. script example you could get here:
https://github.com/ihabunek/php-upload-progress

and custom session handler example here:
http://durak.org/sean/pubs/software/php-5.4.6/function.session-set-save-
handler.html

Thanks,
Anton







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


Bug #63407 [Com]: segmentation fault in zval_mark_grey()

2012-11-01 Thread ber...@php.net
Edit report at https://bugs.php.net/bug.php?id=63407&edit=1

 ID: 63407
 Comment by: ber...@php.net
 Reported by:ber...@php.net
 Summary:segmentation fault in zval_mark_grey()
 Status: Feedback
 Type:   Bug
 Package:Reproducible crash
 Operating System:   linux
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

Tried that, still crashes, although now it seems to happen on the line below?

Updated gdb backtrace. Do you need something else?

Program received signal SIGSEGV, Segmentation fault.
zval_mark_grey (pz=0x1a9fafa00) at .../php5.4-201211020030/Zend/zend_gc.c:426
426 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) 
!= &EG(symbol_table)) {
(gdb) bt
#0  zval_mark_grey (pz=0x1a9fafa00) at .../php5.4-
201211020030/Zend/zend_gc.c:426
#1  0x007e43a4 in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:432
#2  0x007e43a4 in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:432
#3  0x007e43a4 in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:432
#4  0x007e43dd in zval_mark_grey (pz=) at .../php5.4-
201211020030/Zend/zend_gc.c:407
#5  0x007e51f5 in gc_mark_roots () at .../php5.4-
201211020030/Zend/zend_gc.c:501
#6  gc_collect_cycles () at .../php5.4-201211020030/Zend/zend_gc.c:793
#7  0x007e5584 in gc_zval_possible_root (zv=) at 
.../php5.4-201211020030/Zend/zend_gc.c:166
#8  0x007d4138 in zend_hash_destroy (ht=0x214ea30) at .../php5.4-
201211020030/Zend/zend_hash.c:560
#9  0x007c5787 in _zval_dtor_func (zvalue=0x1db4ba0) at .../php5.4-
201211020030/Zend/zend_variables.c:43
#10 0x0086ca10 in _zval_dtor (zvalue=0x1db4ba0) at .../php5.4-
201211020030/Zend/zend_variables.h:35
#11 i_zval_ptr_dtor (zval_ptr=0x1db4ba0) at .../php5.4-
201211020030/Zend/zend_execute.h:87
#12 zend_vm_stack_clear_multiple () at .../php5.4-
201211020030/Zend/zend_execute.h:339
#13 zend_do_fcall_common_helper_SPEC (execute_data=) at 
.../php5.4-201211020030/Zend/zend_vm_execute.h:736
#14 0x00826cdf in execute (op_array=0x1174570) at .../php5.4-
201211020030/Zend/zend_vm_execute.h:410
#15 0x007c7ea9 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at .../php5.4-201211020030/Zend/zend.c:1279
#16 0x00767763 in php_execute_script (primary_file=0x7fffcd80) at 
.../php5.4-201211020030/main/main.c:2473
#17 0x0086f45f in do_cli (argc=10, argv=0x7fffe168) at .../php5.4-
201211020030/sapi/cli/php_cli.c:988
#18 0x00435dce in main (argc=10, argv=0x7fffe168) at .../php5.4-
201211020030/sapi/cli/php_cli.c:1364


Previous Comments:

[2012-11-01 02:23:19] larue...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

there is a knew issue of segfault caused by traits alias.

please try with the 5.4-snapshot


[2012-10-31 22:55:43] ber...@php.net

Description:

I'm experiencing segfaults in the mentioned function while working on Drupal 8. 
Here's what I found out so far:

- Happens both with the default ubuntu 12.04 php 5.3.10 and php 5.4.8 from 
https://launchpad.net/~ondrej/+archive/php5
- See http://drupal.org/node/512026#comment-6673974 for the backtrace
- Happens both on my local installation and our automated testbots
- The segfault does not happen if zend.enable_gc is Off.

It's non-trivial to set up, see "script" below, so just tell me what commands 
to 
run in gdb to give you additional information if required.

Test script:
---
git clone g...@git.drupal.org:project/drupal.git --branch=8.x
# Install Drupal, enable Testing module.
wget http://drupal.org/files/form-state-keyvalue-512026-98.patch
git apply form-state-keyvalue-512026-98.patch

php core/scripts/run-tests.sh --class 
"Drupal\views\Tests\Handler\FilterStringTest"


Expected result:

Drupal test run
---

Tests to be run:
 -  (Drupal\views\Tests\Handler\FilterStringTest)

Test run started:
 Wednesday, October 31, 2012 - 23:50

Test summary


Filter: String n passes, 0 fails, and 0 exception

Test run duration: n sec

Actual result:
--
Drupal test run
---

Tests to be run:
 -  (Drupal\views\Tests\Handler\FilterStringTest)

Test run started:
 Wednesday, October 31, 2012 - 23:50

Test summary


Segmentation fault (core dumped)
FATAL Drupal\views\Tests\Handler\FilterStringTest: test runner returned a non-
zero error code (139).
- Found database prefix 'simpletest916618' for test ID 372.
- Removed test files directory.
- Removed 43 leftover tables.

Test run duration: 11 sec






Bug #63413 [Opn]: Intermittent warning and fatal error on require() statement

2012-11-01 Thread ben at indietorrent dot org
Edit report at https://bugs.php.net/bug.php?id=63413&edit=1

 ID: 63413
 User updated by:ben at indietorrent dot org
 Reported by:ben at indietorrent dot org
 Summary:Intermittent warning and fatal error on require()
 statement
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows 7 x64
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

It occurred to me to examine Apache's internal error log for entries that 
correspond to those in PHP's error log when this occurs. I noticed what may be 
an important clue.

Sample entries in PHP's error log:

---
[01-Nov-2012 13:29:41 America/New_York] PHP Warning:  
require(../include/global.inc.php): failed to open stream: No such file or 
directory in C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\auxiliary\css.php on line 5

[01-Nov-2012 13:29:41 America/New_York] PHP Fatal error:  require(): Failed 
opening required '../include/global.inc.php' (include_path='.;C:\Program 
Files\php\includes;C:\Program Files\php\PEAR\pear') in 
C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\auxiliary\css.php on line 5

[01-Nov-2012 13:29:43 America/New_York] PHP Warning:  
require(C:/Users/Ben/Documents/Apache/project/protected/constants.inc.php): 
failed to open stream: No such file or directory in 
C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\include\global.inc.php on line 18

[01-Nov-2012 13:29:43 America/New_York] PHP Fatal error:  require(): Failed 
opening required 
'C:/Users/Ben/Documents/Apache/project/protected/constants.inc.php' 
(include_path='.;C:\Program Files\php\includes;C:\Program Files\php\PEAR\pear') 
in C:\Users\Ben\Documents\Projects\project 
Testing\project-svn\trunk\public\include\global.inc.php on line 18
---

Roughly-corresponding entries in Apache's error log:

---
[Thu Nov 01 13:29:21.235844 2012] [core:error] [pid 6780:tid 1136] (OS 32)The 
process cannot access the file because it is being used by another process.  : 
[client 10.0.1.57:65162] AH00127: Cannot map GET 
/project/public/js/jquery.accordion.js HTTP/1.1 to file, referer: 
https://ben-pc/project/public/company/history/
[Thu Nov 01 13:29:41.141441 2012] [core:error] [pid 6780:tid 1128] (OS 32)The 
process cannot access the file because it is being used by another process.  : 
[client 10.0.1.57:65204] AH00127: Cannot map GET 
/project/public/common/js/libs/modernizr-2.5.3.min.js HTTP/1.1 to file, 
referer: https://ben-pc/project/public/contact/service-inquiry/
---

While I don't see any direct correlation between the files cited in PHP's error 
log and those cited in Apache's error log, the message "(OS 32)The process 
cannot access the file because it is being used by another process" seems very 
relevant to the observed behavior in PHP.

This observation inspired me to create a very simple test script which, much to 
my surprise, enables me to produce this issue at will. I was able to reproduce 
the issue in Windows' Safe Mode, too, which seems to eliminate virus scanners, 
filter drivers, and other similar causes.

The key to reproducing this issue is making as many requests per unit of time 
as possible. In other words, holding-down the browser's refresh key (e.g., 
Ctrl+R or F5) for some period of time eventually causes require() failures to 
be logged.

Here's the script:



The contents of "require-test-include.php" are probably largely irrelevant, but 
I'm using the following:



A sample excerpt from PHP's error log contains entries such as the following:

---
[01-Nov-2012 16:01:53 America/New_York] PHP Warning:  
require(C:/Users/Ben/Documents/Apache/require-test-include.php): failed to open 
stream: No such file or directory in 
C:\Users\Ben\Documents\Apache\require-test.php on line 8

[01-Nov-2012 16:01:53 America/New_York] PHP Fatal error:  require(): Failed 
opening required 'C:/Users/Ben/Documents/Apache/require-test-include.php' 
(include_path='.;C:\Program Files\php\includes;C:\Program Files\php\PEAR\pear') 
in C:\Users\Ben\Documents\Apache\require-test.php on line 8
---

Apache's error log fills-up with entries such as the following (I've included 
six lines to demonstrate the timestamp variances):

---
[Thu Nov 01 15:59:02.327506 2012] [core:error] [pid 4420:tid 1040] (OS 32)The 
process cannot access the file because it is being used by another process.  : 
[client 10.0.1.57:62710] AH00127: Cannot map GET /require-test.php HTTP/1.1 to 
file
[Thu Nov 01 15:59:02.389509 2012] [core:error] [pid 4420:tid 1040] (OS 32)The 
process cannot access the file because it is being used by another process.  : 
[client 10.0.1.57:62710] AH00127: Cannot map GET /require-test.php HTTP/1.1 to 
file
[Thu Nov 01 15

Bug #54097 [Com]: rename() of dirs accross devices produces confusing copy error

2012-11-01 Thread tyler dot bannister at remote-learner dot net
Edit report at https://bugs.php.net/bug.php?id=54097&edit=1

 ID: 54097
 Comment by: tyler dot bannister at remote-learner dot net
 Reported by:clint at ubuntu dot com
 Summary:rename() of dirs accross devices produces confusing
 copy error
 Status: Open
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Linux (Ubuntu)
 PHP Version:5.3.6RC1
 Block user comment: N
 Private report: N

 New Comment:

This bug also affects PHP 5.3.3 on RHEL 5.8.


Previous Comments:

[2011-02-25 02:12:28] clint at ubuntu dot com

I forgot to mention, this was reported in Ubuntu here:

https://launchpad.net/bugs/723330


[2011-02-25 02:10:59] clint at ubuntu dot com

Description:

When a user tries to rename a directory accross filesystems, they are presented 
with this warning:


PHP Warning:  rename(): The first argument to copy() function cannot be a 
directory in Command line code on line 1
PHP Warning:  rename(t2,/var/run/test/t2): Invalid cross-device link in Command 
line code on line 1

To contrast this, running 'mv t2 /var/run/test/t2' works without any problems.


Test script:
---
$ sudo mkdir /var/run/test && sudo chown `whoami` /var/run/test
$ mkdir t2
$ touch t2/a.file
$ php -r "rename('t2','/var/run/test/t2');"


Expected result:

I would expect the directory to be copied with its contents in their entirety 
to 
the new destination, *OR* at the very least, an error message that specifies 
that 
one cannot rename directories, as its confusing that it mentions copy during a 
rename.

Actual result:
--
PHP Warning:  rename(): The first argument to copy() function cannot be a 
directory in Command line code on line 1
PHP Warning:  rename(t2,/var/run/test/t2): Invalid cross-device link in Command 
line code on line 1






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


Bug #63411 [Com]: curl_multi_select() returns invalid value

2012-11-01 Thread aa dot vasilenko at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63411&edit=1

 ID: 63411
 Comment by: aa dot vasilenko at gmail dot com
 Reported by:marcel at silverstreet dot com
 Summary:curl_multi_select() returns invalid value
 Status: Open
 Type:   Bug
 Package:cURL related
 Operating System:   CentOS 6.3
 PHP Version:5.3.18
 Block user comment: N
 Private report: N

 New Comment:

Confirming the same bug. PHP 5.4.8, CentOS 5.8


Previous Comments:

[2012-11-01 11:10:46] marcel at silverstreet dot com

Description:

curl_multi_select() seems broken in PHP 5.3.18 on CentOS 6.3.

The behavior of the test script below is different than it used to be, 
returning 
immediately without select with a -1 (failure) return value.


Test script:
---
$mh = curl_multi_init();
print curl_multi_select($mh, 1.0);
curl_multi_close($mh);


Expected result:

curl_multi_select() should take 1.0 seconds to complete and returns 0

Actual result:
--
curl_multi_select() returns immediately with return value of -1







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


[PHP-BUG] Bug #63414 [NEW]: built-in upload progress mechanism does not work with custom session handler

2012-11-01 Thread xergin at gmail dot com
From: xergin at gmail dot com
Operating system: ubuntu 12.04 x86_64
PHP version:  5.4.8
Package:  *General Issues
Bug Type: Bug
Bug description:built-in upload progress mechanism does not work with custom 
session handler

Description:

By default php stores sessions in files (default filepath is
/var/lib/php5).
If we want to store sessions, for example, in database, upload progress
info 
doesn't appears there. Even If we change session_save_path to another
directory we 
will get the same problem.

P.S. script example you could get here:
https://github.com/ihabunek/php-upload-progress

and custom session handler example here:
http://durak.org/sean/pubs/software/php-5.4.6/function.session-set-save-
handler.html

Thanks,
Anton


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



[PHP-BUG] Bug #63413 [NEW]: Intermittent warning and fatal error on require() statement

2012-11-01 Thread ben at indietorrent dot org
From: ben at indietorrent dot org
Operating system: Windows 7 x64
PHP version:  5.4.8
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Intermittent warning and fatal error on require() statement

Description:

I observe erratic behavior relating to require() statements. The files that
are being required are static (they are not created or destroyed during
script execution), so there should be no reason that they are required
successfully the vast majority of the time, but fail to be required some
small percentage of the time.

It bears mention that I am also wrapping the calls to require() in calls to
file_exists(). It seems that while file_exists() always returns true (the
require() statements are always executed), the calls to require() fail
intermittently with "PHP Warning: Unknown: failed to open stream: No such
file or directory" and then "PHP Fatal error: Unknown: Failed opening
required".

The symptoms of this issue are very similar to those described in
https://bugs.php.net/bug.php?id=49012 ("Spurious fatal error on require()
statement"), but I don't know whether the root cause is the same or not.

I have confirmed that this problem occurs on several different computers,
no two of which have the exact same OS or *AMP stack component versions.
For this reason, I do not believe this issue to be due to failing hardware,
a corrupt operating system, or similar.

I should note also that in PHP 5.2 and 5.3, the offending line number was
always zero (0). Unless line number zero has some special meaning in PHP,
this seems like a bug in itself. In any case, in PHP 5.4.8, the line number
is non-zero *usually* (but not always), and seems to be accurate. (I have
not tested with any PHP version before 5.2 or between 5.3 and 5.4.8.)

I have not installed any third-party extensions and am using a pristine
5.4.8 installation. PHP is running via Apache's mod_php module. php.ini is
relatively untouched; the only changes I made were to enable some of the
modules that are disabled by default (I can list them if it's relevant).

Unfortunately, I am unable to reproduce this issue at will, because it
occurs completely sporadically.

That said, the problem occurs quite frequently, so, if a developer is able
to provide specific debugging instructions, it should be easy enough for me
to capture the relevant information. By "quite frequently", I mean every
couple of minutes during normal browsing.

Also, I have used Firefox's handy "Reload Tab Every..." context menu
feature to reload an affected page every 1 second for 10 minutes straight
and the issue occurred only twice. This seems to indicate that the issue
does not necessarily occur some percentage of the time (+/- variance), but
rather, it occurs when more complex conditions are met. For whatever
reason, the issue occurs most frequently when I make several concurrent
requests to the affected URLs/files, and I navigate to various URLs before
each page has loaded fully.

Strangely enough, if I let the auto-refresh test run long enough (this run,
it took more than 30 minutes of refreshing every second), the specific
error messages change (the location of the failed require statements
change), but their nature is always the same: failed require() statements
due to variations of "file not found".

Also, the issue seems most likely to occur when the Web-server (Apache in
this case) has been sitting idle for some period of time (e.g., 10 or more
minutes). Oftentimes, if I have been away from the computer and refresh an
affected page when I return, the issue occurs. Could this behavior point to
memory managment or caching?

The code-base that causes this issue is shared across several different
production websites, all of which run on various GNU/Linux distributions.
With Ubuntu 10.04 + Apache 2.2.14 + mod_php + PHP 5.3.2, I do not observe
the issue at all. On another identically-configured server, the only
difference being Fast-CGI (fcgid) instead of mod_php, I do observe the
issue, but its manifestation is slightly different than on Windows with
mod_php. (I'm happy to provide details regarding the differences.)

I find it particularly strange that the messages and specific points of
failure change over time. The first log entry (made only a few seconds
after Apache was started) makes no sense; there is no file mentioned, and
the line number is zero:


[29-Oct-2012 15:30:29 America/New_York] PHP Warning:  Unknown: failed to
open stream: No such file or directory in Unknown on line 0


At least the related fatal error mentions a file:


[29-Oct-2012 15:30:29 America/New_York] PHP Fatal error:  Unknown: Failed
opening required
'C:/Users/Ben/Documents/Apache/project/public/auxiliary/css.php'
(include_path='.;C:\Program Files\php\includes;C:\Program
Files\php\PEAR\pear') in Unknown on line 0


The next time the warning/fatal occurs, we have a f

Bug #63281 [Com]: PDO: Multiple queries using multiple bindParams yields unexpected results

2012-11-01 Thread giblets at mailinator dot com
Edit report at https://bugs.php.net/bug.php?id=63281&edit=1

 ID: 63281
 Comment by: giblets at mailinator dot com
 Reported by:jim dot gibbs at onelifemedia dot com
 Summary:PDO: Multiple queries using multiple bindParams
 yields unexpected results
 Status: Wont fix
 Type:   Bug
 Package:PDO related
 Operating System:   Mac
 PHP Version:5.4.7
 Block user comment: N
 Private report: N

 New Comment:

nihao, mate


Previous Comments:

[2012-11-01 05:39:46] rawr at rawr dot com

nihao


[2012-10-16 15:29:19] jim dot gibbs at onelifemedia dot com

Thanks for the information.  I read your blog post, and I'm glad that we came 
to 
the same conclusion.

I guess my only other question would be, are there any drawbacks to sending the 
array to the execute function?  That's the workaround that I'm currently using, 
and it's working just fine.  Of course, I haven't tried any speed/load tests, 
or 
anything of that ilk, since I'm in the beginning stages of development.


[2012-10-16 15:08:29] larue...@php.net

I wrote a blog to explain this: http://www.laruence.com/2012/10/16/2831.html

it's chinese, but I think you can use google translator :)


[2012-10-16 14:42:19] larue...@php.net

the reason for this is because require a reference variable, then in the loop, 
the variable will be reused, after the loop, the variable will be the last 
assigned one.

you can use bindValue instead, or ...
you can use:
foreach ($params as $key => &$val) ;

this is a complicated problem, since it is a feature of PHP 
internal(reference). 
so, won't fix.

thanks


[2012-10-15 18:18:17] jim dot gibbs at onelifemedia dot com

Description:

Created a prepared statement, with named placeholders.  The prepared statement 
contained 2 queries, and 3 placeholders.  2 of the placeholders were the same, 
so 
they *should* become the same value.

The resulting query ended up being all three place holders being the same value.

The results below were generated from the mysql log files.

Workaround:

Instead of using the bindParam function, I was able to send the same array to 
the 
execute function, and it worked.

Test script:
---
$query = <prepare($query);
$bind_params = array(':session_key' => $session_key, ':generated_hash' => 
$generated_hash)
foreach( $bind_params as $key => $value ){
  $statement->bindParam($key, $value);
}
$statement->execute();


Expected result:

DELETE FROM `authentication_hashes` WHERE session_key = '8675309';
INSERT INTO `authentication_hashes` (`session_key`, `generated_hash`) VALUES 
('8675309', 'cb5606644c1d30a9d8f84cee4234a44455c82448a33f8031434ec42a6d173383')


Actual result:
--
DELETE FROM `authentication_hashes` WHERE session_key = 
'3966b45ae07b86de9c74163b093994fbf2a5813a06cbc9902f15e1b38a212940';
INSERT INTO `authentication_hashes` (`session_key`, `generated_hash`) VALUES 
('3966b45ae07b86de9c74163b093994fbf2a5813a06cbc9902f15e1b38a212940', 
'3966b45ae07b86de9c74163b093994fbf2a5813a06cbc9902f15e1b38a212940')






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


[PHP-BUG] Bug #63412 [NEW]: Crash in libclntsh.so.11.1 on database access

2012-11-01 Thread roman dot b at zend dot com
From: roman dot b at zend dot com
Operating system: RedHat EL 5 32bit
PHP version:  5.3.18
Package:  OCI8 related
Bug Type: Bug
Bug description:Crash in libclntsh.so.11.1 on database access

Description:

The crash occurs every time the application interacts with the Oracle
database. 
The application is based on Doctrine and the problem happens only with the

following setting in the Doctrine configuration:

doctrine.cache.query.driver = "Doctrine_Cache_Array"

With the same parameter empty, no crash happens:

doctrine.cache.query.driver = ""


Crash stack trace:

/usr/local/zend/lib/ZendExtensionManager.so(_Z11zPrintTraceN6ZDebug8StreamIdE+0x
2c) [0x90c4ee]
/usr/local/zend/lib/ZendExtensionManager.so [0x8fab65]
[0xb0e420]
/usr/local/zend/lib/php_extensions/oci8.so(php_oci_bind_in_callback+0x28) 
[0xb97d48]
/usr/lib/libclntsh.so.11.1(ttcGetSendInfo+0x9a) [0x50cfeea]
/usr/lib/libclntsh.so.11.1(ttcacs+0x913) [0x66cbc2f]
/usr/lib/libclntsh.so.11.1(ttcdrv+0x412) [0x66a1972]
/usr/lib/libclntsh.so.11.1(nioqwa+0x30) [0x665c034]
/usr/lib/libclntsh.so.11.1(upirtrc+0x463) [0x664bc0b]
/usr/lib/libclntsh.so.11.1(kpurcsc+0x60) [0x6650f3c]
/usr/lib/libclntsh.so.11.1(kpuexec+0x9a8) [0x664d0b8]
/usr/lib/libclntsh.so.11.1(OCIStmtExecute+0x32) [0x664c5ec]
/usr/local/zend/lib/php_extensions/oci8.so(php_oci_statement_execute+0x11d)

[0xb98ecd]
/usr/local/zend/lib/php_extensions/oci8.so(zif_oci_execute+0x97)
[0xba5a27]
/usr/local/zend/lib/monitor/php-5.3.x/ZendMonitor.so [0x1de0254]
/usr/local/zend/lib/apache2/libphp5.so [0x122fd91]
/usr/local/zend/lib/apache2/libphp5.so(execute+0x1f3) [0x122f2f3]
/usr/local/zend/lib/monitor/php-5.3.x/ZendMonitor.so [0x1defe1e]
/usr/local/zend/lib/debugger/php-5.3.x/ZendDebugger.so [0x7235ede]
/usr/local/zend/lib/apache2/libphp5.so [0x122f84f]


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



[PHP-BUG] Bug #63411 [NEW]: curl_multi_select() returns invalid value

2012-11-01 Thread marcel at silverstreet dot com
From: marcel at silverstreet dot com
Operating system: CentOS 6.3
PHP version:  5.3.18
Package:  cURL related
Bug Type: Bug
Bug description:curl_multi_select() returns invalid value

Description:

curl_multi_select() seems broken in PHP 5.3.18 on CentOS 6.3.

The behavior of the test script below is different than it used to be,
returning 
immediately without select with a -1 (failure) return value.


Test script:
---
$mh = curl_multi_init();
print curl_multi_select($mh, 1.0);
curl_multi_close($mh);


Expected result:

curl_multi_select() should take 1.0 seconds to complete and returns 0

Actual result:
--
curl_multi_select() returns immediately with return value of -1


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



[PHP-BUG] Req #63410 [NEW]: DOMElement is missing method for fetching all inscope namespaces

2012-11-01 Thread jirka at kosek dot cz
From: jirka at kosek dot cz
Operating system: 
PHP version:  5.4.8
Package:  DOM XML related
Bug Type: Feature/Change Request
Bug description:DOMElement is missing method for fetching all inscope namespaces

Description:

If XML documents you are processing are using QNames inside attribute or
element values there is need to get list of all XML namespaces declared for
a particular element inside DOM.

libxml2 has function for this

http://www.xmlsoft.org/html/libxml-tree.html#xmlGetNsList

Unfortunately this function is not exposed in PHP DOM extensions and there
is no other way how to get namespaces inscope for some element.


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



[PHP-BUG] Bug #63409 [NEW]: php-dba function test fails on big-endian machine

2012-11-01 Thread tianhonglouis at gmail dot com
From: tianhonglouis at gmail dot com
Operating system: linux
PHP version:  5.4.8
Package:  Testing related
Bug Type: Bug
Bug description:php-dba function test fails on big-endian machine

Description:

For ext/dba/tests/bug38698.phpt, if running the testcase on big-endian
machine 
like ppc, it will fail. The main root cause is the function pack('i', 129),
if 
add the format character "i", it's machine dependent size and byte order.
Big 
endian and liitle endian will output the different string value. According
to the 
string value, dba_insert() will insert the different position of the db,
finally 
cause the different md5 value. 

Test script:
---
php run-tests.php ext/dba/tests/bug38698.phpt

Expected result:

Running selected tests.
PASS Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and
cdb 
can't read valid db) [ext/dba/tests/bug38698.phpt] 
=
Number of tests :1 1
Tests skipped   :0 (  0.0%) 
Tests warned:0 (  0.0%) (  0.0%)
Tests failed:0 (  0.0%) (  0.0%)
Expected fail   :0 (  0.0%) (  0.0%)
Tests passed:1 (100.0%) (100.0%)
-
Time taken  :0 seconds

Actual result:
--
Running selected tests.
FAIL Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and
cdb 
can't read valid db) [ext/dba/tests/bug38698.phpt] 
=
Number of tests :1 1
Tests skipped   :0 (  0.0%) 
Tests warned:0 (  0.0%) (  0.0%)
Tests failed:1 (100.0%) (100.0%)
Expected fail   :0 (  0.0%) (  0.0%)
Tests passed:0 (  0.0%) (  0.0%)
-
Time taken  :0 seconds
=

=
FAILED TEST SUMMARY
-
Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb
can't 
read valid db) [ext/dba/tests/bug38698.phpt]


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