Req #63525 [Nab]: php5.4.8 connecting to mysql is slower then php5.2.6

2012-11-15 Thread admin at wudimei dot com
Edit report at https://bugs.php.net/bug.php?id=63525&edit=1

 ID: 63525
 User updated by:admin at wudimei dot com
 Reported by:admin at wudimei dot com
 Summary:php5.4.8 connecting to mysql is slower then php5.2.6
 Status: Not a bug
 Type:   Feature/Change Request
 Package:MySQL related
 Operating System:   windows 7
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

connect to mysql take ". (microtime(true ) - $a); echo " 
seconds"; 
 phpinfo();
 
?>


connect to mysql take 0.0034029483795166 seconds

thanks ras...@php.net very much,this issue solved!
thank you again!
best regards
yangqingrong


Previous Comments:

[2012-11-15 15:43:11] ras...@php.net

You said you used 127.0.0.1 but your code clearly shows "localhost". Windows is 
probably trying to use ipv6 for "localhost" first and MySQL isn't listening on 
::1 so it has to time out there first before trying 127.0.0.1. You can either 
fix 
your Hosts file and remove ::1 (probably a bad idea) or simply use 127.0.0.1 in 
your code.


[2012-11-15 12:11:34] yangqingrong at wudimei dot com

i edited the code like this:

connect to mysql take ". (microtime(true ) - $a); echo " 
seconds"; 
 phpinfo();
 
?>


to see the result,copy the url below and paste it to the address bar of browser:

http://www.wudimei.com/data/YangQingrong/php5.2.6.jpg
http://www.wudimei.com/data/YangQingrong/php5.4.8.jpg


[2012-11-15 11:59:54] admin at wudimei dot com

i use ip,not localhost.
http://127.0.0.18/wudimei_show/admin_S2D3L56N8K5L/component_types.php?act=index


[2012-11-15 09:37:35] and...@php.net

Can you try 127.0.0.1 instead of localhost and report the connect time?


[2012-11-15 09:09:19] admin at wudimei dot com

Description:

php5.4.8 connecting to mysql is slower then php5.2.8

i use php5.4.8 to connect the mysql,it's slow!it take about 1.0138568878174 
seconds.
then i switch to php5.2.6 ,it only take 0.00234985351562 seconds.

please improve it
thank you!

yang qingrong

Test script:
---


php5.4.8 output:

Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
1.0138568878174 seconds

php 5.2.6 output
Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
0.00234985351562 seconds







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


Bug #50400 [Fbk->NoF]: Compile fails generating phar.phar

2012-11-15 Thread dsp
Edit report at https://bugs.php.net/bug.php?id=50400&edit=1

 ID: 50400
 Updated by: d...@php.net
 Reported by:lepage at grm dot polymtl dot ca
 Summary:Compile fails generating phar.phar
-Status: Feedback
+Status: No Feedback
 Type:   Bug
 Package:PHAR related
 Operating System:   Solaris 10
 PHP Version:5.3.1
 Assigned To:dsp
 Block user comment: N
 Private report: N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:

[2010-09-28 15:26:17] steve at computurn dot com

I have a fix for this issue (PHP5.3.3)

It's caused by ext/phar/build_precommand.php having a header of #!/usr/bin/php
I fixed it on my system by creating a /usr/bin/php symlink to a php executable, 
but I suspect the proper fix will be to change the #! to point to sapi/cli/php, 
if that's built when we get to this stage.


[2010-07-05 21:43:00] omars1234 at gmail dot com

Tried the new snapshot, no luck.  Using Solaris10, gcc 4.2.1.  Configured 
without any options.

Generating phar.php
*** Error code 139
The following command caused the error:
`  if test -x "/tmp/php5.3-201007051830/sapi/cli/php"; then  
/tmp/php5.3-201007051830/build/shtool echo -n -- 
"/tmp/php5.3-201007051830/sapi/cli/php -n";  if test "x" != "x"; then  
/tmp/php5.3-201007051830/build/shtool echo -n -- " -d 
extension_dir=/tmp/php5.3-201007051830/modules";  for i in bz2 zlib phar; do  
if test -f "/tmp/php5.3-201007051830/modules/$i.la"; then  . 
/tmp/php5.3-201007051830/modules/$i.la; /tmp/php5.3-201007051830/build/shtool 
echo -n -- " -d extension=$dlname";  fi;  done;  fi;  else  
/tmp/php5.3-201007051830/build/shtool echo -n -- 
"/tmp/php5.3-201007051830/sapi/cli/php";  fi;` -d 'open_basedir=' -d 
'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' 
/tmp/php5.3-201007051830/ext/phar/build_precommand.php > ext/phar/phar.php
make: Fatal error: Command failed for target `ext/phar/phar.php'

(my disable-phar version didn't work out either, resulting cli-binary core 
dumps :( )


[2010-07-02 11:33:17] johan...@php.net

Please try using this snapshot:

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

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


[2010-07-02 01:04:44] omars1234 at gmail dot com

As a work-around, pass "--disable-phar" to configure.  I don't do anything that 
explicitly needs phar archives (so far), so I did this to build PHP5.3.2 on 
Solaris10 after running into the same problem.


[2010-01-26 17:09:36] ekcheu at uncg dot edu

I've had this issue before.  It appears that this error occurs depending upon 
which version of gcc you are using.  After continuing to fail to compile on a 
version of gcc (4.2.1).. I used blastwave's gcc, and it was able to get past 
this issue.  Don't ask why it compiles find on some versions of gcc and not 
others.




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=50400


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


Req #47871 [Asn]: PHPIniScanDir directive for apache allows scanning for extension ini files

2012-11-15 Thread dsp
Edit report at https://bugs.php.net/bug.php?id=47871&edit=1

 ID: 47871
 Updated by: d...@php.net
 Reported by:sriram dot natarajan at gmail dot com
 Summary:PHPIniScanDir directive for apache allows scanning
 for extension ini files
 Status: Assigned
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   unix and linux
 PHP Version:5.3.0RC1
 Assigned To:dsp
 Block user comment: N
 Private report: N

 New Comment:

Sriram, sorry for totally having forgotten about that patch. I think we might 
be 
able to add it to 5.5.0 if someone pushes for it. I yet have to test if the 
patch 
works with 5.5.0


Previous Comments:

[2011-02-08 03:29:13] srina...@php.net

i believe, with my initial patch the idea was that introduce a directive like 
PhpIniScanDir within httpd.conf so that this can scan a directory.


[2011-02-02 23:34:15] tyra3l at gmail dot com

for the record: passing PHP_INI_SCAN_DIR through SetEnv from apache confid 
doesnt 
work: the environment variable will be there(at least by phpinfo()), but the 
"Scan 
this dir for additional .ini files" will be empty.
on the other hand, if you set/export an environment variable in the shell where 
you start the apache afterwards, that does work.
so for now, one can set this option "runtime", but it would be a nicer 
solution, 
if the apache SetEnv would work, or if the patch would be merged, so we would 
have 
an apache directive called PHP_INI_SCAN_DIR.

Tyrael


[2011-02-02 22:04:21] tyra3l at gmail dot com

poke

Tyrael


[2009-05-04 18:19:16] sriram dot natarajan at gmail dot com

how does this work ? will this need to be ported all the sapi's currently 
supported by PHP or can it be on a user request basis ? for, example - i can 
provide the patch for ISAPI ? will that help ? 

For NSAPI, lot of things are broke as is. for example, php ini dir itself does 
not work with recent version of sun web server. I plan to  file a separate bug 
for NSAPI and can provide a separate patch to address this issue for nsapi.  

I don't have lot of experience with thttpd or roxen. Does this patch need to be 
ported to those SAPI's as well ? are these SAPI's actively used by the 
community ?


[2009-05-04 15:12:54] paj...@php.net

David, what's the status about this one? Should it not be for all SAPI instead?




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=47871


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


Bug #61268 [Asn->Fbk]: --enable-dtrace leads make to clobber Zend/zend_dtrace.d

2012-11-15 Thread dsp
Edit report at https://bugs.php.net/bug.php?id=61268&edit=1

 ID: 61268
 Updated by: d...@php.net
 Reported by:mike at harschsystems dot com
 Summary:--enable-dtrace leads make to clobber
 Zend/zend_dtrace.d
-Status: Assigned
+Status: Feedback
 Type:   Bug
 Package:Compile Failure
 Operating System:   solaris
 PHP Version:5.4.0
 Assigned To:dsp
 Block user comment: N
 Private report: N

 New Comment:

I see what the problem is but cannot reproduce it myself with 5.5.0alpha1. 
Please try the 5.5.0alpha snapshots from http://downloads.php.net/dsp and 
provide me with 'uname -a' and 'gmake --version'.

./configure && gmake works fine for me on

$ uname -a
SunOS foo 5.11 11.0 i86pc i386 i86pc Solaris

which is a Oracle Solaris 5.11.

$ gmake -- version
GNU Make 3.81


Previous Comments:

[2012-05-08 04:35:50] mike at harschsystems dot com

I've seen the same failing behavior on 5.4.1 as well.  It's worth noting that 
gmake exhibits this failure mode while regular (non-GNU) make works fine.  So, 
the 
2 workarounds are:

1.) run gmake with the '-r' option
or
2.) run non-GNU make instead of gmake


[2012-04-22 13:13:01] alasdairrr at gmail dot com

I can confirm I'm seeing this problem too on both Solaris 10 and SmartOS.


[2012-03-03 20:19:39] mike at harschsystems dot com

Description:

5.4.0 bundle configured with only one option: --enable-dtrace

The configure script runs fine and the build finishes without error.  However, 
the next invocation of 
make (probably from trying to run 'make install') fails with the following 
error:


[jack@fjpe6maa ~/php-5.4.0]$ make install
gcc   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o   -o /home/jack/php-
5.4.0/Zend/zend_dtrace.d
Undefined   first referenced
 symbol in file
main/usr/lib/crt1.o
php_request_startup /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute_internal /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute  /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
php_request_shutdown/home/jack/php-5.4.0/Zend/zend_dtrace.d.o
zend_throw_exception_internal   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_compile_file /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
$dtrace185178.ZEND_CATCH_SPEC_CONST_CV_HANDLER /home/jack/php-
5.4.0/Zend/zend_dtrace.d.o
zend_error_noreturn /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
ld: fatal: symbol referencing errors. No output written to /home/jack/php-
5.4.0/Zend/zend_dtrace.d
collect2: ld returned 1 exit status
make: *** [/home/jack/php-5.4.0/Zend/zend_dtrace.d] Error 1

What's happening here is that make has determined that the file 
Zend/zend_dtrace.d is out of date and 
must be rebuilt.  It matches a built-in implicit rule that ends up running:
gcc   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o   -o /home/jack/php-
5.4.0/Zend/zend_dtrace.d

This command fails with the error that you see, but it also clobbers 
zend_dtrace.d

Here's a bit more detail from 'make -d':
 
 Prerequisite `/home/jack/php-5.4.0/Zend/zend_dtrace.d.o' is newer 
