#40417 [Com]: Suddenly binding as many vars as there are *identical* prepared tokens

2007-03-01 Thread xing at mac dot com
 ID:   40417
 Comment by:   xing at mac dot com
 Reported By:  exaton at free dot fr
 Status:   Open
 Bug Type: PDO related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.1
 New Comment:

I have to agree with exaton on this. This is an absolute app-breaker
change and MUST be noted in the change-log at the very least.

It is pure luck I found this change before my official upgrade to
5.2.1.

I really hope there there a solution to this.

On a blog, wez mentioned that this was a fix and the previous ability
to bind one to many placements was rather an bug. I however, strongly
disagree on a simple level that the pre-5.2.1 pdo binding just made
sense. Why should php force developers to introduce more lines of code
that does nothing more when this can be take care of behind the scenes?


Previous Comments:


[2007-02-27 13:00:47] exaton at free dot fr

Hi again, thanks for reopening this issue.

Sorry for being so snarky before, but I'd just received a little
dressing down from my boss because of having to add the workaround to
already-validated code at extremely short notice. Classic case of
pushing for an upgrade on the production server in the frenzy of the
moment.

I'll let you guys take care of this now. I've kept my test case around
so I'm available for further trials if I can be of any use.



[2007-02-27 11:50:41] [EMAIL PROTECTED]

This is really annoying issue, which forces me to rewrite some 
of the code I've done in the past. Perhaps the bindno 
shouldn't be incremented if the named placeholder already 
exists in the placeholders struct? Would it break something 
else?



[2007-02-24 08:47:52] exaton at free dot fr

Wow. I'm flabbergasted.

Mr Alshanetsky, I am, as they say, and until further notice,
disappointed in you.

No update of the CVS code. Not even a note in the manual to reflect
this spec change.

I guess this is going to have to wait until someone else reports it.
It's got to be relatively common, especially in not too complex search
engine implementations.

Until then, therefore...



[2007-02-24 03:19:49] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.



[2007-02-16 11:26:30] exaton at free dot fr

Hey again people,

I don't mean to be annoying, but I've just done a bit more research, so
I thought I'd share it with you.

Iliaa, I found the code change where you added the infamous
spec-altering error check that I'm going on about :

PHP_5_2 :
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_sql_parser.c?r1=1.35.2.6.2.3r2=1.35.2.6.2.4

Also applied to MAIN, with both times the comment : Added missing
check for mismatching number of tokens  bound params in prepared
statement emulation.

That perfectly matches my error conditions.

The problem is, the bindno variable contains the number of individual
tokens. However, multiple tokens may have the same name ; but each
token name can only be bound once ! So comparing bindno to the number
of bindings is incorrect. It introduces the following specification :
multiple tokens may not have the same name in a prepared statement.

The workaround is still the same : binding enough bogus tokens to match
the number of individual tokens used in the prepared statement, when
some share the same name.

Oh, did I mention that this prevented anyone with prepared statements
containing multiple tokens sharing the same name from upgrading to PHP
5.2.1 ? :-)



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
http://bugs.php.net/40417

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


#39157 [NEW]: can't catch simplexml error

2006-10-13 Thread xing at mac dot com
From: xing at mac dot com
Operating system: linux
PHP version:  5.1.6
PHP Bug Type: SimpleXML related
Bug description:  can't catch simplexml error

Description:

Cannot catch a simple loading error when using simplexml_load_string()
loading an invalid xml string.

I understand that that E_WARNING, E_ERROR etc are not exceptions but
realisticlly, I expect a loading function to throw an exception when it
fails to load a object, not a uncatchable warning. It also be invalid to
say this error class is a warning as it is most definitely an error.  

Reproduce code:
---
?php

try {
$x = simplexml_load_string(adfasdf);
print_r($x);
}
catch (Exception $e) {
echo toast;
}

?

Expected result:

toast

Actual result:
--
Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag
expected, '' not found in...

Warning: simplexml_load_string(): adfasdf in...

Warning: simplexml_load_string(): ^ in...


