Bug #52255 [Opn-Bgs]: SDO_DAS_XML

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52255edit=1

 ID:   52255
 Updated by:   johan...@php.net
 Reported by:  cybermerlin at ya dot ru
 Summary:  SDO_DAS_XML
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  *General Issues
 Operating System: win.xp.sp3
 PHP Version:  5.3.3RC2

 New Comment:

Please use the pecl.php.net bug tracker for PECL bugs.
http://pecl.php.net/bugs/report.php?package=SCA_SDO in this case.


Previous Comments:

[2010-07-05 19:27:45] cybermerlin at ya dot ru

Description:

error:Class 'SDO_DAS_XML' not found in 



php_sdo_das_xml.dll for winXP SP3 - not found in SVC

Test script:
---
$xsd = SDO_DAS_XML::create('ExpandedData.xsd');

Expected result:

faultCode1faultStringFatal error:Class 'SDO_DAS_XML' not found in 







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


[PHP-BUG] Bug #52262 [NEW]: json_decode reports no error while returning NULL

2010-07-06 Thread r...@php.net
From: 
Operating system: Linux/Ubuntu
PHP version:  5.3.2
Package:  JSON related
Bug Type: Bug
Bug description:json_decode reports no error while returning NULL

Description:

I'm attempting to use json_decode on a relatively long piece of JSON. The
JSON 

is returned successfully by file_get_contents, and is valid according to 

JSONLint.



What I expect to happen is for the JSON to be correctly decoded, or NULL to
be 

returned and json_last_error to be populated with the reason. For some
reason 

NULL is returned and json_last_error remains at 0.



I have a feeling that this could be to do with the length of the file 

(containing a large array of objects).



I'm currently using:



r...@ross-laptop:/$ php -v



PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:01:00)


Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Test script:
---
?php

$raw =
file_get_contents(http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0001/?gameid=440;);



$decoded = json_decode($raw);



$errors = array(

JSON_ERROR_NONE = No error has occurred,

JSON_ERROR_DEPTH = The maximum stack depth has been exceeded,

JSON_ERROR_CTRL_CHAR = Control character error, possibly incorrectly
encoded,

JSON_ERROR_SYNTAX = Syntax error,

//JSON_ERROR_UTF8 = Malformed UTF-8 characters, possibly incorrectly
encoded

);



var_dump(Raw result:, $raw, \n\n);

var_dump(Decoded result:, $decoded, \n\n);

var_dump(JSON errors:, $errors[json_last_error()]);

Expected result:

Raw result: (long raw json)

Decoded result: object stdClass(1) { (data array) }

JSON errors: string No error has occurred

Actual result:
--
Raw result: (long raw json)

Decoded result: NULL

JSON errors: string No error has occurred

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



Bug #51583 [Ver-Csd]: Bus error due to wrong alignment in mysqlnd

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=51583edit=1

 ID:   51583
 Updated by:   and...@php.net
 Reported by:  rainer dot jung at kippdata dot de
 Summary:  Bus error due to wrong alignment in mysqlnd
-Status:   Verified
+Status:   Closed
 Type: Bug
 Package:  MySQL related
 Operating System: Solaris Sparc
 PHP Version:  5.3.2
 Assigned To:  mysql

 New Comment:

Patch is in branch and trunk, will appear in 5.3.3.



Thanks!


Previous Comments:

[2010-04-19 17:03:18] and...@php.net

I will take care of this. This week my Linux/Sparc box will be running
again.


[2010-04-17 22:55:25] rainer dot jung at kippdata dot de

I checked the snapshot. Exactly the same problem. Please have a look at
my analysis and patch proposal. Thanks!


[2010-04-17 18:29:20] fel...@php.net

Please try using this snapshot:

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

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




[2010-04-17 17:44:54] rainer dot jung at kippdata dot de

Description:

Using any of pdo-mysql, mysqli or mysql against mysqlnd results in a bus
error on Solaris Sparc. This is due to a wrong alignment assumption that
produces crashes because Sparc is strict about alignment.



The resulting core inspected via GDB shows:



Core was generated by `bin/php -c lib/php.ini mysql.php'.

Program terminated with signal 10, Bus error.

#0  0x0027d7f4 in php_mysqlnd_net_send_pub (conn=0x669928,
buf=0xffbeee63 , count=1)

at /some/path/php53/ext/mysqlnd/mysqlnd_net.c:281

281 STORE_HEADER_SIZE(safe_storage, p);



(gdb) bt full

#0  0x0027d7f4 in php_mysqlnd_net_send_pub (conn=0x669928,
buf=0xffbeee63 , count=1)

at /some/path/php53/ext/mysqlnd/mysqlnd_net.c:281

safe_buf = \000\000\000

net = (MYSQLND_NET *) 0x669370

old_chunk_size = 8192

ret = 0

packets_sent = 1

left = 1

p = (zend_uchar *) 0xffbeee63 

compress_buf = (zend_uchar *) 0x0

to_be_sent = 1

#1  0x0027552c in php_mysqlnd_cmd_write (_packet=0x6692b8,
conn=0x669928)

at /some/path/php53/ext/mysqlnd/mysqlnd_wireprotocol.c:683

buffer = \000\000\000\000\001

net = (MYSQLND_NET *) 0x669370

written = value optimized out

#2  0x00272154 in php_mysqlnd_conn_simple_command_pub (conn=0x669928,
command=COM_QUIT, arg=value optimized out, arg_len=value optimized
out, ok_packet=PROT_LAST,

silent=1 '\001', ignore_upsert_status=1 '\001') at
/some/path/php53/ext/mysqlnd/mysqlnd.c:380

_p_s = (MYSQLND_STATS *) 0x7efa10

ret = value optimized out

cmd_packet = (MYSQLND_PACKET_COMMAND *) 0x6692b8

#3  0x0026f920 in mysqlnd_send_close (conn=0x669928) at
/some/path/php53/ext/mysqlnd/mysqlnd.c:1393

ret = value optimized out

#4  0x00270560 in php_mysqlnd_conn_close_pub (conn=0x669928,
close_type=value optimized out)

at /some/path/php53/ext/mysqlnd/mysqlnd.c:1461

_p_s = (MYSQLND_STATS *) 0x7dafb8

stat = STAT_CLOSE_EXPLICIT

close_type_to_stat_map = {STAT_CLOSE_EXPLICIT,
STAT_CLOSE_IMPLICIT, STAT_CLOSE_DISCONNECT}

#5  0xfee47a70 in _close_mysql_link (rsrc=0x672150) at
/some/path/php53/ext/mysql/php_mysql.c:355

link = (php_mysql_conn *) 0x669358

handler = (void (*)(int)) 0x1

...



(gdb) print p

$1 = (zend_uchar *) 0xffbeee63 

(gdb) up

#1  0x0027552c in php_mysqlnd_cmd_write (_packet=0x6692b8,
conn=0x669928)

at /some/path/php53/ext/mysqlnd/mysqlnd_wireprotocol.c:683

683 written = conn-net-m.send(conn, buffer, 1
TSRMLS_CC);

(gdb) print buffer

$2 = (char (*)[5]) 0xffbeee63



Further Analysis shows:



- STORE_HEADER_SIZE() is a macro defined in the same file as:

int4store((safe_storage), (*(uint32_t *)(buffer)))

  Note that buffer gets cast via (uint32_t *)



- buffer is not aligned on a 4 byte boundary, in fact it is an odd
address.

  In the above example it was allocated in line 680 of
mysqlnd_wireprotocol.c,

  without any alignment enforcement: char buffer[MYSQLND_HEADER_SIZE +
1];



- thus casting buffer to an (unsigned int *) crashes



Since both macros STORE_HEADER_SIZE and RESTORE_HEADER_SIZE seem to be
used in places, where there can be made no assumption about the
alignment of the buffer, the attached patch proposes to copy the header
bytes as four individual byte operations. Platform specific
optimizations might be applied, but at least the patch seems to be a
robust solution. The patch was done against trunk, same patch applies
with offset to 5_3 branch.

Test script:
---
h2MySQL Test/h2

?php

  ini_set ('display_errors', 

Bug #52082 [Ver-Csd]: character_set_client character_set_connection reset after mysqli_change_user

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=52082edit=1

 ID:   52082
 Updated by:   and...@php.net
 Reported by:  and...@php.net
 Summary:  character_set_client  character_set_connection reset
   after mysqli_change_user
-Status:   Verified
+Status:   Closed
 Type: Bug
 Package:  MySQLi related
 Operating System: All
 PHP Version:  5.3SVN-2010-06-14 (SVN)
 Assigned To:  mysql

 New Comment:

Already fixed and reported in NEWS. Closing.


Previous Comments:

[2010-06-14 19:16:23] and...@php.net

Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=300435
Log: Fixed bug #52082 (character_set_client amp;
character_set_connection reset after
mysqli_change_user())

libmysql gt;= 5.1.23 will PASS, older library versions will fail


[2010-06-14 18:28:21] and...@php.net

Description:

After calling mysqli_change_user() character_set_client and
character_set_result are reset to the server defaults. If the client has
set a different one with mysqli_options() or mysqli_set_character_set()
it will be lost.

The MySQL server supports from version 5.1.23 setting of a charset
during COM_CHANGE_USER, an extension in the protocol. Older versions
doesn't support it and need explicit call to mysql_set_character_set().

Expected result:

Keep the old character_set_client/connection.







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


Bug #52196 [Asn]: MysqlSTMT could not effectively support dynamic SQL with Prepare Statement

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=52196edit=1

 ID:   52196
 Updated by:   and...@php.net
 Reported by:  lanpioneer at 126 dot com
 Summary:  MysqlSTMT could not effectively support dynamic SQL
   with Prepare Statement
 Status:   Assigned
 Type: Bug
 Package:  MySQL related
 Operating System: Linux
 PHP Version:  5.3.2
 Assigned To:  mysql

 New Comment:

Hi, 

I needed to do some changes to the attached script. MySQL knows utf8 but
not utf-8. Because I use CLI for testing I added some \n-s in the
printfs. Also, `set @count` is not a valid SQL statement, returns an
error, should be `set @count=NULL`.

After these changes, here is my output on the console (it seems
right?):



 php failedpagedrecoreds.php.patch.txt

html

head

meta http-equiv=Content-Type content=text/html; charset=utf-8 /

titletitle/title



/head

  body

table border=1

  tr

   tdName/td

   tdSize/td

   tdDesp/td

  /tr



  liname=BoostWEB/li

liname=Clever Terminal/li

liname=中文论坛/li

liname=WinGate/li

liname=Copernic 99/li

trtdBoostWEB/tdtd304KB/tdtd最佳化Cache,浏览网页速度快/td/tr

trtdClever
Terminal/tdtd655KB/tdtd非常好的TelNet软件/td/tr

trtd中文论坛/tdtd655KB/tdtd建立BBS的好软件/td/tr

trtdWinGate/tdtd2523KB/tdtd多台电脑共用一个MODEN上网的软件/td/tr

trtdCopernic 99/tdtd2404KB/tdtdSearch工具/td/tr

/table

/body

/html


Previous Comments:

[2010-06-28 14:33:54] lanpioneer at 126 dot com

I used mysqlnd and Linux version is Linux version 2.6.9-78.ELsmp
(brewbuil...@hs20-bc2-3.build.redhat.com)

Also, i tried to test it on windows but it still like that.


[2010-06-28 12:57:33] and...@php.net

Hi,

can you give us more data:

- Do you use mysqlnd or libmysql? (--with-mysqli=mysqlnd or
--with-mysqli)

- What is the server version?

- Can you provide us with an SQL dump which includes the some data in
the `software` table, as well as the SP you have already provided

- And then a minimal script, which shows the problem.



Thank you!



Andrey


[2010-06-27 06:45:05] lanpioneer at 126 dot com

Description:

Hi, I found this problem but i could not find any suggestion in google,
so I think that was probable a bug in Mysqli_STMT:

first,I create a dynamic SQL Procedure example:

CREATE UP_Get_PagedSoftware(

IN VI_PageSize INT,

IN VI_PageNow INT,

OUT OV_ROWS INT

 )

BEGIN

   DECLARE UV_BeginRow INT DEFAULT 0;

   DECLARE UV_dynamicSQL VARCHAR(1000);

   SET UV_BeginRow = (VI_PageNow-1)*VI_PageSize;

   

   SELECT COUNT(id) INTO OV_ROWS FROM software;

   

   SET UV_dynamicSQL = CONCAT_WS(' ','SELECT
Name,Size,Desp FROM software LIMIT',UV_BeginRow,',',VI_PageSize);

   

   SET @dynamicSQL = UV_dynamicSQL;

   PREPARE pager_stmt FROM @dynamicSQL;

   EXECUTE pager_stmt;

   DEALLOCATE PREPARE pager_stmt;

 END

I directly called this procedure in Mysql Command Line that was OK,

But I called this procedure in PHP page, the code is below:

$softlist = array();

if($this-link){

$this-link-query(set names 'utf8');

$this-link-query(SET @count);

$stmt = $this-link-stmt_init();

$stmt = $this-link-prepare('CALL
UP_Get_PagedSoftware(?,?,@count)');

if($stmt){


$stmt-bind_param('ii',$this-pagesize,$currentpage);

$stmt-execute();

$stmt-store_result();

if($this-link-more_results()){

$this-link-next_result();

$rs = $this-link-query('SELECT 
@count');

list($count) = 
$rs-fetch_array(MYSQLI_NUM);

$this-pagecount=(int)$count;

$rs-free();

}

$stmt-bind_result($name,$size,$desp);

while($stmt-fetch()){

  

Bug #52196 [Asn-Fbk]: MysqlSTMT could not effectively support dynamic SQL with Prepare Statement

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=52196edit=1

 ID:   52196
 Updated by:   and...@php.net
 Reported by:  lanpioneer at 126 dot com
 Summary:  MysqlSTMT could not effectively support dynamic SQL
   with Prepare Statement
-Status:   Assigned
+Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux
 PHP Version:  5.3.2
 Assigned To:  mysql



Previous Comments:

[2010-07-06 13:20:29] and...@php.net

Hi, 

I needed to do some changes to the attached script. MySQL knows utf8 but
not utf-8. Because I use CLI for testing I added some \n-s in the
printfs. Also, `set @count` is not a valid SQL statement, returns an
error, should be `set @count=NULL`.

After these changes, here is my output on the console (it seems
right?):



 php failedpagedrecoreds.php.patch.txt

html

head

meta http-equiv=Content-Type content=text/html; charset=utf-8 /

titletitle/title



/head

  body

table border=1

  tr

   tdName/td

   tdSize/td

   tdDesp/td

  /tr



  liname=BoostWEB/li

liname=Clever Terminal/li

liname=中文论坛/li

liname=WinGate/li

liname=Copernic 99/li

trtdBoostWEB/tdtd304KB/tdtd最佳化Cache,浏览网页速度快/td/tr

trtdClever
Terminal/tdtd655KB/tdtd非常好的TelNet软件/td/tr

trtd中文论坛/tdtd655KB/tdtd建立BBS的好软件/td/tr

trtdWinGate/tdtd2523KB/tdtd多台电脑共用一个MODEN上网的软件/td/tr

trtdCopernic 99/tdtd2404KB/tdtdSearch工具/td/tr

/table

/body

/html


[2010-06-28 14:33:54] lanpioneer at 126 dot com

I used mysqlnd and Linux version is Linux version 2.6.9-78.ELsmp
(brewbuil...@hs20-bc2-3.build.redhat.com)

Also, i tried to test it on windows but it still like that.


[2010-06-28 12:57:33] and...@php.net

Hi,

can you give us more data:

- Do you use mysqlnd or libmysql? (--with-mysqli=mysqlnd or
--with-mysqli)

- What is the server version?

- Can you provide us with an SQL dump which includes the some data in
the `software` table, as well as the SP you have already provided

- And then a minimal script, which shows the problem.



Thank you!



Andrey


[2010-06-27 06:45:05] lanpioneer at 126 dot com

Description:

Hi, I found this problem but i could not find any suggestion in google,
so I think that was probable a bug in Mysqli_STMT:

first,I create a dynamic SQL Procedure example:

CREATE UP_Get_PagedSoftware(

IN VI_PageSize INT,

IN VI_PageNow INT,

OUT OV_ROWS INT

 )

BEGIN

   DECLARE UV_BeginRow INT DEFAULT 0;

   DECLARE UV_dynamicSQL VARCHAR(1000);

   SET UV_BeginRow = (VI_PageNow-1)*VI_PageSize;

   

   SELECT COUNT(id) INTO OV_ROWS FROM software;

   

   SET UV_dynamicSQL = CONCAT_WS(' ','SELECT
Name,Size,Desp FROM software LIMIT',UV_BeginRow,',',VI_PageSize);

   

   SET @dynamicSQL = UV_dynamicSQL;

   PREPARE pager_stmt FROM @dynamicSQL;

   EXECUTE pager_stmt;

   DEALLOCATE PREPARE pager_stmt;

 END

I directly called this procedure in Mysql Command Line that was OK,

But I called this procedure in PHP page, the code is below:

$softlist = array();

if($this-link){

$this-link-query(set names 'utf8');

$this-link-query(SET @count);

$stmt = $this-link-stmt_init();

$stmt = $this-link-prepare('CALL
UP_Get_PagedSoftware(?,?,@count)');

if($stmt){


$stmt-bind_param('ii',$this-pagesize,$currentpage);

$stmt-execute();

$stmt-store_result();

if($this-link-more_results()){

$this-link-next_result();

$rs = $this-link-query('SELECT 
@count');

list($count) = 
$rs-fetch_array(MYSQLI_NUM);

$this-pagecount=(int)$count;

$rs-free();

}

   

Bug #52262 [Opn-Asn]: json_decode reports no error while returning NULL

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52262edit=1

 ID:   52262
 Updated by:   johan...@php.net
 Reported by:  r...@php.net
 Summary:  json_decode reports no error while returning NULL
-Status:   Open
+Status:   Assigned
 Type: Bug
 Package:  JSON related
 Operating System: Linux/Ubuntu
 PHP Version:  5.3.2
-Assigned To:  
+Assigned To:  scottmac

 New Comment:

That codition in php_json_decode is hit as utf16_len == -2



utf16_len = utf8_to_utf16(utf16, str, str_len);

if (utf16_len = 0) {

if (utf16) {

efree(utf16);

}

RETURN_NULL();

}


Previous Comments:

[2010-07-06 11:17:59] r...@php.net

Description:

I'm attempting to use json_decode on a relatively long piece of JSON.
The JSON 

is returned successfully by file_get_contents, and is valid according to


JSONLint.



What I expect to happen is for the JSON to be correctly decoded, or NULL
to be 

returned and json_last_error to be populated with the reason. For some
reason 

NULL is returned and json_last_error remains at 0.



I have a feeling that this could be to do with the length of the file 

(containing a large array of objects).



I'm currently using:



r...@ross-laptop:/$ php -v



PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010
20:01:00) 

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Test script:
---
?php

$raw =
file_get_contents(http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0001/?gameid=440;);



$decoded = json_decode($raw);



$errors = array(

JSON_ERROR_NONE = No error has occurred,

JSON_ERROR_DEPTH = The maximum stack depth has been exceeded,

JSON_ERROR_CTRL_CHAR = Control character error, possibly
incorrectly encoded,

JSON_ERROR_SYNTAX = Syntax error,

//JSON_ERROR_UTF8 = Malformed UTF-8 characters, possibly
incorrectly encoded

);



var_dump(Raw result:, $raw, \n\n);

var_dump(Decoded result:, $decoded, \n\n);

var_dump(JSON errors:, $errors[json_last_error()]);

Expected result:

Raw result: (long raw json)

Decoded result: object stdClass(1) { (data array) }

JSON errors: string No error has occurred

Actual result:
--
Raw result: (long raw json)

Decoded result: NULL

JSON errors: string No error has occurred






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


[PHP-BUG] Bug #52263 [NEW]: Script cleanup takes long with Oracle 11 instant client

2010-07-06 Thread andrew at digicol dot de
From: 
Operating system: Linux
PHP version:  5.3.2
Package:  OCI8 related
Bug Type: Bug
Bug description:Script cleanup takes long with Oracle 11 instant client

Description:

PHP scripts that connect to an Oracle 11gR2 database server using version
11 clients (instant client, fat client) hang for approx. one second after
the last command in the script has been executed.



=== version 11 client ===



PHP was build with the following configure option:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_11_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real0m1.119s

  user0m0.055s

  sys 0m0.058s



The first value is printed as the last statement in the script. It will not
return immediately to the command-line, but hang noticeably for approx. 1
second.



When commenting out the two OCI-related statements the script returns
immediately.



This may also be a bug in the Oracle client libraries, I am not sure. But
the one second pause does not happen when connect and disconnecting with
sqlplus:



  time echo -e exit\n | sqlplus */*@//*/*



  SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 1 16:56:11 2010



  Copyright (c) 1982, 2009, Oracle. All rights reserved.



  Connected to:

  Oracle Database 11g Release 11.2.0.1.0 - 64bit Production



  Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit
Production



  real 0m0.063s

  user 0m0.018s

  sys 0m0.011s



Test script:
---
oci_connect.php:

?php



list($usec, $sec) = explode(' ', microtime());

$stime = ((float)$usec + (float)$sec);



$conn = ocilogon('user', 'pass', 'host/service');



if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);



ocilogoff($conn);



if ($conn === false) die(ocilogon failed\n);



$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);

?

Expected result:

I would expect the same behavior as with the Oracle 10 client libraries:



=== version 10 client ===



When PHP is built against the older, release 10 libraries, this does not
happen:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_10_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real 0m0.161s

  user 0m0.052s

  sys 0m0.068s


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



Bug #52263 [Opn]: Script cleanup takes long with Oracle 11 instant client

2010-07-06 Thread andrew at digicol dot de
Edit report at http://bugs.php.net/bug.php?id=52263edit=1

 ID:   52263
 User updated by:  andrew at digicol dot de
 Reported by:  andrew at digicol dot de
 Summary:  Script cleanup takes long with Oracle 11 instant
   client
 Status:   Open
 Type: Bug
 Package:  OCI8 related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

There is a logical fault in the script that I pasted - the calculation
of the elapsed time should be after the disconnect ( sorry, this
happened while stripping down the original test script to a simpler
one). This does not affect the described behavior, though - the pause is
still there:



...

if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);

$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);


Previous Comments:

[2010-07-06 15:49:26] andrew at digicol dot de

Description:

PHP scripts that connect to an Oracle 11gR2 database server using
version 11 clients (instant client, fat client) hang for approx. one
second after the last command in the script has been executed.



=== version 11 client ===



PHP was build with the following configure option:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_11_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real0m1.119s

  user0m0.055s

  sys 0m0.058s



The first value is printed as the last statement in the script. It will
not return immediately to the command-line, but hang noticeably for
approx. 1 second.



When commenting out the two OCI-related statements the script returns
immediately.



This may also be a bug in the Oracle client libraries, I am not sure.
But the one second pause does not happen when connect and disconnecting
with sqlplus:



  time echo -e exit\n | sqlplus */*@//*/*



  SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 1 16:56:11 2010



  Copyright (c) 1982, 2009, Oracle. All rights reserved.



  Connected to:

  Oracle Database 11g Release 11.2.0.1.0 - 64bit Production



  Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit
Production



  real 0m0.063s

  user 0m0.018s

  sys 0m0.011s



Test script:
---
oci_connect.php:

?php



list($usec, $sec) = explode(' ', microtime());

$stime = ((float)$usec + (float)$sec);



$conn = ocilogon('user', 'pass', 'host/service');



if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);



ocilogoff($conn);



if ($conn === false) die(ocilogon failed\n);



$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);

?

Expected result:

I would expect the same behavior as with the Oracle 10 client
libraries:



=== version 10 client ===



When PHP is built against the older, release 10 libraries, this does not
happen:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_10_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real 0m0.161s

  user 0m0.052s

  sys 0m0.068s







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


Bug #52090 [Com]: mysql_fetch_assoc returns infinite number of records

2010-07-06 Thread gsx1022 at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52090edit=1

 ID:   52090
 Comment by:   gsx1022 at gmail dot com
 Reported by:  gsx1022 at gmail dot com
 Summary:  mysql_fetch_assoc returns infinite number of records
 Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux x86
 PHP Version:  5.3.2

 New Comment:

In my current situation I cannot afford to set up a test box and try to
compile 

the snapshot from php.net. However, I will do so as soon as I can. In
the 

meantime here is the source-archive with all patches that I use, from
the Ubuntu 

Repositories: 

http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz



Also, I can confirm that the same problem exists on an x64 box with the
same 

software versions too. All other requested information (schema,
versions) are 

provided in detail on the link in the description.


Previous Comments:

[2010-06-23 01:44:41] johan...@php.net

Please use a recent snapshot from our site, we don't know what kind of
patches Ubuntu applies. Please provide the table schema and data you are
querying. Whcih MySQL server version?


[2010-06-16 13:19:23] gsx1022 at gmail dot com

I am using the php5 package from the Ubuntu Linux APT repository. It
seems to use 

libmysql. And yes, mysqli is also affected.


[2010-06-16 03:51:33] ka...@php.net

Do you use mysqlnd with ext/mysql or libmysql, in either case does it
solve switching the lib?



Is mysqli affected by this issue too on your machine?


[2010-06-15 21:35:55] gsx1022 at gmail dot com

Description:

A MySQL query that should return 5 records returns an infinite number of
records. 

It returns the 5 five records correctly, but then it returns them again,
and 

again, and again... Other SELECT statements are fine, this is the only 

problematic one. Also, this query works from the MySQL console just
fine. At 

first I thought it is an issue with Zend Framework but it turned out it
is 

probably not. See this url for (much) more info (also detailed
information to 

reproduce): http://framework.zend.com/issues/browse/ZF-9982

Test script:
---
$c = mysql_connect('host', 'user', 'pass');

mysql_select_db('db', $c);

$raw = mysql_query('SELECT `name`, `level`, `parent` FROM
`allresources_view` ORDER BY `level` ASC');

while ($r = mysql_fetch_assoc($raw)) {

var_dump($r);

echo 'br /br /';

}

mysql_close($c);

Expected result:

5 records should have been returned from the database.

Actual result:
--
An infinite number of records are returned from the database.






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


Bug #52263 [Opn-Bgs]: Script cleanup takes long with Oracle 11 instant client

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52263edit=1

 ID:   52263
 Updated by:   johan...@php.net
 Reported by:  andrew at digicol dot de
 Summary:  Script cleanup takes long with Oracle 11 instant
   client
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  OCI8 related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

Expected behavior. See bug #51610.


Previous Comments:

[2010-07-06 16:03:00] andrew at digicol dot de

There is a logical fault in the script that I pasted - the calculation
of the elapsed time should be after the disconnect ( sorry, this
happened while stripping down the original test script to a simpler
one). This does not affect the described behavior, though - the pause is
still there:



...

if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);

$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);


[2010-07-06 15:49:26] andrew at digicol dot de

Description:

PHP scripts that connect to an Oracle 11gR2 database server using
version 11 clients (instant client, fat client) hang for approx. one
second after the last command in the script has been executed.



=== version 11 client ===



PHP was build with the following configure option:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_11_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real0m1.119s

  user0m0.055s

  sys 0m0.058s



The first value is printed as the last statement in the script. It will
not return immediately to the command-line, but hang noticeably for
approx. 1 second.



When commenting out the two OCI-related statements the script returns
immediately.



This may also be a bug in the Oracle client libraries, I am not sure.
But the one second pause does not happen when connect and disconnecting
with sqlplus:



  time echo -e exit\n | sqlplus */*@//*/*



  SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 1 16:56:11 2010



  Copyright (c) 1982, 2009, Oracle. All rights reserved.



  Connected to:

  Oracle Database 11g Release 11.2.0.1.0 - 64bit Production



  Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit
Production



  real 0m0.063s

  user 0m0.018s

  sys 0m0.011s



Test script:
---
oci_connect.php:

?php



list($usec, $sec) = explode(' ', microtime());

$stime = ((float)$usec + (float)$sec);



$conn = ocilogon('user', 'pass', 'host/service');



if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);



ocilogoff($conn);



if ($conn === false) die(ocilogon failed\n);



$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);

?

Expected result:

I would expect the same behavior as with the Oracle 10 client
libraries:



=== version 10 client ===



When PHP is built against the older, release 10 libraries, this does not
happen:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_10_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real 0m0.161s

  user 0m0.052s

  sys 0m0.068s







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


[PHP-BUG] Bug #52265 [NEW]: Defaulting a class-function-param to 0 makes an IF see it as true when comparin

2010-07-06 Thread weer1 at gmx dot net
From: 
Operating system: Linux
PHP version:  5.2.13
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Defaulting a class-function-param to 0 makes an IF see it as 
true when comparin

Description:

Defaulting a class-function-param to 0 makes an IF see it as true when
comparing it to a string.



function fillSelectBox($selected = 0)

{

$txt = '';



$obj = new RetailerCountry();

$objs = $obj-getAll();

foreach ($objs as $ob)

{

$id = $ob-getAttrib('retailercountry');

$name = $ob-getAttrib('retailercountry');



$txt .= $ob-getAttrib('retailercountry');



echo 'i:'.$id;

echo 's:'.$selected;



if ($id == $selected)

{

$txt .= ' * ';

}

$txt .= 'br';

}



return $txt;

}



The result for this function is: every word that's displayed gets a star
*.

This changes when I change the input param to $selected = ''.



But did or does PHP every care about this? I don't to do some kind of
strict typing!



Regards

MD



Test script:
---
function fillSelectBox($selected = 0)

{

$txt = '';



$obj = new RetailerCountry();

$objs = $obj-getAll();

foreach ($objs as $ob)

{

$id = $ob-getAttrib('retailercountry');

$name = $ob-getAttrib('retailercountry');



$txt .= $ob-getAttrib('retailercountry');



echo 'i:'.$id;

echo 's:'.$selected;



if ($id == $selected)

{

$txt .= ' * ';

}

$txt .= 'br';

}

return $txt;

}



Expected result:

The result for this function is: every word that's displayed gets a star
*.

This changes when I change the input param to $selected = ''.



But did or does PHP every care about this? I don't to do some kind of
strict typing!


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



Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records

2010-07-06 Thread rasmus
Edit report at http://bugs.php.net/bug.php?id=52090edit=1

 ID:   52090
 Updated by:   ras...@php.net
 Reported by:  gsx1022 at gmail dot com
 Summary:  mysql_fetch_assoc returns infinite number of records
 Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux x86
 PHP Version:  5.3.2

 New Comment:

Can't afford?  As in financially?  There are multiple free
virtualization 

mechanisms out there and the OS images are free.  Setting up a clean vm
on your 

existing machine is trivial and takes about 30 minutes, tops.


Previous Comments:

[2010-07-06 16:20:28] gsx1022 at gmail dot com

In my current situation I cannot afford to set up a test box and try to
compile 

the snapshot from php.net. However, I will do so as soon as I can. In
the 

meantime here is the source-archive with all patches that I use, from
the Ubuntu 

Repositories: 

http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz



Also, I can confirm that the same problem exists on an x64 box with the
same 

software versions too. All other requested information (schema,
versions) are 

provided in detail on the link in the description.


[2010-06-23 01:44:41] johan...@php.net

Please use a recent snapshot from our site, we don't know what kind of
patches Ubuntu applies. Please provide the table schema and data you are
querying. Whcih MySQL server version?


[2010-06-16 13:19:23] gsx1022 at gmail dot com

I am using the php5 package from the Ubuntu Linux APT repository. It
seems to use 

libmysql. And yes, mysqli is also affected.


[2010-06-16 03:51:33] ka...@php.net

Do you use mysqlnd with ext/mysql or libmysql, in either case does it
solve switching the lib?



Is mysqli affected by this issue too on your machine?


[2010-06-15 21:35:55] gsx1022 at gmail dot com

Description:

A MySQL query that should return 5 records returns an infinite number of
records. 

It returns the 5 five records correctly, but then it returns them again,
and 

again, and again... Other SELECT statements are fine, this is the only 

problematic one. Also, this query works from the MySQL console just
fine. At 

first I thought it is an issue with Zend Framework but it turned out it
is 

probably not. See this url for (much) more info (also detailed
information to 

reproduce): http://framework.zend.com/issues/browse/ZF-9982

Test script:
---
$c = mysql_connect('host', 'user', 'pass');

mysql_select_db('db', $c);

$raw = mysql_query('SELECT `name`, `level`, `parent` FROM
`allresources_view` ORDER BY `level` ASC');

while ($r = mysql_fetch_assoc($raw)) {

var_dump($r);

echo 'br /br /';

}

mysql_close($c);

Expected result:

5 records should have been returned from the database.

Actual result:
--
An infinite number of records are returned from the database.






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


Bug #52263 [Bgs]: Script cleanup takes long with Oracle 11 instant client

2010-07-06 Thread andrew at digicol dot de
Edit report at http://bugs.php.net/bug.php?id=52263edit=1

 ID:   52263
 User updated by:  andrew at digicol dot de
 Reported by:  andrew at digicol dot de
 Summary:  Script cleanup takes long with Oracle 11 instant
   client
 Status:   Bogus
 Type: Bug
 Package:  OCI8 related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

Ok, thanks for the pointer to the other bug report. This is in fact
exactly the same issue.



However, I cannot subscribe to the statement that has been made there:



Most deployments either do not start and stop PHP processes frequently,
or are 

not sensitive to the time between completing the work of the script and
the 

termination of the process.



We use a find dir -name '*.xml' | php do_some_work.php - style
approach. The actual execution time of the script is  100 milliseconds.
Adding 1 second to each invocation makes the whole thing slower by
factor 10.



We could change the whole procedure to minimize PHP script invocations,
of course. But a one second overhead is quite hefty, isn't it?



Is there any chance this will be configurable if you don't need DRCP or
FAN?


Previous Comments:

[2010-07-06 16:26:00] johan...@php.net

Expected behavior. See bug #51610.


[2010-07-06 16:03:00] andrew at digicol dot de

There is a logical fault in the script that I pasted - the calculation
of the elapsed time should be after the disconnect ( sorry, this
happened while stripping down the original test script to a simpler
one). This does not affect the described behavior, though - the pause is
still there:



...

if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);

$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);


[2010-07-06 15:49:26] andrew at digicol dot de

Description:

PHP scripts that connect to an Oracle 11gR2 database server using
version 11 clients (instant client, fat client) hang for approx. one
second after the last command in the script has been executed.



=== version 11 client ===



PHP was build with the following configure option:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_11_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real0m1.119s

  user0m0.055s

  sys 0m0.058s



The first value is printed as the last statement in the script. It will
not return immediately to the command-line, but hang noticeably for
approx. 1 second.



When commenting out the two OCI-related statements the script returns
immediately.



This may also be a bug in the Oracle client libraries, I am not sure.
But the one second pause does not happen when connect and disconnecting
with sqlplus:



  time echo -e exit\n | sqlplus */*@//*/*



  SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 1 16:56:11 2010



  Copyright (c) 1982, 2009, Oracle. All rights reserved.



  Connected to:

  Oracle Database 11g Release 11.2.0.1.0 - 64bit Production



  Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit
Production



  real 0m0.063s

  user 0m0.018s

  sys 0m0.011s



Test script:
---
oci_connect.php:

?php



list($usec, $sec) = explode(' ', microtime());

$stime = ((float)$usec + (float)$sec);



$conn = ocilogon('user', 'pass', 'host/service');



if ($conn === false) die(ocilogon failed\n);



list($usec, $sec) = explode(' ', microtime());

$now = ((float)$usec + (float)$sec);



ocilogoff($conn);



if ($conn === false) die(ocilogon failed\n);



$elapsed = $now - $stime;



fwrite(STDOUT, $elapsed . \n);

?

Expected result:

I would expect the same behavior as with the Oracle 10 client
libraries:



=== version 10 client ===



When PHP is built against the older, release 10 libraries, this does not
happen:



 
--with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_10_2



Executing the test script results in:



  $ time php oci_connect.php

  0.0691978931427



  real 0m0.161s

  user 0m0.052s

  sys 0m0.068s







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


Bug #52090 [Com]: mysql_fetch_assoc returns infinite number of records

2010-07-06 Thread gsx1022 at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52090edit=1

 ID:   52090
 Comment by:   gsx1022 at gmail dot com
 Reported by:  gsx1022 at gmail dot com
 Summary:  mysql_fetch_assoc returns infinite number of records
 Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux x86
 PHP Version:  5.3.2

 New Comment:

No, I meant that I cannot afford the time loss since the deadline for my
work is 

*really* close, and this is just hobby project. :-P


Previous Comments:

[2010-07-06 16:51:30] ras...@php.net

Can't afford?  As in financially?  There are multiple free
virtualization 

mechanisms out there and the OS images are free.  Setting up a clean vm
on your 

existing machine is trivial and takes about 30 minutes, tops.


[2010-07-06 16:20:28] gsx1022 at gmail dot com

In my current situation I cannot afford to set up a test box and try to
compile 

the snapshot from php.net. However, I will do so as soon as I can. In
the 

meantime here is the source-archive with all patches that I use, from
the Ubuntu 

Repositories: 

http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz



Also, I can confirm that the same problem exists on an x64 box with the
same 

software versions too. All other requested information (schema,
versions) are 

provided in detail on the link in the description.


[2010-06-23 01:44:41] johan...@php.net

Please use a recent snapshot from our site, we don't know what kind of
patches Ubuntu applies. Please provide the table schema and data you are
querying. Whcih MySQL server version?


[2010-06-16 13:19:23] gsx1022 at gmail dot com

I am using the php5 package from the Ubuntu Linux APT repository. It
seems to use 

libmysql. And yes, mysqli is also affected.


[2010-06-16 03:51:33] ka...@php.net

Do you use mysqlnd with ext/mysql or libmysql, in either case does it
solve switching the lib?



Is mysqli affected by this issue too on your machine?




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/bug.php?id=52090


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


Bug #52265 [Opn-Bgs]: Defaulting a class-function-param to 0 makes an IF see it as true when comparin

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52265edit=1

 ID:   52265
 Updated by:   johan...@php.net
 Reported by:  weer1 at gmx dot net
 Summary:  Defaulting a class-function-param to 0 makes an IF see
   it as true when comparin
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.13

 New Comment:

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

See http://php.net/manual/en/types.comparisons.php


Previous Comments:

[2010-07-06 16:42:20] weer1 at gmx dot net

Description:

Defaulting a class-function-param to 0 makes an IF see it as true when
comparing it to a string.



function fillSelectBox($selected = 0)

{

$txt = '';



$obj = new RetailerCountry();

$objs = $obj-getAll();

foreach ($objs as $ob)

{

$id = $ob-getAttrib('retailercountry');

$name = $ob-getAttrib('retailercountry');



$txt .= $ob-getAttrib('retailercountry');



echo 'i:'.$id;

echo 's:'.$selected;



if ($id == $selected)

{

$txt .= ' * ';

}

$txt .= 'br';

}



return $txt;

}



The result for this function is: every word that's displayed gets a star
*.

This changes when I change the input param to $selected = ''.



But did or does PHP every care about this? I don't to do some kind of
strict typing!



Regards

MD



Test script:
---
function fillSelectBox($selected = 0)

{

$txt = '';



$obj = new RetailerCountry();

$objs = $obj-getAll();

foreach ($objs as $ob)

{

$id = $ob-getAttrib('retailercountry');

$name = $ob-getAttrib('retailercountry');



$txt .= $ob-getAttrib('retailercountry');



echo 'i:'.$id;

echo 's:'.$selected;



if ($id == $selected)

{

$txt .= ' * ';

}

$txt .= 'br';

}

return $txt;

}



Expected result:

The result for this function is: every word that's displayed gets a star
*.

This changes when I change the input param to $selected = ''.



But did or does PHP every care about this? I don't to do some kind of
strict typing!







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


Bug #37274 [Com]: Array style COM property access

2010-07-06 Thread juliec at computersecurity dot com
Edit report at http://bugs.php.net/bug.php?id=37274edit=1

 ID:   37274
 Comment by:   juliec at computersecurity dot com
 Reported by:  tp at synolon dot gr
 Summary:  Array style COM property access
 Status:   No Feedback
 Type: Bug
 Package:  COM related
 Operating System: Windows XP Pro
 PHP Version:  5.1.3

 New Comment:

I can confirm this is an issue with the latest 5.3.2 build also. 



The error is Fatal error: Uncaught exception 'com_exception' with
message 'Error [0x8002000f] Parameter not optional. ' 



Someone created a very simple standalone test library specifically to
reproduce this problem. I have the dll that I can email to you along
with a test php script so you can see the error in action on your own
system. I also have the Visual Basic library that does the same thing
except in VB I can set the property that we are not being allowed to set
in PHP without getting the error.



Please let me know where to email the libraries to or if you need any
other information to move forward with this.  Thank you.


Previous Comments:

[2007-12-11 14:34:26] mjscod at web dot de

I can confirm this behaviour. PHP 5.2.4 contains this bug too.


[2007-02-10 00:08:29] lee at dark-circuit dot com

On current snap of PHP 5.2.2 It still doesn't work, but I get a slightly
diff trace than some are reporting. Here's mine:



PHP Fatal error:  Uncaught exception 'com_exception' with message

'Error [0x8002000f] Parameter not optional.

' in C:\New Folder\prime-sync-itemdb.php:197

Stack trace:

#0 C:\New Folder\prime-sync-itemdb.php(197): unknown()

#1 {main}

  thrown in C:\New Folder (3)\prime-sync-itemdb.php on line 197



That is on this test line:

$oInfo-CustomField[1] = bb;



Com property is 

string CustomField(ByVal Index As Integer)



VB.NET Code that works:

oCompanyInfo.CustomField(1) = bb



Note: in php: echo $oInfo-CustomField[1]; works fine. I just can't
assign anything with an array


[2007-01-05 17:08:03] phpbugs at mike-c dot com

Still the same error using latest CVS snapshot

(PHP 5.2.1RC3-dev (cli) (built: Jan  5 2007 16:24:22))



PHP Fatal error:  Uncaught exception 'com_exception' with message 'Error
[0x8002000e] Invalid number of parameters.' in C:\PHP
Files\comobjecttest.php:4

Stack trace:

#0 C:\PHP Files\comobjecttest.php(4): unknown()

#1 {main}

  thrown in C:\PHP Files\comobjecttest.php on line 4


[2007-01-01 01:00:01] 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.


[2006-12-24 12:37:12] rricha...@php.net

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






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/bug.php?id=37274


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


[PHP-BUG] Bug #52266 [NEW]: ldap_search Operations error for SizeLimit $results['count']

2010-07-06 Thread ceo at l-i-e dot com
From: 
Operating system: Mac OS X
PHP version:  5.3.2
Package:  LDAP related
Bug Type: Bug
Bug description:ldap_search Operations error for SizeLimit  $results['count']

Description:

NOTE:

***

It's actually PHP 5.3.1, from mac ports. Sorry.

But I don't find anything related in bug searching, nor in the ChangeLog
for 5.3.2, so pretty sure it's still active bug.

***



Attempting to work with Active Directory via OpenLDAP/PHP.



Search for '(cn=*)' works fine.

Search for '(cn=*ynch)' fails with ldap_search: Search: Operations error



Further analysis reveals that providing the fourth parameter, SizeLimit,
which is equal to or less than the number of results, works fine.  Larger
numbers fail, in the same way as no limit.



Of course, one doesn't generally know how many results are in there, so
this is not really a good work-around...



I believe the AD server is 2003 version, but it could be newer.



The AD server is reputed to have 50,000 entries in it, which may be
relevant.



Test script:
---
http://6112northwolcott.com/ldap/ldap.phps

Expected result:

I expect it to give me 16 results, no matter what number I put for the
fourth parameter, or for none at all.



Actual result:
--
http://6112northwolcott.com/ldap/ldap.txt

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



Bug #52266 [Com]: ldap_search Operations error for SizeLimit $results['count']

2010-07-06 Thread ceo at l-i-e dot com
Edit report at http://bugs.php.net/bug.php?id=52266edit=1

 ID:   52266
 Comment by:   ceo at l-i-e dot com
 Reported by:  ceo at l-i-e dot com
 Summary:  ldap_search Operations error for SizeLimit 
   $results['count']
 Status:   Open
 Type: Bug
 Package:  LDAP related
 Operating System: Mac OS X
 PHP Version:  5.3.2

 New Comment:

PS

The same searches work fine from ldapsearch command line tool provided
by OpenLDAP.

Thus, logically, the error must reside in PHP's extension...


Previous Comments:

[2010-07-06 17:51:19] ceo at l-i-e dot com

Description:

NOTE:

***

It's actually PHP 5.3.1, from mac ports. Sorry.

But I don't find anything related in bug searching, nor in the ChangeLog
for 5.3.2, so pretty sure it's still active bug.

***



Attempting to work with Active Directory via OpenLDAP/PHP.



Search for '(cn=*)' works fine.

Search for '(cn=*ynch)' fails with ldap_search: Search: Operations
error



Further analysis reveals that providing the fourth parameter, SizeLimit,
which is equal to or less than the number of results, works fine. 
Larger numbers fail, in the same way as no limit.



Of course, one doesn't generally know how many results are in there, so
this is not really a good work-around...



I believe the AD server is 2003 version, but it could be newer.



The AD server is reputed to have 50,000 entries in it, which may be
relevant.



Test script:
---
http://6112northwolcott.com/ldap/ldap.phps

Expected result:

I expect it to give me 16 results, no matter what number I put for the
fourth parameter, or for none at all.



Actual result:
--
http://6112northwolcott.com/ldap/ldap.txt






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


Bug #52266 [Com]: ldap_search Operations error for SizeLimit $results['count']

2010-07-06 Thread ceo at l-i-e dot com
Edit report at http://bugs.php.net/bug.php?id=52266edit=1

 ID:   52266
 Comment by:   ceo at l-i-e dot com
 Reported by:  ceo at l-i-e dot com
 Summary:  ldap_search Operations error for SizeLimit 
   $results['count']
 Status:   Open
 Type: Bug
 Package:  LDAP related
 Operating System: Mac OS X
 PHP Version:  5.3.2

 New Comment:

The AD version has been confirmed to be 2003.


Previous Comments:

[2010-07-06 17:52:44] ceo at l-i-e dot com

PS

The same searches work fine from ldapsearch command line tool provided
by OpenLDAP.

Thus, logically, the error must reside in PHP's extension...


[2010-07-06 17:51:19] ceo at l-i-e dot com

Description:

NOTE:

***

It's actually PHP 5.3.1, from mac ports. Sorry.

But I don't find anything related in bug searching, nor in the ChangeLog
for 5.3.2, so pretty sure it's still active bug.

***



Attempting to work with Active Directory via OpenLDAP/PHP.



Search for '(cn=*)' works fine.

Search for '(cn=*ynch)' fails with ldap_search: Search: Operations
error



Further analysis reveals that providing the fourth parameter, SizeLimit,
which is equal to or less than the number of results, works fine. 
Larger numbers fail, in the same way as no limit.



Of course, one doesn't generally know how many results are in there, so
this is not really a good work-around...



I believe the AD server is 2003 version, but it could be newer.



The AD server is reputed to have 50,000 entries in it, which may be
relevant.



Test script:
---
http://6112northwolcott.com/ldap/ldap.phps

Expected result:

I expect it to give me 16 results, no matter what number I put for the
fourth parameter, or for none at all.



Actual result:
--
http://6112northwolcott.com/ldap/ldap.txt






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


Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52090edit=1

 ID:   52090
 Updated by:   johan...@php.net
 Reported by:  gsx1022 at gmail dot com
 Summary:  mysql_fetch_assoc returns infinite number of records
 Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux x86
 PHP Version:  5.3.2

 New Comment:

Just let me get this straight: You have an issue and now you ask us to
invest our (limited) time (for free) to rebuild your setup and find the
causing component? - As you can imagine we all have our tasks to do and
our deadlines and for some work on PHP is hobby, too.



With your given your schema I was unable to reproduce this case on any
of my setups.


Previous Comments:

[2010-07-06 17:16:42] gsx1022 at gmail dot com

No, I meant that I cannot afford the time loss since the deadline for my
work is 

*really* close, and this is just hobby project. :-P


[2010-07-06 16:51:30] ras...@php.net

Can't afford?  As in financially?  There are multiple free
virtualization 

mechanisms out there and the OS images are free.  Setting up a clean vm
on your 

existing machine is trivial and takes about 30 minutes, tops.


[2010-07-06 16:20:28] gsx1022 at gmail dot com

In my current situation I cannot afford to set up a test box and try to
compile 

the snapshot from php.net. However, I will do so as soon as I can. In
the 

meantime here is the source-archive with all patches that I use, from
the Ubuntu 

Repositories: 

http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz



Also, I can confirm that the same problem exists on an x64 box with the
same 

software versions too. All other requested information (schema,
versions) are 

provided in detail on the link in the description.


[2010-06-23 01:44:41] johan...@php.net

Please use a recent snapshot from our site, we don't know what kind of
patches Ubuntu applies. Please provide the table schema and data you are
querying. Whcih MySQL server version?


[2010-06-16 13:19:23] gsx1022 at gmail dot com

I am using the php5 package from the Ubuntu Linux APT repository. It
seems to use 

libmysql. And yes, mysqli is also affected.




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/bug.php?id=52090


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


Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52090edit=1

 ID:   52090
 Updated by:   johan...@php.net
 Reported by:  gsx1022 at gmail dot com
 Summary:  mysql_fetch_assoc returns infinite number of records
 Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux x86
 PHP Version:  5.3.2

 New Comment:

As reference, here the output I get:





array(3) {

  [name]=

  string(4) root

  [level]=

  string(1) 0

  [parent]=

  NULL

}

br /br /array(3) {

  [name]=

  string(5) error

  [level]=

  string(1) 1

  [parent]=

  string(4) root

}

br /br /array(3) {

  [name]=

  string(11) index_index

  [level]=

  string(1) 1

  [parent]=

  string(4) root

}

br /br /array(3) {

  [name]=

  string(11) error_error

  [level]=

  string(1) 2

  [parent]=

  string(5) error

}

br /br /array(3) {

  [name]=

  string(12) error_denied

  [level]=

  string(1) 2

  [parent]=

  string(5) error

}

br /br /


Previous Comments:

[2010-07-06 19:01:55] johan...@php.net

Just let me get this straight: You have an issue and now you ask us to
invest our (limited) time (for free) to rebuild your setup and find the
causing component? - As you can imagine we all have our tasks to do and
our deadlines and for some work on PHP is hobby, too.



With your given your schema I was unable to reproduce this case on any
of my setups.


[2010-07-06 17:16:42] gsx1022 at gmail dot com

No, I meant that I cannot afford the time loss since the deadline for my
work is 

*really* close, and this is just hobby project. :-P


[2010-07-06 16:51:30] ras...@php.net

Can't afford?  As in financially?  There are multiple free
virtualization 

mechanisms out there and the OS images are free.  Setting up a clean vm
on your 

existing machine is trivial and takes about 30 minutes, tops.


[2010-07-06 16:20:28] gsx1022 at gmail dot com

In my current situation I cannot afford to set up a test box and try to
compile 

the snapshot from php.net. However, I will do so as soon as I can. In
the 

meantime here is the source-archive with all patches that I use, from
the Ubuntu 

Repositories: 

http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz



Also, I can confirm that the same problem exists on an x64 box with the
same 

software versions too. All other requested information (schema,
versions) are 

provided in detail on the link in the description.


[2010-06-23 01:44:41] johan...@php.net

Please use a recent snapshot from our site, we don't know what kind of
patches Ubuntu applies. Please provide the table schema and data you are
querying. Whcih MySQL server version?




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/bug.php?id=52090


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


[PHP-BUG] Req #52267 [NEW]: add collation to mysqli::set_charset

2010-07-06 Thread gutzmer at usa dot net
From: 
Operating system: 
PHP version:  Irrelevant
Package:  MySQLi related
Bug Type: Feature/Change Request
Bug description:add collation to mysqli::set_charset

Description:

According to the docs,  mysqli::set_charset is the preferred way to change
the charset. Using mysqli::query() to execute SET NAMES ..  is not
recommended.



But when using the MySQLi extension, the only way to use a collation other
than the default for a particular charset is to send a SET NAMES ... with a
COLLATION clause.



mysqli::set_charset should have a second (Optional) string $collation
parameter to allow users to set the charset and collation without resorting
to the 'not recommended' direct query method.  When the optional parameter
is not set, is null, casts to Boolean FALSE, or is an invalid choice for
the charset passed in the first parameter, the connection should use the
default collation for the selected charset.



MySQL already handles error conditions relating to charset/collation
mismatches, so there should be no great added overhead to the source code
logic implementing  the MySQLi function.


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



Req #51720 [Opn-Bgs]: static properties in subclasses should take on own value w/o redeclaration

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=51720edit=1

 ID:   51720
 Updated by:   johan...@php.net
 Reported by:  dtomasiewicz at gmail dot com
 Summary:  static properties in subclasses should take on own
   value w/o redeclaration
-Status:   Open
+Status:   Bogus
 Type: Feature/Change Request
 Package:  Class/Object related
 Operating System: all
 PHP Version:  5.3.2

 New Comment:

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

The protected static variable is inherited by the children. Make it
private if it should belong to a specific class context.


Previous Comments:

[2010-05-02 00:01:20] dtomasiewicz at gmail dot com

Description:

Something I've found quite annoying about the Late Static Binding
implementation 

is the need to re-declare static variables in subclasses to allow them
to have 

their own values. (see Test Script)



In order to get the desired results, you need to re-declare the static
variable 

in the subclasses, which of course goes against every fundamental
principle of 

DRY if you're going to have a large number of subclasses and static
properties. 

I can't find a work-around to this other than to re-declare the static 

variables, which sort of puts us in the same boat we were in before 5.3
when we 

would need to redeclare static methods in subclasses too.



I'm not sure why this is behaving this way-- if you don't want
subclasses to 

have their own value, you should make it private or use the self::
keyword when 

referencing the variable in the superclass.



There is a note on the PHP Late Static Binding page that reads static::
does 

not work like $this for static methods! $this- follows the rules of
inheritance 

while static:: doesn't. This difference is detailed later on this manual
page. 

but the difference is NOT detailed later on that page, and I can't find
any 

details whatsoever.

Test script:
---
?php



class Foo {

  protected static $whoAmI;



  public static function init() {

static::$whoAmI = get_called_class();

  }

  public static function who() {

echo static::$whoAmI.\n;

  }

}



class BarOne extends Foo {}



class BarTwo extends Foo {}



BarOne::init(); // sets the whoAmI property in Foo to BarOne

BarTwo::init(); // sets the whoAmI property in Foo to BarTwo

BarOne::who(); // outputs BarTwo

BarTwo::who(); // also outputs BarTwo

Expected result:

BarOne

BarTwo



Actual result:
--
BarTwo

BarTwo








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


Bug #52262 [Asn-Csd]: json_decode reports no error while returning NULL

2010-07-06 Thread scottmac
Edit report at http://bugs.php.net/bug.php?id=52262edit=1

 ID:   52262
 Updated by:   scott...@php.net
 Reported by:  r...@php.net
 Summary:  json_decode reports no error while returning NULL
-Status:   Assigned
+Status:   Closed
 Type: Bug
 Package:  JSON related
 Operating System: Linux/Ubuntu
 PHP Version:  5.3.2
 Assigned To:  scottmac

 New Comment:

It now correctly returns an error code to indicate an invalid UTF-8
error. The 

issue is an incorrectly encoded character around number 21,190.



I suggest you speak to Steam and get them to produce a correctly valid
feed.


Previous Comments:

[2010-07-06 19:01:35] scott...@php.net

Automatic comment from SVN on behalf of scottmac
Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=301028
Log: Fix bug #52262 - Invalid UTF-8 documents don't set an error code
when they fail to decode.


[2010-07-06 13:34:48] johan...@php.net

That codition in php_json_decode is hit as utf16_len == -2



utf16_len = utf8_to_utf16(utf16, str, str_len);

if (utf16_len = 0) {

if (utf16) {

efree(utf16);

}

RETURN_NULL();

}


[2010-07-06 11:17:59] r...@php.net

Description:

I'm attempting to use json_decode on a relatively long piece of JSON.
The JSON 

is returned successfully by file_get_contents, and is valid according to


JSONLint.



What I expect to happen is for the JSON to be correctly decoded, or NULL
to be 

returned and json_last_error to be populated with the reason. For some
reason 

NULL is returned and json_last_error remains at 0.



I have a feeling that this could be to do with the length of the file 

(containing a large array of objects).



I'm currently using:



r...@ross-laptop:/$ php -v



PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010
20:01:00) 

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Test script:
---
?php

$raw =
file_get_contents(http://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v0001/?gameid=440;);



$decoded = json_decode($raw);



$errors = array(

JSON_ERROR_NONE = No error has occurred,

JSON_ERROR_DEPTH = The maximum stack depth has been exceeded,

JSON_ERROR_CTRL_CHAR = Control character error, possibly
incorrectly encoded,

JSON_ERROR_SYNTAX = Syntax error,

//JSON_ERROR_UTF8 = Malformed UTF-8 characters, possibly
incorrectly encoded

);



var_dump(Raw result:, $raw, \n\n);

var_dump(Decoded result:, $decoded, \n\n);

var_dump(JSON errors:, $errors[json_last_error()]);

Expected result:

Raw result: (long raw json)

Decoded result: object stdClass(1) { (data array) }

JSON errors: string No error has occurred

Actual result:
--
Raw result: (long raw json)

Decoded result: NULL

JSON errors: string No error has occurred






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


Bug #51759 [Opn-Fbk]: Same as bug #45150 (localhost - 127.0.0.1)

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=51759edit=1

 ID:   51759
 Updated by:   and...@php.net
 Reported by:  sed at sed dot is
 Summary:  Same as bug #45150 (localhost - 127.0.0.1)
-Status:   Open
+Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Windows 7 Ultimate 64bit
 PHP Version:  5.3.2

 New Comment:

Check if this is your case, most probably it is.



http://blogs.iis.net/donraman/archive/2010/06/11/php-5-3-and-mysql-connectivity-problem.aspx


Previous Comments:

[2010-06-27 13:43:25] therealloonylion at yahoo dot co dot uk

I have the same issue as falcon_ia at hotmail dot com. I upgraded 5.3.0
to 5.3.2 and php is no longer able to connect to Mysql. Mysql is working
fine and my hosts file is correct.


[2010-05-09 17:46:17] falcon_ia at hotmail dot com

After I updated php from 5.3.0 to 5.3.2,

mysql_connect cannot connect localhost but 127.0.0.1.

It shows:

Warning: mysql_connect() [function.mysql-connect]: [2002] A connection
attempt failed because the connected party did not (trying to connect
via tcp://localhost:3306) in 



And drivers\etc\hosts seems good.


[2010-05-06 21:43:33] sed at sed dot is

Description:

Same as bug #45150. I was not able to connect to MySQL via localhost
though PHP found the mysql extension etc.

Finally, after 20 hours work, I found a website through Google that let
me to a solution. To fix this I'll have to use 127.0.0.1 instead of
localhost

I'm using IIS7.5 on Windows 7 Ultimate 64bit

FastCGI (PHP 5.2.13 installer [20,929Kb] - 25 February 2010, md5:
891e3262428851ebe71d5432a97be6d5, with my own php.ini aftertouch)

MySQL 5.1.46-winx64

Using both IPv4 and IPv6

I can use localhost within MySQL command prompt, but not with PHP.

Test script:
---
// timeout

$host = localhost;

$user = root;

$password = **;

$database = **;

$mysql_link = mysql_connect( $host, $user, $password );



// timeout fixed

$host = 127.0.0.1;

$user = root;

$password = **;

$database = **;

$mysql_link = mysql_connect( $host, $user, $password );



Expected result:

Normal connection with mysql without timeout.

Actual result:
--
Timeout trying to connect via mysql_connect (Error: 2002)






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


Bug #45150 [Bgs]: MySQL functions cannot be used with 5.3.x on Vista when using localhost

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=45150edit=1

 ID:   45150
 Updated by:   and...@php.net
 Reported by:  conor dot kerr_php at dev dot ceon dot net
 Summary:  MySQL functions cannot be used with 5.3.x on Vista
   when using localhost
 Status:   Bogus
 Type: Bug
 Package:  MySQL related
 Operating System: Windows Vista
 PHP Version:  5.3CVS-2008-07-23 (snap)

 New Comment:

PLEASE READ THIS : 



http://blogs.iis.net/donraman/archive/2010/06/11/php-5-3-and-mysql-connectivity-problem.aspx


Previous Comments:

[2010-05-11 08:30:30] kiewic at gmail dot com

Same problem with Windows Vista Ultimate SP2. Why isn't this a bug?


[2010-04-19 04:13:08] sasavilic at gmail dot com

I have same issue. Using Windows 7, 64-bit, IIS



When I try to connect to mysql server on 127.0.0.1 everything works
fine, but with localhost not.


[2010-04-10 03:58:16] buana95 at yahoo dot com

Same issue on Windows XP SP3 and PHP 5.3.1 with mysqlnd 5.0.5-dev -
081106 - $Revision: 289630 $. 



Work fine when using *libmysql.dll, but can not connect to database when
using *mysqlnd.dll (tested on mysql, mysqli, and PDO extension).



***



From MySQL website: they have resolved the issue by looping to all
available IP (IPv4 - IPv6) and return the first successful connection.



So, it's must be from PHP streams that fail to resolve IPv6.



Never test on newer PHP version. Sorry.


[2010-04-05 07:52:30] telstra at dark-media dot net

Had the same problem on Windows Server 2008 R2 had to edit the hosts
file and un comment out the 127.0.0.1 localhost



Was stumbled for a while after upgrading from 5.2 to 5.3, this might not
be a bug with PHP but its something that is going to cause issues.


[2010-03-16 13:55:28] achurkin at gmail dot com

Same on Windows 7 Home Edition.

In PHP version 5.2.9 on same system everything works fine.




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/bug.php?id=45150


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


Req #52267 [Opn-Ver]: add collation to mysqli::set_charset

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=52267edit=1

 ID:  52267
 Updated by:  and...@php.net
 Reported by: gutzmer at usa dot net
 Summary: add collation to mysqli::set_charset
-Status:  Open
+Status:  Verified
 Type:Feature/Change Request
 Package: MySQLi related
 PHP Version: Irrelevant
-Assigned To: 
+Assigned To: mysql



Previous Comments:

[2010-07-06 19:07:01] gutzmer at usa dot net

Description:

According to the docs,  mysqli::set_charset is the preferred way to
change the charset. Using mysqli::query() to execute SET NAMES ..  is
not recommended.



But when using the MySQLi extension, the only way to use a collation
other than the default for a particular charset is to send a SET NAMES
... with a COLLATION clause.



mysqli::set_charset should have a second (Optional) string $collation
parameter to allow users to set the charset and collation without
resorting to the 'not recommended' direct query method.  When the
optional parameter is not set, is null, casts to Boolean FALSE, or is an
invalid choice for the charset passed in the first parameter, the
connection should use the default collation for the selected charset.



MySQL already handles error conditions relating to charset/collation
mismatches, so there should be no great added overhead to the source
code logic implementing  the MySQLi function.







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


Bug #49216 [Asn]: Reflection doesn't seem to work properly on MySqli

2010-07-06 Thread andrey
Edit report at http://bugs.php.net/bug.php?id=49216edit=1

 ID:   49216
 Updated by:   and...@php.net
 Reported by:  virgilp at gmail dot com
 Summary:  Reflection doesn't seem to work properly on MySqli
 Status:   Assigned
 Type: Bug
 Package:  MySQLi related
 Operating System: Windows XP SP3
 PHP Version:  5.2.10
 Assigned To:  mysql

 New Comment:

working on this, needs arginfo here and there. Will be, however only
5.3+


Previous Comments:

[2009-09-10 12:33:14] virgilp at gmail dot com

I found something interesting.

As it turns out, you may need to refine the php.net site... the code 

written there seems to be no good, according to your latest feedback - 

because it works just like my example:

http://www.php.net/~helly/classbrowser/class.php?

class=mysqli_stmtextension=mysqli



And there are others, too, for instance this one:

http://www.php.net/~helly/classbrowser/class.php?

class=DOMErrorHandlerextension=dom

(probably not a reflection bug either, just an unrefined class.php 

page)


[2009-09-09 17:26:37] virgilp at gmail dot com

Oh, and about your supposition that I need an actual object... that's 

not true, either. Try this:

===

$mysqli = mysqli_init();

if (!$mysqli) {

die('mysqli_init failed');

}



if (!$mysqli-options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT = 0')) {

die('Setting MYSQLI_INIT_COMMAND failed');

}



PrintParams('MySqli','options');

==



With the PrintParams function being the one from my previous example. 

I get the following output:

---

$ php.exe d.php

MySqli::options():

---



Surprise-surprise, it does get to PrintParams (meaning that it doesn't 

die, and I did successfully create a MySqli object). But what do you 

know, the options function still shows as being one with no 

parameters. So maybe they were optional parameters? Nope, this is what 


I get if I give no parameters:



Warning: mysqli::options() expects exactly 2 parameters, 0 given



As it turns out, it doesn't matter if you created one MySqli object... 

the reflection is still buggy.


[2009-09-09 17:20:30] virgilp at gmail dot com

Just to clarify - the previous program shows the following results on 

my machine:



MySqli_stmt::bind_param():

Parameter #0 [ required $param0 ] :

SoapClient::__call():

Parameter #0 [ required $param0 ] :

Parameter #1 [ required $param1 ] :

SoapClient::__soapCall():

Parameter #0 [ required $function_name ] : function_name

Parameter #1 [ required $arguments ] : arguments

Parameter #2 [ optional $options ] : options

Parameter #3 [ optional $input_headers ] : input_headers

Parameter #4 [ optional $output_headers ] : output_headers

===



Notice that bind_param, as well as SoapClient::__call do not return 

any name for the parameters (although printing the parameter 

directly will show a name). In contrast with that - _soapCall will 

correctly show the names


[2009-09-09 17:10:40] virgilp at gmail dot com

1. You forgot about the protected class mysqli_warning.



2. Then run the following program, and explain its results. I added 

mysqli_stmt only for reference, so that you see the similarity:



?

function PrintParams($classname, $methodname){

   $class = new ReflectionClass($classname);

   $method= $class-getMethod($methodname);

echo $classname::$methodname():\n;

   $parameters = $method-getParameters();

  foreach ($parameter as $param)

  {

echo $param : .$param-getName(). \n;



  }

}



PrintParams('MySqli_stmt','bind_param');

PrintParams('SoapClient','__call');

PrintParams('SoapClient','__soapCall');



?



3. furthermore - new reflection issues, not really related to MySqli: 

a bunch of interfaces have no extension associated. For example try 

php.exe --rc RecursiveIterator -you'll see that it prints 

internal:SPL (which is probably correct). But php.exe --rc Iterator, 

or php.exe --rc ArrayAccess will print only internal. 

Coincidentally, this means that you can't find the Iterator 

interface in any extension (e.g. using 

ReflectionExtesions::GetClasses) - IMO, it should be either in SPL 

or in standard, but not completely missing.


[2009-09-02 19:25:29] j...@php.net

host_info and such is only there when you actually have connected 

somewhere. How about you refine your report and try with an actual 

object first?




The remainder of 

Bug #52090 [Com]: mysql_fetch_assoc returns infinite number of records

2010-07-06 Thread gsx1022 at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52090edit=1

 ID:   52090
 Comment by:   gsx1022 at gmail dot com
 Reported by:  gsx1022 at gmail dot com
 Summary:  mysql_fetch_assoc returns infinite number of records
 Status:   Feedback
 Type: Bug
 Package:  MySQL related
 Operating System: Linux x86
 PHP Version:  5.3.2

 New Comment:

I am sorry, I was not clear enough. I wanted to say, that it will take
some time 

for me to set up a test box, but wanted to share my other findings
earlier. I do 

know that you are volunteers, and that others have work to do too.


Previous Comments:

[2010-07-06 19:02:37] johan...@php.net

As reference, here the output I get:





array(3) {

  [name]=

  string(4) root

  [level]=

  string(1) 0

  [parent]=

  NULL

}

br /br /array(3) {

  [name]=

  string(5) error

  [level]=

  string(1) 1

  [parent]=

  string(4) root

}

br /br /array(3) {

  [name]=

  string(11) index_index

  [level]=

  string(1) 1

  [parent]=

  string(4) root

}

br /br /array(3) {

  [name]=

  string(11) error_error

  [level]=

  string(1) 2

  [parent]=

  string(5) error

}

br /br /array(3) {

  [name]=

  string(12) error_denied

  [level]=

  string(1) 2

  [parent]=

  string(5) error

}

br /br /


[2010-07-06 19:01:55] johan...@php.net

Just let me get this straight: You have an issue and now you ask us to
invest our (limited) time (for free) to rebuild your setup and find the
causing component? - As you can imagine we all have our tasks to do and
our deadlines and for some work on PHP is hobby, too.



With your given your schema I was unable to reproduce this case on any
of my setups.


[2010-07-06 17:16:42] gsx1022 at gmail dot com

No, I meant that I cannot afford the time loss since the deadline for my
work is 

*really* close, and this is just hobby project. :-P


[2010-07-06 16:51:30] ras...@php.net

Can't afford?  As in financially?  There are multiple free
virtualization 

mechanisms out there and the OS images are free.  Setting up a clean vm
on your 

existing machine is trivial and takes about 30 minutes, tops.


[2010-07-06 16:20:28] gsx1022 at gmail dot com

In my current situation I cannot afford to set up a test box and try to
compile 

the snapshot from php.net. However, I will do so as soon as I can. In
the 

meantime here is the source-archive with all patches that I use, from
the Ubuntu 

Repositories: 

http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz



Also, I can confirm that the same problem exists on an x64 box with the
same 

software versions too. All other requested information (schema,
versions) are 

provided in detail on the link in the description.




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/bug.php?id=52090


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


[PHP-BUG] Req #52268 [NEW]: explode with an Array as Delimiter

2010-07-06 Thread halloanjedendenichkenne at gmail dot com
From: 
Operating system: Irrelevant
PHP version:  Irrelevant
Package:  Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:explode with an Array as Delimiter

Description:

It would be useful if you were able to pass an Array as Delimiter to
explode.

The Test Script contains an Example.

Test script:
---
?php



  var_dump(explode(array(',', '.', '!', ' '), 'Hello, World! This is a
Test!'));

  /*



Should output something like:

  array(8) {

[0]=

string(5) Hello

[1]=

string(0) 

[2]=

string(5) World

[3]=

string(0) 

[4]=

string(4) This

[5]=

string(2) is

[6]=

string(1) a

[7]=

string(4) Test

  }



  */



?

Expected result:

Included in the Test Script

Actual result:
--
Warning: explode() expects parameter 1 to be string, array given in php
shell code 

on line 1

NULL

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



[PHP-BUG] Bug #52269 [NEW]: mssql.dll doesn't exist

2010-07-06 Thread bbarnettm at gmail dot com
From: 
Operating system: W7 SP 1
PHP version:  5.3.2
Package:  MSSQL related
Bug Type: Bug
Bug description:mssql.dll doesn't exist

Description:

I downloaded php-5.3.2-Win32-VC6-x86.zip but the mssql.dll doesn't exit and
there are not any documentation about thi.



I need to know to connect to MS SQL SERVER DATABASE

Test script:
---
extension=php_mssql.dll

Expected result:

Connect to MS SQL SERVER DATABASE

Actual result:
--
The dll doesn't exist

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



[PHP-BUG] Bug #52270 [NEW]: Anonymous functions :: Example #2 :: parse error, unexpected T_FUNCTION

2010-07-06 Thread user at niepodam dot pl
From: 
Operating system: Windows/Linus
PHP version:  5.2.13
Package:  *General Issues
Bug Type: Bug
Bug description:Anonymous functions :: Example #2 :: parse error, unexpected 
T_FUNCTION

Description:

http://www.php.net/manual/en/functions.anonymous.php



example #2 produce error:



Parse error: parse error, unexpected T_FUNCTION in ./ on line 4

Test script:
---
?php

$greet = function($name)

{

printf(Hello %s\r\n, $name);

};



$greet('World');

$greet('PHP');

?


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



Bug #52270 [Opn-Bgs]: Anonymous functions :: Example #2 :: parse error, unexpected T_FUNCTION

2010-07-06 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52270edit=1

 ID:   52270
 Updated by:   johan...@php.net
 Reported by:  user at niepodam dot pl
 Summary:  Anonymous functions :: Example #2 :: parse error,
   unexpected T_FUNCTION
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  *General Issues
 Operating System: Windows/Linus
 PHP Version:  5.2.13

 New Comment:

The page has a box telling you:



Note:  Anonymous functions are available since PHP 5.3.0.


Previous Comments:

[2010-07-07 00:30:44] user at niepodam dot pl

Description:

http://www.php.net/manual/en/functions.anonymous.php



example #2 produce error:



Parse error: parse error, unexpected T_FUNCTION in ./ on line 4

Test script:
---
?php

$greet = function($name)

{

printf(Hello %s\r\n, $name);

};



$greet('World');

$greet('PHP');

?







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


Bug #52269 [Opn-Bgs]: mssql.dll doesn't exist

2010-07-06 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=52269edit=1

 ID:   52269
 Updated by:   paj...@php.net
 Reported by:  bbarnettm at gmail dot com
 Summary:  mssql.dll doesn't exist
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  MSSQL related
 Operating System: W7 SP 1
 PHP Version:  5.3.2

 New Comment:

Expected, the SqlServer SDK compatiole with the compilers we use for PHP
is not available anymore. I would suggest to use the sqlsrv driver from
Microsoft instead.


Previous Comments:

[2010-07-07 00:16:33] bbarnettm at gmail dot com

Description:

I downloaded php-5.3.2-Win32-VC6-x86.zip but the mssql.dll doesn't exit
and there are not any documentation about thi.



I need to know to connect to MS SQL SERVER DATABASE

Test script:
---
extension=php_mssql.dll

Expected result:

Connect to MS SQL SERVER DATABASE

Actual result:
--
The dll doesn't exist






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


Bug #52191 [Com]: any PHP version above 5.3.0 causes Apache above 2.2.11 to die on start

2010-07-06 Thread lj0425 at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52191edit=1

 ID:   52191
 Comment by:   lj0425 at gmail dot com
 Reported by:  therealloonylion at yahoo dot co dot uk
 Summary:  any PHP version above 5.3.0 causes Apache above 2.2.11
   to die on start
 Status:   Open
 Type: Bug
 Package:  Reproducible crash
 Operating System: Windows XP/2003
 PHP Version:  5.3.2

 New Comment:

It's still NW on

PHP 5.3.2 + Apache 2.2.15 + XP professional SP3



if comment out 

 PHPIniDir C:/PHP/ -

 #PHPIniDir C:/PHP/ 

in httpd.conf ,Apache start.


Previous Comments:

[2010-06-27 13:22:17] therealloonylion at yahoo dot co dot uk

The only information in the backtraces that I didn't paste was:



Type of Analysis Performed   Crash Analysis 

Machine Name   SARABI 

Operating System   Windows XP Service Pack 3 

Number Of Processors   2 

Process ID   516 

Process Image   C:\Program Files\Apache Software
Foundation\Apache2.2\bin\httpd.exe 

System Up-Time   05:46:54 

Process Up-Time   00:00:03 





There's an entry point in the backtraces (already pasted) but nothing
about main()


[2010-06-26 23:17:19] ka...@php.net

Hi, your backtrace doesn't seem to include all of it, like the
application entry point at main(), is there any chance you can get those
remaining trace bits?


[2010-06-26 19:13:37] therealloonylion at yahoo dot co dot uk

It seems to no longer occur with PHP 5.3.2 although it did last time I
tried it (a month or so ago) and when it first was released (tested on
Apache 2.2.13 and 2.2.14 at the time). It still occurs with 5.3.1,
however, so I have attached backtraces from tests with that version and
the following version matrix:





Apache 2.2.11   2.2.13  2.2.14  2.2.15

PHP

5.3.0W W  W   W

5.3.1NWNW NW  NW

5.3.2W W  W   W



W = working

NW = not working



Apache 2.2.11:



apache log:



[Sat Jun 26 15:43:39 2010] [notice] Child 5332: All worker threads have
exited.

[Sat Jun 26 15:43:39 2010] [notice] Child 5332: Child process is
exiting

[Sat Jun 26 15:44:23 2010] [crit] (OS 6)The handle is invalid.  :
master_main: create child process failed. Exiting.

[Sat Jun 26 15:44:23 2010] [notice] Parent: Forcing termination of child
process 36 





backtrace:



Thread 0 - System ID 1208

Entry point   httpd+1ecf 

Create time   26/06/2010 15:55:10 

Time spent in user mode   0 Days 0:0:0.46 

Time spent in kernel mode   0 Days 0:0:0.203 













Function Arg 1 Arg 2 Arg 3   Source 

php5ts!php_date_get_timezone_ce+39c 0134 7c90d99a
7c810f63

kernel32!CreateFileA+30  0003 0134

0x8000` 77c61aa0 0006facc 77c2c16e