than target 
`/home/jack/php-5.4.0/Zend/zend_dtrace.d'.
Must remake target `/home/jack/php-5.4.0/Zend/zend_dtrace.d'.
Invoking builtin recipe to update target `/home/jack/php-
5.4.0/Zend/zend_dtrace.d'.
gcc   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o   -o /home/jack/php-
5.4.0/Zend/zend_dtrace.d
Putting child 80bdaa0 (/home/jack/php-5.4.0/Zend/zend_dtrace.d) PID 5104 on the 
chain.
Live child 80bdaa0 (/home/jack/php-5.4.0/Zend/zend_dtrace.d) PID 5104
Undefined   first referenced
 symbol in file
main/usr/lib/crt1.o
php_request_startup /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute_internal /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute  /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
$dtrace187054.ZEND_CATCH_SPEC_CONST_CV_HANDLER /home/jack/php-
5.4.0/Zend/zend_dtrace.d.o
php_request_shutdown/home/jack/php-5.4.0/Zend/zend_dtrace.d.o
zend_throw_exception_internal   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_compile_file /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
zend_error_noreturn /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
ld: fatal: symbol referencing errors. No output written to /home/jack/php-
5.4.0/Zend/zend_dtrace.d
collect2: ld returned 1 exit status
Reaping losing child 80bdaa0 PID 5104
make: *** [/home/jack/php-5.4.0/Zend/zend_dtrace.d] 

Req #49369 [Com]: Change current(), key(), next(), etc. to check for Iterator

2012-11-15 Thread le...@php.net
Edit report at https://bugs.php.net/bug.php?id=49369&edit=1

 ID: 49369
 Comment by: le...@php.net
 Reported by:admin at ifyouwantblood dot de
 Summary:Change current(), key(), next(), etc. to check for
 Iterator
 Status: Open
 Type:   Feature/Change Request
 Package:Arrays related
 Operating System:   *
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

Sorry, I misunderstood the bug. Silly me.  Ignore my above comments.


Previous Comments:

[2012-11-16 04:33:26] le...@php.net

Also, calling `current($i)` gets the current value of the object `$i` which is 
the 
array; it doesn't call `$i->current`.


[2012-11-16 04:27:19] le...@php.net

I'm not sure this is a php bug.  Iterators should be rewound almost 100% of the 
time before being used, especially when using an array or an object that 
implements Iterator instead of IteratorAggregate.

Maybe the documentation should try to make this better known?


[2012-07-01 11:14:30] bugs dot php dot net dot nsp at cvogt dot org

As a further note, the current behavior or current() also leaks private fields 
unlike e.g. http://php.net/manual/en/language.oop5.iterations.php.

class Test{
  private $field = 5;
  public $field3 = 6;
}
$t = new Test;
print current($t);

Expected result:
6

Actual result:
5


[2009-08-26 10:34:05] admin at ifyouwantblood dot de

Description:

it would be helpful for chained Iterators, if the default array functions would 
check if an given object is an instanceof Iterator and react appropriate.

thus key() calling object->key(), current() calling object->current() and so on.

Reproduce code:
---
aarray=$array;
}

public function key()
{
return key($this->aarray);
}

public function current()
{
return current($this->aarray);
}

public function valid()
{
return (current($this->aarray)!==FALSE);
}

public function next()
{
next($this->aarray);
}

public function rewind()
{
reset($this->aarray);
}
}

$i=new iterator_array(Array(1,2));
var_dump(current($i));
var_dump(key($i));
next($i);
var_dump($current($i));
var_dump(key($i));

Expected result:

int(1)
int(0)
int(2)
int(1)


Actual result:
--
array(6) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
  [4]=>
  int(5)
  [5]=>
  int(6)
}
string(9) "�*�aarray"
bool(false)
NULL







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


Req #49369 [Com]: Change current(), key(), next(), etc. to check for Iterator

2012-11-15 Thread le...@php.net
Edit report at https://bugs.php.net/bug.php?id=49369&edit=1

 ID: 49369
 Comment by: le...@php.net
 Reported by:admin at ifyouwantblood dot de
 Summary:Change current(), key(), next(), etc. to check for
 Iterator
 Status: Open
 Type:   Feature/Change Request
 Package:Arrays related
 Operating System:   *
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

Also, calling `current($i)` gets the current value of the object `$i` which is 
the 
array; it doesn't call `$i->current`.


Previous Comments:

[2012-11-16 04:27:19] le...@php.net

I'm not sure this is a php bug.  Iterators should be rewound almost 100% of the 
time before being used, especially when using an array or an object that 
implements Iterator instead of IteratorAggregate.

Maybe the documentation should try to make this better known?


[2012-07-01 11:14:30] bugs dot php dot net dot nsp at cvogt dot org

As a further note, the current behavior or current() also leaks private fields 
unlike e.g. http://php.net/manual/en/language.oop5.iterations.php.

class Test{
  private $field = 5;
  public $field3 = 6;
}
$t = new Test;
print current($t);

Expected result:
6

Actual result:
5


[2009-08-26 10:34:05] admin at ifyouwantblood dot de

Description:

it would be helpful for chained Iterators, if the default array functions would 
check if an given object is an instanceof Iterator and react appropriate.

thus key() calling object->key(), current() calling object->current() and so on.

Reproduce code:
---
aarray=$array;
}

public function key()
{
return key($this->aarray);
}

public function current()
{
return current($this->aarray);
}

public function valid()
{
return (current($this->aarray)!==FALSE);
}

public function next()
{
next($this->aarray);
}

public function rewind()
{
reset($this->aarray);
}
}

$i=new iterator_array(Array(1,2));
var_dump(current($i));
var_dump(key($i));
next($i);
var_dump($current($i));
var_dump(key($i));

Expected result:

int(1)
int(0)
int(2)
int(1)


Actual result:
--
array(6) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
  [4]=>
  int(5)
  [5]=>
  int(6)
}
string(9) "�*�aarray"
bool(false)
NULL







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


Req #49369 [Com]: Change current(), key(), next(), etc. to check for Iterator

2012-11-15 Thread le...@php.net
Edit report at https://bugs.php.net/bug.php?id=49369&edit=1

 ID: 49369
 Comment by: le...@php.net
 Reported by:admin at ifyouwantblood dot de
 Summary:Change current(), key(), next(), etc. to check for
 Iterator
 Status: Open
 Type:   Feature/Change Request
 Package:Arrays related
 Operating System:   *
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

I'm not sure this is a php bug.  Iterators should be rewound almost 100% of the 
time before being used, especially when using an array or an object that 
implements Iterator instead of IteratorAggregate.

Maybe the documentation should try to make this better known?


Previous Comments:

[2012-07-01 11:14:30] bugs dot php dot net dot nsp at cvogt dot org

As a further note, the current behavior or current() also leaks private fields 
unlike e.g. http://php.net/manual/en/language.oop5.iterations.php.

class Test{
  private $field = 5;
  public $field3 = 6;
}
$t = new Test;
print current($t);

Expected result:
6

Actual result:
5


[2009-08-26 10:34:05] admin at ifyouwantblood dot de

Description:

it would be helpful for chained Iterators, if the default array functions would 
check if an given object is an instanceof Iterator and react appropriate.

thus key() calling object->key(), current() calling object->current() and so on.

Reproduce code:
---
aarray=$array;
}

public function key()
{
return key($this->aarray);
}

public function current()
{
return current($this->aarray);
}

public function valid()
{
return (current($this->aarray)!==FALSE);
}

public function next()
{
next($this->aarray);
}

public function rewind()
{
reset($this->aarray);
}
}

$i=new iterator_array(Array(1,2));
var_dump(current($i));
var_dump(key($i));
next($i);
var_dump($current($i));
var_dump(key($i));

Expected result:

int(1)
int(0)
int(2)
int(1)


Actual result:
--
array(6) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
  [4]=>
  int(5)
  [5]=>
  int(6)
}
string(9) "�*�aarray"
bool(false)
NULL







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


Bug #63535 [Opn->Nab]: zend_parse_parameters: error when signature is s|ssbs

2012-11-15 Thread felipe
Edit report at https://bugs.php.net/bug.php?id=63535&edit=1

 ID: 63535
 Updated by: fel...@php.net
 Reported by:lmpmbernardo at gmail dot com
 Summary:zend_parse_parameters: error when signature is
 s|ssbs
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:Unknown/Other Function
 Operating System:   Ubuntu 12.04 LTS 32 bits
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

You are specifying "s|ssbs", but it's passing args for "s|sbs".


Previous Comments:

[2012-11-16 00:47:19] lmpmbernardo at gmail dot com

updated version; 5.3.10 is the most recent version in Ubuntu.


[2012-11-16 00:46:13] lmpmbernardo at gmail dot com

Description:

zend_parse_parameters is having trouble parsing this signature: s|ssbs; the 
error happens with the last "bs" arguments. the signature "ssbs" works well.

~$ php -v
PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 19:00:43) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies


Test script:
---
PHP_FUNCTION(test_parse_parameters) {
  char *p_str1 = "";
  int p_str1_len;
  char *p_str2 = "";
  int p_str2_len;
  char *p_str3 = "";
  int p_str3_len;
  zend_bool b = 0;

  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ssbs", &p_str1, 
&p_str1_len, &p_str2,
  &p_str2_len, &b, &p_str3, &p_str3_len) == FAILURE) {
return;
  }

  zend_error(E_WARNING, "First parameter: len[%d] value[%s]", p_str1_len, 
p_str1);
  zend_error(E_WARNING, "Second parameter: len[%d] value[%s]", p_str2_len, 
p_str2);
  zend_error(E_WARNING, "Third parameter: '%s'", b ? "TRUE" : "FALSE");
  zend_error(E_WARNING, "Fourth parameter: len[%d] value[%s]", p_str3_len, 
p_str3);

  char returnValue[256];
  char* result;
  sprintf(returnValue, "%d#%s", 0, "houston, we have a problem!");
  result = estrdup(returnValue);
  RETURN_STRING(result, 0);
}


Expected result:

lbernardo@sousel:~$ php -r 'echo test_parse_parameters("first", "second", 
FALSE, "fourth");'
PHP Warning:  First parameter: len[5] value[first] in Command line code on line 
1
PHP Warning:  Second parameter: len[6] value[second] in Command line code on 
line 1
PHP Warning:  Third parameter: 'FALSE' in Command line code on line 1
PHP Warning:  Fourth parameter: len[6] value[fourth] in Command line code on 
line 1
0#houston, we have a problem!


Actual result:
--
lbernardo@sousel:~$ php -r 'echo test_parse_parameters("first", "second", 
FALSE, "fourth");'
PHP Warning:  First parameter: len[5] value[first] in Command line code on line 
1
PHP Warning:  Second parameter: len[6] value[second] in Command line code on 
line 1
PHP Warning:  Third parameter: 'TRUE' in Command line code on line 1
PHP Warning:  Fourth parameter: len[769] value[(null)] in Command line code on 
line 1
0#houston, we have a problem!







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


[PHP-BUG] Bug #63535 [NEW]: zend_parse_parameters: error when signature is s|ssbs

2012-11-15 Thread lmpmbernardo at gmail dot com
From: lmpmbernardo at gmail dot com
Operating system: Ubuntu 12.04 LTS 32 bits
PHP version:  5.3.18
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:zend_parse_parameters: error when signature is s|ssbs

Description:

zend_parse_parameters is having trouble parsing this signature: s|ssbs; the
error happens with the last "bs" arguments. the signature "ssbs" works
well.

~$ php -v
PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012
19:00:43) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies


Test script:
---
PHP_FUNCTION(test_parse_parameters) {
  char *p_str1 = "";
  int p_str1_len;
  char *p_str2 = "";
  int p_str2_len;
  char *p_str3 = "";
  int p_str3_len;
  zend_bool b = 0;

  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ssbs", &p_str1,
&p_str1_len, &p_str2,
  &p_str2_len, &b, &p_str3, &p_str3_len) == FAILURE) {
return;
  }

  zend_error(E_WARNING, "First parameter: len[%d] value[%s]", p_str1_len,
p_str1);
  zend_error(E_WARNING, "Second parameter: len[%d] value[%s]", p_str2_len,
p_str2);
  zend_error(E_WARNING, "Third parameter: '%s'", b ? "TRUE" : "FALSE");
  zend_error(E_WARNING, "Fourth parameter: len[%d] value[%s]", p_str3_len,
p_str3);

  char returnValue[256];
  char* result;
  sprintf(returnValue, "%d#%s", 0, "houston, we have a problem!");
  result = estrdup(returnValue);
  RETURN_STRING(result, 0);
}


Expected result:

lbernardo@sousel:~$ php -r 'echo test_parse_parameters("first", "second",
FALSE, "fourth");'
PHP Warning:  First parameter: len[5] value[first] in Command line code on
line 1
PHP Warning:  Second parameter: len[6] value[second] in Command line code
on line 1
PHP Warning:  Third parameter: 'FALSE' in Command line code on line 1
PHP Warning:  Fourth parameter: len[6] value[fourth] in Command line code
on line 1
0#houston, we have a problem!


Actual result:
--
lbernardo@sousel:~$ php -r 'echo test_parse_parameters("first", "second",
FALSE, "fourth");'
PHP Warning:  First parameter: len[5] value[first] in Command line code on
line 1
PHP Warning:  Second parameter: len[6] value[second] in Command line code
on line 1
PHP Warning:  Third parameter: 'TRUE' in Command line code on line 1
PHP Warning:  Fourth parameter: len[769] value[(null)] in Command line code
on line 1
0#houston, we have a problem!


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



Bug #63535 [Opn]: zend_parse_parameters: error when signature is s|ssbs

2012-11-15 Thread lmpmbernardo at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63535&edit=1

 ID: 63535
 User updated by:lmpmbernardo at gmail dot com
 Reported by:lmpmbernardo at gmail dot com
 Summary:zend_parse_parameters: error when signature is
 s|ssbs
 Status: Open
 Type:   Bug
 Package:Unknown/Other Function
 Operating System:   Ubuntu 12.04 LTS 32 bits
-PHP Version:5.3.18
+PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

updated version; 5.3.10 is the most recent version in Ubuntu.


Previous Comments:

[2012-11-16 00:46:13] lmpmbernardo at gmail dot com

Description:

zend_parse_parameters is having trouble parsing this signature: s|ssbs; the 
error happens with the last "bs" arguments. the signature "ssbs" works well.

~$ php -v
PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 19:00:43) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies


Test script:
---
PHP_FUNCTION(test_parse_parameters) {
  char *p_str1 = "";
  int p_str1_len;
  char *p_str2 = "";
  int p_str2_len;
  char *p_str3 = "";
  int p_str3_len;
  zend_bool b = 0;

  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ssbs", &p_str1, 
&p_str1_len, &p_str2,
  &p_str2_len, &b, &p_str3, &p_str3_len) == FAILURE) {
return;
  }

  zend_error(E_WARNING, "First parameter: len[%d] value[%s]", p_str1_len, 
p_str1);
  zend_error(E_WARNING, "Second parameter: len[%d] value[%s]", p_str2_len, 
p_str2);
  zend_error(E_WARNING, "Third parameter: '%s'", b ? "TRUE" : "FALSE");
  zend_error(E_WARNING, "Fourth parameter: len[%d] value[%s]", p_str3_len, 
p_str3);

  char returnValue[256];
  char* result;
  sprintf(returnValue, "%d#%s", 0, "houston, we have a problem!");
  result = estrdup(returnValue);
  RETURN_STRING(result, 0);
}


Expected result:

lbernardo@sousel:~$ php -r 'echo test_parse_parameters("first", "second", 
FALSE, "fourth");'
PHP Warning:  First parameter: len[5] value[first] in Command line code on line 
1
PHP Warning:  Second parameter: len[6] value[second] in Command line code on 
line 1
PHP Warning:  Third parameter: 'FALSE' in Command line code on line 1
PHP Warning:  Fourth parameter: len[6] value[fourth] in Command line code on 
line 1
0#houston, we have a problem!


Actual result:
--
lbernardo@sousel:~$ php -r 'echo test_parse_parameters("first", "second", 
FALSE, "fourth");'
PHP Warning:  First parameter: len[5] value[first] in Command line code on line 
1
PHP Warning:  Second parameter: len[6] value[second] in Command line code on 
line 1
PHP Warning:  Third parameter: 'TRUE' in Command line code on line 1
PHP Warning:  Fourth parameter: len[769] value[(null)] in Command line code on 
line 1
0#houston, we have a problem!







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


Bug #63512 [Asn]: parse_ini_file() with INI_SCANNER_RAW removes quotes from value.

2012-11-15 Thread pierrick
Edit report at https://bugs.php.net/bug.php?id=63512&edit=1

 ID: 63512
 Updated by: pierr...@php.net
 Reported by:arjen at react dot com
 Summary:parse_ini_file() with INI_SCANNER_RAW removes quotes
 from value.
 Status: Assigned
 Type:   Bug
 Package:Filesystem function related
 Operating System:   All
 PHP Version:5.3.18
 Assigned To:pierrick
 Block user comment: N
 Private report: N

 New Comment:

Current status is : 
- we can't as suggested keep all " to make a "real" raw, because of BC
- we can't remove all the quotes would not make sense for some cases like
  c = "waa" INSTALL_ROOT
- we need to fix the bug where c="foo;bar" will result in c="foo (This is why 
the 
commit causing the current bug was first made)

So I think this patch is the best one for the moment since it fix the original 
bug, and keep the old behaviour to keep BC.


Previous Comments:

[2012-11-15 13:39:18] larue...@php.net

codes looks fine, and new comment coming :)
thanks


[2012-11-15 13:32:23] arjen at react dot com

With this patch, the old behaviour is restored. But the "eat leading and 
trailing quotes" does 
not make sense..

var_dump(parse_ini_string('waa = "string" CONSTANT "anotherString"', false, 
INI_SCANNER_RAW));

5.3.18 (wrong):
array(1) {
  ["waa"]=>
  string(29) "string CONSTANT anotherString"
}

with patch (behaviour like in versions < 5.3.15)

array(1) {
  ["waa"]=>
  string(29) "string" CONSTANT "anotherString"
}


Now string appears to be the constant, and CONSTANT a quoted string..

expected/better:
array(1) {
  ["waa"]=>
  string(29) ""string" CONSTANT "anotherString""
}

So IHMO remove this whole trim quotes thingy.


[2012-11-15 04:46:29] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v3.diff
Revision:   1352954789
URL:
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v3.diff&revision=1352954789


[2012-11-15 04:45:54] pierr...@php.net

I created a patch for this bug (which also fix #62884).

Could you make a quick code review before I commit it ? 

Thanks


[2012-11-15 04:12:53] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v2.diff
Revision:   1352952773
URL:
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v2.diff&revision=1352952773




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=63512


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


Bug #40837 [Com]: static and non-static functions can't have the same name

2012-11-15 Thread jpmarois at hotmail dot com
Edit report at https://bugs.php.net/bug.php?id=40837&edit=1

 ID: 40837
 Comment by: jpmarois at hotmail dot com
 Reported by:nick dot telford at gmail dot com
 Summary:static and non-static functions can't have the same
 name
 Status: Not a bug
 Type:   Bug
 Package:Class/Object related
 Operating System:   Irrelevant
 PHP Version:5.2.1
 Block user comment: N
 Private report: N

 New Comment:

ahar...@php.net:

Sure, go Microsoft's way and move forward by staying behind for the sake of 
"compatibility".

Please explain why, "As of PHP 5.3.3, methods with the same name as the last 
element of a namespaced class name will no longer be treated as constructor.". 
If 
PHP wont even initialize a "compatible" PHP 4 class anymore, how is it relevant 
to 
preserve instance methods being called statically?


Previous Comments:

[2012-09-11 01:59:54] ahar...@php.net

It breaks compatibility with any PHP 4 compatible code that uses static method 
calls. That's (obviously) less important than it once was, but there's still 
plenty of legacy code out there.


[2012-09-10 15:29:23] mac at macnewbold dot com

ahar...@php.net :

What would the impacts be of deprecating static calls to non-static methods? 
They would seem to not make much sense, since any uses of $this inside the 
method (which would be pretty typical since it is a non-static method) would 
fail with "Fatal error: Using $this when not in object context". What is the 
value of being able to attempt a static call on a non-static method?


[2012-09-10 03:00:14] ahar...@php.net

For the record, there's no way this can be implemented as it stands: for 
backward compatibility reasons, instance methods can be called statically, so 
the name has to be distinct to disambiguate between static and instance 
methods. The call type is not enough.


[2012-09-07 22:33:55] accounts dot php at nickawilliams dot com

I also support this proposal. On numerous occasions throughout my career 
writing 
PHP I have found a need for this. While there are workarounds that work, they 
are 
all fairly verbose, convoluted, and/or difficult to follow. Please consider 
reopening this!


[2012-08-04 00:46:35] billco at fnarg dot com

Same here!  This is a very useful pattern in other languages, where the same 
method name can be used in both static and non-static contexts.

For example, a search() method in static context could create a new result 
object, while the non-static form would search within an existing result set.

While it is possible to mimic this sort of behaviour by first creating a 
"blank" object, it leads to dual-purpose methods (a big "if" statement), 
resulting in messy, unmaintainable code.  Why arbitrarily force developers to 
violate good OOP practices ?




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=40837


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


[PHP-BUG] Req #63534 [NEW]: new php.ini flag disable_remote_download

2012-11-15 Thread thbley at gmail dot com
From: thbley at gmail dot com
Operating system: any
PHP version:  5.5.0alpha1
Package:  *Configuration Issues
Bug Type: Feature/Change Request
Bug description:new php.ini flag disable_remote_download

Description:

Disable downloading content only from remote computers:

disable_remote_download = On|Off
(default: On?)

disable_remote_download = On forbids fopen("http://www.php.net/";, "r"); or
fopen("http://69.147.83.199/";, "r"); or the IPv6 equivalent

disable_remote_download = On allows fopen("http://localhost/";, "r"); or
fopen("http://127.0.0.1/";, "r"); or the IPv6 equivalent

affects: url-fopen-wrappers, (p)fsockopen, socket_bind, curl extension,
imap extension, others?


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



Bug #63532 [Opn->Spm]: omar

2012-11-15 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=63532&edit=1

 ID: 63532
 Updated by: ras...@php.net
 Reported by:omar9...@php.net
 Summary:omar
-Status: Open
+Status: Spam
 Type:   Bug
 Package:PDO related
 Operating System:   php
 PHP Version:5.5.0alpha1
 Block user comment: N
 Private report: N



Previous Comments:

[2012-11-15 20:55:07] omar9...@php.net

Description:

---
>From manual page: http://www.php.net/function.openssl-free-key#refsect1-
function.openssl-free-key-description
---


Test script:
---
omar ali hp .com

Expected result:

NO OMAR

Actual result:
--
NO ALI






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


[PHP-BUG] Req #63533 [NEW]: new php.ini flag disable_execute

2012-11-15 Thread thbley at gmail dot com
From: thbley at gmail dot com
Operating system: all
PHP version:  5.5.0alpha1
Package:  *Configuration Issues
Bug Type: Feature/Change Request
Bug description:new php.ini flag disable_execute

Description:

add new flag to php.ini:
disable_execute = On|Off
(default: On?)

which is the same as:
disable_functions =
exec,shell_exec,passthru,system,popen,proc_open,pcntl_exec

=> make secure configuration easier


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



[PHP-BUG] Bug #63532 [NEW]: omar

2012-11-15 Thread omar9...@php.net
From: omar9...@php.net
Operating system: php
PHP version:  5.5.0alpha1
Package:  PDO related
Bug Type: Bug
Bug description:omar

Description:

---
>From manual page: http://www.php.net/function.openssl-free-key#refsect1-
function.openssl-free-key-description
---


Test script:
---
omar ali hp .com

Expected result:

NO OMAR

Actual result:
--
NO ALI

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



Bug #50300 [Com]: PHP Warning: Error while sending QUERY packet

2012-11-15 Thread sokolukasz2 at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=50300&edit=1

 ID: 50300
 Comment by: sokolukasz2 at gmail dot com
 Reported by:tejas dot net+php at gmail dot com
 Summary:PHP Warning:  Error while sending QUERY packet
 Status: Not a bug
 Type:   Bug
 Package:MySQL related
 Operating System:   CentOS v5
 PHP Version:5.3.1
 Block user comment: N
 Private report: N

 New Comment:

I have this warning when im starting new transaction after when i loast 
connection and reconnect to server again on error 2006(gone)


Previous Comments:

[2012-02-25 17:25:00] noostroi at gmail dot com

I got this error when trying to store a file as a BLOB that was 
larger than the SQL query limit within MySQL.

It was set to 1Mb (the default, afaik), and I was uploading a 
2Mb file. 
Uploading a smaller sized file was working for me, which prompted 
me to investigate size limits.

Upping the limit to a suitable value (e.g. 10Mb) fixed the issue.

Exact setting that I changed was max_allowed_packet in /etc/my.cnf 
in the [mysqld] section. (MySQL version: 5.5.21, php version: 5.2.3
 (whatever came as default in Mac Snow Leopard) )

(Adding this info here, now, as I was linked to this page from 
the first page on a google search for the error text.)


[2009-12-11 22:36:17] j...@php.net

Yep.


[2009-12-11 14:41:59] tejas dot net+php at gmail dot com

I guess this is a legitimate warning thrown by PHP.

After some debugging, I found that this happens if the connection is lost (my 
DB layer class normally does a mysql_ping to restore it, which is why I dont 
see any side-effects)


[2009-11-26 10:08:53] ka...@php.net

Any chance you can log a possible query that might generate this warning? Along 
with the MySQL server version.

When replying, then change the status back to Open


[2009-11-25 21:17:56] tejas dot net+php at gmail dot com

Description:

When using the mysql_* functions (mysqlnd), I sometimes get a warning 
like:

PHP Warning:  Error while sending QUERY packet. PID=16717 in [FILE] on 
line [LINE]

The query seems to work just fine however.

Probably related to this bug here: http://bugs.php.net/bug.php?id=49761
but I'm not using Mysqli or persistent connections.

FILE:LINE contains: return mysql_query( $sql, $this->_connection );

Is this a bug?








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


[PHP-BUG] Bug #63531 [NEW]: pdo_mysql test fails with unexpected MYSQL_ATTR_SERVER_PUBLIC_KEY constant

2012-11-15 Thread google...@php.net
From: googleguy
Operating system: linux
PHP version:  5.5.0alpha1
Package:  Testing related
Bug Type: Bug
Bug description:pdo_mysql test fails with unexpected 
MYSQL_ATTR_SERVER_PUBLIC_KEY constant

Description:

The ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt fails in 5.5.0
Alpha1 with 
unexpected class constant MYSQL_ATTR_SERVER_PUBLIC_KEY


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



[PHP-BUG] Bug #63530 [NEW]: mysqlnd_stmt::bind_one_parameter uses wrong alloc for stmt->param_bind

2012-11-15 Thread geoff at lollywollydoodle dot com
From: geoff at lollywollydoodle dot com
Operating system: OS X 10.8.2
PHP version:  5.3.18
Package:  MySQL related
Bug Type: Bug
Bug description:mysqlnd_stmt::bind_one_parameter uses wrong alloc for 
stmt->param_bind

Description:

This issue is specific to PDO, mysqlnd, PDO::ATTR_EMULATE_PREPARES =>
false, and 
PDO::ATTR_PERSISTENT => true.

When you run a prepared statement with parameters this way, PHP crashes.

My fix is essentially the same as the one for bug 61411 but just in a
different 
function.  I browsed around git for at some other HEADs including master
and it 
looks like this issue is still there in all of them.

Test script:
---
$dbh = new PDO('mysql:host=' . DBHOST . ';dbname=' . DBDATA, DBUSER,
DBPASS,
array(PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_PERSISTENT 
=>
true));
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$s = $dbh->prepare('select * from t where id = :id limit 1');
$s->execute(array(':id' => 1));

$r = $s->fetch(PDO::FETCH_ASSOC);

Expected result:

Script to not crash, result set to be available

Actual result:
--
PHP crashes (php-cgi or httpd process).


#0  0x7fff89a4a558 in malloc_error_break ()
#1  0x7fff89a4b912 in free ()
#2  0x00010a874c00 in _mysqlnd_pefree (ptr=0x103, persistent=1 '\001')
at 
mysqlnd_debug.c:1062
#3  0x00010a876107 in php_mysqlnd_stmt_free_stmt_content_pub 
(s=0x7fdb94bf44d0) at mysqlnd_ps.c:2114
#4  0x00010a877023 in php_mysqlnd_stmt_net_close_priv
(s=0x7fdb94bf44d0, 
implicit=33 '!') at mysqlnd_ps.c:2209
#5  0x00010a875f6e in php_mysqlnd_stmt_dtor_pub (s=0x103, implicit=0
'\0') 
at mysqlnd_ps.c:2236
#6  0x00010a756233 in pdo_mysql_stmt_dtor (stmt=0x10ae7f438) at 
mysql_statement.c:64
#7  0x00010a7503a5 in free_statement (stmt=0x103) at pdo_stmt.c:2406
#8  0x00010a8f0041 in zend_objects_store_del_ref_by_handle_ex
(handle=259, 
handlers=0x10af16000) at zend_objects_API.c:220
#9  0x00010a8f00fa in zend_objects_store_del_ref (zobject=0x10b122100)
at 
zend_objects_API.c:173
#10 0x00010a8c46da in _zval_dtor [inlined] () at /Users/geoff/php-
5.3.17/Zend/zend_variables.h:35
#11 0x00010a8c46da in _zval_ptr_dtor (zval_ptr=0x103) at 
zend_variables.h:447
#12 0x00010a9354dd in zend_leave_helper_SPEC (execute_data=0x103) at 
zend_vm_execute.h:160
#13 0x00010a934b31 in execute (op_array=0x103) at
zend_vm_execute.h:107
#14 0x00010a8c5af5 in zend_call_function (fci=0x7fff55971af8) at 
zend_execute_API.c:969
#15 0x00010a8072f6 in zif_call_user_func_array (ht=259, 
return_value=0x10b1214d0, return_value_ptr=0x1000, this_ptr=0x7fff8a0f45de,

return_value_used=0) at basic_functions.c:4814
#16 0x00010a934439 in zend_do_fcall_common_helper_SPEC
(execute_data=0x103) 
at zend_vm_execute.h:320
#17 0x00010a934b31 in execute (op_array=0x10b041508) at 
zend_vm_execute.h:107
#18 0x00010a8c5af5 in zend_call_function (fci=0x7fff55971d98) at 
zend_execute_API.c:969
#19 0x00010a8072f6 in zif_call_user_func_array (ht=184816904, 
return_value=0x10b12a6e8, return_value_ptr=0x1000, this_ptr=0x7fff8a0f45de,

return_value_used=0) at basic_functions.c:4814
#20 0x00010a934439 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x10b041508) at zend_vm_execute.h:320
#21 0x00010a934b31 in execute (op_array=0x10b040fa0) at 
zend_vm_execute.h:107
#22 0x00010a8cf878 in zend_execute_scripts (type=8,
retval=0x7fff55972010, 
file_count=1435967504) at zend.c:1236
#23 0x00010a87db02 in php_execute_script (primary_file=0x7fff559726b8)
at 
main.c:2308
#24 0x00010a949c90 in php_handler (r=0x10b040fa0) at
sapi_apache2.c:669
#25 0x00010a28ee8d in ap_run_handler ()
#26 0x00010a28f592 in ap_invoke_handler ()
#27 0x00010a2c4e44 in ap_internal_redirect ()
#28 0x00010a5e2d65 in handler_redirect ()
#29 0x00010a28ee8d in ap_run_handler ()
#30 0x00010a28f592 in ap_invoke_handler ()
#31 0x00010a2c4efb in ap_process_request ()
#32 0x00010a2c1043 in ap_process_http_connection ()
#33 0x00010a2a40ad in ap_run_process_connection ()
#34 0x00010a2a465b in ap_process_connection ()
#35 0x00010a2ceeec in child_main ()
#36 0x00010a2cd99e in make_child ()
#37 0x00010a2cda50 in startup_children ()
#38 0x00010a2ccb1f in ap_mpm_run ()
#39 0x00010a297b12 in main ()

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63530&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63530&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63530&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=63530&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=63530&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=63530&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63530&r=needtrace
Need Reproduce Script:  https://bugs

Bug #63520 [Sus]: JSON extension includes a problematic license statement

2012-11-15 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=63520&edit=1

 ID: 63520
 Updated by: ras...@php.net
 Reported by:kaplan at debian dot org
 Summary:JSON extension includes a problematic license
 statement
 Status: Suspended
 Type:   Bug
 Package:JSON related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

I am not saying it isn't a tricky license clause to deal with and it would be 
better if it wasn't there. However, I am also not keen on spending resources on 
rewriting code for this reason. If someone supplies a functionally equivalent 
replacement, we will have a look at it. But as far as I am concerned, license-
wise the terms Good and Evil are not legal terms. These are more subjective 
self-describing terms and since I deem PHP's use of the code as "Good" then we 
comply with the license. Could others perhaps use PHP and thus the code for 
"Evil" and therefore not comply with the license? Sure, but there are many 
things people can do with our code that is either against the various licenses 
involved or even illegal criminally. It is something we cannot control.


Previous Comments:

[2012-11-15 18:01:24] paj...@php.net

More seriously, as soon as the license is changed upstream, we will merge it. 
But 
we won't be able to do anything before.


[2012-11-15 18:00:52] paj...@php.net

well, the FSF does not like the PHP license either. Nothing worries me here :)


[2012-11-15 17:58:38] ansgar at debian dot org

I just want to note that the FSF[1] and other distributions like Fedora also 
think this license is bad[2].

  [1] 
  [2] , look for 
"JSON License"

So this is not a problem for just Debian.

Ansgar


[2012-11-15 07:39:35] ras...@php.net

Sorry, I don't see us ripping out and rewriting the json code due to this.


[2012-11-15 07:30:01] kaplan at debian dot org

On Wed, Nov 14, 2012 at 10:06 PM, Douglas Crockford  
wrote:
> The license looks fine to me.

So he refuses politely... which means it's time for PHP.net to think about this 
license issue (e.g. use a different implementation for JSON).

And you're right, it's *also* problem in Debian, and we talk to the different 
upstream projects, trying to resolve the issue with each of them, but that's 
still a problem of the upstream itself.




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=63520


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


Req #63526 [Com]: get_class(): New parameter to allow stripping of namespace

2012-11-15 Thread ni...@php.net
Edit report at https://bugs.php.net/bug.php?id=63526&edit=1

 ID: 63526
 Comment by: ni...@php.net
 Reported by:alex at arcomit dot co dot uk
 Summary:get_class(): New parameter to allow stripping of
 namespace
 Status: Open
 Type:   Feature/Change Request
 Package:Class/Object related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

Seems unnecessary to me, especially as you can always do (new 
ReflectionObject($obj))->getShortName().


Previous Comments:

[2012-11-15 11:38:12] alex at arcomit dot co dot uk

Description:

Add a new parameter to get_class so it can return the class with the namespace 
removed.

string get_class ([ object $object = NULL ] , [ bool $stripNamespace = FALSE ] )







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


Bug #63520 [Sus]: JSON extension includes a problematic license statement

2012-11-15 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=63520&edit=1

 ID: 63520
 Updated by: paj...@php.net
 Reported by:kaplan at debian dot org
 Summary:JSON extension includes a problematic license
 statement
 Status: Suspended
 Type:   Bug
 Package:JSON related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

More seriously, as soon as the license is changed upstream, we will merge it. 
But 
we won't be able to do anything before.


Previous Comments:

[2012-11-15 18:00:52] paj...@php.net

well, the FSF does not like the PHP license either. Nothing worries me here :)


[2012-11-15 17:58:38] ansgar at debian dot org

I just want to note that the FSF[1] and other distributions like Fedora also 
think this license is bad[2].

  [1] 
  [2] , look for 
"JSON License"

So this is not a problem for just Debian.

Ansgar


[2012-11-15 07:39:35] ras...@php.net

Sorry, I don't see us ripping out and rewriting the json code due to this.


[2012-11-15 07:30:01] kaplan at debian dot org

On Wed, Nov 14, 2012 at 10:06 PM, Douglas Crockford  
wrote:
> The license looks fine to me.

So he refuses politely... which means it's time for PHP.net to think about this 
license issue (e.g. use a different implementation for JSON).

And you're right, it's *also* problem in Debian, and we talk to the different 
upstream projects, trying to resolve the issue with each of them, but that's 
still a problem of the upstream itself.


[2012-11-14 19:51:02] kaplan at debian dot org

I wasn't aware for having non php.net developers involved in the code, 
otherwise I wouldn't asked just to remove that paragraph but to resolve the 
issue with upstream, which is what I'm trying to do.

Your licensing policy is what we all do, no need to defend it (:

Anyway, thanks for the fast responses.




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=63520


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


Bug #63520 [Sus]: JSON extension includes a problematic license statement

2012-11-15 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=63520&edit=1

 ID: 63520
 Updated by: paj...@php.net
 Reported by:kaplan at debian dot org
 Summary:JSON extension includes a problematic license
 statement
 Status: Suspended
 Type:   Bug
 Package:JSON related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

well, the FSF does not like the PHP license either. Nothing worries me here :)


Previous Comments:

[2012-11-15 17:58:38] ansgar at debian dot org

I just want to note that the FSF[1] and other distributions like Fedora also 
think this license is bad[2].

  [1] 
  [2] , look for 
"JSON License"

So this is not a problem for just Debian.

Ansgar


[2012-11-15 07:39:35] ras...@php.net

Sorry, I don't see us ripping out and rewriting the json code due to this.


[2012-11-15 07:30:01] kaplan at debian dot org

On Wed, Nov 14, 2012 at 10:06 PM, Douglas Crockford  
wrote:
> The license looks fine to me.

So he refuses politely... which means it's time for PHP.net to think about this 
license issue (e.g. use a different implementation for JSON).

And you're right, it's *also* problem in Debian, and we talk to the different 
upstream projects, trying to resolve the issue with each of them, but that's 
still a problem of the upstream itself.


[2012-11-14 19:51:02] kaplan at debian dot org

I wasn't aware for having non php.net developers involved in the code, 
otherwise I wouldn't asked just to remove that paragraph but to resolve the 
issue with upstream, which is what I'm trying to do.

Your licensing policy is what we all do, no need to defend it (:

Anyway, thanks for the fast responses.


[2012-11-14 19:49:50] ras...@php.net

Well, I think you will find that code from json.org is in a lot of packages 
Debian ships. This isn't a PHP-Debian issue, this is a Debian-json.org issue 
for 
you guys to work out.




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=63520


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


Bug #63520 [Com]: JSON extension includes a problematic license statement

2012-11-15 Thread ansgar at debian dot org
Edit report at https://bugs.php.net/bug.php?id=63520&edit=1

 ID: 63520
 Comment by: ansgar at debian dot org
 Reported by:kaplan at debian dot org
 Summary:JSON extension includes a problematic license
 statement
 Status: Suspended
 Type:   Bug
 Package:JSON related
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

I just want to note that the FSF[1] and other distributions like Fedora also 
think this license is bad[2].

  [1] 
  [2] , look for 
"JSON License"

So this is not a problem for just Debian.

Ansgar


Previous Comments:

[2012-11-15 07:39:35] ras...@php.net

Sorry, I don't see us ripping out and rewriting the json code due to this.


[2012-11-15 07:30:01] kaplan at debian dot org

On Wed, Nov 14, 2012 at 10:06 PM, Douglas Crockford  
wrote:
> The license looks fine to me.

So he refuses politely... which means it's time for PHP.net to think about this 
license issue (e.g. use a different implementation for JSON).

And you're right, it's *also* problem in Debian, and we talk to the different 
upstream projects, trying to resolve the issue with each of them, but that's 
still a problem of the upstream itself.


[2012-11-14 19:51:02] kaplan at debian dot org

I wasn't aware for having non php.net developers involved in the code, 
otherwise I wouldn't asked just to remove that paragraph but to resolve the 
issue with upstream, which is what I'm trying to do.

Your licensing policy is what we all do, no need to defend it (:

Anyway, thanks for the fast responses.


[2012-11-14 19:49:50] ras...@php.net

Well, I think you will find that code from json.org is in a lot of packages 
Debian ships. This isn't a PHP-Debian issue, this is a Debian-json.org issue 
for 
you guys to work out.


[2012-11-14 19:47:35] kaplan at debian dot org

Mail sent, thanks. Hope he will help to solve this. Otherwise we should think 
of a plan b.




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=63520


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


Bug #63486 [Opn]: mysqli_free_result leave the resource variable in a messy state

2012-11-15 Thread uw
Edit report at https://bugs.php.net/bug.php?id=63486&edit=1

 ID: 63486
 Updated by: u...@php.net
 Reported by:der...@php.net
 Summary:mysqli_free_result leave the resource variable in a
 messy state
 Status: Open
 Type:   Bug
 Package:MySQLi related
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

Derick, thanks a lot for the patch. All three of us MySQL guys are at a team 
meeting. We will fly back home tomorrow morning. We can have a look once home 
and no more tired (flight goes at 6:xx am).


Previous Comments:

[2012-11-11 12:53:01] der...@php.net

The following patch has been added/updated:

Patch Name: mysqli-clear-result-cleanup
Revision:   1352638381
URL:
https://bugs.php.net/patch-display.php?bug=63486&patch=mysqli-clear-result-cleanup&revision=1352638381


[2012-11-11 12:52:02] der...@php.net

Description:

An Xdebug user filed the following report: 
http://bugs.xdebug.org/view.php?id=900

I've just investigated this, and found out that this is something I can't fix 
in Xdebug. mysqli_free_result() destroys the internal object, but leaves the 
resource (in your case, $rs) in a silly state. All Xdebug does internally is 
basically a var_dump( $rs ), and after it is freed with mysqli_free_result(), 
that throws exactly the same error (without Xdebug). This can however, easily 
be fixed in the MySQLi extension with the attached patch. The patch applies to 
PHP 5.4, but this also a problem in master and PHP 5.3. It is also possible, 
that other mysqli_free_* functions can benefit from a similar construct.

Test script:
---



Expected result:

The expected result is perhaps something like "NULL" (which my patch makes it 
do).

Actual result:
--
hi mom
Warning: var_dump(): Couldn't fetch mysqli_result in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Couldn't fetch mysqli_result in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Property access is not allowed yet in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Couldn't fetch mysqli_result in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10


Warning: var_dump(): Property access is not allowed yet in 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php on line 10

Call Stack:
0.0002 662616   1. {main}() 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:0
0.0032 672792   2. var_dump(class mysqli_result { public $current_field 
= NULL; public $field_count = NULL; public $lengths = NULL; public $num_rows = 
NULL; public $type = NULL }) 
/home/derick/dev/php/derickr-xdebug/tests/bug00900.php:10

class mysqli_result#2 (5) {
  public $current_field =>
  NULL
  public $field_count =>
  NULL
  public $lengths =>
  NULL
  public $num_rows =>
  NULL
  public $type =>
  NULL
}







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


Bug #63528 [Com]: Generators crash on Zend\tests\generators\clone_with_stack.phpt

2012-11-15 Thread a...@php.net
Edit report at https://bugs.php.net/bug.php?id=63528&edit=1

 ID: 63528
 Comment by: a...@php.net
 Reported by:a...@php.net
 Summary:Generators crash on
 Zend\tests\generators\clone_with_stack.phpt
 Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   Windows
 PHP Version:5.5Git-2012-11-15 (Git)
 Block user comment: N
 Private report: N

 New Comment:

Btw. there are no valgrind complains on Linux for this test.


Previous Comments:

[2012-11-15 14:35:20] a...@php.net

Description:

Both TS and NTS crash. On a debug build VS gives the following error:

Unhandled exception at 0x102D369E (php5ts_debug.dll) in php.exe: 0xC005: 
Access violation reading location 0x5A5A5A56.

and the debugger stops in zend_execute.h:337 (second line in 
zend_vm_stack_clear_multiple()). 

Here is the corresponding BT:

php5ts_debug.dll!zend_vm_stack_clear_multiple(void * * * tsrm_ls) Line 
337  C
php5ts_debug.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * 
execute_data, void * * * tsrm_ls) Line 736   C
php5ts_debug.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data 
* execute_data, void * * * tsrm_ls) Line 879 C
php5ts_debug.dll!execute_ex(_zend_execute_data * execute_data, void * * 
* tsrm_ls) Line 436 C
php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls) 
Line 461C
php5ts_debug.dll!zend_execute_scripts(int type, void * * * tsrm_ls, 
_zval_struct * * retval, int file_count, ...) Line 1309 C
php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file, 
void * * * tsrm_ls) Line 2468 C
php.exe!do_cli(int argc, char * * argv, void * * * tsrm_ls) Line 988
C
php.exe!main(int argc, char * * argv) Line 1364 C
php.exe!__tmainCRTStartup() Line 582C
php.exe!mainCRTStartup() Line 399   C
kernel32.dll!76971866() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for 
kernel32.dll]  
ntdll.dll!770668f1()Unknown
ntdll.dll!7706689d()Unknown
 

Test script:
---
Zend\tests\generators\clone_with_stack.phpt

Expected result:

Test diff:

001+
001- string(10) "xx"

Actual result:
--
test pass






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


Req #63525 [Opn->Nab]: php5.4.8 connecting to mysql is slower then php5.2.6

2012-11-15 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=63525&edit=1

 ID: 63525
 Updated by: ras...@php.net
 Reported by:admin at wudimei dot com
 Summary:php5.4.8 connecting to mysql is slower then php5.2.6
-Status: Open
+Status: Not a bug
 Type:   Feature/Change Request
 Package:MySQL related
 Operating System:   windows 7
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

You said you used 127.0.0.1 but your code clearly shows "localhost". Windows is 
probably trying to use ipv6 for "localhost" first and MySQL isn't listening on 
::1 so it has to time out there first before trying 127.0.0.1. You can either 
fix 
your Hosts file and remove ::1 (probably a bad idea) or simply use 127.0.0.1 in 
your code.


Previous Comments:

[2012-11-15 12:11:34] yangqingrong at wudimei dot com

i edited the code like this:

connect to mysql take ". (microtime(true ) - $a); echo " 
seconds"; 
 phpinfo();
 
?>


to see the result,copy the url below and paste it to the address bar of browser:

http://www.wudimei.com/data/YangQingrong/php5.2.6.jpg
http://www.wudimei.com/data/YangQingrong/php5.4.8.jpg


[2012-11-15 11:59:54] admin at wudimei dot com

i use ip,not localhost.
http://127.0.0.18/wudimei_show/admin_S2D3L56N8K5L/component_types.php?act=index


[2012-11-15 09:37:35] and...@php.net

Can you try 127.0.0.1 instead of localhost and report the connect time?


[2012-11-15 09:09:19] admin at wudimei dot com

Description:

php5.4.8 connecting to mysql is slower then php5.2.8

i use php5.4.8 to connect the mysql,it's slow!it take about 1.0138568878174 
seconds.
then i switch to php5.2.6 ,it only take 0.00234985351562 seconds.

please improve it
thank you!

yang qingrong

Test script:
---


php5.4.8 output:

Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
1.0138568878174 seconds

php 5.2.6 output
Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
0.00234985351562 seconds







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


Req #52657 [Com]: create a spl_object_id function

2012-11-15 Thread maciej dot sz at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=52657&edit=1

 ID: 52657
 Comment by: maciej dot sz at gmail dot com
 Reported by:marco dot weber at uni-trier dot de
 Summary:create a spl_object_id function
 Status: Open
 Type:   Feature/Change Request
 Package:SPL related
 Operating System:   ANY
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

@rasmus at mindplay dot dk: the thing is PHP already creates internal unique 
index for each instantiated object. The requested spl_object_id() function 
would only have to return it. You may have seen the value of this variable 
while debugging your scripts. Have you not noticed the overhead? ;) Just 
kidding.

Anyway, your idea for workaround seemed reasonable to me, and now thanks to the 
traits in 5.4 I'm able to apply this unique object id to every class that I 
need. Just use the below trait. It is also immune to the __get/__set issue. The 
downside of this is that the id is a string containing class name. But if I'd 
need an id that is unique only within a specific class scope I can use integer 
value without the class name:

__oid__ ) {
$this->__oid__ = __CLASS__ . '\\' . $__object_index++;
}
return $this->__oid__;
}
}


Previous Comments:

[2011-06-13 14:28:07] rasmus at mindplay dot dk

I don't think attaching a serial number to every object from the get-go is a 
good 
approach, since this will add overhead (memory and CPU) for every object 
constructed. Objects are relatively lightweight in PHP, and sacrificing that 
for a 
feature that is probably less commonly used, to me, is unacceptable.

What I would propose, is to assign a serial number the first time you access an 
object - something along the lines of this:

  public function object_serial($object)
  {
static $next_sn = 1;

if (!isset($object->__sn__))
  $object->__sn__ = $next_sn++;

return $object->__sn__;
  }

You don't need to keep a serial-number in-memory until it's actually needed, 
and 
at that point, we'll just check and see if it already has an assigned serial-
number.

This is much simpler and easier on system-resources - the serial number is much 
lighter than the 32-character hash, and will work just as well. And since 
you're 
most likely going to use this value as index in an array, hash indexes will 
take 
up less memory, and lookups will probably be cheaper too.

Unfortunately the PHP version of this collides with the magic __set() method, 
which is why the function shown above won't always work.

If there were a way to go around the __get() and __set() methods, and directly 
access the properties of an object without colliding with these magic methods, 
that would probably be an even better solution. I would consider such a feature 
as 
belonging to the reflection domain - something like 
ReflectionObject::getValue($object, $name) and 
ReflectionObject::setValue($object, 
$name, $value) would do the trick.

(this would probably have other uses too, so perhaps that's an even better 
solution to this problem, seeing as how implementing your own object_serial() 
method is literally only a few lines of code...)


[2011-06-13 10:44:11] marco dot weber at uni-trier dot de

i know, that there is nothing wrong with that method, as it does exactly, what 
the documentation says. Nevertheless, it would be great to have another 
function like spl_object_id(), that generates unique ids...

Quotation from  [2010-08-20 15:34 UTC] marco dot weber at uni-trier dot de :
Since there is nothing wrong, with the spl_object_hash() method, i suggest to 
introduce a new spl_object_id() function. This could simply return an 
(internal) uint32, that is attached to every object on its creation. This 
counter gets incremented on every object that gets created. :)


[2011-06-13 04:18:41] rasmus at mindplay dot dk

I agree, this is a vital feature.

Also, the description of spl_object_hash() in the documentation is highly 
misleading:

"This function returns a unique identifier for the object. This id can be used 
as a hash key for storing objects or for identifying an object."

It does NOT always return a unique identifier, not even within a single running 
script. And it CANNOT be used as a key for storing objects, neither can it be 
used to identify an object. In fact, in the footnote, it basically says so:

"When an object is destroyed, its hash may be reused for other objects."

That fact precludes the uses mentioned in the first part of the documentation.

I don't know what the intended use of that function is. It seems like it was an 
attempt to provide the functionality described in the first part of the 
documentation, 

[PHP-BUG] Bug #63528 [NEW]: Generators crash on Zend\tests\generators\clone_with_stack.phpt

2012-11-15 Thread a...@php.net
From: ab
Operating system: Windows
PHP version:  5.5Git-2012-11-15 (Git)
Package:  *General Issues
Bug Type: Bug
Bug description:Generators crash on Zend\tests\generators\clone_with_stack.phpt

Description:

Both TS and NTS crash. On a debug build VS gives the following error:

Unhandled exception at 0x102D369E (php5ts_debug.dll) in php.exe:
0xC005: Access violation reading location 0x5A5A5A56.

and the debugger stops in zend_execute.h:337 (second line in
zend_vm_stack_clear_multiple()). 

Here is the corresponding BT:

php5ts_debug.dll!zend_vm_stack_clear_multiple(void * * * tsrm_ls) Line
337 C
php5ts_debug.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data *
execute_data, void * * * tsrm_ls) Line 736  C
php5ts_debug.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data *
execute_data, void * * * tsrm_ls) Line 879  C
php5ts_debug.dll!execute_ex(_zend_execute_data * execute_data, void * * 
*
tsrm_ls) Line 436   C
php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls)
Line 461C
php5ts_debug.dll!zend_execute_scripts(int type, void * * * tsrm_ls,
_zval_struct * * retval, int file_count, ...) Line 1309 C
php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file,
void * * * tsrm_ls) Line 2468   C
php.exe!do_cli(int argc, char * * argv, void * * * tsrm_ls) Line 988
C
php.exe!main(int argc, char * * argv) Line 1364 C
php.exe!__tmainCRTStartup() Line 582C
php.exe!mainCRTStartup() Line 399   C
kernel32.dll!76971866() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for
kernel32.dll]   
ntdll.dll!770668f1()Unknown
ntdll.dll!7706689d()Unknown
 

Test script:
---
Zend\tests\generators\clone_with_stack.phpt

Expected result:

Test diff:

001+
001- string(10) "xx"

Actual result:
--
test pass

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



Bug #63516 [Fbk->Opn]: The Process exits random with SEGV

2012-11-15 Thread dpeuscher at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63516&edit=1

 ID: 63516
 User updated by:dpeuscher at gmail dot com
 Reported by:dpeuscher at gmail dot com
 Summary:The Process exits random with SEGV
-Status: Feedback
+Status: Open
 Type:   Bug
-Package:Apache2 related
+Package:SOAP related
 Operating System:   openSUSE 11.0 (X86-64)
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

That was a great hint. I got it isolated! It seams like the problem occurs when 
the ini-option wsdl_cache is set to 3 (WSDL_CACHE_BOTH), maybe also 2 
(WSDL_CACHE_MEMORY). I 
initialized 5 WSDL-Files that are nearly empty (just to don't throw any 
exceptions like "Could not find any usable binding services in WSDL.". They all 
look like this:

http://pastebin.com/e6QBUkeh (Wasn't allowed to put it in here because of 
possible Spam)

with 5 different names. I named them s1.wsdl, ... s5.wsdl. Afterwards I 
initialized an ebay-Webservice. The test-Script looks like this:

http://pastebin.com/dWxg1qL7

Sometimes the SEGV appears after 50 calls, sometimes on the first call. It 
doesn't apper on WSDL_CACHE_DISK or WSDL_CACHE_NONE.


Previous Comments:

[2012-11-15 00:00:05] fel...@php.net

Please, try isolating the SOAP related part of code.


[2012-11-14 15:48:00] dpeuscher at gmail dot com

I know that it is important for you to replicate the bug but I really have no 
clue 
how to find the snippet that is the problem. Can you guess at which part I 
should 
take a deeper look depending on the backtrace? Or telling me the environment I 
need to analyse in gdb? Especially with the using of the Zend Framework it 
might 
be nearly impossible to get the part.
I would like to give a better example but doesn't really know how.


[2012-11-14 15:03:57] larue...@php.net

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.

thanks, could you please try to get a reproduce script? that is really 
important..


[2012-11-14 14:48:06] dpeuscher at gmail dot com

Description:

I have got a PHP-Script, that is based on the Zend Framework 1.12. It uses its 
MVC-Functionality via Zend_Application, as well as SOAP-Enginge (as Client), 
the 
Ini- and XML-Extensions for Configuration and Navigation, a Caching-Enginge 
Memcached, the Database is PDO_MYSQL over remote, Zend_Layout, Zend_View, 
Zend_Router, the ZendX-JQuery Extension, Zend_Acl, Firebug-Logger-Extension. I 
think these are the main-features of the Call, where the Segmentation Fault 
happens.

I could not figure out the part where the error happens. I tried to quit the 
script at different lines and it seams like it is always another point. 
Sometimes 
it needs 5 refreshes to reproduce the error. I tried it with a simple script, 
that 
doesn't make use of these Features and it worked fine, but also other pages, 
that 
do use these features. At this point it is impossible for me to give a code-
snippet, I will try to figure out the differences of the scripts that fail and 
those that don't.

Actual result:
--
#0  _zend_mm_free_int (heap=0x7dfb40, p=0x656c626973736f50) at /root/php-
5.4.8/Zend/zend_alloc.c:2071
#1  0x732022ca in delete_sdl_impl (handle=)
at /root/php-5.4.8/ext/soap/php_sdl.c:3427
#2  0x7334fa82 in list_entry_destructor (ptr=0xf66800) at /root/php-
5.4.8/Zend/zend_list.c:178
#3  0x7334f386 in zend_hash_del_key_or_index (ht=0x73b06eb0, 
arKey=0x0, nKeyLength=0, h=130, 
flag=) at /root/php-5.4.8/Zend/zend_hash.c:531
#4  0x7334fd49 in _zend_list_delete (id=) at 
/root/php-5.4.8/Zend/zend_list.c:57
#5  0x7333183d in _zval_ptr_dtor (zval_ptr=0x1115c00) at /root/php-
5.4.8/Zend/zend_variables.h:35
#6  0x7334c830 in zend_hash_destroy (ht=0xf65c80) at /root/php-
5.4.8/Zend/zend_hash.c:560
#7  0x7336148e in zend_object_std_dtor (object=0xf65170) at /root/php-
5.4.8/Zend/zend_objects.c:44
#8  0x73361519 in zend_objects_free_object_storage (object=0x7dfb40)
at /root/php-5.4.8/Zend/zend_objects.c:137
#9  0x73366d5c in zend_objects_store_free_object_storage 
(objects=0x73b06fe0)
at /root/php-5.4.8/Zend/zend_objects_API.c:92
#10 0x7

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

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

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

 New Comment:

As mentioned in bug #61141, curl_multi_select() returning -1 is an expected 
behaviour and you should not throw an exception which prevent your call to 
be done.

Internally php curl_multi_select uses libcurl curl_multi_fdset function to set 
all the fd_set and the maxfd value. The libcurl curl_multi_fdset 
documentation says :

When libcurl returns -1 in max_fd, it is because libcurl currently does 
something that isn't possible for your application to monitor with a socket and 
unfortunately you can then not know exactly when the current action is 
completed using select(). When max_fd returns with -1, you need to wait a while 
and then proceed and call curl_multi_perform anyway. How long to wait? I would 
suggest 100 milliseconds at least, but you may want to test it out in 
our own particular conditions to find a suitable value.

The workaround you made is not really a workaround, but is exactly what libcurl 
recommend you to do in this case :)


Previous Comments:

[2012-11-15 11:42:21] bfanger at gmail dot com

curl_multi_select() returning -1 has been an issue for windows versions of PHP 
for a while:
https://bugs.php.net/bug.php?id=61141

A workaround for my Curl wrapper class was to rewrite:

if (curl_multi_select(self::$pool, 0.2) === -1) {
   throw new \Exception('Failed to detect changes in the cURL multi handle');
}

To:

if (curl_multi_select(self::$pool, 0.2) === -1) {
   usleep(10); // wait 0.1 second
}


PS:
When are you going to introduce the new curl_multi_wait function to php?


[2012-11-15 09:30:31] bfanger at gmail dot com

It breaks all my testcases in PHP 5.4.8 (works fine in 5.4.7)

$ git clone git://github.com/sledgehammer/core.git testapp/core
$ phpunit --bootstrap testapp/core/phpunit_bootstrap.php 
testapp/core/tests/CurlTest.php


[2012-11-15 05:39:33] pierr...@php.net

Does it break all the test cases ? Or only like in your case when you have no 
handle ?


[2012-11-05 15:21:29] aa dot vasilenko at gmail dot com

This bug breaks existing libs, like Buzz https://github.com/kriswallsmith/Buzz 
, 
that relies on curl_multi_* functions. This is how I came here.


[2012-11-03 03:42:09] pierr...@php.net

I'm not sure we really want to wait 1 second for nothing in this specific case.

Furthermore, as mentioned in my commit message, when libcurl returns -1 in 
max_fd after calling curl_multi_fdset, it is because libcurl currently
does something that isn't possible for your application to monitor
with a socket and unfortunately you can then not know exactly when
the current action is completed using select().

I would personally keep the current behaviour.




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=63411


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


Bug #63512 [Asn]: parse_ini_file() with INI_SCANNER_RAW removes quotes from value.

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

 ID: 63512
 Updated by: larue...@php.net
 Reported by:arjen at react dot com
 Summary:parse_ini_file() with INI_SCANNER_RAW removes quotes
 from value.
 Status: Assigned
 Type:   Bug
 Package:Filesystem function related
 Operating System:   All
 PHP Version:5.3.18
-Assigned To:laruence
+Assigned To:pierreck
 Block user comment: N
 Private report: N

 New Comment:

codes looks fine, and new comment coming :)
thanks


Previous Comments:

[2012-11-15 13:32:23] arjen at react dot com

With this patch, the old behaviour is restored. But the "eat leading and 
trailing quotes" does 
not make sense..

var_dump(parse_ini_string('waa = "string" CONSTANT "anotherString"', false, 
INI_SCANNER_RAW));

5.3.18 (wrong):
array(1) {
  ["waa"]=>
  string(29) "string CONSTANT anotherString"
}

with patch (behaviour like in versions < 5.3.15)

array(1) {
  ["waa"]=>
  string(29) "string" CONSTANT "anotherString"
}


Now string appears to be the constant, and CONSTANT a quoted string..

expected/better:
array(1) {
  ["waa"]=>
  string(29) ""string" CONSTANT "anotherString""
}

So IHMO remove this whole trim quotes thingy.


[2012-11-15 04:46:29] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v3.diff
Revision:   1352954789
URL:
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v3.diff&revision=1352954789


[2012-11-15 04:45:54] pierr...@php.net

I created a patch for this bug (which also fix #62884).

Could you make a quick code review before I commit it ? 

Thanks


[2012-11-15 04:12:53] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v2.diff
Revision:   1352952773
URL:
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v2.diff&revision=1352952773


[2012-11-14 15:19:00] larue...@php.net

pierrick, do you have time to look at this? thanks :)




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=63512


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


Bug #63512 [Com]: parse_ini_file() with INI_SCANNER_RAW removes quotes from value.

2012-11-15 Thread arjen at react dot com
Edit report at https://bugs.php.net/bug.php?id=63512&edit=1

 ID: 63512
 Comment by: arjen at react dot com
 Reported by:arjen at react dot com
 Summary:parse_ini_file() with INI_SCANNER_RAW removes quotes
 from value.
 Status: Assigned
 Type:   Bug
 Package:Filesystem function related
 Operating System:   All
 PHP Version:5.3.18
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

With this patch, the old behaviour is restored. But the "eat leading and 
trailing quotes" does 
not make sense..

var_dump(parse_ini_string('waa = "string" CONSTANT "anotherString"', false, 
INI_SCANNER_RAW));

5.3.18 (wrong):
array(1) {
  ["waa"]=>
  string(29) "string CONSTANT anotherString"
}

with patch (behaviour like in versions < 5.3.15)

array(1) {
  ["waa"]=>
  string(29) "string" CONSTANT "anotherString"
}


Now string appears to be the constant, and CONSTANT a quoted string..

expected/better:
array(1) {
  ["waa"]=>
  string(29) ""string" CONSTANT "anotherString""
}

So IHMO remove this whole trim quotes thingy.


Previous Comments:

[2012-11-15 04:46:29] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v3.diff
Revision:   1352954789
URL:
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v3.diff&revision=1352954789


[2012-11-15 04:45:54] pierr...@php.net

I created a patch for this bug (which also fix #62884).

Could you make a quick code review before I commit it ? 

Thanks


[2012-11-15 04:12:53] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v2.diff
Revision:   1352952773
URL:
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v2.diff&revision=1352952773


[2012-11-14 15:19:00] larue...@php.net

pierrick, do you have time to look at this? thanks :)


[2012-11-14 12:14:29] arjen at react dot com

Warning: expected result and actual result are swapped! :o




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=63512


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


Bug #63527 [Com]: DCOM does not work with Username, Password parameter

2012-11-15 Thread friedrich dot grosse at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63527&edit=1

 ID: 63527
 Comment by: friedrich dot grosse at gmail dot com
 Reported by:friedrich dot grosse at gmail dot com
 Summary:DCOM does not work with Username, Password parameter
 Status: Open
 Type:   Bug
 Package:COM related
 Operating System:   Windows Server 2008 R2
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

Here are some information copied from the security event log of the target 
machine. Note that the username is just 'A' and not the wanted 'Admin':

Subject:
Security ID:NULL SID
Account Name:   -
Account Domain: -
Logon ID:   0x0

Logon Type: 3

Account For Which Logon Failed:
Security ID:NULL SID
Account Name:   A
Account Domain: Testdomain.com


Previous Comments:

[2012-11-15 13:06:53] friedrich dot grosse at gmail dot com

Description:

I try to instantiate a DCOM object on a remote machine (Windows Server 2008 R2) 
in another 
domain using the Username and Password parameters of the COM class constructor 
[1]
I did also figure out that there is a Domain parameter which is not mentioned 
in 
the manual at 
[1].

However I can not authenticate at the remote machine.
The event log there indicates that only the first character of the Logon 
Accounts Username has 
been transmitted to the DCOM Server.
The Domain parameter has been received completely.

I am not familiar with PHP internals but I did a quick look in the source code 
and would guess 
that the issue can be traced back to [2].

The user_name and user_name_len are already parsed some lines above.
Why is php_com_string_to_olestring called with a -1 as second parameter which 
leads to 
determining the length of the username again?

Maybe giving user_name_len instead of -1 could fix this issue?


[1] http://de1.php.net/manual/de/class.com.php
[2] https://github.com/php/php-src/blob/master/ext/com_dotnet/com_com.c#L131

Test script:
---
try {
  $DCOMserverInfo = array(
  'Server' => "Server.com",
  'Username' => "Admin",
  'Domain' => "Testdomain.com",
  'Password' => "password"
  );
  /** You may change the COM module name to word.application or whatever COM 
enabled app is installed on the target machine. **/
  $comObj = new COM("word.application", $DCOMserverInfo);
  echo "Everything works fine";
}
catch (Exception $exception) {
  echo exception->getMessage();
}

Expected result:

Everything works fine

Actual result:
--
Failed to create COM object `word.application': Access is denied.






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


