#48476 [NEW]: cloning extended DateTime class without calling parent::__constr crashed PHP

2009-06-05 Thread rvanvelzen at expert-shops dot com
From: rvanvelzen at expert-shops dot com
Operating system: CentOS 5.2
PHP version:  5.2.9
PHP Bug Type: Reproducible crash
Bug description:  cloning extended DateTime class without calling 
parent::__constr crashed PHP

Description:

When trying to clone an extended class of DateTime of which the
constructor doesn't call parent::__construct, this causes PHP to die.

Reproduce code:
---


Expected result:

object(MyDateTime)#2 (0) {
}


Actual result:
--
Nothing, PHP crashes

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



#48476 [Opn->Asn]: cloning extended DateTime class without calling parent::__constr crashed PHP

2009-06-05 Thread derick
 ID:   48476
 Updated by:   der...@php.net
 Reported By:  rvanvelzen at expert-shops dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: CentOS 5.2
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  derick


Previous Comments:


[2009-06-05 09:29:05] rvanvelzen at expert-shops dot com

Description:

When trying to clone an extended class of DateTime of which the
constructor doesn't call parent::__construct, this causes PHP to die.

Reproduce code:
---


Expected result:

object(MyDateTime)#2 (0) {
}


Actual result:
--
Nothing, PHP crashes





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



#48477 [NEW]: Session always store content in UTF-8

2009-06-05 Thread dayseye at 21cn dot com
From: dayseye at 21cn dot com
Operating system: Win32
PHP version:  5.3.0RC2
PHP Bug Type: Session related
Bug description:  Session always store content in UTF-8

Description:

I write some code in charset "GBK" and use session to store some text.
When I get the $_SESSION data, found it's UTF-8, which behave different 
from PHP5.2.x

Reproduce code:
---
test.php (ASNI)



Expected result:

display:
=
ÕÅÃô·å

Actual result:
--
display:
=
text can't viewed  correctly in charset "GBK".

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



#48478 [NEW]: Super-globals cannot be accessed with literal keys

2009-06-05 Thread arancaytar dot ilyaran at gmail dot com
From: arancaytar dot ilyaran at gmail dot com
Operating system: Ubuntu 9.04
PHP version:  6CVS-2009-06-05 (snap)
PHP Bug Type: Arrays related
Bug description:  Super-globals cannot be accessed with literal keys

Description:

In the current snapshot of PHP6, the values stored in the "internal"
$_SERVER and $_ENV super-globals cannot be accessed using literal string
keys like $_SERVER['SCRIPT_NAME'].

This is because the array keys in these super-globals are of type
"string", while literals in the script implicitly are of type "unicode".

This problem does not occur in $_GET, $_POST and $_REQUEST, because the
request parameter names are implicitly in unicode too.

Reproduce code:
---
// This will fail and print a notice:
print $_ENV['SHELL'] . "\n";

// This works:
foreach($_ENV as $key => $value)
  if ($key == 'SHELL')
print $_ENV[$key] . "\n";

// This will work:
foreach ($_ENV as $key => $value)
  $_ENV["$key"] = $value;
print $_ENV['SHELL'] . "\n";

Expected result:

/bin/bash
/bin/bash
/bin/bash

Actual result:
--
Notice: Undefined index: SHELL in - on line 2

/bin/bash
/bin/bash


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



#48479 [NEW]: enable-zend-multibyte breaks compilation

2009-06-05 Thread gabriel at e-radical dot ro
From: gabriel at e-radical dot ro
Operating system: Centos 5.3
PHP version:  5.3.0RC2
PHP Bug Type: Compile Failure
Bug description:  enable-zend-multibyte breaks compilation

Description:

If you use --enable-zend-multibyte the compiles exists.