-- 
Edit bug report at http://bugs.php.net/?id=39157edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39157r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39157r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39157r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39157r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39157r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39157r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39157r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39157r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39157r=support
Expected behavior:http://bugs.php.net/fix.php?id=39157r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39157r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39157r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39157r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39157r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39157r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39157r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39157r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39157r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39157r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39157r=mysqlcfg


#39052 [NEW]: pdo::query with show slave/master status

2006-10-05 Thread xing at mac dot com
From: xing at mac dot com
Operating system: Linux
PHP version:  5.1.6
PHP Bug Type: PDO related
Bug description:  pdo::query with show slave/master status 

Description:

PHP 5.1.6
Mysql 5.0.24a

I have tested using PDO::query for both show master status and show
slave status via tcp port and both bomb out with SQLSTATE[HY000]:
General error: 2030 This command is not supported in the prepared
statement protocol yet error.

Bug #36572 was suppoed to fix this but I just tested with php 5.1.6 and
the issue is still unresolved. 


Reproduce code:
---
Execute 

show slave status;

or 

show master status

via pdo::query connected to server using tcp port.

Expected result:

Result set.

Actual result:
--
SQLSTATE[HY000]: General error: 2030 This command is not supported in the
prepared statement protocol yet

-- 
Edit bug report at http://bugs.php.net/?id=39052edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39052r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39052r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39052r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39052r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39052r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39052r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39052r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39052r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39052r=support
Expected behavior:http://bugs.php.net/fix.php?id=39052r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39052r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39052r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39052r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39052r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39052r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39052r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39052r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39052r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39052r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39052r=mysqlcfg


#39052 [Fbk-Opn]: pdo::query with show slave/master status

2006-10-05 Thread xing at mac dot com
 ID:   39052
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.6
 New Comment:

Just tried the 5.2cvs snapshot. Same result. No change.


Previous Comments:


[2006-10-05 19:36:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-10-05 19:28:57] xing at mac dot com

Description:

PHP 5.1.6
Mysql 5.0.24a

I have tested using PDO::query for both show master status and show
slave status via tcp port and both bomb out with SQLSTATE[HY000]:
General error: 2030 This command is not supported in the prepared
statement protocol yet error.

Bug #36572 was suppoed to fix this but I just tested with php 5.1.6 and
the issue is still unresolved. 


Reproduce code:
---
Execute 

show slave status;

or 

show master status

via pdo::query connected to server using tcp port.

Expected result:

Result set.

Actual result:
--
SQLSTATE[HY000]: General error: 2030 This command is not supported in
the prepared statement protocol yet





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


#39053 [NEW]: errorInfo not populated for connect error

2006-10-05 Thread xing at mac dot com
From: xing at mac dot com
Operating system: Linux
PHP version:  5CVS-2006-10-05 (snap)
PHP Bug Type: PDO related
Bug description:  errorInfo not populated for connect error

Description:

When pdo connect fails, the pdoexception object field errorInfo is
properly set.

Mysql 5.0.24a
PHP 5.2snap



Reproduce code:
---
Use pdo to a non-existing mysql server. Catch and print_r() exception.


Expected result:

...pdo exception snippet...

[errorInfo] = Array
(
[0] = HY000
[1] = 2003
[2] = Can't connect to MySQL server on '1276.0.0.86' (111)
)

Actual result:
--
[errorInfo] = 

(empty errorInfo property)

-- 
Edit bug report at http://bugs.php.net/?id=39053edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39053r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39053r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39053r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39053r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39053r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39053r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39053r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39053r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39053r=support
Expected behavior:http://bugs.php.net/fix.php?id=39053r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39053r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39053r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39053r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39053r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39053r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39053r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39053r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39053r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39053r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39053r=mysqlcfg


#39052 [Fbk-Opn]: pdo::query with show slave/master status

2006-10-05 Thread xing at mac dot com
 ID:   39052
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.6
 New Comment:

?php

$link = new PDO(mysql:host=127.0.0.1;port=3;,user,password);
$link-setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$link-setAttribute (PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, TRUE);
$link-query(SET NAMES 'utf8');

try {
  $link-query(show slave status);
  echo good;
}
catch (PDOException $e) {
  echo pre;
  print_r($e);
  echo /pre;
}