[PHP-BUG] Bug #63527 [NEW]: DCOM does not work with Username, Password parameter

2012-11-15 Thread friedrich dot grosse at gmail dot com
From: friedrich dot grosse at gmail dot com
Operating system: Windows Server 2008 R2
PHP version:  5.4.8
Package:  COM related
Bug Type: Bug
Bug description:DCOM does not work with Username, Password parameter

Description:

I try to instantiate a DCOM object on a remote machine (Windows Server 2008
R2) 
in another 
domain using the Username and Password parameters of the COM class
constructor 
[1]
I did also figure out that there is a Domain parameter which is not
mentioned in 
the manual at 
[1].

However I can not authenticate at the remote machine.
The event log there indicates that only the first character of the Logon 
Accounts Username has 
been transmitted to the DCOM Server.
The Domain parameter has been received completely.

I am not familiar with PHP internals but I did a quick look in the source
code 
and would guess 
that the issue can be traced back to [2].

The user_name and user_name_len are already parsed some lines above.
Why is php_com_string_to_olestring called with a -1 as second parameter
which 
leads to 
determining the length of the username again?

Maybe giving user_name_len instead of -1 could fix this issue?


[1] http://de1.php.net/manual/de/class.com.php
[2]
https://github.com/php/php-src/blob/master/ext/com_dotnet/com_com.c#L131