Reproduce code:
---
./configure --cache-file=../php-5.3.0RC2.cache --with-apxs2   \
--with-gd --enable-gd-native-ttf --with-gettext --enable-ftp  \
--enable-soap --with-curl --with-zlib --enable-mod-charset\
--disable-short-tags --with-openssl --with-kerberos --with-pcre-regex \
--without-sqlite3 --enable-bcmath --with-bz2 --enable-calendar\
--enable-ctype --with-curl --disable-dba --enable-dom --enable-exif   \
--enable-fileinfo --enable-filter --enable-ftp --enable-gd-jis-conv   \
--with-gmp --with-mhash --enable-hash --with-iconv --with-imap\
--with-imap-ssl --enable-intl --enable-json --with-ldap   \
--with-ldap-sasl --enable-mbstring --enable-mbregex   \
--enable-mbregex-backtrack --with-libmbfl --with-onig --with-mcrypt   \
--with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-pcntl \
--enable-pdo --with-pdo-mysql=mysqlnd --without-pdo-sqlite\
--enable-phar --enable-posix --without-libedit --without-readline \
--without-recode --enable-session --without-mm --enable-shmop \
--enable-simplexml --with-snmp --with-openssl-dir --enable-soap   \
--enable-ucd-snmp-hack --enable-sockets --without-sqlite  \
--enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy\
--enable-wddx --enable-xml --enable-xmlreader --with-xmlrpc   \
--enable-xmlwriter --with-xsl --enable-zip --with-pcre-dir\
--enable-mysqlnd-threading --with-pear --enable-zend-multibyte

Actual result:
--
/bin/sh /root/installed/php-5.3.0RC2/libtool --silent --preserve-dup-deps
--mode=compile /root/installed/php-5.3.0RC2/meta_ccld  -Iext/mbstring/
-I/root/installed/php-5.3.0RC2/ext/mbstring/ -DPHP_ATOM_INC
-I/root/installed/php-5.3.0RC2/include -I/root/installed/php-5.3.0RC2/main
-I/root/installed/php-5.3.0RC2
-I/root/installed/php-5.3.0RC2/ext/ereg/regex -I/usr/include/libxml2
-I/usr/kerberos/include -I/root/installed/php-5.3.0RC2/ext/date/lib
-I/usr/include/imap -I/root/installed/php-5.3.0RC2/ext/mbstring/oniguruma
-I/root/installed/php-5.3.0RC2/ext/mbstring/libmbfl
-I/root/installed/php-5.3.0RC2/ext/mbstring/libmbfl/mbfl
-I/root/installed/php-5.3.0RC2/TSRM -I/root/installed/php-5.3.0RC2/Zend   
-I/usr/include -g -O2 -fvisibility=hidden -DZTS   -c
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c -o
ext/mbstring/mbstring.lo 
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:4726: error: static
declaration of 'php_mb_set_zend_encoding' follows non-static declaration
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:1451: error: previous
implicit declaration of 'php_mb_set_zend_encoding' was here
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c: In function
'php_mb_set_zend_encoding':
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:4757: error:
'php_mb_encoding_detector' undeclared (first use in this function)
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:4757: error: (Each
undeclared identifier is reported only once
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:4757: error: for each
function it appears in.)
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:4758: error:
'php_mb_encoding_converter' undeclared (first use in this function)
/root/installed/php-5.3.0RC2/ext/mbstring/mbstring.c:4759: error:
'php_mb_oddlen' undeclared (first use in this function)
make: *** [ext/mbstring/mbstring.lo] Error 1


-- 
Edit bug report at http://bugs.php.net/?id=48479&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48479&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48479&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48479&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48479&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48479&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48479&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=48479&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=48479&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=48479&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=48479&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=48479&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=48479&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=48479&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=4

#48480 [NEW]: oci_bind_by_name() binds non-existing variables

2009-06-05 Thread s dot pfalz at teles dot de
From: s dot pfalz at teles dot de
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: OCI8 related
Bug description:  oci_bind_by_name() binds non-existing variables

Description:

When using oci_bind_by_name() to add data feed by an associative array,
this function adds non-existant data! 
In the example code the function getDataArray() contains an associative
array with a master key called A,B and C. 
A and B arrays are complete, however for master key C the sub-fields "f1"
and "f2" are missing.
The code simply loops through the array, binds the values and execute the
query. Normally I would expect to run both A and B queries without any
problem, however for the C query I would expect that OCI8 lib complains
about not all variables bound. See expected/actual result what happened.

Reproduce code:
---
// Requires table: CREATE TABLE TESTOCI(NAME VARCHAR2(10),f1 VARCHAR2(80),
f2 VARCHAR2(80));
function getDataArray($which)
  {
  $data['A']['name']  = 'NAME_A';
  $data['A']['f1']= 'A_VAL_F1';
  $data['A']['f2']= 'A_VAL_F2';
  $data['B']['name']  = 'NAME_B';
  $data['B']['f1']= 'B_VAL_F1';
  $data['B']['f2']= 'B_VAL_F2';
  $data['C']['name']  = 'NAME_C';
  return($data[$which]);
  }