?


Previous Comments:


[2006-10-05 20:21:38] [EMAIL PROTECTED]

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 ?php and ends 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.





[2006-10-05 20:09:14] xing at mac dot com

Just tried the 5.2cvs snapshot. Same result. No change.



[2006-10-05 19:36:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-10-05 19:28:57] xing at mac dot com

Description:

PHP 5.1.6
Mysql 5.0.24a

I have tested using PDO::query for both show master status and show
slave status via tcp port and both bomb out with SQLSTATE[HY000]:
General error: 2030 This command is not supported in the prepared
statement protocol yet error.

Bug #36572 was suppoed to fix this but I just tested with php 5.1.6 and
the issue is still unresolved. 


Reproduce code:
---
Execute 

show slave status;

or 

show master status

via pdo::query connected to server using tcp port.

Expected result:

Result set.

Actual result:
--
SQLSTATE[HY000]: General error: 2030 This command is not supported in
the prepared statement protocol yet





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


#39053 [Fbk-Opn]: errorInfo not populated for connect error

2006-10-05 Thread xing at mac dot com
 ID:   39053
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5CVS-2006-10-05 (snap)
 New Comment:

?php

try {
  $link = new PDO(mysql:host=127.0.0.1;port=99;,user,pass);
  $link-setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  $link-setAttribute (PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, TRUE);


  $link-query(SET NAMES 'utf8');
  $link-query(show slave status);
  echo good;
}
catch (PDOException $e) {
  echo pre;
  print_r($e);
  echo /pre;
}
?


Previous Comments:


[2006-10-05 20:30:46] [EMAIL PROTECTED]

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 ?php and ends 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.





[2006-10-05 20:23:10] xing at mac dot com

Description:

When pdo connect fails, the pdoexception object field errorInfo is
properly set.

Mysql 5.0.24a
PHP 5.2snap



Reproduce code:
---
Use pdo to a non-existing mysql server. Catch and print_r() exception.


Expected result:

...pdo exception snippet...

[errorInfo] = Array
(
[0] = HY000
[1] = 2003
[2] = Can't connect to MySQL server on '1276.0.0.86'
(111)
)

Actual result:
--
[errorInfo] = 

(empty errorInfo property)





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


#35845 [NEW]: deserialization problem

2005-12-29 Thread xing at mac dot com
From: xing at mac dot com
Operating system: centos 4.2
PHP version:  5.1.2RC1
PHP Bug Type: Scripting Engine problem
Bug description:  deserialization problem

Description:

cannot deserialize an serialized output...

the serialized object is an array of query_result objects which contain an
result element which is an array of simple objects.

Reproduce code:
---
?

class query_result   {

public $affected_rows = 0; 
public $num_rows = 0; 
public $insert_id = 0;

public $result = array(); //pdo result
public $pointer = 0;
}

$dump = unserialize(file_get_contents(dump.txt));

if($dump == NULL) {
echo error;   
}
else if(is_array($dump)) {
echo not error;
}
else {
echo huh? {$dump};
}

?

Expected result:

not error

Actual result:
--
error

-- 
Edit bug report at http://bugs.php.net/?id=35845edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35845r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35845r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35845r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35845r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=35845r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=35845r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=35845r=needscript
Try newer version:http://bugs.php.net/fix.php?id=35845r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=35845r=support
Expected behavior:http://bugs.php.net/fix.php?id=35845r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=35845r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=35845r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35845r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35845r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35845r=dst
IIS Stability:http://bugs.php.net/fix.php?id=35845r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=35845r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35845r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=35845r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=35845r=mysqlcfg


#35846 [NEW]: var_export() generate invalid code

2005-12-29 Thread xing at mac dot com
From: xing at mac dot com
Operating system: centos 4.2
PHP version:  5.1.2RC1
PHP Bug Type: Variables related
Bug description:  var_export() generate invalid code

Description:

invalid php code from var_export contrary to documentation claims.

Reproduce code:
---
?


class query_result   {

public $affected_rows = 0; 
public $num_rows = 0; 
public $insert_id = 0;

public $result = array(); //pdo result
public $pointer = 0;
}