Test script:
---
try {
  $DCOMserverInfo = array(
  'Server' => "Server.com",
  'Username' => "Admin",
  'Domain' => "Testdomain.com",
  'Password' => "password"
  );
  /** You may change the COM module name to word.application or whatever
COM enabled app is installed on the target machine. **/
  $comObj = new COM("word.application", $DCOMserverInfo);
  echo "Everything works fine";
}
catch (Exception $exception) {
  echo exception->getMessage();
}

Expected result:

Everything works fine

Actual result:
--
Failed to create COM object `word.application': Access is denied.

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



Bug #61604 [Asn->Csd]: Add Apache 2.4 support

2012-11-15 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=61604&edit=1

 ID: 61604
 Updated by: paj...@php.net
 Reported by:bugzilla33 at gmail dot com
 Summary:Add Apache 2.4 support
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:Apache2 related
 Operating System:   Win 7
 PHP Version:5.4.1RC1
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2012-10-23 14:25:12] yehuda at ymkatz dot net

Using php5apache2_3.dll with Apache 2.4 builds (from apachelounge) produces the 
error:
Module "sapi\\apache2handler\\mod_php5.c" is not compatible with this version 
of 
Apache (found 20110619, need 20120211).


[2012-04-11 21:43:26] johan...@php.net

Pierre, can you look into providing those?


[2012-04-02 22:22:34] bugzilla33 at gmail dot com

Description:

news.txt says
- Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)

but

http://windows.php.net/downloads/qa/php-5.4.1RC1-Win32-VC9-x86.zip

consits only php5apache2_3.dll

There was no version of Apache 2.3. Only 2.2 and 2.4 released.

Expected result:

php5apache2_4.dll

Actual result:
--
php5apache2_3.dll






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


Req #63525 [Com]: php5.4.8 connecting to mysql is slower then php5.2.6

2012-11-15 Thread yangqingrong at wudimei dot com
Edit report at https://bugs.php.net/bug.php?id=63525&edit=1

 ID: 63525
 Comment by: yangqingrong at wudimei dot com
 Reported by:admin at wudimei dot com
 Summary:php5.4.8 connecting to mysql is slower then php5.2.6
 Status: Open
 Type:   Feature/Change Request
 Package:MySQL related
 Operating System:   windows 7
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

i edited the code like this:

connect to mysql take ". (microtime(true ) - $a); echo " 
seconds"; 
 phpinfo();
 
?>


to see the result,copy the url below and paste it to the address bar of browser:

http://www.wudimei.com/data/YangQingrong/php5.2.6.jpg
http://www.wudimei.com/data/YangQingrong/php5.4.8.jpg


Previous Comments:

[2012-11-15 11:59:54] admin at wudimei dot com

i use ip,not localhost.
http://127.0.0.18/wudimei_show/admin_S2D3L56N8K5L/component_types.php?act=index


[2012-11-15 09:37:35] and...@php.net

Can you try 127.0.0.1 instead of localhost and report the connect time?


[2012-11-15 09:09:19] admin at wudimei dot com

Description:

php5.4.8 connecting to mysql is slower then php5.2.8

i use php5.4.8 to connect the mysql,it's slow!it take about 1.0138568878174 
seconds.
then i switch to php5.2.6 ,it only take 0.00234985351562 seconds.

please improve it
thank you!

yang qingrong

Test script:
---


php5.4.8 output:

Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
1.0138568878174 seconds

php 5.2.6 output
Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
0.00234985351562 seconds







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


Req #63525 [Fbk->Opn]: php5.4.8 connecting to mysql is slower then php5.2.6

2012-11-15 Thread admin at wudimei dot com
Edit report at https://bugs.php.net/bug.php?id=63525&edit=1

 ID: 63525
 User updated by:admin at wudimei dot com
 Reported by:admin at wudimei dot com
 Summary:php5.4.8 connecting to mysql is slower then php5.2.6
-Status: Feedback
+Status: Open
 Type:   Feature/Change Request
 Package:MySQL related
 Operating System:   windows 7
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

i use ip,not localhost.
http://127.0.0.18/wudimei_show/admin_S2D3L56N8K5L/component_types.php?act=index


Previous Comments:

[2012-11-15 09:37:35] and...@php.net

Can you try 127.0.0.1 instead of localhost and report the connect time?


[2012-11-15 09:09:19] admin at wudimei dot com

Description:

php5.4.8 connecting to mysql is slower then php5.2.8

i use php5.4.8 to connect the mysql,it's slow!it take about 1.0138568878174 
seconds.
then i switch to php5.2.6 ,it only take 0.00234985351562 seconds.

please improve it
thank you!

yang qingrong

Test script:
---


php5.4.8 output:

Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
1.0138568878174 seconds

php 5.2.6 output
Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
0.00234985351562 seconds







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


Bug #45945 [Com]: Apache byterange output filter nullified if mod_php5 output > 8000 bytes

2012-11-15 Thread richard_s_yeo at hotmail dot com
Edit report at https://bugs.php.net/bug.php?id=45945&edit=1

 ID: 45945
 Comment by: richard_s_yeo at hotmail dot com
 Reported by:djimenez at conduit-it dot com
 Summary:Apache byterange output filter nullified if mod_php5
 output > 8000 bytes
 Status: Open
 Type:   Bug
 Package:Apache2 related
 Operating System:   Ubuntu
 PHP Version:5.*, 6CVS (2009-07-15)
 Block user comment: N
 Private report: N

 New Comment:

Has there been any update to this?
I am experiencing the same issue on Windows and Linux with 5.3.5 of php.
This is a very important issue for me and the workaround of using redirect 
won't 
work for me.


Previous Comments:

[2010-03-24 10:02:46] thwien at gmx dot net

I can confirm this problem. Exactly over 8000 Bytes it does not work anymore. 
Also using the Apache module x-sendfile does not solve this error in my case. 
The one and only work-around in my case is a header call with location of a 
static url.

header('Location: http://any.url/toanyfile.html');
exit;

After this just Apache controls the range operator and it works as expected.


[2009-10-13 21:30:08] dylan at io dot com

I have found that using sing X-Sendfile will solve this issue:
http://tn123.ath.cx/mod_xsendfile/
(at least for Apache/mod_php).

Also even if this "bug" was fixed, I'm not sure the results would be 
very desirable.  Since there's no way to efficiently "fseek" to a 
particular byte in the script output, I assume mod_php would have to 
transfer the entire document internally for each chunk that was 
requested.


[2009-09-16 14:15:21] djimenez at conduit-it dot com

Using the handler module:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

  AddType application/x-httpd-php .php .phtml .php3 .html .inc .func 
.clss
  AddType application/x-httpd-php-source .phps



[2009-09-16 12:35:33] j...@php.net

Are you using the filter or handler module? What exactly do you put in 
your httpd.conf to enable PHP?


[2009-07-15 19:01:34] djimenez at conduit-it dot com

I tested against nightly snapshot php5.3-200907151630 and still obtain 
the same results. The bug is probably in the php5 apache2 module.




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=45945


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


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

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

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

 New Comment:

curl_multi_select() returning -1 has been an issue for windows versions of PHP 
for a while:
https://bugs.php.net/bug.php?id=61141

A workaround for my Curl wrapper class was to rewrite:

if (curl_multi_select(self::$pool, 0.2) === -1) {
   throw new \Exception('Failed to detect changes in the cURL multi handle');
}

To:

if (curl_multi_select(self::$pool, 0.2) === -1) {
   usleep(10); // wait 0.1 second
}


PS:
When are you going to introduce the new curl_multi_wait function to php?


Previous Comments:

[2012-11-15 09:30:31] bfanger at gmail dot com

It breaks all my testcases in PHP 5.4.8 (works fine in 5.4.7)

$ git clone git://github.com/sledgehammer/core.git testapp/core
$ phpunit --bootstrap testapp/core/phpunit_bootstrap.php 
testapp/core/tests/CurlTest.php


[2012-11-15 05:39:33] pierr...@php.net

Does it break all the test cases ? Or only like in your case when you have no 
handle ?


[2012-11-05 15:21:29] aa dot vasilenko at gmail dot com

This bug breaks existing libs, like Buzz https://github.com/kriswallsmith/Buzz 
, 
that relies on curl_multi_* functions. This is how I came here.


[2012-11-03 03:42:09] pierr...@php.net

I'm not sure we really want to wait 1 second for nothing in this specific case.

Furthermore, as mentioned in my commit message, when libcurl returns -1 in 
max_fd after calling curl_multi_fdset, it is because libcurl currently
does something that isn't possible for your application to monitor
with a socket and unfortunately you can then not know exactly when
the current action is completed using select().

I would personally keep the current behaviour.


[2012-11-02 04:52:57] re...@php.net

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.




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=63411


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


[PHP-BUG] Req #63526 [NEW]: get_class(): New parameter to allow stripping of namespace

2012-11-15 Thread alex at arcomit dot co dot uk
From: alex at arcomit dot co dot uk
Operating system: 
PHP version:  Irrelevant
Package:  Class/Object related
Bug Type: Feature/Change Request
Bug description:get_class(): New parameter to allow stripping of namespace

Description:

Add a new parameter to get_class so it can return the class with the
namespace removed.

string get_class ([ object $object = NULL ] , [ bool $stripNamespace =
FALSE ] )


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



Bug #62577 [Opn]: simplexml_load_file does not file if libxml_disable_entity_loader(true)

2012-11-15 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=62577&edit=1

 ID: 62577
 Updated by: paj...@php.net
 Reported by:ivan dot enderlin at hoa-project dot net
 Summary:simplexml_load_file does not file if
 libxml_disable_entity_loader(true)
 Status: Open
 Type:   Bug
 Package:SimpleXML related
 Operating System:   All
 PHP Version:master-Git-2012-07-16 (Git)
-Assigned To:
+Assigned To:rrichards
 Block user comment: N
 Private report: N

 New Comment:

hi Rob!

What would be the best/cleanest fix for this issue? It affects quite a lot of 
apps 
out there.

Thanks!


Previous Comments:

[2012-07-16 09:25:29] ivan dot enderlin at hoa-project dot net

I think it's not a normal behavior.


[2012-07-16 09:22:31] jpa...@php.net

http://lxr.php.net/xref/PHP_5_4/ext/libxml/libxml.c#1058 
libxml_disable_entity_loader(true) registers a NULL function 
(http://lxr.php.net/xref/PHP_5_4/ext/libxml/libxml.c#372) as callback for URI 
input file handling in libxml.
So you cant open any file with libxml after having called this function.

Is that the correct behavior ? I have no clue to answer that


[2012-07-16 08:56:06] ivan dot enderlin at hoa-project dot net

Description:

The function simplexml_load_file() failed to open any file (existing or not) if 
libxml_disable_entity_loader(true) has been called.

I have tried with simplexml_load_string(), it works; same with new 
SimpleXMLElement() etc. The bug is restricted to the simplexml_load_file() 
function.

Test script:
---
 LibXMLError Object
(
[level] => 1
[code] => 1549
[column] => 0
[message] => failed to load external entity "foo"

[file] => 
[line] => 0
)

)
bool(false)






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


Req #63525 [Opn->Fbk]: php5.4.8 connecting to mysql is slower then php5.2.6

2012-11-15 Thread andrey
Edit report at https://bugs.php.net/bug.php?id=63525&edit=1

 ID: 63525
 Updated by: and...@php.net
 Reported by:admin at wudimei dot com
 Summary:php5.4.8 connecting to mysql is slower then php5.2.6
-Status: Open
+Status: Feedback
 Type:   Feature/Change Request
 Package:MySQL related
 Operating System:   windows 7
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

Can you try 127.0.0.1 instead of localhost and report the connect time?


Previous Comments:

[2012-11-15 09:09:19] admin at wudimei dot com

Description:

php5.4.8 connecting to mysql is slower then php5.2.8

i use php5.4.8 to connect the mysql,it's slow!it take about 1.0138568878174 
seconds.
then i switch to php5.2.6 ,it only take 0.00234985351562 seconds.

please improve it
thank you!

yang qingrong

Test script:
---


php5.4.8 output:

Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
1.0138568878174 seconds

php 5.2.6 output
Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] => customer ) 
Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] => friends ) Array 
( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr] => 
hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array ( 
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule ) 
0.00234985351562 seconds







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


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

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

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

 New Comment:

It breaks all my testcases in PHP 5.4.8 (works fine in 5.4.7)

$ git clone git://github.com/sledgehammer/core.git testapp/core
$ phpunit --bootstrap testapp/core/phpunit_bootstrap.php 
testapp/core/tests/CurlTest.php


Previous Comments:

[2012-11-15 05:39:33] pierr...@php.net

Does it break all the test cases ? Or only like in your case when you have no 
handle ?


[2012-11-05 15:21:29] aa dot vasilenko at gmail dot com

This bug breaks existing libs, like Buzz https://github.com/kriswallsmith/Buzz 
, 
that relies on curl_multi_* functions. This is how I came here.


[2012-11-03 03:42:09] pierr...@php.net

I'm not sure we really want to wait 1 second for nothing in this specific case.

Furthermore, as mentioned in my commit message, when libcurl returns -1 in 
max_fd after calling curl_multi_fdset, it is because libcurl currently
does something that isn't possible for your application to monitor
with a socket and unfortunately you can then not know exactly when
the current action is completed using select().

I would personally keep the current behaviour.


[2012-11-02 04:52:57] re...@php.net

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.


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

Confirming the same bug. PHP 5.4.8, CentOS 5.8




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=63411


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


Bug #63441 [Com]: php-fpm is hangup

2012-11-15 Thread mail dot skeletor at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63441&edit=1

 ID: 63441
 Comment by: mail dot skeletor at gmail dot com
 Reported by:mail dot skeletor at gmail dot com
 Summary:php-fpm is hangup
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Solaris
 PHP Version:5.4.8
 Block user comment: N
 Private report: N

 New Comment:

Thanks for reply, but I have already done it. Also, I've already written about 
that:

"Also, i try to disable a xdebug, rebuild with gcc/solaris studio but it 
nothing 
changes."


Previous Comments:

[2012-11-15 00:55:14] fel...@php.net

Please, try disabling the xdebug extension.


[2012-11-05 15:59:53] mail dot skeletor at gmail dot com

Description:

Hello.
Our system is Solaris 11 with nginx+php-fpm.
Sometimes our programmer execute a few scripts which generate an exeptions 
which 
doesn't processed by the application and that's why hangup a php-fpm. I try to 
use version 5.4.3 and 5.4.8, but it still hangup. 
When we use version 5.3.9 - exections was generated, but php-fpm didn't hangup.

Also, i try to disable a xdebug, rebuild with gcc/solaris studio but it nothing 
changes.

php build with this parametres:

--with-mysql=/usr/mysql --enable-embedded-mysqli --with-gd --with-jpeg-dir=/usr 
--enable-session --enable-sockets --with-openssl --with-iconv --enable-mbstring 
--enable-exif --with-zlib --enable-fpm --with-curl

build arch is amd64


Actual result:
--
Reading symbols from /lib/amd64/libelf.so.1...done.
Loaded symbols for /lib/64/libelf.so.1
Reading symbols from /usr/lib/security/amd64/pkcs11_kernel.so.1...done.
Loaded symbols for /usr/lib/security/64/pkcs11_kernel.so.1
Reading symbols from /lib/amd64/ld.so.1...done.
Loaded symbols for /lib/amd64/ld.so.1
Core was generated by `/usr/php54/sbin/php-fpm -y /usr/php54/etc/php-fpm.conf'.
Program terminated with signal 11, Segmentation fault.
[New process 89458 ]
#0 0x0093f2eb in zend_fetch_var_address_helper_SPEC_CONST_VAR ()
(gdb) bt
#0 0x0093f2eb in zend_fetch_var_address_helper_SPEC_CONST_VAR ()
#1 0x00938c81 in execute ()
#2 0xfd7f923747b7 in xdebug_execute () from 
/usr/php54/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
#3 0x009394c7 in zend_do_fcall_common_helper_SPEC ()
#4 0x00938c81 in execute ()
#5 0xfd7f923747b7 in xdebug_execute () from 
/usr/php54/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
#6 0x008fa118 in zend_call_function ()
#7 0x009222b1 in zend_call_method ()
#8 0x007d0672 in zif_spl_autoload_call ()
#9 0x008fa080 in zend_call_function ()
#10 0x008fa8d4 in zend_lookup_class_ex ()
#11 0x0091170f in zend_is_callable_check_class ()
#12 0x00912811 in zend_is_callable_ex ()
#13 0x008f9605 in zend_call_function ()
#14 0x008f93f3 in call_user_function_ex ()
#15 0x008f92e7 in call_user_function ()
#16 0x007c16d4 in ps_call_handler ()
#17 0x007c1c0a in ps_write_user ()
#18 0x007b8edf in php_session_save_current_state ()
#19 0x007be9e8 in zm_deactivate_session ()
#20 0x00910c1a in zend_deactivate_modules ()
#21 0x00898073 in php_request_shutdown ()
#22 0x009859b1 in main ()
(gdb) where
#0 0x0093f2eb in zend_fetch_var_address_helper_SPEC_CONST_VAR ()
#1 0x00938c81 in execute ()
#2 0xfd7f923747b7 in xdebug_execute () from 
/usr/php54/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
#3 0x009394c7 in zend_do_fcall_common_helper_SPEC ()
#4 0x00938c81 in execute ()
#5 0xfd7f923747b7 in xdebug_execute () from 
/usr/php54/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
#6 0x008fa118 in zend_call_function ()
#7 0x009222b1 in zend_call_method ()
#8 0x007d0672 in zif_spl_autoload_call ()
#9 0x008fa080 in zend_call_function ()
#10 0x008fa8d4 in zend_lookup_class_ex ()
#11 0x0091170f in zend_is_callable_check_class ()
#12 0x00912811 in zend_is_callable_ex ()
#13 0x008f9605 in zend_call_function ()
#14 0x008f93f3 in call_user_function_ex ()
#15 0x008f92e7 in call_user_function ()
#16 0x007c16d4 in ps_call_handler ()
#17 0x007c1c0a in ps_write_user ()
#18 0x007b8edf in php_session_save_current_state ()
#19 0x007be9e8 in zm_deactivate_session ()
#20 0x00910c1a in zend_deactivate_modules ()
#21 0x00898073 in php_request_shutdown ()
#22 0x009859b1 in main ()







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


