#47954 [Com]: pathinfo function returns invalid filename for utf-8 file

2009-04-11 Thread top dot bagger at bk dot ru
 ID:   47954
 Comment by:   top dot bagger at bk dot ru
 Reported By:  top dot bagger at bk dot ru
 Status:   Open
 Bug Type: *Unicode Issues
 Operating System: Linux 2.6.18
 PHP Version:  5.2.9
 New Comment:

utf-8 strings i submitid there got replaced by entities :( The main
thing is there should be a "_" sign in filename. Then "filename" part
becomes splitted by it. If there is no "_" sign, the "filename" part is
empty.


Previous Comments:


[2009-04-12 00:36:26] top dot bagger at bk dot ru

Description:

pathinfo() function returns invalid "filename" array part for utf-8
filename



Reproduce code:
---



Expected result:

string(25)
"ПРИВЕТ_МЕДВЕД"


Actual result:
--
string(13) "_МЕДВЕД" 





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



#47954 [NEW]: pathinfo function returns invalid filename for utf-8 file

2009-04-11 Thread top dot bagger at bk dot ru
From: top dot bagger at bk dot ru
Operating system: Linux 2.6.18
PHP version:  5.2.9
PHP Bug Type: *Unicode Issues
Bug description:  pathinfo function returns invalid filename for utf-8 file

Description:

pathinfo() function returns invalid "filename" array part for utf-8
filename



Reproduce code:
---



Expected result:

string(25)
"ПРИВЕТ_МЕДВЕД"


Actual result:
--
string(13) "_МЕДВЕД" 

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



#47953 [Com]: Error reading XML string

2009-04-11 Thread bbarnett at gt dot co dot cr
 ID:   47953
 Comment by:   bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

This is a part of the code that I'm using:
",1);
} 
?>


Previous Comments:


[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




[2009-04-11 23:51:46] j...@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.





[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





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



#47953 [Com]: Error reading XML string

2009-04-11 Thread bbarnett at gt dot co dot cr
 ID:   47953
 Comment by:   bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217



Previous Comments:


[2009-04-11 23:51:46] j...@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.





[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





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



#47928 [Opn->Fbk]: PHP crashes when using MySQLi-Statement

2009-04-11 Thread jani
 ID:   47928
 Updated by:   j...@php.net
 Reported By:  jjuergens at web dot de
-Status:   Open
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: Opensuse 11.1
 PHP Version:  5.2.9
 New Comment:

Try building the snapshot with shortest possible configure line 
necessary. And do not use shared extensions when debugging the crash, 
build all static and use -n when running the test to prevent loading 
any php.ini's.


Previous Comments:


[2009-04-11 09:44:13] jjuergens at web dot de

Ok, I just downloaded the latest version (php5.2-200904110630) and
compiled it with the following options:


'./configure'  '--prefix=/temp/php' '--enable-libxml'
'--enable-session' '--with-mm' '--with-pcre-r
egex=/usr' '--enable-xml' '--enable-simplexml' '--enable-spl'
'--enable-filter' '--disable-debug' '--enable-inline-optimi
zation' '--disable-rpath' '--disable-static' '--enable-shared'
'--program-suffix=5' '--with-pic' '--with-gnu-ld' '--with-
system-tzdata=/usr/share/zoneinfo' '--enable-cli'
'--with-pear=/usr/share/php5/PEAR' '--enable-bcmath=shared' '--enable-c
alendar=shared' '--enable-ctype=shared' '--enable-dbase=shared'
'--enable-dom=shared' '--enable-exif=shared' '--enable-ft
p=shared' '--enable-mbstring=shared' '--enable-mbregex'
'--enable-pcntl=shared' '--enable-posix=shared' '--enable-shmop=s
hared' '--enable-soap=shared' '--enable-sockets=shared'
'--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sys
vshm=shared' '--enable-tokenizer=shared' '--enable-wddx=shared'
'--with-zlib=shared' '--with-bz2=shared' '--with-curl=sha
red' '--with-gd=shared' '--enable-gd-native-ttf' '--with-xpm-dir=/usr'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '
--with-jpeg-dir=/usr' '--with-zlib-dir=/usr' '--with-t1lib=/usr'
'--with-gettext=shared' '--with-gmp=shared' '--enable-ha
sh=shared' '--with-iconv=shared' '--with-imap-ssl'
'--enable-json=shared' '--with-libedit=shared,/usr' '--with-mcrypt=sha
red' '--with-mysql=shared,/usr'
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli'
'--with-ncurses=shared' '--
with-unixODBC=shared,/usr' '--with-openssl=shared'
'--with-xmlrpc=shared' '--enable-xmlreader=shared' '--enable-xmlwriter
=shared' '--with-xsl=shared' '--with-tidy=shared,/usr'
'--enable-dba=shared' '--with-db4=/usr' '--without-gdbm' '--with-c
db' '--with-inifile' '--with-flatfile' '--enable-pdo=shared'
'--with-pdo_sqlite=shared,/usr' '--with-pdo-mysql=shared,/us
r' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-sqlite=shared,/usr'
'--enable-sqlite-utf8' '--enable-zip=shared' '--dis
able-cgi'



Running it with the same code I posted here I get a memory-error again.
But Valgrind shows some different output than before:


>valgrind /temp/php/bin/php5 mysqli.php
==19284== Memcheck, a memory error detector.
==19284== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==19284== Using LibVEX rev 1854, a library for dynamic binary
translation.
==19284== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==19284== Using valgrind-3.3.1, a dynamic binary instrumentation
framework.
==19284== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==19284== For more details, rerun with: -v
==19284==
==19284== Invalid read of size 4
==19284==at 0x81A16EA: _zval_ptr_dtor (zend_execute_API.c:412)
==19284==by 0x81B9E29: zend_hash_destroy (zend_hash.c:526)
==19284==by 0x81AEA3C: _zval_dtor_func (zend_variables.c:43)
==19284==by 0x81A1747: _zval_ptr_dtor (zend_variables.h:35)
==19284==by 0x81B9A81: zend_hash_apply_deleter (zend_hash.c:611)
==19284==by 0x81B9D46: zend_hash_graceful_reverse_destroy
(zend_hash.c:646)
==19284==by 0x81A4582: shutdown_executor (zend_execute_API.c:239)
==19284==by 0x81AF66E: zend_deactivate (zend.c:860)
==19284==by 0x81673C7: php_request_shutdown (main.c:1492)
==19284==by 0x8226483: main (php_cli.c:1343)
==19284==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==19284==
==19284== Process terminating with default action of signal 11
(SIGSEGV)
==19284==  Access not within mapped region at address 0x0
==19284==at 0x81A16EA: _zval_ptr_dtor (zend_execute_API.c:412)
==19284==by 0x81B9E29: zend_hash_destroy (zend_hash.c:526)
==19284==by 0x81AEA3C: _zval_dtor_func (zend_variables.c:43)
==19284==by 0x81A1747: _zval_ptr_dtor (zend_variables.h:35)
==19284==by 0x81B9A81: zend_hash_apply_deleter (zend_hash.c:611)
==19284==by 0x81B9D46: zend_hash_graceful_reverse_destroy
(zend_hash.c:646)
==19284==by 0x81A4582: shutdown_executor (zend_execute_API.c:239)
==19284==by 0x81AF66E: zend_deactivate (zend.c:860)
==19284==by 0x81673C7: php_request_shutdown (main.c:1492)
==19284==by 0x8226483: main (php_cli.c:1343)
==19284==
==19284== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from
1)
==19284== malloc/free: in use at exit: 790,981 bytes in 7,064 blocks.
==1928

#47953 [Opn->Fbk]: Error reading XML string

2009-04-11 Thread jani
 ID:   47953
 Updated by:   j...@php.net
 Reported By:  bbarnett at gt dot co dot cr
-Status:   Open
+Status:   Feedback
-Bug Type: *XML functions
+Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:


[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





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



#47953 [NEW]: Error reading XML string

2009-04-11 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: WXP
PHP version:  5.2.9
PHP Bug Type: *XML functions
Bug description:  Error reading XML string

Description:

I'm receiving and error when I try to read and XML string. The error is:
Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.

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



#47951 [Opn->Bgs]: Access to OS randomness would be nice

2009-04-11 Thread scottmac
 ID:  47951
 Updated by:  scott...@php.net
 Reported By: jking at jkingweb dot ca
-Status:  Open
+Status:  Bogus
 Bug Type:Feature/Change Request
 PHP Version: 5.2.9
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.




Previous Comments:


[2009-04-11 18:52:24] jking at jkingweb dot ca

Description:

The other day I wrote a PHP implementation of a spec which mandates
using a cryptographically-secure random number generator.  For most Unix
systems this is easy (/dev/urandom or /dev/random), but getting access
to such a source in PHP for Windows seems impossible.  

I thought it might be beneficial for PHP to expose the best source of
randomness availble via fopen("php://random") or some such.  I confess I
don't know how difficult this would be to do, but it would certainly be
more feasible for PHP itself to pull this off in a cross-platform
fashion than for little old me writing software from within PHP.

Reproduce code:
---
---
>From manual page: wrappers.php
---







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



#47952 [Opn->WFx]: Access to OS randomness would be nice

2009-04-11 Thread scottmac
 ID:  47952
 Updated by:  scott...@php.net
 Reported By: jking at jkingweb dot ca
-Status:  Open
+Status:  Wont fix
 Bug Type:Feature/Change Request
 PHP Version: 5.2.9
 New Comment:

It's not in the manual yet but you'll find
openssl_random_pseudo_bytes() in PHP 5.3 that accesses the underlying
PRNG.

We could add this to PHP itself, but I think letting OpenSSL being
responsible for this is better in case we make a mistake.


Previous Comments:


[2009-04-11 18:52:45] jking at jkingweb dot ca

Description:

The other day I wrote a PHP implementation of a spec which mandates
using a cryptographically-secure random number generator.  For most Unix
systems this is easy (/dev/urandom or /dev/random), but getting access
to such a source in PHP for Windows seems impossible.  

I thought it might be beneficial for PHP to expose the best source of
randomness availble via fopen("php://random") or some such.  I confess I
don't know how difficult this would be to do, but it would certainly be
more feasible for PHP itself to pull this off in a cross-platform
fashion than for little old me writing software from within PHP.

Reproduce code:
---
---
>From manual page: wrappers.php
---







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



#47952 [NEW]: Access to OS randomness would be nice

2009-04-11 Thread jking at jkingweb dot ca
From: jking at jkingweb dot ca
Operating system: 
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  Access to OS randomness would be nice

Description:

The other day I wrote a PHP implementation of a spec which mandates using
a cryptographically-secure random number generator.  For most Unix systems
this is easy (/dev/urandom or /dev/random), but getting access to such a
source in PHP for Windows seems impossible.  

I thought it might be beneficial for PHP to expose the best source of
randomness availble via fopen("php://random") or some such.  I confess I
don't know how difficult this would be to do, but it would certainly be
more feasible for PHP itself to pull this off in a cross-platform fashion
than for little old me writing software from within PHP.

Reproduce code:
---
---
>From manual page: wrappers.php
---



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



#47951 [NEW]: Access to OS randomness would be nice

2009-04-11 Thread jking at jkingweb dot ca
From: jking at jkingweb dot ca
Operating system: 
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  Access to OS randomness would be nice

Description:

The other day I wrote a PHP implementation of a spec which mandates using
a cryptographically-secure random number generator.  For most Unix systems
this is easy (/dev/urandom or /dev/random), but getting access to such a
source in PHP for Windows seems impossible.  

I thought it might be beneficial for PHP to expose the best source of
randomness availble via fopen("php://random") or some such.  I confess I
don't know how difficult this would be to do, but it would certainly be
more feasible for PHP itself to pull this off in a cross-platform fashion
than for little old me writing software from within PHP.

Reproduce code:
---
---
>From manual page: wrappers.php
---



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



#47949 [Fbk->Opn]: Return value of a registered completion function is not tested

2009-04-11 Thread rannou dot sebastien at gmail dot com
 ID:   47949
 User updated by:  rannou dot sebastien at gmail dot com
 Reported By:  rannou dot sebastien at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Readline related
 Operating System: GNU/Linux
 PHP Version:  5.2.9
 New Comment:

Sorry for my mistake, I thought it was with php-5.2.9, but it seems
only to happen on 5.2.4.

$ php -v
PHP 5.2.4-2ubuntu5.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 11
2009 20:09:52)

Here's the gdb trace:

Core was generated by `php segfault.php'.
Program terminated with signal 11, Segmentation fault.
[New process 18508]
#0  0xb7f5214a in ?? () from /usr/lib/libedit.so.2
#1  0xb79e3cca in ?? () from /lib/tls/i686/cmov/libc.so.6
#2  0xb79e46b7 in qsort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7f51c3f in fn_display_match_list () from /usr/lib/libedit.so.2
#4  0xb7f5201b in fn_complete () from /usr/lib/libedit.so.2
#5  0xb7f577ce in rl_complete () from /usr/lib/libedit.so.2
#6  0xb7f577f9 in ?? () from /usr/lib/libedit.so.2
#7  0xb7f4cd36 in el_gets () from /usr/lib/libedit.so.2
#8  0xb7f58dc5 in readline () from /usr/lib/libedit.so.2
#9  0x08353d57 in zif_readline ()
#10 0x082f4c0b in ?? ()
#11 0x082e5648 in execute ()
#12 0x082c4443 in zend_execute_scripts ()
#13 0x0827a2b0 in php_execute_script ()
#14 0x08356a0a in main ()
(gdb)

I've very sorry once again. I re-open the ticket in case it interests
you.

Thanks for your attention :-)


Previous Comments:


[2009-04-11 17:14:30] fel...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce it using libreadline 5.2-4.



[2009-04-11 12:14:45] rannou dot sebastien at gmail dot com

Description:

If the registered function from readline_completion_function returns an
empty array, a segmentation fault happens when trying to tab.

Reproduce code:
---
 ');

?>

Expected result:

Doing nothing or printing a new prompt.

Actual result:
--
$> php script.php
> 
Segmentation fault
$>





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



#47949 [Opn->Fbk]: Return value of a registered completion function is not tested

2009-04-11 Thread felipe
 ID:   47949
 Updated by:   fel...@php.net
 Reported By:  rannou dot sebastien at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Readline related
 Operating System: GNU/Linux
 PHP Version:  5.2.9
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I can't reproduce it using libreadline 5.2-4.


Previous Comments:


[2009-04-11 12:14:45] rannou dot sebastien at gmail dot com

Description:

If the registered function from readline_completion_function returns an
empty array, a segmentation fault happens when trying to tab.

Reproduce code:
---
 ');

?>

Expected result:

Doing nothing or printing a new prompt.

Actual result:
--
$> php script.php
> 
Segmentation fault
$>





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



#47950 [Opn]: new MySQLi functions not available as class methods

2009-04-11 Thread werner at procurios dot nl
 ID:   47950
 User updated by:  werner at procurios dot nl
-Reported By:  werner at procurios dot org
+Reported By:  werner at procurios dot nl
 Status:   Open
 Bug Type: MySQLi related
 Operating System: os x 10.5
 PHP Version:  5.3.0RC1
 New Comment:

fixed my mail adres


Previous Comments:


[2009-04-11 12:52:30] werner at procurios dot nl

Description:

While experimenting with the new MySQli functions enabled by compiling
with the mysqlnd driver I encountered a problem with the OO MySQLi
interface.

I can call the new functions, but contrary to the documentation they
dont seem to be available as class methods on a mysqli object.

The only relevant info i could find was this message:
http://lists.mysql.com/commits/21812


full configure string:
./configure --prefix=/usr/local/php --with-apxs2 --with-openssl
--enable-bcmath --enable-mbstring --with-curl --with-mysql=mysqlnd
--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-soap
--enable-zip --with-pear=/usr/local/pear --with-zlib
--with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib
--with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6
--with-xpm-dir=/usr/X11R6 --with-gd --with-mcrypt=/usr/local/lib
--with-tidy=/usr/local

Reproduce code:
---
';
}

if (function_exists(mysqli_get_cache_stats) && !method_exists($mysqli,
'mysqli_get_cache_stats')) {
echo 'mysqli_get_cache_stats not a class method ';
}

if (function_exists(mysqli_get_client_stats) && !method_exists($mysqli,
'mysqli_get_client_stats')) {
echo 'mysqli_get_client_stats not a class method ';
}

if (function_exists(mysqli_get_connection_stats) &&
!method_exists($mysqli, 'mysqli_get_connection_stats')) {
echo 'mysqli_get_connection_stats not a class method ';
}
?>

Expected result:

no output expected

Actual result:
--
mysqli_fetch_all not a class method
mysqli_get_cache_stats not a class method
mysqli_get_client_stats not a class method
mysqli_get_connection_stats not a class method





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



#47950 [NEW]: new MySQLi functions not available as class methods

2009-04-11 Thread werner at procurios dot org
From: werner at procurios dot org
Operating system: os x 10.5
PHP version:  5.3.0RC1
PHP Bug Type: MySQLi related
Bug description:  new MySQLi functions not available as class methods

Description:

While experimenting with the new MySQli functions enabled by compiling
with the mysqlnd driver I encountered a problem with the OO MySQLi
interface.

I can call the new functions, but contrary to the documentation they dont
seem to be available as class methods on a mysqli object.

The only relevant info i could find was this message:
http://lists.mysql.com/commits/21812


full configure string:
./configure --prefix=/usr/local/php --with-apxs2 --with-openssl
--enable-bcmath --enable-mbstring --with-curl --with-mysql=mysqlnd
--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-soap --enable-zip
--with-pear=/usr/local/pear --with-zlib --with-zlib-dir=/usr
--with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6
--with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --with-gd
--with-mcrypt=/usr/local/lib --with-tidy=/usr/local

Reproduce code:
---
';
}

if (function_exists(mysqli_get_cache_stats) && !method_exists($mysqli,
'mysqli_get_cache_stats')) {
echo 'mysqli_get_cache_stats not a class method ';
}

if (function_exists(mysqli_get_client_stats) && !method_exists($mysqli,
'mysqli_get_client_stats')) {
echo 'mysqli_get_client_stats not a class method ';
}

if (function_exists(mysqli_get_connection_stats) &&
!method_exists($mysqli, 'mysqli_get_connection_stats')) {
echo 'mysqli_get_connection_stats not a class method ';
}
?>

Expected result:

no output expected

Actual result:
--
mysqli_fetch_all not a class method
mysqli_get_cache_stats not a class method
mysqli_get_client_stats not a class method
mysqli_get_connection_stats not a class method

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



#47949 [NEW]: Return value of a registered completion function is not tested

2009-04-11 Thread rannou dot sebastien at gmail dot com
From: rannou dot sebastien at gmail dot com
Operating system: GNU/Linux
PHP version:  5.2.9
PHP Bug Type: Readline related
Bug description:  Return value of a registered completion function is not tested

Description:

If the registered function from readline_completion_function returns an
empty array, a segmentation fault happens when trying to tab.

Reproduce code:
---
 ');

?>

Expected result:

Doing nothing or printing a new prompt.

Actual result:
--
$> php script.php
> 
Segmentation fault
$>

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



#47928 [Fbk->Opn]: PHP crashes when using MySQLi-Statement

2009-04-11 Thread jjuergens at web dot de
 ID:   47928
 User updated by:  jjuergens at web dot de
 Reported By:  jjuergens at web dot de
-Status:   Feedback
+Status:   Open
 Bug Type: MySQLi related
 Operating System: Opensuse 11.1
 PHP Version:  5.2.9
 New Comment:

Ok, I just downloaded the latest version (php5.2-200904110630) and
compiled it with the following options:


'./configure'  '--prefix=/temp/php' '--enable-libxml'
'--enable-session' '--with-mm' '--with-pcre-r
egex=/usr' '--enable-xml' '--enable-simplexml' '--enable-spl'
'--enable-filter' '--disable-debug' '--enable-inline-optimi
zation' '--disable-rpath' '--disable-static' '--enable-shared'
'--program-suffix=5' '--with-pic' '--with-gnu-ld' '--with-
system-tzdata=/usr/share/zoneinfo' '--enable-cli'
'--with-pear=/usr/share/php5/PEAR' '--enable-bcmath=shared' '--enable-c
alendar=shared' '--enable-ctype=shared' '--enable-dbase=shared'
'--enable-dom=shared' '--enable-exif=shared' '--enable-ft
p=shared' '--enable-mbstring=shared' '--enable-mbregex'
'--enable-pcntl=shared' '--enable-posix=shared' '--enable-shmop=s
hared' '--enable-soap=shared' '--enable-sockets=shared'
'--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sys
vshm=shared' '--enable-tokenizer=shared' '--enable-wddx=shared'
'--with-zlib=shared' '--with-bz2=shared' '--with-curl=sha
red' '--with-gd=shared' '--enable-gd-native-ttf' '--with-xpm-dir=/usr'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '
--with-jpeg-dir=/usr' '--with-zlib-dir=/usr' '--with-t1lib=/usr'
'--with-gettext=shared' '--with-gmp=shared' '--enable-ha
sh=shared' '--with-iconv=shared' '--with-imap-ssl'
'--enable-json=shared' '--with-libedit=shared,/usr' '--with-mcrypt=sha
red' '--with-mysql=shared,/usr'
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli'
'--with-ncurses=shared' '--
with-unixODBC=shared,/usr' '--with-openssl=shared'
'--with-xmlrpc=shared' '--enable-xmlreader=shared' '--enable-xmlwriter
=shared' '--with-xsl=shared' '--with-tidy=shared,/usr'
'--enable-dba=shared' '--with-db4=/usr' '--without-gdbm' '--with-c
db' '--with-inifile' '--with-flatfile' '--enable-pdo=shared'
'--with-pdo_sqlite=shared,/usr' '--with-pdo-mysql=shared,/us
r' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-sqlite=shared,/usr'
'--enable-sqlite-utf8' '--enable-zip=shared' '--dis
able-cgi'



Running it with the same code I posted here I get a memory-error again.
But Valgrind shows some different output than before:


>valgrind /temp/php/bin/php5 mysqli.php
==19284== Memcheck, a memory error detector.
==19284== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==19284== Using LibVEX rev 1854, a library for dynamic binary
translation.
==19284== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==19284== Using valgrind-3.3.1, a dynamic binary instrumentation
framework.
==19284== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==19284== For more details, rerun with: -v
==19284==
==19284== Invalid read of size 4
==19284==at 0x81A16EA: _zval_ptr_dtor (zend_execute_API.c:412)
==19284==by 0x81B9E29: zend_hash_destroy (zend_hash.c:526)
==19284==by 0x81AEA3C: _zval_dtor_func (zend_variables.c:43)
==19284==by 0x81A1747: _zval_ptr_dtor (zend_variables.h:35)
==19284==by 0x81B9A81: zend_hash_apply_deleter (zend_hash.c:611)
==19284==by 0x81B9D46: zend_hash_graceful_reverse_destroy
(zend_hash.c:646)
==19284==by 0x81A4582: shutdown_executor (zend_execute_API.c:239)
==19284==by 0x81AF66E: zend_deactivate (zend.c:860)
==19284==by 0x81673C7: php_request_shutdown (main.c:1492)
==19284==by 0x8226483: main (php_cli.c:1343)
==19284==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==19284==
==19284== Process terminating with default action of signal 11
(SIGSEGV)
==19284==  Access not within mapped region at address 0x0
==19284==at 0x81A16EA: _zval_ptr_dtor (zend_execute_API.c:412)
==19284==by 0x81B9E29: zend_hash_destroy (zend_hash.c:526)
==19284==by 0x81AEA3C: _zval_dtor_func (zend_variables.c:43)
==19284==by 0x81A1747: _zval_ptr_dtor (zend_variables.h:35)
==19284==by 0x81B9A81: zend_hash_apply_deleter (zend_hash.c:611)
==19284==by 0x81B9D46: zend_hash_graceful_reverse_destroy
(zend_hash.c:646)
==19284==by 0x81A4582: shutdown_executor (zend_execute_API.c:239)
==19284==by 0x81AF66E: zend_deactivate (zend.c:860)
==19284==by 0x81673C7: php_request_shutdown (main.c:1492)
==19284==by 0x8226483: main (php_cli.c:1343)
==19284==
==19284== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from
1)
==19284== malloc/free: in use at exit: 790,981 bytes in 7,064 blocks.
==19284== malloc/free: 7,399 allocs, 335 frees, 1,180,249 bytes
allocated.
==19284== For counts of detected errors, rerun with: -v
==19284== searching for pointers to 7,064 not-freed blocks.
==19284== checked 1,025,176 bytes.
==19284==
==19284== LEAK SUMMARY:
==19284==definitely lost: 0 bytes in 0 blocks.
==19284==  possibly lost: 0 bytes in 0 bloc