$test = array(
test = new query_result()
);

$dump =  var_export($test, TRUE);

file_put_contents(test.txt,? . $dump . ?);

include(test.txt);

die();

?

Expected result:

no php error

Actual result:
--
PHP Fatal error: Call to undefinied query_result::__set_state() in
test.txt line 3

-- 
Edit bug report at http://bugs.php.net/?id=35846edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35846r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35846r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35846r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35846r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=35846r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=35846r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=35846r=needscript
Try newer version:http://bugs.php.net/fix.php?id=35846r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=35846r=support
Expected behavior:http://bugs.php.net/fix.php?id=35846r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=35846r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=35846r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35846r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35846r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35846r=dst
IIS Stability:http://bugs.php.net/fix.php?id=35846r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=35846r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35846r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=35846r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=35846r=mysqlcfg


#35845 [Opn]: deserialization problem

2005-12-29 Thread xing at mac dot com
 ID:   35845
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: centos 4.2
 PHP Version:  5.1.2RC1
 New Comment:

dump.txt, captured serialized output, is at:

http://mirror.fictionpress.com/beans/dump.txt


Previous Comments:


[2005-12-30 01:38:31] xing at mac dot com

Description:

cannot deserialize an serialized output...

the serialized object is an array of query_result objects which contain
an result element which is an array of simple objects.

Reproduce code:
---
?

class query_result   {

public $affected_rows = 0; 
public $num_rows = 0; 
public $insert_id = 0;

public $result = array(); //pdo result
public $pointer = 0;
}

$dump = unserialize(file_get_contents(dump.txt));

if($dump == NULL) {
echo error;   
}
else if(is_array($dump)) {
echo not error;
}
else {
echo huh? {$dump};
}

?

Expected result:

not error

Actual result:
--
error





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


#35845 [Fbk-Opn]: deserialization problem

2005-12-29 Thread xing at mac dot com
 ID:   35845
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: centos 4.2
 PHP Version:  5.1.2RC1
 New Comment:

Just put the dump.txt file within the same folder as the included code
and run.


Previous Comments:


[2005-12-30 06:46:25] [EMAIL PROTECTED]

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 ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-12-30 01:43:36] xing at mac dot com

dump.txt, captured serialized output, is at:

http://mirror.fictionpress.com/beans/dump.txt



[2005-12-30 01:38:31] xing at mac dot com

Description:

cannot deserialize an serialized output...

the serialized object is an array of query_result objects which contain
an result element which is an array of simple objects.

Reproduce code:
---
?

class query_result   {

public $affected_rows = 0; 
public $num_rows = 0; 
public $insert_id = 0;

public $result = array(); //pdo result
public $pointer = 0;
}

$dump = unserialize(file_get_contents(dump.txt));

if($dump == NULL) {
echo error;   
}
else if(is_array($dump)) {
echo not error;
}
else {
echo huh? {$dump};
}

?

Expected result:

not error

Actual result:
--
error





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


#35824 [NEW]: prepared quries returning 0 rows with variable in multiple places

2005-12-27 Thread xing at mac dot com
From: xing at mac dot com
Operating system: centos 4.2
PHP version:  5.1.2RC1
PHP Bug Type: PDO related
Bug description:  prepared quries returning 0 rows with variable in multiple 
places

Description:

Mysql version 4.1.15

use mysql_pdo with attribute enabled to have it throw exception on all
errors:







Reproduce code:
---
$st = $db-prepare(select * from test where c = 2 AND (a = :a OR b =
:a));

$st-execute(array(:a = 2));

Expected result:

Rows matching where a == 2 or b == 2 OR an exception if pdo doesn't
support having the same variable appear more than once in a prepared
query.

Actual result:
--
0 row result regardless of what's in the database. No error or
exceptions from pdo. Everything points to successful query when nothing
has been executed.

-- 
Edit bug report at http://bugs.php.net/?id=35824edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35824r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35824r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35824r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35824r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=35824r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=35824r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=35824r=needscript
Try newer version:http://bugs.php.net/fix.php?id=35824r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=35824r=support
Expected behavior:http://bugs.php.net/fix.php?id=35824r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=35824r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=35824r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35824r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35824r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35824r=dst
IIS Stability:http://bugs.php.net/fix.php?id=35824r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=35824r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35824r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=35824r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=35824r=mysqlcfg