[PHP-BUG] Req #63525 [NEW]: php5.4.8 connecting to mysql is slower then php5.2.6

2012-11-15 Thread admin at wudimei dot com
From: admin at wudimei dot com
Operating system: windows 7
PHP version:  5.4.8
Package:  MySQL related
Bug Type: Feature/Change Request
Bug description:php5.4.8 connecting to mysql is slower then php5.2.6

Description:

php5.4.8 connecting to mysql is slower then php5.2.8

i use php5.4.8 to connect the mysql,it's slow!it take about 1.0138568878174
seconds.
then i switch to php5.2.6 ,it only take 0.00234985351562 seconds.

please improve it
thank you!

yang qingrong

Test script:
---


php5.4.8 output:

Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] =>
customer ) Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] =>
friends ) Array ( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr]
=> hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array (
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule )
1.0138568878174 seconds

php 5.2.6 output
Array ( [Tables_in_yqr] => account_book ) Array ( [Tables_in_yqr] =>
customer ) Array ( [Tables_in_yqr] => domain ) Array ( [Tables_in_yqr] =>
friends ) Array ( [Tables_in_yqr] => hourly_work ) Array ( [Tables_in_yqr]
=> hourly_work_project ) Array ( [Tables_in_yqr] => notepad ) Array (
[Tables_in_yqr] => notepad_ctg ) Array ( [Tables_in_yqr] => schedule )
0.00234985351562 seconds


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