ini_set('error_reporting', E_ALL|E_NOTICE);
$sock = OCILogon('scott','tiger');
$stmt = OCIParse($sock,'INSERT INTO TESTOCI(NAME,F1,F2)
VALUES(:name,:f1,:f2)');
$tdat = array('A','B','C');
for($i =0 ; $i < count($tdat); $i++)
  {
  $what = array();
  printf("HANDLING SET=%s\n",$tdat[$i]);
  $what = getDataArray($tdat[$i]);
  print_r($what);
  foreach($what AS $n => $v)
{
printf("Calling OCIBindByName(\$stmt,'%s','%s',-1)\n",$n,$what[$n]);
$rc = OCIBindByName($stmt,$n,$what[$n],-1);
printf("OCIBindByName() returned %s\n",$rc);
}
  print_r($what);
  OCIExecute($stmt,OCI_DEFAULT);
  unset($what);
  }
OCIFreeStatement($stmt);
OCICOMMIT($sock);
OCILogoff($sock);



Expected result:

I would expect that for the data array 'C' an error message should occure
stating that not all variables are bound (f1,f2). So the contents of the
table should be empty because the code should abort, and COMMIT_ON_SUCCESS
is not set.



Actual result:
--
After running the code, the table contents look like this:

SQL> SELECT NAME,F1,F2 FROM TESTOCI;

NAMEF1  F2

NAME_A  A_VAL_F1A_VAL_F2
NAME_B  B_VAL_F1B_VAL_F2
NAME_C  B_VAL_F1B_VAL_F2

I really wonder how it is possible that the 3rd line contains the values
of the previous call??

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



#48481 [Opn->Bgs]: get_class_methods behaviour in inherited classes

2009-06-05 Thread xsist10 at gmail dot com
 ID:   48481
 User updated by:  xsist10 at gmail dot com
 Reported By:  xsist10 at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Ubuntu 9.04
 PHP Version:  5.2.9
 New Comment:

return get_class_methods(__CLASS__);

should be:

return get_class_methods($this);


Previous Comments:


[2009-06-05 13:17:03] xsist10 at gmail dot com

Description:

get_class_methods returns the parents methods when called from a
protected/public function in the parent from an inherited child.

Reproduce code:
---
class Foo {
function getFunctions() {
return get_class_methods(__CLASS__);
}

function test1() {
}
}

class Bar extends Foo {
function test2() {
}
}

$bar = new Bar();
print_r($bar->getFunctions());

Expected result:

Array ( [0] => getFunctions [1] => test1 [2] => test2 ) 

Actual result:
--
Array ( [0] => getFunctions [1] => test1 ) 





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



#48481 [NEW]: get_class_methods behaviour in inherited classes

2009-06-05 Thread xsist10 at gmail dot com
From: xsist10 at gmail dot com
Operating system: Ubuntu 9.04
PHP version:  5.2.9
PHP Bug Type: Class/Object related
Bug description:  get_class_methods behaviour in inherited classes

Description:

get_class_methods returns the parents methods when called from a
protected/public function in the parent from an inherited child.

Reproduce code:
---
class Foo {
function getFunctions() {
return get_class_methods(__CLASS__);
}

function test1() {
}
}

class Bar extends Foo {
function test2() {
}
}

$bar = new Bar();
print_r($bar->getFunctions());

Expected result:

Array ( [0] => getFunctions [1] => test1 [2] => test2 ) 

Actual result:
--
Array ( [0] => getFunctions [1] => test1 ) 

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



#48477 [Opn]: Session always store content in UTF-8

2009-06-05 Thread dayseye at 21cn dot com
 ID:   48477
 User updated by:  dayseye at 21cn dot com
 Reported By:  dayseye at 21cn dot com
 Status:   Open
 Bug Type: Session related
 Operating System: Win32
-PHP Version:  5.3.0RC2
+PHP Version:  5.3.0RC3-dev
 New Comment:

5.3.0RC2 is OK, RC3-dev cause the problem.


Previous Comments:


[2009-06-05 09:50:30] dayseye at 21cn dot com

Description:

I write some code in charset "GBK" and use session to store some text.
When I get the $_SESSION data, found it's UTF-8, which behave different

from PHP5.2.x

Reproduce code:
---
test.php (ASNI)



Expected result:

display:
=
ÕÅÃô·å

Actual result:
--
display:
=
text can't viewed  correctly in charset "GBK".





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



#42060 [Asn]: [PATCH] LDAP: Add pagedResults support and more

2009-06-05 Thread pajoye
 ID:   42060
 Updated by:   paj...@php.net
 Reported By:  iarenuno at eteo dot mondragon dot edu
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS, 6CVS (2008-11-01)
-Assigned To:  pajoye
+Assigned To:  patrickallaert
 New Comment:

>> get some help :)