#35824 [Opn-Bgs]: prepared quries returning 0 rows with variable in multiple places

2005-12-27 Thread xing at mac dot com
 ID:   35824
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PDO related
 Operating System: centos 4.2
 PHP Version:  5.1.2RC1
 New Comment:

Turns out it's because I did not set the error attribute correctly.
Apparently you cannot set it via the construct method.

new PDO(mysql:host=1.1.1.1;unix_socket=/tmp/my.sock;dbname=testdb,
$USER,
$PASS,
array(
PDO::ATTR_ERRMODE = PDO::ERRMODE_EXCEPTION );

the above does not work...to set the error mode attribute..had to use
the below after pdo connection is made.

setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);


Previous Comments:


[2005-12-28 01:39:14] xing at mac dot com

Description:

Mysql version 4.1.15

use mysql_pdo with attribute enabled to have it throw exception on all
errors:







Reproduce code:
---
$st = $db-prepare(select * from test where c = 2 AND (a = :a OR b =
:a));

$st-execute(array(:a = 2));

Expected result:

Rows matching where a == 2 or b == 2 OR an exception if pdo doesn't
support having the same variable appear more than once in a prepared
query.

Actual result:
--
0 row result regardless of what's in the database. No error or
exceptions from pdo. Everything points to successful query when nothing
has been executed.





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


#30020 [Fbk-Opn]: htmlentities error

2004-09-08 Thread xing at mac dot com
 ID:   30020
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Linux
 PHP Version:  4.3.9RC2
 New Comment:

There should be no hidden UTF-8 characters in the string: all ascii
compliant including the french accented e.