Bug #63206 [Opn]: restore_error_handler does not restore previous errors mask

2012-11-15 Thread gwarnants at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63206&edit=1

 ID: 63206
 User updated by:gwarnants at gmail dot com
 Reported by:gwarnants at gmail dot com
 Summary:restore_error_handler does not restore previous
 errors mask
 Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   Windows XP
 PHP Version:5.4.7
 Block user comment: N
 Private report: N

 New Comment:

Here is a simpler example to illustrate the problem. As you see, the 2nd 
trigger_error will not be caught because the error reporting isn't restored to 
its initial state.

set_error_handler('handler1', E_ALL);
trigger_error('notice 1',  E_USER_NOTICE); // OK
trigger_error('notice 2',  E_USER_NOTICE); // not caught !

function handler1($errrno, $errstr)
{
echo "HANDLER1 : $errstr\n";
set_error_handler('handler2', E_USER_WARNING);
restore_error_handler();
}

function handler2($errrno, $errstr)
{
}


Previous Comments:

[2012-10-17 04:57:25] gwarnants at gmail dot com

Any feedback ?


[2012-10-03 09:59:45] gwarnants at gmail dot com

Description:

Dear PHP Team,

I don't know if it's a bug but I discovered a strange behavior :

When setting a custom error handler, we can choose an error mask as a 2nd 
parameter to catch only some kinds of errors.
If I set 2 error handlers with differents masks, and trying to restore back my 
first handler by calling restore_error_handler(), my first handler is now 
running with the second error mask