msvcrt!_unlock+15 0004 77c2c215 005bbc80

msvcrt!calloc+ab 0020 00ca6924 

php5ts!zend_error+498 77c47660 77c47660 0020

php5ts!spprintf+19 0020 00ca68d4 012b2288

php5ts!php_verror+554   









PHP5TS!PHP_DATE_GET_TIMEZONE_CE+39CWARNING - DebugDiag was not able to
locate debug symbols for php5ts.dll, so the information below may be
incomplete.







In
httpd__PID__3272__Date__06_26_2010__Time_03_55_46PM__671__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!php_date_get_timezone_ce+39c in
W:\PHP\php5ts.dll from The PHP Group has caused an access violation
exception (0xC005) when trying to read from memory location
0x0045 on thread 0



Module Information 

Image Name: W:\PHP\php5ts.dll   Symbol Type:  Export 

Base address: 0x0097   Time Stamp:  Thu Nov 19 10:17:25 2009  

Checksum: 0x   Comments:   

COM DLL: False   Company Name:  The PHP Group 

ISAPIExtension: False   File Description:  PHP Script Interpreter 

ISAPIFilter: False   File Version:  5.3.1 

Managed DLL: False   Internal Name:  PHP Script Interpreter 

VB DLL: False   Legal Copyright:  Copyright © 1997-2009 The PHP Group 

Loaded Image Name:  php5ts.dll   Legal Trademarks:  PHP 

Mapped Image Name:  W:\PHP\php5ts.dll   Original filename:  php5ts.dll 

Module name:  php5ts   Private Build:   

Single Threaded:  False   Product Name:  PHP 

Module Size:  5.45 MBytes   Product Version:  5.3.1 

Symbol File Name:  php5ts.dll   Special Build:   



Apache 2.2.13



apache log:



[Sat Jun 26 16:25:38 2010] [warn] pid file C:/Program Files/Apache
Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean
shutdown of previous Apache run?





backtrace:





Thread 0 - System ID 3396

Entry point   httpd+1ecf 

Create time   26/06/2010 16:25:38 

Time spent in user mode   0 Days 0:0:0.15 

Time spent in kernel