I did however have an error in the code where extra ( was added. Here
is the complete and correct code you can just copy-paste from any
browser.

--
?
$str = Le Café Café ; 

$str = html_entity_decode(htmlentities($str,ENT_QUOTES,UTF-8));
echo $str;
?


Previous Comments:


[2004-09-08 07:46:50] [EMAIL PROTECTED]

Can you e-mail me the scripts (in a zip file or something)? I am afraid
the bugsystem doesn't handle UTF8 well.



[2004-09-08 04:43:08] xing at mac dot com

Description:

htmlentities function appears to eat é but correctly handle é .

Reproduce code:
---
$str = Le Café Café ; 

$str = html_entity_decode((htmlentities($str,ENT_QUOTES,UTF-8));

Expected result:

Le Café Café 

Actual result:
--
Le Caf Café 





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


#30020 [Fbk-Opn]: htmlentities error

2004-09-08 Thread xing at mac dot com
 ID:   30020
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Linux
 PHP Version:  4.3.9RC2
 New Comment:

gzipped code sent to [EMAIL PROTECTED]


Previous Comments:


[2004-09-08 08:35:25] [EMAIL PROTECTED]

ascii is 7 bit, and accented characters are not in the 7 bit part and
thus could I see them with a different charset, please send me the
script.



[2004-09-08 08:29:14] xing at mac dot com

There should be no hidden UTF-8 characters in the string: all ascii
compliant including the french accented e.

I did however have an error in the code where extra ( was added. Here
is the complete and correct code you can just copy-paste from any
browser.

--
?
$str = Le Café Café ; 

$str = html_entity_decode(htmlentities($str,ENT_QUOTES,UTF-8));
echo $str;
?



[2004-09-08 07:46:50] [EMAIL PROTECTED]

Can you e-mail me the scripts (in a zip file or something)? I am afraid
the bugsystem doesn't handle UTF8 well.



[2004-09-08 04:43:08] xing at mac dot com

Description:

htmlentities function appears to eat é but correctly handle é .

Reproduce code:
---
$str = Le Café Café ; 

$str = html_entity_decode((htmlentities($str,ENT_QUOTES,UTF-8));

Expected result:

Le Café Café 

Actual result:
--
Le Caf Café 





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


#30020 [Bgs]: htmlentities error

2004-09-08 Thread xing at mac dot com
 ID:   30020
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: Linux
 PHP Version:  4.3.9RC2
 New Comment:

Thanks a bunch for the clarification. =)


Previous Comments:


[2004-09-08 09:03:52] [EMAIL PROTECTED]

replace the é with é in my explanation, by browser used UTF8 to post
the message ;-)



[2004-09-08 09:01:17] [EMAIL PROTECTED]

This is not a bug at all, you're doing something wrong here ;-)

THe first part of your code is:
?
$str = Le Café Café ;

$str = htmlentities($str,ENT_QUOTES,UTF-8);

This will try to interpret the $str as an UTF-8 string and add
htmlentities for all utf-8 chars that it finds in here.
Because é is not a valid combination as a multi-byte UTF8 character,
the é is simply skipped.

I don't know why the second é isn't stripped out though. 
Anyway, your code is wrong, don't try to use an iso-8859-1 string as
UTF8.



[2004-09-08 08:51:02] xing at mac dot com

gzipped code sent to [EMAIL PROTECTED]



[2004-09-08 08:35:25] [EMAIL PROTECTED]

ascii is 7 bit, and accented characters are not in the 7 bit part and
thus could I see them with a different charset, please send me the
script.



[2004-09-08 08:29:14] xing at mac dot com

There should be no hidden UTF-8 characters in the string: all ascii
compliant including the french accented e.

I did however have an error in the code where extra ( was added. Here
is the complete and correct code you can just copy-paste from any
browser.

--
?
$str = Le Café Café ; 

$str = html_entity_decode(htmlentities($str,ENT_QUOTES,UTF-8));
echo $str;
?



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
http://bugs.php.net/30020

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


#30020 [NEW]: htmlentities error

2004-09-07 Thread xing at mac dot com
From: xing at mac dot com
Operating system: Linux
PHP version:  4.3.9RC2
PHP Bug Type: Strings related
Bug description:  htmlentities error

Description:

htmlentities function appears to eat é but correctly handle é .

Reproduce code:
---
$str = Le Café Café ; 

$str = html_entity_decode((htmlentities($str,ENT_QUOTES,UTF-8));

Expected result:

Le Café Café 

Actual result:
--
Le Caf Café 

-- 
Edit bug report at http://bugs.php.net/?id=30020edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30020r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30020r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30020r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30020r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30020r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30020r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30020r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30020r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30020r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30020r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30020r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30020r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30020r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30020r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30020r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30020r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30020r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30020r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30020r=mysqlcfg


#27950 [NEW]: make test stalls...

2004-04-11 Thread xing at mac dot com
From: xing at mac dot com
Operating system: Fedora2Test2 64bit
PHP version:  4.3.6RC1
PHP Bug Type: *Compile Issues
Bug description:  make test stalls...

Description:

4.3.6RC2 source install.



Mak test stalls right after 





PASS unset($_SESSION[name]); should work with register_globals=off
[ext/session/tests/009.phpt]

PASS $session_array = explode(;, session_encode()); should not segfault
[ext/session/tests/010.phpt]

PASS session_decode(); should not segfault [ext/session/tests/011.phpt]

PASS registering $_SESSION should not segfault
[ext/session/tests/012.phpt]

PASS redefining SID should not cause warnings
[ext/session/tests/013.phpt]

PASS a script should not be able to modify session.use_trans_sid
[ext/session/tests/014.phpt]

PASS use_trans_sid should not affect SID [ext/session/tests/015.phpt]

PASS invalid session.save_path should not cause a segfault
[ext/session/tests/016.phpt]

PASS setting $_SESSION before session_start() should not cause segfault
[ext/session/tests/017.phpt]

PASS rewriter correctly handles attribute names which contain dashes
[ext/session/tests/018.phpt]



-- stalls hereI don't think it's supposed to stall.



This is on a Athlon64 cpu running Fedora 2 Test 2 release with ALL
relevant updates released as of 4-11 3:15AM PST.



uname -r = 2.6.5-1.315

Reproduce code:
---
./configure

make

make test





Expected result:

gracefull complete

Actual result:
--
stalls..

-- 
Edit bug report at http://bugs.php.net/?id=27950edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27950r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27950r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=27950r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=27950r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27950r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=27950r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=27950r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=27950r=support
Expected behavior:  http://bugs.php.net/fix.php?id=27950r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=27950r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=27950r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=27950r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27950r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=27950r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=27950r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=27950r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27950r=float



#27950 [Opn]: make test stalls...

2004-04-11 Thread xing at mac dot com
 ID:   27950
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
 Status:   Open
 Bug Type: *Compile Issues
 Operating System: Fedora2Test2 64bit
 PHP Version:  4.3.6RC1
 New Comment:

Fedora 2 Test 2 64bit edition.


Previous Comments:


[2004-04-11 06:16:53] xing at mac dot com

Description:

4.3.6RC2 source install.



Mak test stalls right after 





PASS unset($_SESSION[name]); should work with register_globals=off
[ext/session/tests/009.phpt]

PASS $session_array = explode(;, session_encode()); should not
segfault [ext/session/tests/010.phpt]

PASS session_decode(); should not segfault
[ext/session/tests/011.phpt]

PASS registering $_SESSION should not segfault
[ext/session/tests/012.phpt]

PASS redefining SID should not cause warnings
[ext/session/tests/013.phpt]

PASS a script should not be able to modify session.use_trans_sid
[ext/session/tests/014.phpt]

PASS use_trans_sid should not affect SID [ext/session/tests/015.phpt]

PASS invalid session.save_path should not cause a segfault
[ext/session/tests/016.phpt]

PASS setting $_SESSION before session_start() should not cause segfault
[ext/session/tests/017.phpt]

PASS rewriter correctly handles attribute names which contain dashes
[ext/session/tests/018.phpt]



-- stalls hereI don't think it's supposed to stall.



This is on a Athlon64 cpu running Fedora 2 Test 2 release with ALL
relevant updates released as of 4-11 3:15AM PST.



uname -r = 2.6.5-1.315

Reproduce code:
---
./configure

make

make test





Expected result:

gracefull complete

Actual result:
--
stalls..





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


#27950 [Opn]: make test stalls...

2004-04-11 Thread xing at mac dot com
 ID:   27950
 User updated by:  xing at mac dot com
 Reported By:  xing at mac dot com
 Status:   Open
 Bug Type: *Compile Issues
 Operating System: Fedora2Test2 64bit
-PHP Version:  4.3.6RC1
+PHP Version:  4.3.6RC2
 New Comment:

During the stall which I assume in on test 019.phpt, the php process is
at 90%+ cpu usage.


Previous Comments:


[2004-04-11 06:18:09] xing at mac dot com

Fedora 2 Test 2 64bit edition.



[2004-04-11 06:16:53] xing at mac dot com

Description:

4.3.6RC2 source install.



Mak test stalls right after 





PASS unset($_SESSION[name]); should work with register_globals=off
[ext/session/tests/009.phpt]

PASS $session_array = explode(;, session_encode()); should not
segfault [ext/session/tests/010.phpt]

PASS session_decode(); should not segfault
[ext/session/tests/011.phpt]

PASS registering $_SESSION should not segfault
[ext/session/tests/012.phpt]

PASS redefining SID should not cause warnings
[ext/session/tests/013.phpt]

PASS a script should not be able to modify session.use_trans_sid
[ext/session/tests/014.phpt]

PASS use_trans_sid should not affect SID [ext/session/tests/015.phpt]

PASS invalid session.save_path should not cause a segfault
[ext/session/tests/016.phpt]

PASS setting $_SESSION before session_start() should not cause segfault
[ext/session/tests/017.phpt]

PASS rewriter correctly handles attribute names which contain dashes
[ext/session/tests/018.phpt]



-- stalls hereI don't think it's supposed to stall.



This is on a Athlon64 cpu running Fedora 2 Test 2 release with ALL
relevant updates released as of 4-11 3:15AM PST.



uname -r = 2.6.5-1.315

Reproduce code:
---
./configure

make

make test





Expected result:

gracefull complete

Actual result:
--
stalls..





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