Perhaps it is a normal behavior because set_error_handler() is setting a 
"global" error mask, but if it is, I think there is no
way to know the previous error_mask to restore it properly (that value isn't 
returned by error_reporting())

Regards,
Geoffray

Test script:
---
class CustomErrorHandler
{
public static function handler($errrno, $errstr)
{
echo "HANDLING: $errstr\n";

// i set an internal error_handler other catch WARNINGS ONLY
set_error_handler(array('CustomErrorHandler', 'internal_handler'), 
E_WARNING|E_USER_WARNING);
fopen('file_not_found.dat', 'r');   // will trigger a E_WARNING
restore_error_handler();// doing this i think previous handler will 
be restored to E_ALL... but it's not ??
}

private static function internal_handler($errrno, $errstr)
{
echo "  INTERNAL HANDLER: $errstr\n";
}
}


set_error_handler(array('CustomErrorHandler', 'handler'), E_ALL);

trigger_error('User notice 1',  E_USER_NOTICE);
trigger_error('User warning 1', E_USER_WARNING);
trigger_error('User notice 2',  E_USER_NOTICE); // will not be caught !
trigger_error('User warning 2', E_USER_WARNING);

Expected result:

HANDLING: User notice 1
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory
HANDLING: User warning 1
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory
HANDLING: User notice 2
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory
HANDLING: User warning 2
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory

Actual result:
--
HANDLING: User notice 1
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory
HANDLING: User warning 1
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory


Notice:  User notice 2 in D:\wamp\www\custom_error_handler.php on line 29

HANDLING: User warning 2
  INTERNAL HANDLER: fopen(file_not_found.dat): failed to open stream: No such 
file or directory






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