Previous Comments:


[2008-11-16 14:57:56] paj...@php.net

Alexey has ported the patch to 5.3, it will committed in the next days.



[2008-07-17 13:00:37] ando at sys-net dot it

I didn't get any notification about this message, so I overlooked it; I
was pointed here by a user (like many others) interested in the
functionalities provided by the patch.  In the meanwhile, I noticed that
the code, after more than 2 years of inactivity, is now incompatible
with the patch.  Fixing it will require an amount of time that is
incompatible with my current schedule.  Feel free to fix it yourself. 
Cheers, p.



[2008-06-05 19:10:08] paj...@php.net

After a little discussions about windows with Howard, he pointed me to
this bug report. 

It is now the right time to apply such patch (or any other new
features) to ext/ldap as we are getting closer to the PHP 5.3 features
freeze.

Ando, do you have the time to work on it for php5.3?





[2007-09-07 18:40:25] ando at sys-net dot it

A working patch with test examples lined up to HEAD as of 5 minutes ago
is available here



I'm the original developer, and I'm willing to cooperate in integrating
it, if needed.  So you can re-open the bug now.

p.



[2007-07-21 16:08:17] j...@php.net

New features are not added in bugfix releases so this'll have to wait
til we start the 5.3 branch.



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/42060

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



#44462 [Com]: Can not compile embed sapi on OSX

2009-06-05 Thread ralph at smashlabs dot com
 ID:   44462
 Comment by:   ralph at smashlabs dot com
 Reported By:  graham+php at nexopia dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: OSX
 PHP Version:  5.2CVS-2009-03-25
 New Comment:

I can confirm this is still an issue


  ld: duplicate symbol _spl_ce_SplDoublyLinkedList in
ext/spl/.libs/spl_dllist.o and ext/spl/.libs/php_spl.o
  collect2: ld returned 1 exit status
  make: *** [libphp5.la] Error 1 


I can compile statically though.  Can you reopen?


Previous Comments:


[2009-04-09 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2009-04-01 11:25:00] j...@php.net

There is no working patch here. Or are you saying you can not compile 
PHP (without the experimental embed sapi)? FYI: it works fine for me.




[2009-03-25 18:28:07] graham+php at nexopia dot com

Incidentally, this bug is now a year old, has a functioning patch that
resolves the issue, and has still not been fixed upstream.



[2008-04-25 17:56:46] cthompson at nexopia dot com

I just sent the following to the php-install mailing list for
feedback.

Modify php-5.2.5/Zend/zend_ini_scanner.c:

--- /Users/cthompson/php-5.2.5.clean/Zend/zend_ini_scanner.c   
2007-11-08 09:36:37.0 -0600
+++ ./zend_ini_scanner.c2008-04-25 10:16:27.0 -0600
@@ -478,7 +478,7 @@
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+//char *yytext;
 #define INITIAL 0
 /*

+--+


Modify php-5.2.5/Zend/zend_language_scanner.c:
--- /Users/cthompson/php-5.2.5.clean/Zend/zend_language_scanner.c
2007-11-08 09:36:37.0 -0600
+++ ./zend_language_scanner.c2008-04-25 10:17:15.0 -0600
@@ -3009,7 +3009,7 @@
 #define yymore() (yy_more_flag = 1)
 #define YY_MORE_ADJ yy_more_len
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+//char *yytext;
 #define INITIAL 0

 /*


This REMOVES the definition of yytext.  I think this is okay because
the various defines in those files actually end up using the yy_text in
zend_global.h, at least as far as I can see.

Certainly, this allows PHP to compile but I am not at all sure if this
is going to cause other problems.  Could someone please give me some
feedback?


Additionally, I believe php-5.2.5/sapi/cli/config.m4 should be modified
to compile using libtool on OS X:
--- /Users/cthompson/php-5.2.5.clean/sapi/cli/config.m42007-07-11
17:20:36.0 -0600
+++ ./config.m42008-04-25 11:51:57.0 -0600
@@ -17,7 +17,7 @@
 BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg
\`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed
's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") ||
(\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) {
print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC)
-export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS)
\$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym
\$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS)
\$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
 ;;
   *darwin*)
-BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS)
\$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS)
\$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS)
\$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) \$(CFLAGS_CLEAN)
\$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS)
\$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS)
\$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
 ;;
   *netware*)
 BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic
\$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS)
\$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS)
-Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)"


Of course, the shipping version of PHP 5.2.5 would then also need the
php-5.2.5/configure file changing, though presumably this is
autogenerated from the fragments:
--- /Users/cthompson/php-5.2.5.clean/configure2007-11-08
09:36:28.0 -0600
+++ ./configure2008-04-25 11:27:46.0 -0600
@@ -9180,7 +9180,7 @@
 BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg
\`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed
's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") ||
(\$\$2 == \"D\") || (\$\$2 == \"B\

#48373 [Com]: Unable to combine prepared statements and fetch_row

2009-06-05 Thread jochen dot wiedmann at gmail dot com
 ID:   48373
 Comment by:   jochen dot wiedmann at gmail dot com
 Reported By:  jochen dot wiedmann at gmail dot com
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Fedora Linux 10
 PHP Version:  5.2.9
 New Comment:

Ping?


Previous Comments:


[2009-05-24 15:27:15] jochen dot wiedmann at gmail dot com

Description:

This is a follow up to bug 45289, which has been closed due to missing
feedback. I have checked the latest snapshot (php5.2-200905151830),
whether the problem still persists by using the script below. (Should be
easy to derive a .phpt file from it.)


Reproduce code:
---
real_connect("localhost", "root", null, 'test');
  if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
  }
  $mysqli->query("DROP TABLE IF EXISTS prep_and_fetch_row")
or die($mysqli->error);
  $mysqli->query("CREATE TABLE prep_and_fetch_row(id BIGINT NOT NULL
PRIMARY KEY, name VARCHAR(64) NOT NULL)")
or die($mysqli->error);
  $mysqli->query("INSERT INTO prep_and_fetch_row (id, name) VALUES (1,
'abc')")
or die($mysqli->error);
  $stmt = $mysqli->prepare("SELECT * FROM prep_and_fetch_row WHERE
id=?")
or die($mysqli->error);
  $id = "1";
  $stmt->bind_param("i", $id)  or die($mysqli->error);
  $stmt->execute() or die($mysqli->error);
  $result = $mysqli->use_result() or die($mysqli->error);
  while ($row = $result->fetch_row()) {
print "- result row ---\n";
print_r($row);
  }
  print "- no more results ---\n";

  $mysqli->query("DROP TABLE prep_and_fetch_row") or
die($mysqli->error);
  $mysqli->close();
?>


Expected result:

Expected output: Something like

- result row ---
Array
(
[0] => int(1)
[1] => string(3) "abc"
)
- no more results ---


Actual result:
--
Actual output:

- result row ---
Array
(
[0] => 
[1] => 
)
- no more results ---






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



#48483 [NEW]: this pointer is not passed by reference correctly

2009-06-05 Thread chase at circleofmoms dot com
From: chase at circleofmoms dot com
Operating system: ubuntu 8.04
PHP version:  5.2.9
PHP Bug Type: Class/Object related
Bug description:  this pointer is not passed by reference correctly

Description:

When you pass the $this pointer by reference and change data for the
object it points to, that data is not correctly updated.

Reproduce code:
---
function changeAddress(&$oldThing) {
$oldThing = new Thing();
}

class Thing {
  var $data;
  public function updateData($newData) {
ThingChanger::changeData($this,$newData);
var_dump($this);
var_dump($this->data);
  }
}

class ThingChanger {
  public static function changeData(&$thingToChange,$newData) {
changeAddress($thingToChange);
$thingToChange->data = $newData;
  }
}

$thing = new Thing();
$thing->data = "foo";
$thing->updateData("bar");

Expected result:

object(Thing)#2 (1) {
  ["data"]=>
  string(3) "bar"
}
string(3) "bar"


Actual result:
--
object(Thing)#2 (1) {
  ["data"]=>
  string(3) "bar"
}
string(3) "foo"


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



#48482 [NEW]: add $is_html optional parameter to highlight_*

2009-06-05 Thread php dot net at fuscata dot com
From: php dot net at fuscata dot com
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  add $is_html optional parameter to highlight_*

Description:

highlight_string() and highlight_file() return XHTML code. Please add the
optional parameter $is_xhtml similar to nl2br().


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