#47171 [Fbk->Opn]: Incorrect tell values when trying to seek beyond file range

2009-01-20 Thread d_kelsey at uk dot ibm dot com
 ID:   47171
 User updated by:  d_kelsey at uk dot ibm dot com
 Reported By:  d_kelsey at uk dot ibm dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: Windows
-PHP Version:  5.2.8
+PHP Version:  5.2.9 snap jan21
 New Comment:

The problem still exists in the latest windows snapshot for php 5.2


Previous Comments:


[2009-01-20 19:06:19] j...@php.net

Please try using this CVS snapshot:

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

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





[2009-01-20 17:25:01] d_kelsey at uk dot ibm dot com

The provided test only covers the read scenario, but similar issues
result when opening a zlib stream for write as well.



[2009-01-20 17:24:00] d_kelsey at uk dot ibm dot com

Description:

When attempting to seek a zlib stream outside the range of the file eg
-50 or 2000 (and the uncompressed length is < 2000) in either read or
write mode, after the seek operation a gztell call returns false. In
most cases the file pointer doesn't move so I can perform further reads
or writes but the tell value returns now an invalid value. 

If a attempt to seek forward in read mode beyond the end of the
uncompressed stream it looks like the file pointer remains at the end of
the stream as a subsequent read returns nothing.

In all cases I would expect
- seek & gzseek to return -1
- the file pointer to remain where it was
- the tell to return the same value as before the seek

In other words the operation fails and nothing changes.

Reproduce code:
---


Expected result:

move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=int(40)
string(10) "iny flying"
tell=int(50)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=int(0)
string(10) "When you'r"
tell=int(10)

Actual result:
--
move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=bool(false)
string(0) ""
tell=bool(false)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=bool(false)
string(10) "When you'r"
tell=int(9)





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



#44954 [NoF->Opn]: file_get_contents crashes Apache

2009-01-20 Thread abakker at gmx dot net
 ID:   44954
 User updated by:  abakker at gmx dot net
 Reported By:  abakker at gmx dot net
-Status:   No Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Win XP
 PHP Version:  5.2.6
 Assigned To:  fb-req-jani
 New Comment:

I completely removed Apache and PHP from my PC and did a fresh default
install of Apache 2.2.11 and PHP 5.2.8 (on my PC with Windows XP Pro).
The problem still occurs. After 202 iterations of file_get_contents the
script continues very slowly, every iteration takes 1 minute. In the
Apache error log file the following entries are created:

[Tue Jan 20 09:09:17 2009] [error] [client 127.0.0.1] PHP Warning: 
file_get_contents(http://localhost/bugs/bug.htm) [function.file-get-contents]:
failed to open stream: A connection attempt failed because the connected
party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond.\r\n in
C:\\Andre\\Apache\\public_html\\bugs\\bug.php on line 7

[Tue Jan 20 09:10:17 2009] [error] [client 127.0.0.1] PHP Warning: 
file_get_contents(http://localhost/bugs/bug.htm) [function.file-get-contents]:
failed to open stream: A connection attempt failed because the connected
party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond.\r\n in
C:\\Andre\\Apache\\public_html\\bugs\\bug.php on line 7

[Tue Jan 20 09:11:17 2009] [error] [client 127.0.0.1] PHP Warning: 
file_get_contents(http://localhost/bugs/bug.htm) [function.file-get-contents]:
failed to open stream: A connection attempt failed because the connected
party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond.\r\n in
C:\\Andre\\Apache\\public_html\\bugs\\bug.php on line 7

Apache does not respond to page requests in other sessions, i.e. other
users cannot access web pages anymore.

I guess technically speaking Apache does not crash, but hangs. Maybe
that is why I am unable to create a backtrace. Anyway, the problem
occurs with a default install of Apache and PHP. Maybe you are able to
reproduce the problem if you do a default install on your PC.


Previous Comments:


[2008-08-15 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".



[2008-08-07 22:15:17] j...@php.net

The problem is that I can't reproduce this. So it's up to you either
provide the backtrace or just let this report rot.



[2008-07-24 09:10:43] abakker at gmx dot net

I tried to create a backtrace for the httpd.exe process, but no dmp
file is generated. Either Apache does not crash (but hangs) or I am
doing something wrong.

The problem can easily be reproduced (just run the script I provided).
I suggest you reproduce the problem yourself which allows you to do
whatever analysis or backtracing you need. That would be far more
efficient than passing it back to me.



[2008-07-14 21:13:40] j...@php.net

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

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





[2008-05-18 08:43:37] abakker at gmx dot net

I added a sleep(1) and set max_execution_time to 999. After 172
iterations the Apache server hangs (does not respond to page requests
anymore). The script continues very slowly at this point, it times out
on every file_get_contents request (in the error log you see the error
message mentioned at the top of this bug report for every iteration).

The total number of threads in Windows Task Manager does not increase
when running the script. My system is also not running out of resources,
I have 3 Gb memory of which 2.6 Gb is available.

When you replace file_get_contents with http_get or curl_exec the
problem does not occur. Seems to me that this indicates that there is
something wrong with file_get_contents.

In any case a PHP script should not cause the Apache server to
hang/crash (Apache does not respond to page requests for any user
anymore) and bring a production system dow

#47175 [Bgs]: ini_set('session.gc_maxlifetime','86400') does not respond to the change of tim

2009-01-20 Thread webmaster at e-taller dot com dot ar
 ID:   47175
 User updated by:  webmaster at e-taller dot com dot ar
-Summary:  ini_set('session.gc_maxlifetime','86400') no responde
   al cambio de tiempo
 Reported By:  webmaster at e-taller dot com dot ar
 Status:   Bogus
 Bug Type: Session related
 Operating System: linux
 PHP Version:  5.2.6
 New Comment:

ok, I did not know what the English language 
I changed all the pages you have session_start () 
the value of session.gc.maxlifetime and only takes the php.ini.

thank you for answering


Previous Comments:


[2009-01-21 01:39:08] scott...@php.net

The primary language for bug reporting is English.

But I think what you are asking is that if you can set the cleanup for
sessions via ini_set, the answer here is yes. Though you'd need to set
it for EVERY script that uses sessions as any script can go through and
clean up the files.



[2009-01-21 00:43:56] webmaster at e-taller dot com dot ar

no cambia el tiempo de caducidad



[2009-01-21 00:25:26] webmaster at e-taller dot com dot ar

Description:

trate de cambiar el tiempo en que caduca la sesion mediante ini_set asi
"ini_set('session.gc_maxlifetime','86400')", esta claro que al recargar
la pagina session.gc.maxlifetime retorna al valor del php.ini, despues
de setearlo para 1 dia en todas las paginas que tenian session_start()
no logre que tomara el valor que yo he puesto siempre toma el del
php.ini.
mi pregunta es porque pasa esto?
se puede realmente mediante ini_set cambiar el valor de
session.gc.maxlifetime?

de ser asi me podrian decir como es.

gracias de ante mano.

Reproduce code:
---
ini_set("session.gc_maxlifetime","86400");

Expected result:

que cambie session.gc.maxlifetime a 1 dia

Actual result:
--
session.gc.maxlifetime no toma cambios mediante ini_set





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



#47173 [Bgs]: $_SESSION reference inside function broken

2009-01-20 Thread tommyhp2 at yahoo dot com
 ID:   47173
 User updated by:  tommyhp2 at yahoo dot com
 Reported By:  tommyhp2 at yahoo dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Win03 R2 SP2 PHP ISAPI
 PHP Version:  5.2.8
 New Comment:

Sorry, the code in scenario 1 should be:

if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION['arr'] =& $arr;
}

Had a long day :D


Previous Comments:


[2009-01-21 02:03:07] tommyhp2 at yahoo dot com

I don't understand how is this bogus? I did look at the manual to make
sure I used the variable variables and reference correctly.  Looking at
the code give, if I pass string 'arr' to the function, then $$var ==
${'arr'}. There is no ambiguity.  If I do a var_dump($$var) equivalent
to var_dump(${'arr'}) inside the function right after global $$var, I
get the defined global $arr array contents.  I didn't see any where in
the manual at
http://www.php.net/manual/en/language.variables.variable.php
about not being able to use it or implement it inside a function since
the examples didn't implement inside a function.

As for references, I don't think it's used improperly. Since I could
have multiple references to a single value:
$a = 'some string';
$b =& $a;
$c =& $a;

echo $b; // gives 'some string'
echo $c; // gives 'some string'

$a = 'nada';
echo $b; // gives 'nada'

which those 2 concepts, this code

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

works as intended. If put the if/else inside a function and replace
with the appropriate variable along with global definition, why does it
break with no reference?  Or is referencing not permitted inside a
function? Which I don't see in the manual. As for the example in the
manual of 
function foo(&$var)
{
$var++;
}
I'm not passing the value or the pointer/reference.  I'm passing a
string and using the string via variable variables and global and
referencing it as variable variables.

Thanks,
Tommy



[2009-01-21 00:12:42] j...@php.net

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

Do not do that..



[2009-01-20 19:32:22] tommyhp2 at yahoo dot com

Same problem w/ CVS PHP 5.2 - Windows x86 VC6 (thread safe))  [10.02MB]
- 2009-Jan-20 12:00:00



[2009-01-20 19:27:31] tommyhp2 at yahoo dot com

Description:

use of variable variables broken when reference inside a function in
conjunction with $_SESSION.

Thanks,
Tommy

Reproduce code:
---
Scenario 1:

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');

if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

Works as intended (please see "Expected result").

Scenario 2:

function register_session($var)
{
global $$var;

if (isset($_SESSION[$var]))
{
$$var =& $_SESSION[$var];
} else
{
$_SESSION[$var] =& $$var;
}
}

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
register_session('arr');

Does not work as intended (Please see "Actual result").  The variable
$arr is not referenced.

Expected result:

["_SESSION"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }
  ["arr"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }

Actual result:
--
["_SESSION"]=>
  &array(1) {
["arr"]=>
array(3) {
  ["idx1"]=>
  string(4) "val1"
  ["idx2"]=>
  string(4) "val2"
  ["idx3"]=>
  string(4) "val3"
}
  }
  ["arr"]=>
  array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }





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



#47173 [Bgs]: $_SESSION reference inside function broken

2009-01-20 Thread tommyhp2 at yahoo dot com
 ID:   47173
 User updated by:  tommyhp2 at yahoo dot com
 Reported By:  tommyhp2 at yahoo dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Win03 R2 SP2 PHP ISAPI
 PHP Version:  5.2.8
 New Comment:

I don't understand how is this bogus? I did look at the manual to make
sure I used the variable variables and reference correctly.  Looking at
the code give, if I pass string 'arr' to the function, then $$var ==
${'arr'}. There is no ambiguity.  If I do a var_dump($$var) equivalent
to var_dump(${'arr'}) inside the function right after global $$var, I
get the defined global $arr array contents.  I didn't see any where in
the manual at
http://www.php.net/manual/en/language.variables.variable.php
about not being able to use it or implement it inside a function since
the examples didn't implement inside a function.

As for references, I don't think it's used improperly. Since I could
have multiple references to a single value:
$a = 'some string';
$b =& $a;
$c =& $a;

echo $b; // gives 'some string'
echo $c; // gives 'some string'

$a = 'nada';
echo $b; // gives 'nada'

which those 2 concepts, this code

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

works as intended. If put the if/else inside a function and replace
with the appropriate variable along with global definition, why does it
break with no reference?  Or is referencing not permitted inside a
function? Which I don't see in the manual. As for the example in the
manual of 
function foo(&$var)
{
$var++;
}
I'm not passing the value or the pointer/reference.  I'm passing a
string and using the string via variable variables and global and
referencing it as variable variables.

Thanks,
Tommy


Previous Comments:


[2009-01-21 00:12:42] j...@php.net

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

Do not do that..



[2009-01-20 19:32:22] tommyhp2 at yahoo dot com

Same problem w/ CVS PHP 5.2 - Windows x86 VC6 (thread safe))  [10.02MB]
- 2009-Jan-20 12:00:00



[2009-01-20 19:27:31] tommyhp2 at yahoo dot com

Description:

use of variable variables broken when reference inside a function in
conjunction with $_SESSION.

Thanks,
Tommy

Reproduce code:
---
Scenario 1:

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');

if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

Works as intended (please see "Expected result").

Scenario 2:

function register_session($var)
{
global $$var;

if (isset($_SESSION[$var]))
{
$$var =& $_SESSION[$var];
} else
{
$_SESSION[$var] =& $$var;
}
}

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
register_session('arr');

Does not work as intended (Please see "Actual result").  The variable
$arr is not referenced.

Expected result:

["_SESSION"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }
  ["arr"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }

Actual result:
--
["_SESSION"]=>
  &array(1) {
["arr"]=>
array(3) {
  ["idx1"]=>
  string(4) "val1"
  ["idx2"]=>
  string(4) "val2"
  ["idx3"]=>
  string(4) "val3"
}
  }
  ["arr"]=>
  array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }





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



#47175 [Opn->Bgs]: ini_set('session.gc_maxlifetime','86400') no responde al cambio de tiempo

2009-01-20 Thread scottmac
 ID:   47175
 Updated by:   scott...@php.net
 Reported By:  webmaster at e-taller dot com dot ar
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: linux
 PHP Version:  5.2.6
 New Comment:

The primary language for bug reporting is English.

But I think what you are asking is that if you can set the cleanup for
sessions via ini_set, the answer here is yes. Though you'd need to set
it for EVERY script that uses sessions as any script can go through and
clean up the files.


Previous Comments:


[2009-01-21 00:43:56] webmaster at e-taller dot com dot ar

no cambia el tiempo de caducidad



[2009-01-21 00:25:26] webmaster at e-taller dot com dot ar

Description:

trate de cambiar el tiempo en que caduca la sesion mediante ini_set asi
"ini_set('session.gc_maxlifetime','86400')", esta claro que al recargar
la pagina session.gc.maxlifetime retorna al valor del php.ini, despues
de setearlo para 1 dia en todas las paginas que tenian session_start()
no logre que tomara el valor que yo he puesto siempre toma el del
php.ini.
mi pregunta es porque pasa esto?
se puede realmente mediante ini_set cambiar el valor de
session.gc.maxlifetime?

de ser asi me podrian decir como es.

gracias de ante mano.

Reproduce code:
---
ini_set("session.gc_maxlifetime","86400");

Expected result:

que cambie session.gc.maxlifetime a 1 dia

Actual result:
--
session.gc.maxlifetime no toma cambios mediante ini_set





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



#47175 [Opn]: ini_set('session.gc_maxlifetime','86400') no responde al cambio de tiempo

2009-01-20 Thread webmaster at e-taller dot com dot ar
 ID:   47175
 User updated by:  webmaster at e-taller dot com dot ar
-Summary:  ini_set
 Reported By:  webmaster at e-taller dot com dot ar
 Status:   Open
 Bug Type: Session related
 Operating System: linux
-PHP Version:  5.2.8
+PHP Version:  5.2.6
 New Comment:

no cambia el tiempo de caducidad


Previous Comments:


[2009-01-21 00:25:26] webmaster at e-taller dot com dot ar

Description:

trate de cambiar el tiempo en que caduca la sesion mediante ini_set asi
"ini_set('session.gc_maxlifetime','86400')", esta claro que al recargar
la pagina session.gc.maxlifetime retorna al valor del php.ini, despues
de setearlo para 1 dia en todas las paginas que tenian session_start()
no logre que tomara el valor que yo he puesto siempre toma el del
php.ini.
mi pregunta es porque pasa esto?
se puede realmente mediante ini_set cambiar el valor de
session.gc.maxlifetime?

de ser asi me podrian decir como es.

gracias de ante mano.

Reproduce code:
---
ini_set("session.gc_maxlifetime","86400");

Expected result:

que cambie session.gc.maxlifetime a 1 dia

Actual result:
--
session.gc.maxlifetime no toma cambios mediante ini_set





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



#47175 [NEW]: ini_set

2009-01-20 Thread webmaster at e-taller dot com dot ar
From: webmaster at e-taller dot com dot ar
Operating system: linux
PHP version:  5.2.8
PHP Bug Type: Session related
Bug description:  ini_set

Description:

trate de cambiar el tiempo en que caduca la sesion mediante ini_set asi
"ini_set('session.gc_maxlifetime','86400')", esta claro que al recargar la
pagina session.gc.maxlifetime retorna al valor del php.ini, despues de
setearlo para 1 dia en todas las paginas que tenian session_start() no
logre que tomara el valor que yo he puesto siempre toma el del php.ini.
mi pregunta es porque pasa esto?
se puede realmente mediante ini_set cambiar el valor de
session.gc.maxlifetime?

de ser asi me podrian decir como es.

gracias de ante mano.

Reproduce code:
---
ini_set("session.gc_maxlifetime","86400");

Expected result:

que cambie session.gc.maxlifetime a 1 dia

Actual result:
--
session.gc.maxlifetime no toma cambios mediante ini_set

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



#47173 [Opn->Bgs]: $_SESSION reference inside function broken

2009-01-20 Thread jani
 ID:   47173
 Updated by:   j...@php.net
 Reported By:  tommyhp2 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Win03 R2 SP2 PHP ISAPI
 PHP Version:  5.2.8
 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

Do not do that..


Previous Comments:


[2009-01-20 19:32:22] tommyhp2 at yahoo dot com

Same problem w/ CVS PHP 5.2 - Windows x86 VC6 (thread safe))  [10.02MB]
- 2009-Jan-20 12:00:00



[2009-01-20 19:27:31] tommyhp2 at yahoo dot com

Description:

use of variable variables broken when reference inside a function in
conjunction with $_SESSION.

Thanks,
Tommy

Reproduce code:
---
Scenario 1:

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');

if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

Works as intended (please see "Expected result").

Scenario 2:

function register_session($var)
{
global $$var;

if (isset($_SESSION[$var]))
{
$$var =& $_SESSION[$var];
} else
{
$_SESSION[$var] =& $$var;
}
}

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
register_session('arr');

Does not work as intended (Please see "Actual result").  The variable
$arr is not referenced.

Expected result:

["_SESSION"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }
  ["arr"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }

Actual result:
--
["_SESSION"]=>
  &array(1) {
["arr"]=>
array(3) {
  ["idx1"]=>
  string(4) "val1"
  ["idx2"]=>
  string(4) "val2"
  ["idx3"]=>
  string(4) "val3"
}
  }
  ["arr"]=>
  array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }





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



#47154 [Com]: Object properties unset after setting.

2009-01-20 Thread onerax at gmail dot com
 ID:   47154
 Comment by:   onerax at gmail dot com
 Reported By:  onerax at gmail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows
 PHP Version:  6CVS-2009-01-19 (snap)
 New Comment:

It also seems that if I set the values in the object manually - in 
the above example, $User->Password = 'notest', then the property is 
set. If I do the same to the array $Data, $Data['Password'] = 
'notest', It does not set the existing Password index, rather it 
creates a second Password index, which is shown in print_r below.

Array ( [EntityId] => USER_4974b612242741.58553835 [Password] => test 
[LastLogin] => [LastIp] => [Name] => test [Description] => [Updated] 
=> [Created] => 2009-01-19 17:19:14 [Parent] => [Owner] => [UserId] 
=> USER_4974b612242741.58553835 [FirstName] => [MiddleName] => 
[LastName] => [Avatar] => [Alias] => [Gender] => [Signature] => 
[Password] => notest ) 111Page Generation Time:: 0.09224 seconds

A single array with two "Password" entries...strange, yes? =)


Previous Comments:


[2009-01-20 16:51:28] onerax at gmail dot com

Here's a section of the actual code piece, and the output of all 
involved variables after the routine.

CODE::
Password = $Data['Password'];
$User->LastLogin= $Data['LastLogin'];
$User->LastIp   = $Data['LastIp'];

require_once('./Core/Entities/Profile.class.php');
$User->Profile  = new 
\xBB\Entities\Profile();
$User->Profile->UserId  = $Data['EntityId'];

$this->Database->Profiles->Fill($User->Profile, 
$Data);
if(sizeof($Data)>1){
die(print_r($User).print_r($User-
>Profile).print_r($Data));
}
}
...


OUTPUT::
xBB\Entities\User Object ( [Password] => [LastLogin] => [Profile] => 
xBB\Entities\Profile Object ( [UserId] => [FirstName] => [MiddleName] 
=> [LastName] => [Avatar] => [Alias] => [Gender] => [Signature] => ) 
[LastIp] => [EntityId] => [Name] => [Description] => [Updated] => 
[Created] => [Parent] => [Owner] => ) xBB\Entities\Profile Object ( 
[UserId] => [FirstName] => [MiddleName] => [LastName] => [Avatar] => 
[Alias] => [Gender] => [Signature] => ) Array ( [EntityId] => 
USER_4974b612242741.58553835 [Password] => test [LastLogin] => 
[LastIp] => [Name] => test [Description] => [Updated] => [Created] => 
2009-01-19 17:19:14 [Parent] => [Owner] => [UserId] => 
USER_4974b612242741.58553835 [FirstName] => [MiddleName] => 
[LastName] => [Avatar] => [Alias] => [Gender] => [Signature] => ) 
111Page Generation Time:: 0.093775 seconds



[2009-01-19 21:16:35] onerax at gmail dot com

Description:

After setting object properties on one line, object is still empty on 
the next. Inheritance, multiple namespaces, and passing arrays by 
reference are involved.





Reproduce code:
---
http://helios-emu.org/arraytest.txt

keep in mind this is not the actual code, and does not reproduce the
problem by itself. To reproduce the problem you have to separate each
class into a separate file and separate them out into two separate
namespaces. I have the original code that I uncovered this in and can
e-mail it upon a developer's request, but I will not make it public.

Expected result:

The object in which the properties are set contain data.

Actual result:
--
The object in which the properties are set do not contain data.





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



#47168 [Bgs]: printf of floating point variable prints maximum of 40 decimal places

2009-01-20 Thread exploringbinary at gmail dot com
 ID:   47168
 User updated by:  exploringbinary at gmail dot com
 Reported By:  exploringbinary at gmail dot com
 Status:   Bogus
 Bug Type: Math related
 Operating System: Windows
 PHP Version:  5.2.8
 New Comment:

Hi,

  I read the documentation and the "how to submit a bug report" and
googled as well before (and now again after) submitting the bug report. 
I cannot see discussion of this limit. Could you please give me a more
specific link?

  I would also like to know the rationale for the limit. Why doesn't
javascript or gcc have this limit? Why did Microsoft accept my bug
report for a similar problem in VS? It seems like something PHP should
consider, or at least give rationale for why not.

Thanks.


Previous Comments:


[2009-01-20 18:04:24] il...@php.net

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

PHP string formatting functions will not permit float precision beyond

40 characters, this is a hard limit. A notice was however added to 
indicate that this is happening.



[2009-01-20 14:55:45] exploringbinary at gmail dot com

Description:

printf will not print more than 40 decimal places, even if the format
specifier asks for more. For example, 

 

Contrast this with javascript:

  var value = 0.00011102230246251565404236316680908203125;
// 2^-53
  var result = value.toFixed(53);
  document.write (result); // Prints all 53 decimal places


I reported a similar bug in Visual Studio, which Microsoft acknowledged
as an error:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=329278


Reproduce code:
---


Expected result:

I expect to see all 53 decimal places printed:
0.00011102230246251565404236316680908203125

Actual result:
--
Only 40 decimal places are printed:
0.0001110223024625156540423632





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



#47174 [NEW]: base64_decode interprets pad char in mid string as terminator

2009-01-20 Thread rricha...@php.net
From: rricha...@php.net
Operating system: All
PHP version:  5.2.8
PHP Bug Type: *URL Functions
Bug description:  base64_decode interprets pad char in mid string as terminator

Description:

base64_decode handles a pad as the end of data even when it is not 
terminating a string, in which case it really should be handled as non-
alphabet characters. From rfc 3548 2.3: "Furthermore, such 
specifications may consider the pad character, "=", as not part of the 
base alphabet until the end of the string."

By ignoring all data after the pad, it is difficult to work with 
signature based technologies where the base64 
decoded octects must be compared to determine validity. PHP allows for 
additional data to be added to a signature which ends up being ignored 
when compared, while other implementations do not.

Reproduce code:
---
if (base64_decode("dGVzdA==") == base64_decode("dGVzdA==CRAP")) {
echo "Same octect data - Signature Valid";
} else {
echo "Invalid Signature";
}

Expected result:

Invalid Signature

Actual result:
--
Same octect data - Signature Valid

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



#47087 [Asn->Csd]: Second parameter of mssql_fetch_array() is ignored

2009-01-20 Thread felipe
 ID:   47087
 Updated by:   fel...@php.net
 Reported By:  vr...@php.net
-Status:   Assigned
+Status:   Closed
 Bug Type: MSSQL related
 Operating System: Windows
 PHP Version:  5.3.0alpha3
 Assigned To:  kalle
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2009-01-13 13:29:06] ka...@php.net

I'll have a look at it



[2009-01-13 12:35:24] vr...@php.net

Description:

It seems that the result_type parameter of mssql_fetch_array() is
always set to MSSQL_BOTH.

Reproduce code:
---



Expected result:

Array
(
[id] => 1
)


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






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



#47172 [Com]: new interface suggest

2009-01-20 Thread info at netmosfera dot it
 ID:   47172
 Comment by:   info at netmosfera dot it
 Reported By:  info at netmosfera dot it
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: irrelevant
 PHP Version:  5.3.0alpha3
 New Comment:

another useful interface:

interface PrintReadable
{
 public printR();
}

print_r(new ArrayObject(.));

useful to improve readability on items like this:

ArrayObject Object
(
[storage:ArrayObject:private] => Array
(
[0] => ArrayObject Object
(
[storage:ArrayObject:private] => Array
(
[0] => ArrayObject Object
(
[storage:ArrayObject:private] =>
Array
(
)

)

)

)

[1] => ciao
)

)


Previous Comments:


[2009-01-20 18:34:50] info at netmosfera dot it

Description:

hello

please read the code!

hth

Reproduce code:
---
interface FirstLast //? lol!
{
public function (Boolean) isFirst();
public function (Boolean) isLast();
}

$x= new ArrayObject(Array(1,2,3,4,5,6,7)); // implements this..

foreach($x as $item)
{
if($x->isFirst()) echo "";
echo "" . $item . "";
if($x->isLast()) echo "";
}






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



#47173 [Com]: $_SESSION reference inside function broken

2009-01-20 Thread tommyhp2 at yahoo dot com
 ID:   47173
 Comment by:   tommyhp2 at yahoo dot com
 Reported By:  tommyhp2 at yahoo dot com
 Status:   Open
 Bug Type: Session related
 Operating System: Win03 R2 SP2 PHP ISAPI
 PHP Version:  5.2.8
 New Comment:

Same problem w/ CVS PHP 5.2 - Windows x86 VC6 (thread safe))  [10.02MB]
- 2009-Jan-20 12:00:00


Previous Comments:


[2009-01-20 19:27:31] tommyhp2 at yahoo dot com

Description:

use of variable variables broken when reference inside a function in
conjunction with $_SESSION.

Thanks,
Tommy

Reproduce code:
---
Scenario 1:

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');

if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

Works as intended (please see "Expected result").

Scenario 2:

function register_session($var)
{
global $$var;

if (isset($_SESSION[$var]))
{
$$var =& $_SESSION[$var];
} else
{
$_SESSION[$var] =& $$var;
}
}

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
register_session('arr');

Does not work as intended (Please see "Actual result").  The variable
$arr is not referenced.

Expected result:

["_SESSION"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }
  ["arr"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }

Actual result:
--
["_SESSION"]=>
  &array(1) {
["arr"]=>
array(3) {
  ["idx1"]=>
  string(4) "val1"
  ["idx2"]=>
  string(4) "val2"
  ["idx3"]=>
  string(4) "val3"
}
  }
  ["arr"]=>
  array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }





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



#47173 [NEW]: $_SESSION reference inside function broken

2009-01-20 Thread tommyhp2 at yahoo dot com
From: tommyhp2 at yahoo dot com
Operating system: Win03 R2 SP2 PHP ISAPI
PHP version:  5.2.8
PHP Bug Type: Session related
Bug description:  $_SESSION reference inside function broken

Description:

use of variable variables broken when reference inside a function in
conjunction with $_SESSION.

Thanks,
Tommy

Reproduce code:
---
Scenario 1:

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');

if (isset($_SESSION['arr']))
{
$arr =& $_SESSION['arr'];
} else {
$_SESSION =& $arr;
}

Works as intended (please see "Expected result").

Scenario 2:

function register_session($var)
{
global $$var;

if (isset($_SESSION[$var]))
{
$$var =& $_SESSION[$var];
} else
{
$_SESSION[$var] =& $$var;
}
}

session_start();

$arr = array('idx1'=>'val1','idx2'=>'val2','idx3'=>'val3');
register_session('arr');

Does not work as intended (Please see "Actual result").  The variable $arr
is not referenced.

Expected result:

["_SESSION"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }
  ["arr"]=>
  &array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }

Actual result:
--
["_SESSION"]=>
  &array(1) {
["arr"]=>
array(3) {
  ["idx1"]=>
  string(4) "val1"
  ["idx2"]=>
  string(4) "val2"
  ["idx3"]=>
  string(4) "val3"
}
  }
  ["arr"]=>
  array(3) {
["idx1"]=>
string(4) "val1"
["idx2"]=>
string(4) "val2"
["idx3"]=>
string(4) "val3"
  }

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



#47171 [Opn->Fbk]: Incorrect tell values when trying to seek beyond file range

2009-01-20 Thread jani
 ID:   47171
 Updated by:   j...@php.net
 Reported By:  d_kelsey at uk dot ibm dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zlib Related
 Operating System: Windows
 PHP Version:  5.2.8
 New Comment:

Please try using this CVS snapshot:

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

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




Previous Comments:


[2009-01-20 17:25:01] d_kelsey at uk dot ibm dot com

The provided test only covers the read scenario, but similar issues
result when opening a zlib stream for write as well.



[2009-01-20 17:24:00] d_kelsey at uk dot ibm dot com

Description:

When attempting to seek a zlib stream outside the range of the file eg
-50 or 2000 (and the uncompressed length is < 2000) in either read or
write mode, after the seek operation a gztell call returns false. In
most cases the file pointer doesn't move so I can perform further reads
or writes but the tell value returns now an invalid value. 

If a attempt to seek forward in read mode beyond the end of the
uncompressed stream it looks like the file pointer remains at the end of
the stream as a subsequent read returns nothing.

In all cases I would expect
- seek & gzseek to return -1
- the file pointer to remain where it was
- the tell to return the same value as before the seek

In other words the operation fails and nothing changes.

Reproduce code:
---


Expected result:

move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=int(40)
string(10) "iny flying"
tell=int(50)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=int(0)
string(10) "When you'r"
tell=int(10)

Actual result:
--
move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=bool(false)
string(0) ""
tell=bool(false)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=bool(false)
string(10) "When you'r"
tell=int(9)





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



#47172 [NEW]: new interface suggest

2009-01-20 Thread info at netmosfera dot it
From: info at netmosfera dot it
Operating system: irrelevant
PHP version:  5.3.0alpha3
PHP Bug Type: SPL related
Bug description:  new interface suggest

Description:

hello

please read the code!

hth

Reproduce code:
---
interface FirstLast //? lol!
{
public function (Boolean) isFirst();
public function (Boolean) isLast();
}

$x= new ArrayObject(Array(1,2,3,4,5,6,7)); // implements this..

foreach($x as $item)
{
if($x->isFirst()) echo "";
echo "" . $item . "";
if($x->isLast()) echo "";
}


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



#47168 [Opn->Bgs]: printf of floating point variable prints maximum of 40 decimal places

2009-01-20 Thread iliaa
 ID:   47168
 Updated by:   il...@php.net
 Reported By:  exploringbinary at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Math related
 Operating System: Windows
 PHP Version:  5.2.8
 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

PHP string formatting functions will not permit float precision beyond

40 characters, this is a hard limit. A notice was however added to 
indicate that this is happening.


Previous Comments:


[2009-01-20 14:55:45] exploringbinary at gmail dot com

Description:

printf will not print more than 40 decimal places, even if the format
specifier asks for more. For example, 

 

Contrast this with javascript:

  var value = 0.00011102230246251565404236316680908203125;
// 2^-53
  var result = value.toFixed(53);
  document.write (result); // Prints all 53 decimal places


I reported a similar bug in Visual Studio, which Microsoft acknowledged
as an error:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=329278


Reproduce code:
---


Expected result:

I expect to see all 53 decimal places printed:
0.00011102230246251565404236316680908203125

Actual result:
--
Only 40 decimal places are printed:
0.0001110223024625156540423632





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



#47171 [Com]: Incorrect tell values when trying to seek beyond file range

2009-01-20 Thread d_kelsey at uk dot ibm dot com
 ID:   47171
 Comment by:   d_kelsey at uk dot ibm dot com
 Reported By:  d_kelsey at uk dot ibm dot com
 Status:   Open
 Bug Type: Zlib Related
 Operating System: Windows
 PHP Version:  5.2.8
 New Comment:

The provided test only covers the read scenario, but similar issues
result when opening a zlib stream for write as well.


Previous Comments:


[2009-01-20 17:24:00] d_kelsey at uk dot ibm dot com

Description:

When attempting to seek a zlib stream outside the range of the file eg
-50 or 2000 (and the uncompressed length is < 2000) in either read or
write mode, after the seek operation a gztell call returns false. In
most cases the file pointer doesn't move so I can perform further reads
or writes but the tell value returns now an invalid value. 

If a attempt to seek forward in read mode beyond the end of the
uncompressed stream it looks like the file pointer remains at the end of
the stream as a subsequent read returns nothing.

In all cases I would expect
- seek & gzseek to return -1
- the file pointer to remain where it was
- the tell to return the same value as before the seek

In other words the operation fails and nothing changes.

Reproduce code:
---


Expected result:

move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=int(40)
string(10) "iny flying"
tell=int(50)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=int(0)
string(10) "When you'r"
tell=int(10)

Actual result:
--
move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=bool(false)
string(0) ""
tell=bool(false)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=bool(false)
string(10) "When you'r"
tell=int(9)





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



#47171 [NEW]: Incorrect tell values when trying to seek beyond file range

2009-01-20 Thread d_kelsey at uk dot ibm dot com
From: d_kelsey at uk dot ibm dot com
Operating system: Windows
PHP version:  5.2.8
PHP Bug Type: Zlib Related
Bug description:  Incorrect tell values when trying to seek beyond file range

Description:

When attempting to seek a zlib stream outside the range of the file eg -50
or 2000 (and the uncompressed length is < 2000) in either read or write
mode, after the seek operation a gztell call returns false. In most cases
the file pointer doesn't move so I can perform further reads or writes but
the tell value returns now an invalid value. 

If a attempt to seek forward in read mode beyond the end of the
uncompressed stream it looks like the file pointer remains at the end of
the stream as a subsequent read returns nothing.

In all cases I would expect
- seek & gzseek to return -1
- the file pointer to remain where it was
- the tell to return the same value as before the seek

In other words the operation fails and nothing changes.

Reproduce code:
---


Expected result:

move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=int(40)
string(10) "iny flying"
tell=int(50)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=int(0)
string(10) "When you'r"
tell=int(10)

Actual result:
--
move to the 40th byte
seek=int(0)
tell=40
try to move beyond the file
seek=int(-1)
tell=bool(false)
string(0) ""
tell=bool(false)

rewinding and try to move to before the start
tell=0
gzseek=int(-1)
tell=bool(false)
string(10) "When you'r"
tell=int(9)

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



#47154 [Com]: Object properties unset after setting.

2009-01-20 Thread onerax at gmail dot com
 ID:   47154
 Comment by:   onerax at gmail dot com
 Reported By:  onerax at gmail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows
 PHP Version:  6CVS-2009-01-19 (snap)
 New Comment:

Here's a section of the actual code piece, and the output of all 
involved variables after the routine.

CODE::
Password = $Data['Password'];
$User->LastLogin= $Data['LastLogin'];
$User->LastIp   = $Data['LastIp'];

require_once('./Core/Entities/Profile.class.php');
$User->Profile  = new 
\xBB\Entities\Profile();
$User->Profile->UserId  = $Data['EntityId'];

$this->Database->Profiles->Fill($User->Profile, 
$Data);
if(sizeof($Data)>1){
die(print_r($User).print_r($User-
>Profile).print_r($Data));
}
}
...


OUTPUT::
xBB\Entities\User Object ( [Password] => [LastLogin] => [Profile] => 
xBB\Entities\Profile Object ( [UserId] => [FirstName] => [MiddleName] 
=> [LastName] => [Avatar] => [Alias] => [Gender] => [Signature] => ) 
[LastIp] => [EntityId] => [Name] => [Description] => [Updated] => 
[Created] => [Parent] => [Owner] => ) xBB\Entities\Profile Object ( 
[UserId] => [FirstName] => [MiddleName] => [LastName] => [Avatar] => 
[Alias] => [Gender] => [Signature] => ) Array ( [EntityId] => 
USER_4974b612242741.58553835 [Password] => test [LastLogin] => 
[LastIp] => [Name] => test [Description] => [Updated] => [Created] => 
2009-01-19 17:19:14 [Parent] => [Owner] => [UserId] => 
USER_4974b612242741.58553835 [FirstName] => [MiddleName] => 
[LastName] => [Avatar] => [Alias] => [Gender] => [Signature] => ) 
111Page Generation Time:: 0.093775 seconds


Previous Comments:


[2009-01-19 21:16:35] onerax at gmail dot com

Description:

After setting object properties on one line, object is still empty on 
the next. Inheritance, multiple namespaces, and passing arrays by 
reference are involved.





Reproduce code:
---
http://helios-emu.org/arraytest.txt

keep in mind this is not the actual code, and does not reproduce the
problem by itself. To reproduce the problem you have to separate each
class into a separate file and separate them out into two separate
namespaces. I have the original code that I uncovered this in and can
e-mail it upon a developer's request, but I will not make it public.

Expected result:

The object in which the properties are set contain data.

Actual result:
--
The object in which the properties are set do not contain data.





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



#47170 [NEW]: cast, gettype mishmash

2009-01-20 Thread lunter at interia dot pl
From: lunter at interia dot pl
Operating system: all
PHP version:  6CVS-2009-01-20 (snap)
PHP Bug Type: Feature/Change Request
Bug description:  cast, gettype mishmash

Description:

mishmash with casting and gettype


Reproduce code:
---
');

 $v=(unicode)'';
 print('2. variable casted as unicode has type: '.gettype($v).'');

 $v=(binary)'';
 print('3. variable casted as binary has type: '.gettype($v).'');
?>

Expected result:

I suggest:

1. variable casted as string has type: string (OLD PHP 5 behaviour, in PHP
6 for binary operation)
2. variable casted as unicode has type: unicode

or

1. variable casted as string has type: string (for unicode)
2. variable casted as binary has type: binary (OLD PHP 5 behaviour, in PHP
6 for binary operation)

Actual result:
--
1. variable casted as string has type: unicode
2. variable casted as unicode has type: unicode
3. variable casted as binary has type: string

---mishmash---
binary -> string -> unicode


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



#47169 [Bgs]: cast, gettype

2009-01-20 Thread lunter at interia dot pl
 ID:   47169
 User updated by:  lunter at interia dot pl
 Reported By:  lunter at interia dot pl
 Status:   Bogus
 Bug Type: Unicode Engine related
 Operating System: all
 PHP Version:  6CVS-2009-01-20 (snap)
 New Comment:

This not a bug, this if feature request.


Previous Comments:


[2009-01-20 15:04:36] fel...@php.net

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





[2009-01-20 14:57:01] lunter at interia dot pl

Description:

total mishmash with casting and gettype

Reproduce code:
---
');

 $v=(unicode)'';
 print('2. variable casted as unicode has type: '.gettype($v).'');

 $v=(binary)'';
 print('3. variable casted as binary has type: '.gettype($v).'');
?>

Expected result:

I suggest:

1. variable casted as string has type: string (OLD PHP 5 behaviour, in
PHP 6 for binary operation)
2. variable casted as unicode has type: unicode

Actual result:
--
1. variable casted as string has type: unicode
2. variable casted as unicode has type: unicode
3. variable casted as binary has type: string





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



#47152 [Opn->Csd]: gzseek/fseek using SEEK_END produces strange results

2009-01-20 Thread felipe
 ID:   47152
 Updated by:   fel...@php.net
 Reported By:  d_kelsey at uk dot ibm dot com
-Status:   Open
+Status:   Closed
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.2.8
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Hi,the SEEK_END actually is not supported.
I've added a warning when it's used.

Thanks.


Previous Comments:


[2009-01-20 13:36:54] d_kelsey at uk dot ibm dot com

I would expect the gzseek to fail for SEEK_END on a write as this
doesn't make any sense. The file pointer should not move which is the
case but it seems that the tell value has been corrupted.



[2009-01-20 13:35:23] d_kelsey at uk dot ibm dot com

There is also a problem using SEEK_END when opening a file for write
mode.

for example


results in:
bool(false)
int(15)
first sentence.second sentence.

So the gztell results of bool(false)and then int(15) are both
incorrect. Yet the file did get written correctly.



[2009-01-19 18:31:59] d_kelsey at uk dot ibm dot com

Description:

I have opened a .gz file using gzopen for reading.
I can pass SEEK_END with offset of 0 (which would seek to the end of
the file) using either fseek or gzseek as a whence. This returns -1 (a
failure), but a subsequent gztell/ftell returns false, but I can still
read the stream from the position it was last in. 

The issue is
1. is a whence of SEEK_END supported for a zlib stream ? If it is then
SEEK_END is very broken as it doesn't move it to the end of the stream.

2. if not supported, I should get a warning saying invalid parameter.
Also a subsequent call to gztell/ftell returns false.a further read and
gztell/ftell returns an incorrect value 

I couldn't find any information to say it was not a valid value so
assumed that it was valid.

Reproduce code:
---


Expected result:

If SEEK_END is not valid:
string(10) "When you'r"
move to the end
gzseek=
Warning: gzseek() SEEK_END not supported
tell=int(10)
eof=bool(false)
string(10) "e taught t"
tell=int(20)

if SEEK_END is valid:
string(10) "When you'r"
move to the end
gzseek=int(0)
tell=int(176)
eof=bool(true)
string(0) ""
tell=int(176)

Actual result:
--
string(10) "When you'r"
move to the end
gzseek=int(-1)
tell=bool(false)
eof=bool(false)
string(10) "e taught t"
tell=int(9)





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



#47169 [Opn->Bgs]: cast, gettype

2009-01-20 Thread felipe
 ID:   47169
 Updated by:   fel...@php.net
 Reported By:  lunter at interia dot pl
-Status:   Open
+Status:   Bogus
 Bug Type: Unicode Engine related
 Operating System: all
 PHP Version:  6CVS-2009-01-20 (snap)
 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




Previous Comments:


[2009-01-20 14:57:01] lunter at interia dot pl

Description:

total mishmash with casting and gettype

Reproduce code:
---
');

 $v=(unicode)'';
 print('2. variable casted as unicode has type: '.gettype($v).'');

 $v=(binary)'';
 print('3. variable casted as binary has type: '.gettype($v).'');
?>

Expected result:

I suggest:

1. variable casted as string has type: string (OLD PHP 5 behaviour, in
PHP 6 for binary operation)
2. variable casted as unicode has type: unicode

Actual result:
--
1. variable casted as string has type: unicode
2. variable casted as unicode has type: unicode
3. variable casted as binary has type: string





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



#47169 [NEW]: cast, gettype

2009-01-20 Thread lunter at interia dot pl
From: lunter at interia dot pl
Operating system: all
PHP version:  6CVS-2009-01-20 (snap)
PHP Bug Type: Unicode Engine related
Bug description:  cast, gettype

Description:

total mishmash with casting and gettype

Reproduce code:
---
');

 $v=(unicode)'';
 print('2. variable casted as unicode has type: '.gettype($v).'');

 $v=(binary)'';
 print('3. variable casted as binary has type: '.gettype($v).'');
?>

Expected result:

I suggest:

1. variable casted as string has type: string (OLD PHP 5 behaviour, in PHP
6 for binary operation)
2. variable casted as unicode has type: unicode

Actual result:
--
1. variable casted as string has type: unicode
2. variable casted as unicode has type: unicode
3. variable casted as binary has type: string

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



#47168 [NEW]: printf of floating point variable prints maximum of 40 decimal places

2009-01-20 Thread exploringbinary at gmail dot com
From: exploringbinary at gmail dot com
Operating system: Windows
PHP version:  5.2.8
PHP Bug Type: Math related
Bug description:  printf of floating point variable prints maximum of 40 
decimal places

Description:

printf will not print more than 40 decimal places, even if the format
specifier asks for more. For example, 

 

Contrast this with javascript:

  var value = 0.00011102230246251565404236316680908203125; //
2^-53
  var result = value.toFixed(53);
  document.write (result); // Prints all 53 decimal places


I reported a similar bug in Visual Studio, which Microsoft acknowledged as
an error:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=329278


Reproduce code:
---


Expected result:

I expect to see all 53 decimal places printed:
0.00011102230246251565404236316680908203125

Actual result:
--
Only 40 decimal places are printed:
0.0001110223024625156540423632

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



#26004 [Com]: $_POST variables not set when using enctype="multipart/form-data"

2009-01-20 Thread paraporquerias at yahoo dot com
 ID:   26004
 Comment by:   paraporquerias at yahoo dot com
 Reported By:  jacknorton101 at hotmail dot com
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: RedHat Linux 9
 PHP Version:  4.3.3
 New Comment:

My problem is that, in my earlier php instalation, I had
register_globals=on, and now, with PHP5, it comes off by default:

http://cn.php.net/manual/en/language.variables.external.php

My solution was using this line before I need the value of $username

$username = echo $_POST['username'];

I hope it helps...


Previous Comments:


[2008-12-15 02:28:26] ray_linn at hotmail dot com

occurs the same issues on apache 2.2.8 + latest php 5.2.8, all of the
solution above is useless.



[2008-09-16 01:58:06] mike dot dygert at adelphia dot net

I am having this issue, none of the above worked for me... anybody have
other ideas?  (IIS 6, PHP 5.2.6)

Thanks



[2008-03-05 14:56:13] schefer at webdessert dot ch

To correct my above message:

Post the form with method GET does not work, setting the post_max_size
in php.ini higher than the size of the uploaded file did the trick.



[2008-03-05 14:43:40] schefer at webdessert dot ch

I have experienced the same problems with PHP 5.2.4 on Windows. The
solution was to specify the forms method as GET, and not as POST. It
worked as well by not specifying any method, as this will choose GET as
the default method.

Use it like this:

 
 
 


print_r($_GET) results in:

Array ( [foo] => bar [file] => abc.zip )



[2008-02-12 13:42:05] sri dot www at gmail dot com

I am facing the similar problem. when i upload a file having more than
the size specified in post_max_size variable, the $_POST variables are
empty after form submission. If i increase the post_max_size variable
more than the file trying to be uploaded then i can get the $_POST
variables array.

Is there any other way to fix this without relaying php configuration
variables in order to get the $_POST variables as it is?



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

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



#47152 [Com]: gzseek/fseek using SEEK_END produces strange results

2009-01-20 Thread d_kelsey at uk dot ibm dot com
 ID:   47152
 Comment by:   d_kelsey at uk dot ibm dot com
 Reported By:  d_kelsey at uk dot ibm dot com
 Status:   Open
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.2.8
 New Comment:

I would expect the gzseek to fail for SEEK_END on a write as this
doesn't make any sense. The file pointer should not move which is the
case but it seems that the tell value has been corrupted.


Previous Comments:


[2009-01-20 13:35:23] d_kelsey at uk dot ibm dot com

There is also a problem using SEEK_END when opening a file for write
mode.

for example


results in:
bool(false)
int(15)
first sentence.second sentence.

So the gztell results of bool(false)and then int(15) are both
incorrect. Yet the file did get written correctly.



[2009-01-19 18:31:59] d_kelsey at uk dot ibm dot com

Description:

I have opened a .gz file using gzopen for reading.
I can pass SEEK_END with offset of 0 (which would seek to the end of
the file) using either fseek or gzseek as a whence. This returns -1 (a
failure), but a subsequent gztell/ftell returns false, but I can still
read the stream from the position it was last in. 

The issue is
1. is a whence of SEEK_END supported for a zlib stream ? If it is then
SEEK_END is very broken as it doesn't move it to the end of the stream.

2. if not supported, I should get a warning saying invalid parameter.
Also a subsequent call to gztell/ftell returns false.a further read and
gztell/ftell returns an incorrect value 

I couldn't find any information to say it was not a valid value so
assumed that it was valid.

Reproduce code:
---


Expected result:

If SEEK_END is not valid:
string(10) "When you'r"
move to the end
gzseek=
Warning: gzseek() SEEK_END not supported
tell=int(10)
eof=bool(false)
string(10) "e taught t"
tell=int(20)

if SEEK_END is valid:
string(10) "When you'r"
move to the end
gzseek=int(0)
tell=int(176)
eof=bool(true)
string(0) ""
tell=int(176)

Actual result:
--
string(10) "When you'r"
move to the end
gzseek=int(-1)
tell=bool(false)
eof=bool(false)
string(10) "e taught t"
tell=int(9)





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



#47152 [Com]: gzseek/fseek using SEEK_END produces strange results

2009-01-20 Thread d_kelsey at uk dot ibm dot com
 ID:   47152
 Comment by:   d_kelsey at uk dot ibm dot com
 Reported By:  d_kelsey at uk dot ibm dot com
 Status:   Open
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.2.8
 New Comment:

There is also a problem using SEEK_END when opening a file for write
mode.

for example


results in:
bool(false)
int(15)
first sentence.second sentence.

So the gztell results of bool(false)and then int(15) are both
incorrect. Yet the file did get written correctly.


Previous Comments:


[2009-01-19 18:31:59] d_kelsey at uk dot ibm dot com

Description:

I have opened a .gz file using gzopen for reading.
I can pass SEEK_END with offset of 0 (which would seek to the end of
the file) using either fseek or gzseek as a whence. This returns -1 (a
failure), but a subsequent gztell/ftell returns false, but I can still
read the stream from the position it was last in. 

The issue is
1. is a whence of SEEK_END supported for a zlib stream ? If it is then
SEEK_END is very broken as it doesn't move it to the end of the stream.

2. if not supported, I should get a warning saying invalid parameter.
Also a subsequent call to gztell/ftell returns false.a further read and
gztell/ftell returns an incorrect value 

I couldn't find any information to say it was not a valid value so
assumed that it was valid.

Reproduce code:
---


Expected result:

If SEEK_END is not valid:
string(10) "When you'r"
move to the end
gzseek=
Warning: gzseek() SEEK_END not supported
tell=int(10)
eof=bool(false)
string(10) "e taught t"
tell=int(20)

if SEEK_END is valid:
string(10) "When you'r"
move to the end
gzseek=int(0)
tell=int(176)
eof=bool(true)
string(0) ""
tell=int(176)

Actual result:
--
string(10) "When you'r"
move to the end
gzseek=int(-1)
tell=bool(false)
eof=bool(false)
string(10) "e taught t"
tell=int(9)





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



#45769 [Opn->Fbk]: Segmentation fault with OCI8

2009-01-20 Thread jani
 ID:   45769
 Updated by:   j...@php.net
 Reported By:  louis dot begin at cspq dot gouv dot qc dot ca
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: zVM/Linux
 PHP Version:  5.2.6
 New Comment:

Please try using this CVS snapshot:

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

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




Previous Comments:


[2008-11-17 19:27:34] louis dot begin at cspq dot gouv dot qc dot ca

Sorry for the delay,

I got th exact same result .

I also noticed thoses messages during compilation, that could be a clue
:

/bin/sh /logiciels/tldb/php/php5.2-200811171530/libtool --silent
--preserve-dup-deps --mode=compile gcc  -Iext/oci8/
-I/logiciels/tldb/php/php5.2-200811171530/ext/oci8/ -DPHP_ATOM_INC
-I/logiciels/tldb/php/php5.2-200811171530/include
-I/logiciels/tldb/php/php5.2-200811171530/main
-I/logiciels/tldb/php/php5.2-200811171530
-I/logiciels/tldb/php/php5.2-200811171530/ext/date/lib
-I/logiciels/oracle/product/10.2.0.3/rdbms/public
-I/logiciels/oracle/product/10.2.0.3/rdbms/demo
-I/logiciels/oracle/product/10.2.0.3/plsql/public
-I/logiciels/tldb/php/php5.2-200811171530/TSRM
-I/logiciels/tldb/php/php5.2-200811171530/Zend-I/usr/include -g -O2 
 -c /logiciels/tldb/php/php5.2-200811171530/ext/oci8/oci8.c -o
ext/oci8/oci8.lo
/logiciels/tldb/php/php5.2-200811171530/ext/oci8/oci8.c: In function
'php_oci_do_connect_ex':
/logiciels/tldb/php/php5.2-200811171530/ext/oci8/oci8.c:1102: warning:
cast from pointer to integer of different size
/logiciels/tldb/php/php5.2-200811171530/ext/oci8/oci8.c:1416: warning:
cast to pointer from integer of different size

Regard,

LBe



[2008-08-29 17:36:13] louis dot begin at cspq dot gouv dot qc dot ca

Additional info:
This installation (with OCI8) works fine if i use de "phpinfo.php"
script or an other little script i did (an "Hello world" script)



[2008-08-28 14:31:20] louis dot begin at cspq dot gouv dot qc dot ca

I installed PECL OCI8 1.3.4
and i got the same result.

---
root.sigubtm:>gdb /logiciels/tldb/httpd-2.0.61/bin/httpd
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "s390x-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run -X
Starting program: /logiciels/tldb/httpd-2.0.61/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread 2199026468240 (LWP 11695)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2199026468240 (LWP 11695)]
_zval_ptr_dtor (zval_ptr=0x3f21818)
at /logiciels/tldb/php/php-5.2.6/Zend/zend_execute_API.c:412
412 (*zval_ptr)->refcount--;
(gdb) bt
#0  _zval_ptr_dtor (zval_ptr=0x3f21818)
at /logiciels/tldb/php/php-5.2.6/Zend/zend_execute_API.c:412
#1  0x026094d6 in zend_do_fcall_common_helper_SPEC
(execute_data=0x3f21e50)
at /logiciels/tldb/php/php-5.2.6/Zend/zend_execute.h:155
#2  0x025f79a2 in execute (op_array=0x20001e41a98)
at /logiciels/tldb/php/php-5.2.6/Zend/zend_vm_execute.h:92
#3  0x025d4258 in zend_execute_scripts (type=, retval=0x0,
file_count=2) at /logiciels/tldb/php/php-5.2.6/Zend/zend.c:1134
#4  0x0258bd78 in php_execute_script
(primary_file=0x3f24460)
at /logiciels/tldb/php/php-5.2.6/main/main.c:2005
#5  0x02667e4c in php_handler (r=0x8026cb60)
at
/logiciels/tldb/php/php-5.2.6/sapi/apache2handler/sapi_apache2.c:629
#6  0x80048e20 in ap_run_handler (r=0x8026cb60) at
config.c:152
#7  0x8004c33a in ap_invoke_handler (r=0x8026cb60) at
config.c:364
#8  0x8003615c in ap_process_request (r=0x8026cb60) at
http_request.c:249
#9  0x80030ccc in ap_process_http_connection (c=0x80262a50) at
http_core.c:253
#10 0x80055e4c in ap_run_process_connection (c=0x80262a50) at
connection.c:43
#11 0x800476e4 in child_main (child_num_arg=) at prefork.c:610
#12 0x8004794e in make_child (s=0x800dca60, slot=0) at
prefork.c:650
#13 0x80047a5a in startup_children (number_to_start=2) at
prefork.c:722
#14 0x800483cc in ap_mpm_run (_pconf=,
plog=, s=0x800dca60) at prefork.c:941
#15 0x8004f02c in main (argc=,
argv=0x3f24f98)
at main.c:636
(gdb)



[2008-08-15 17:44:17] louis dot begin at cspq dot gouv dot qc dot ca

Maybe this info could help:
:>file php
php: ELF 64-bit MSB executab

#47038 [Opn->Asn]: Memory leak in include()

2009-01-20 Thread jani
 ID:   47038
 Updated by:   j...@php.net
 Reported By:  tim at digicol dot de
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
-Operating System: Linux (Debian 4.0 x86)
+Operating System: *
-PHP Version:  5.3CVS-2009-01-08 (snap)
+PHP Version:  5.3CVS, 6CVS (2009-01-20)
 Assigned To:  scottmac


Previous Comments:


[2009-01-20 11:11:51] tim at digicol dot de

Happens to me with PHP 6.0.0-dev (snapshot php6.0-200901200730.tar.bz2)

as well.



[2009-01-08 15:57:50] tim at digicol dot de

Description:

With today's PHP 5.3 snapshot, include() on my Linux box leaks memory;

I've noticed this because we're using long-running scripts with the 
PHP CLI (where Smarty's fetch/display methods call include()...). This

doesn't happen with PHP 5.2.6.

I tested with an unchanged copy of php.ini-recommended and just 
'./configure' without any options, on Debian Linux 4.0, running in 
VMware Fusion on my Intel Mac.

Thanks for looking into this, and for the great work on PHP!

Reproduce code:
---


Expected result:

No increase in memory usage.

Actual result:
--
Memory usage increases constantly, until PHP exits because the memory 
limit is exceeded.





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



#47157 [Opn->Fbk]: require_once included a file twice

2009-01-20 Thread jani
 ID:   47157
 Updated by:   j...@php.net
 Reported By:  stephanie4343 at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD 7.1
 PHP Version:  5.2.8
 New Comment:

I asked for sample script because I'm guessing you propably used
relative path instead of absolute. And hence could have issues with
symlinks and such. So please give a short script that clearly
demonstrates the problem.


Previous Comments:


[2009-01-20 02:55:06] stephanie4343 at yahoo dot com

Hi, Thanks for the reply

Is there a way to print the internal array that require_once is using
so I can diagnose this in the production environment ?



[2009-01-20 01:00:52] j...@php.net

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

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

Please avoid embedding huge scripts into the report.





[2009-01-19 23:06:29] stephanie4343 at yahoo dot com

Description:

What does the require_once function use to determine if a file has
already been included or not?

Could mounting a filesystem with noatime affect it ? 
or serving it over NFS (with noatime) ?

p.s. the file I'm including is only in 1 directory






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



#47163 [Opn->Bgs]: needs separate copy of member variable irrespictive access modifier changes.

2009-01-20 Thread jani
 ID:   47163
 Updated by:   j...@php.net
 Reported By:  vivekanandan8 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: debian linux
 PHP Version:  5.2.6
 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




Previous Comments:


[2009-01-20 10:54:13] vivekanandan8 at yahoo dot com

Description:

i am using php 5.2.6 in debian linux platform.Having common  member
variables names in classes used in inheritance still has problem.
when we declare as private for both member variable it works fine 
but when we declare parent member variable as public , it throws error

Expected result:
  needs seperate copy of the member variable as the same behaviour as
both are private.
Actual Result:
 Access level to son::$mName must be public (as in class dad) i
 


vivek

Reproduce code:
---
mName='father'; 
}
}

class son extends dad {  
private $mName; 
function setSONName(){
$this->mName='child'; 
}
}
  $oChildObj = new son;  
$oChildObj->setDADName(); 
$oChildObj->setSONName(); 
?>

Expected result:

both call to same member variable successfully assign  value to $mName
same as when they are private in both clases(dad,son).

Actual result:
--
Access level to son::$mName must be public (as in class dad) 





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



#47130 [Bgs]: JSON problems

2009-01-20 Thread scottmac
 ID:   47130
 Updated by:   scott...@php.net
 Reported By:  svacinap at compsys dot cz
 Status:   Bogus
 Bug Type: JSON related
 Operating System: Linux Slackware 12.1
 PHP Version:  5.2.8
 New Comment:

It really depends on what the context is and this sort of thing should
be asked on the users list.


Previous Comments:


[2009-01-20 11:38:45] svacinap at compsys dot cz

Developer of the Groupoffice3 is saying: 

How can I work around then when a string contains invalid UTF-8 data?
Is 
there a function to strip invalid chars?

I wrote an e-mail client and with 5.2.6 it worked fine and now my app 
stops working when there is an invalid char in an incomming e-mail. I 
have no control of that of course so I need a function to make the data

clean



[2009-01-20 00:04:52] svacinap at compsys dot cz

OK. Thanks for all the replies and your time. Thanks very much.



[2009-01-19 21:54:39] scott...@php.net

The fact that it worked before was the bug. It's now doing what it 
should have done in the first place.



[2009-01-19 21:24:06] svacinap at compsys dot cz

I meant: So Groupoffice3 developer says: "This is php bug"



[2009-01-19 21:17:38] svacinap at compsys dot cz

OK. Group-office is the php web aplication .. 
I am IT administrator of the linux systems, NOT a programmer (my fault)
... 

OK. If I have Groupoffice3 and php 5.2.6 on my server, I can read the
email messages, no problem, no errors : 

http://www.gmork.cz/files/oldphpworks.png

OK. If I have updated php to recent version 5.2.8, some of messages
which have been made in the php aplication Groupoffice3 CAN NOT be read:


http://www.gmork.cz/files/test-again.png

So php developer says: "This is php bug" , so php developers says "This
is not bug". OKI. Sorry I don't know what to think, because I am not
goddam programmer at all ... :-(



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

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



#47047 [Com]: _SERVER["REQUEST_MTIME"]

2009-01-20 Thread pijon at gmail dot com
 ID:   47047
 Comment by:   pijon at gmail dot com
 Reported By:  lunter at interia dot pl
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  5.3.0alpha3
 New Comment:

It will be very useful.
Confirm.


Previous Comments:


[2009-01-09 10:33:30] lunter at interia dot pl

or better name: _SERVER["REQUEST_UTIME"]



[2009-01-09 10:30:19] lunter at interia dot pl

Description:

_SERVER["REQUEST_MTIME"]

New SERVER variable with microtime(true) of request time

very useful to calculate page generating time in micro-seconds.






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



#47166 [NEW]: unicode_is_decodable feature

2009-01-20 Thread lunter at interia dot pl
From: lunter at interia dot pl
Operating system: all
PHP version:  6CVS-2009-01-20 (snap)
PHP Bug Type: Unicode Engine related
Bug description:  unicode_is_decodable feature

Description:

bool unicode_is_decodable ( string $input , string $encoding )

Return true when convert a binary string encoded in encoding to a unicode
string is possible witout errors.

To prevent emits a E_WARNING level error if a converter cannot be created
for the desired encoding by unicode_decode .

Reproduce code:
---
n/a

Expected result:

n/a

Actual result:
--
n/a

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



#39312 [Com]: Cannot install PDO_OCI

2009-01-20 Thread fernando dot wendt at gmail dot com
 ID:   39312
 Comment by:   fernando dot wendt at gmail dot com
 Reported By:  andrew dot nagy at villanova dot edu
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.2.4
 Assigned To:  sixd
 New Comment:

More info about the lastest Oracle Instant Client under Linux: i'm
configuring a web server with Apache2.2.11, PHP5.2.8, and OIC11.1, and
PDO compile only works with this syntax:

./configure --with-oci8=shared,instantclient,/usr/lib/oracle
--with-pdo-oci=instantclient,/usr/lib/oracle,11.1

Presuming /usr/lib/oracle is your Instant Client base directory. The
great stuff is pass the version number at the command line, just as
Andrew point us.

Thanks a lot, and i do suggest you to put this detail on the online
documentation website, at installing PDO Oracle.

Best regards.


Previous Comments:


[2007-09-27 09:56:50] j...@php.net

Chris, can you check this out please?



[2007-09-25 22:08:48] tony2...@php.net

Yeah, but I never maintained PDO_OCI.



[2007-09-25 09:53:13] j...@php.net

Tony, I wasn't sure to whom to assign this but you're one of the oci8
maintainers AFAIK. :)



[2007-09-24 21:20:56] andrew dot nagy at villanova dot edu

I just did an install of php 5.2.4 on a brand new RHEL server.  The
only way I could get this to work is by using the zip files provided by
Oracle, not the RPMs.  Both the Basic and SDK are need (well I am
assuming the Basic is needed).  Once I unzip the files, I needed to
create 2 symbolic links -- both libclntsh.so and libocci.so.

Could this be fixed in the configure script to look for the original
files instead of the renamed files?

For now - I have created a patch that makes the language a bit more
intuitive if this helps at all.  It is diff'ed against the 5.2.4
release.

1305,1306c1305,1306
< Use
--with-pdo-oci=instantclient,/path/to/instantclient,version
< for an Oracle Instant Client SDK
install.
---
> Use
--with-pdo-oci=instantclient,prefix,version
> for an Oracle Instant Client SDK.
73096c73096
<   { echo "configure: error: I'm too dumb to figure out where the
include dir is in your Instant Client install" 1>&2; exit 1; }
---
>   { echo "configure: error: Cannot find the Instant Client SDK in
your Instant Client install" 1>&2; exit 1; }
73105c73105
<   { echo "configure: error: I'm too dumb to figure out where the
libraries are in your Instant Client install" 1>&2; exit 1; }
---
>   { echo "configure: error: Cannot find the libclntsh.so file. 
Try making a symbolic link in your Instant Client SDK install" 1>&2;
exit 1; }



[2006-11-08 21:37:15] tony2...@php.net

If you know how exactly to make it more verbose and clear - we would
gladly accept your patch for ext/pdo_oci/config.m4.
See here:
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_oci/config.m4?revision=1.14.2.5&view=markup



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

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



#47130 [Bgs]: JSON problems

2009-01-20 Thread svacinap at compsys dot cz
 ID:   47130
 User updated by:  svacinap at compsys dot cz
 Reported By:  svacinap at compsys dot cz
 Status:   Bogus
 Bug Type: JSON related
 Operating System: Linux Slackware 12.1
 PHP Version:  5.2.8
 New Comment:

Developer of the Groupoffice3 is saying: 

How can I work around then when a string contains invalid UTF-8 data?
Is 
there a function to strip invalid chars?

I wrote an e-mail client and with 5.2.6 it worked fine and now my app 
stops working when there is an invalid char in an incomming e-mail. I 
have no control of that of course so I need a function to make the data

clean


Previous Comments:


[2009-01-20 00:04:52] svacinap at compsys dot cz

OK. Thanks for all the replies and your time. Thanks very much.



[2009-01-19 21:54:39] scott...@php.net

The fact that it worked before was the bug. It's now doing what it 
should have done in the first place.



[2009-01-19 21:24:06] svacinap at compsys dot cz

I meant: So Groupoffice3 developer says: "This is php bug"



[2009-01-19 21:17:38] svacinap at compsys dot cz

OK. Group-office is the php web aplication .. 
I am IT administrator of the linux systems, NOT a programmer (my fault)
... 

OK. If I have Groupoffice3 and php 5.2.6 on my server, I can read the
email messages, no problem, no errors : 

http://www.gmork.cz/files/oldphpworks.png

OK. If I have updated php to recent version 5.2.8, some of messages
which have been made in the php aplication Groupoffice3 CAN NOT be read:


http://www.gmork.cz/files/test-again.png

So php developer says: "This is php bug" , so php developers says "This
is not bug". OKI. Sorry I don't know what to think, because I am not
goddam programmer at all ... :-(



[2009-01-19 16:00:41] scott...@php.net

It didn't work before, it just silently cut the string in half and you
never noticed it.

See bug #43941



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

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



#47165 [Opn->Asn]: Possible memory corruption when passing return value by reference by

2009-01-20 Thread dmitry
 ID:   47165
 Updated by:   dmi...@php.net
 Reported By:  dmi...@php.net
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.2.8
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2009-01-20 11:14:19] dmi...@php.net

Description:

The following code cases a double free() and memory corruption

Reproduce code:
---
bar;
}
}
extract(Foo::bar());
echo "ok\n";
?>


Expected result:

ok

Actual result:
--
ok
[Tue Jan 20 14:11:52 2009]  Script:  't.php'
/home/dmitry/php/php5.2/Zend/zend_vm_execute.h(7581) :  Freeing
0x09EE74DC (16 bytes), script=t.php
[Tue Jan 20 14:11:52 2009]  Script:  't.php'
/home/dmitry/php/php5.2/Zend/zend_variables.h(45) :  Freeing 0x09EE9C6C
(44 bytes), script=t.php
/home/dmitry/php/php5.2/Zend/zend_variables.c(132) : Actual location
(location was relayed)
[Tue Jan 20 14:11:52 2009]  Script:  't.php'
/home/dmitry/php/php5.2/Zend/zend_variables.c(133) :  Freeing
0x09EE9D68 (32 bytes), script=t.php
/home/dmitry/php/php5.2/Zend/zend_alloc.c(2386) : Actual location
(location was relayed)
=== Total 3 memory leaks detected ===


$ USE_ZEND_ALLOC=0 valgrind sapi/cli/php t.php 
==30559== Memcheck, a memory error detector.
==30559== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==30559== Using LibVEX rev 1804, a library for dynamic binary
translation.
==30559== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30559== Using valgrind-3.3.0, a dynamic binary instrumentation
framework.
==30559== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==30559== For more details, rerun with: -v
==30559== 
ok
==30559== Invalid read of size 4
==30559==at 0x8389C3E: _zval_ptr_dtor (zend_execute_API.c:412)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper
(zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x838FABD: destroy_zend_class (zend_opcode.c:182)
==30559==by 0x83A8A26: zend_hash_apply_deleter (zend_hash.c:611)
==30559==by 0x83A8FD3: zend_hash_reverse_apply (zend_hash.c:760)
==30559==by 0x83897BC: shutdown_executor (zend_execute_API.c:291)
==30559==by 0x839ADD6: zend_deactivate (zend.c:860)
==30559==by 0x833EE1B: php_request_shutdown (main.c:1492)
==30559==by 0x84222C3: main (php_cli.c:1314)
==30559==  Address 0x7bdae68 is 8 bytes inside a block of size 16
free'd
==30559==at 0x46CC90A: free (vg_replace_malloc.c:323)
==30559==by 0x837A0B3: _efree (zend_alloc.c:2303)
==30559==by 0x8389D28: safe_free_zval_ptr_rel (zend_execute.h:70)
==30559==by 0x8389C9E: _zval_ptr_dtor (zend_execute_API.c:415)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper
(zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x83BCF7D: zend_object_std_dtor (zend_objects.c:45)
==30559==by 0x83BD442: zend_objects_free_object_storage
(zend_objects.c:122)
==30559==by 0x83C1E33: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:206)
==30559==by 0x83C1C7C: zend_objects_store_del_ref
(zend_objects_API.c:168)
==30559==by 0x8398ED1: _zval_dtor_func (zend_variables.c:52)
==30559==by 0x8389A13: _zval_dtor (zend_variables.h:35)
==30559== 
==30559== Invalid write of size 4
==30559==at 0x8389C44: _zval_ptr_dtor (zend_execute_API.c:412)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper
(zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x838FABD: destroy_zend_class (zend_opcode.c:182)
==30559==by 0x83A8A26: zend_hash_apply_deleter (zend_hash.c:611)
==30559==by 0x83A8FD3: zend_hash_reverse_apply (zend_hash.c:760)
==30559==by 0x83897BC: shutdown_executor (zend_execute_API.c:291)
==30559==by 0x839ADD6: zend_deactivate (zend.c:860)
==30559==by 0x833EE1B: php_request_shutdown (main.c:1492)
==30559==by 0x84222C3: main (php_cli.c:1314)
==30559==  Address 0x7bdae68 is 8 bytes inside a block of size 16
free'd
==30559==at 0x46CC90A: free (vg_replace_malloc.c:323)
==30559==by 0x837A0B3: _efree (zend_alloc.c:2303)
==30559==by 0x8389D28: safe_free_zval_ptr_rel (zend_execute.h:70)
==30559==by 0x8389C9E: _zval_ptr_dtor (zend_execute_API.c:415)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper
(zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x83BCF7D: zend_object_std_dtor (zend_objects.c:45)
==30559==by 0x83BD442: zend_objects_free_object_storage
(zend_objects.c:122)
==30559==by 0x83C1E33: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:206)
==30559==by 0x83C1C7C: zend_objects_store_del_ref
(zend_objects_API.c:168)
==30559==by 0x8398ED1: _zval_dtor_func (zend_variables.c:52)
==30559==by 0x8389A13: _zval_dtor (zend_variables.h:35)
==

#47165 [NEW]: Possible memory corruption when passing return value by reference by

2009-01-20 Thread dmi...@php.net
From: dmi...@php.net
Operating system: *
PHP version:  5.2.8
PHP Bug Type: Scripting Engine problem
Bug description:  Possible memory corruption when passing return value by 
reference by 

Description:

The following code cases a double free() and memory corruption

Reproduce code:
---
bar;
}
}
extract(Foo::bar());
echo "ok\n";
?>


Expected result:

ok

Actual result:
--
ok
[Tue Jan 20 14:11:52 2009]  Script:  't.php'
/home/dmitry/php/php5.2/Zend/zend_vm_execute.h(7581) :  Freeing 0x09EE74DC
(16 bytes), script=t.php
[Tue Jan 20 14:11:52 2009]  Script:  't.php'
/home/dmitry/php/php5.2/Zend/zend_variables.h(45) :  Freeing 0x09EE9C6C
(44 bytes), script=t.php
/home/dmitry/php/php5.2/Zend/zend_variables.c(132) : Actual location
(location was relayed)
[Tue Jan 20 14:11:52 2009]  Script:  't.php'
/home/dmitry/php/php5.2/Zend/zend_variables.c(133) :  Freeing 0x09EE9D68
(32 bytes), script=t.php
/home/dmitry/php/php5.2/Zend/zend_alloc.c(2386) : Actual location
(location was relayed)
=== Total 3 memory leaks detected ===


$ USE_ZEND_ALLOC=0 valgrind sapi/cli/php t.php 
==30559== Memcheck, a memory error detector.
==30559== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==30559== Using LibVEX rev 1804, a library for dynamic binary
translation.
==30559== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30559== Using valgrind-3.3.0, a dynamic binary instrumentation
framework.
==30559== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==30559== For more details, rerun with: -v
==30559== 
ok
==30559== Invalid read of size 4
==30559==at 0x8389C3E: _zval_ptr_dtor (zend_execute_API.c:412)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper (zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x838FABD: destroy_zend_class (zend_opcode.c:182)
==30559==by 0x83A8A26: zend_hash_apply_deleter (zend_hash.c:611)
==30559==by 0x83A8FD3: zend_hash_reverse_apply (zend_hash.c:760)
==30559==by 0x83897BC: shutdown_executor (zend_execute_API.c:291)
==30559==by 0x839ADD6: zend_deactivate (zend.c:860)
==30559==by 0x833EE1B: php_request_shutdown (main.c:1492)
==30559==by 0x84222C3: main (php_cli.c:1314)
==30559==  Address 0x7bdae68 is 8 bytes inside a block of size 16 free'd
==30559==at 0x46CC90A: free (vg_replace_malloc.c:323)
==30559==by 0x837A0B3: _efree (zend_alloc.c:2303)
==30559==by 0x8389D28: safe_free_zval_ptr_rel (zend_execute.h:70)
==30559==by 0x8389C9E: _zval_ptr_dtor (zend_execute_API.c:415)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper (zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x83BCF7D: zend_object_std_dtor (zend_objects.c:45)
==30559==by 0x83BD442: zend_objects_free_object_storage
(zend_objects.c:122)
==30559==by 0x83C1E33: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:206)
==30559==by 0x83C1C7C: zend_objects_store_del_ref
(zend_objects_API.c:168)
==30559==by 0x8398ED1: _zval_dtor_func (zend_variables.c:52)
==30559==by 0x8389A13: _zval_dtor (zend_variables.h:35)
==30559== 
==30559== Invalid write of size 4
==30559==at 0x8389C44: _zval_ptr_dtor (zend_execute_API.c:412)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper (zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x838FABD: destroy_zend_class (zend_opcode.c:182)
==30559==by 0x83A8A26: zend_hash_apply_deleter (zend_hash.c:611)
==30559==by 0x83A8FD3: zend_hash_reverse_apply (zend_hash.c:760)
==30559==by 0x83897BC: shutdown_executor (zend_execute_API.c:291)
==30559==by 0x839ADD6: zend_deactivate (zend.c:860)
==30559==by 0x833EE1B: php_request_shutdown (main.c:1492)
==30559==by 0x84222C3: main (php_cli.c:1314)
==30559==  Address 0x7bdae68 is 8 bytes inside a block of size 16 free'd
==30559==at 0x46CC90A: free (vg_replace_malloc.c:323)
==30559==by 0x837A0B3: _efree (zend_alloc.c:2303)
==30559==by 0x8389D28: safe_free_zval_ptr_rel (zend_execute.h:70)
==30559==by 0x8389C9E: _zval_ptr_dtor (zend_execute_API.c:415)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper (zend_variables.c:175)
==30559==by 0x83A8677: zend_hash_destroy (zend_hash.c:526)
==30559==by 0x83BCF7D: zend_object_std_dtor (zend_objects.c:45)
==30559==by 0x83BD442: zend_objects_free_object_storage
(zend_objects.c:122)
==30559==by 0x83C1E33: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:206)
==30559==by 0x83C1C7C: zend_objects_store_del_ref
(zend_objects_API.c:168)
==30559==by 0x8398ED1: _zval_dtor_func (zend_variables.c:52)
==30559==by 0x8389A13: _zval_dtor (zend_variables.h:35)
==30559== 
==30559== Invalid read of size 4
==30559==at 0x8389C4C: _zval_ptr_dtor (zend_execute_API.c:413)
==30559==by 0x839933C: _zval_ptr_dtor_wrapper (zend_variables.c:175)
==30559==by 0x83A8

#47038 [Com]: Memory leak in include()

2009-01-20 Thread tim at digicol dot de
 ID:   47038
 Comment by:   tim at digicol dot de
 Reported By:  tim at digicol dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux (Debian 4.0 x86)
 PHP Version:  5.3CVS-2009-01-08 (snap)
 Assigned To:  scottmac
 New Comment:

Happens to me with PHP 6.0.0-dev (snapshot php6.0-200901200730.tar.bz2)

as well.


Previous Comments:


[2009-01-08 15:57:50] tim at digicol dot de

Description:

With today's PHP 5.3 snapshot, include() on my Linux box leaks memory;

I've noticed this because we're using long-running scripts with the 
PHP CLI (where Smarty's fetch/display methods call include()...). This

doesn't happen with PHP 5.2.6.

I tested with an unchanged copy of php.ini-recommended and just 
'./configure' without any options, on Debian Linux 4.0, running in 
VMware Fusion on my Intel Mac.

Thanks for looking into this, and for the great work on PHP!

Reproduce code:
---


Expected result:

No increase in memory usage.

Actual result:
--
Memory usage increases constantly, until PHP exits because the memory 
limit is exceeded.





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



#47164 [NEW]: uncomfortable (binary)char() append to binary string

2009-01-20 Thread lunter at interia dot pl
From: lunter at interia dot pl
Operating system: all
PHP version:  6CVS-2009-01-20 (snap)
PHP Bug Type: Unicode Engine related
Bug description:  uncomfortable (binary)char() append to binary string

Description:

uncomfortable (binary)char() append to a binary string

Reproduce code:
---
$b=(binary)'';

$b.=chr(255);
$b.=chr(254);
$b.=chr(253);
$b.=chr(252);
$b.=chr(251);
...
$b.=chr(0);

Expected result:

detect $b type as binary string and adding chr() in binary mode

like this:

$b=(binary)'';

$b.=(binary)chr(255);
$b.=(binary)chr(254);
$b.=(binary)chr(253);
$b.=(binary)chr(252);
$b.=(binary)chr(251);
...
$b.=(binary)chr(0);

Actual result:
--
adding chr() in unicode

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



#47163 [NEW]: needs seperate copy of member variable irrespictive access modifier changes.

2009-01-20 Thread vivekanandan8 at yahoo dot com
From: vivekanandan8 at yahoo dot com
Operating system: debian linux 
PHP version:  5.2CVS-2009-01-20 (snap)
PHP Bug Type: Class/Object related
Bug description:  needs seperate copy of member variable irrespictive access 
modifier changes.

Description:

i am using php 5.2.6 in debian linux platform.Having common  member
variables names in classes used in inheritance still has problem.
when we declare as private for both member variable it works fine 
but when we declare parent member variable as public , it throws error

Expected result:
  needs seperate copy of the member variable as the same behaviour as both
are private.
Actual Result:
 Access level to son::$mName must be public (as in class dad) i
 


vivek

Reproduce code:
---
mName='father'; 
}
}

class son extends dad {  
private $mName; 
function setSONName(){
$this->mName='child'; 
}
}
  $oChildObj = new son;  
$oChildObj->setDADName(); 
$oChildObj->setSONName(); 
?>

Expected result:

both call to same member variable successfully assign  value to $mName
same as when they are private in both clases(dad,son).

Actual result:
--
Access level to son::$mName must be public (as in class dad) 

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



#43189 [Com]: Fails to link iconv

2009-01-20 Thread simon at freytag dot org dot uk
 ID:   43189
 Comment by:   simon at freytag dot org dot uk
 Reported By:  meh at mailinator dot com
 Status:   No Feedback
 Bug Type: ICONV related
 Operating System: Mac OS X 10.5
 PHP Version:  5.3CVS-2007-11-04 (snap)
 New Comment:

Same problems for me when building PHP 5.2.8 on Mac OS 10.5.5, which
first occurred when building PHP with mcrypt. It worked for me using
mcrypt and iconv from macports, then the linking solution described
above and finally a reconfigure/make clean/make after doing the
linking.

CONFIGURE:
./configure --prefix=/usr/local/php --with-libxml-dir=/opt/local/lib
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql
--with-zlib --enable-pdo --with-pdo-sqlite
--with-pdo-mysql=/usr/local/mysql --with-mcrypt=/opt/local
--with-iconv=/opt/local


Previous Comments:


[2008-12-27 15:46:41] wickedguitar6 at yahoo dot com

Same problem on 10.5.6
I had to compile twice:

First time: ./configure --with-apxs2
make
   > just to get libphp5.so

Second time: ./configure --with-iconv=/opt/local etc.etc.
 make
 make install
   > compiles normally as long as we do not require the
apache2 module ("--with-apxs2") to be built.

Seems that the "--with-apxs2" directive confuses the linker and it
doesn't know which libiconv to use (i.e. the MacPorts one, or the native
MacOSX one).



[2008-12-23 13:07:59] aalamaki at gmail dot com

Seems to be the same issue on PHP 5.2.8 and 10.5.6, I've tried doing
the mac port with the --with-iconv=shared,/opt/local and it compiled but
the iconv didn't come available.

I also tried copying over the iconv.h from the macports to the
/usr/include but getting the errors mentioned in the first post, it will
not compile with that.

Anyone have experience with this issue on 10.5.6 ?



[2008-10-15 09:19:26] safdf at mailinator dot com

I still have problem with this on 10.5.4. Could you please add a check
or workaround for this in configure script?



[2008-05-25 03:30:50] joe at joeruwe dot com

this happened for me in 10.5.2 with php 5.2.6.

i had to compile everything with --without-iconv then reconfigure and 
remake with the --with-iconv flag..



[2008-03-29 21:11:18] sdfsa at mailinator dot com

This problem still occurs in 10.5.2 for me.



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

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



#47159 [Opn->Csd]: Creating a prepared statement without executing it makes database unclosable

2009-01-20 Thread scottmac
 ID:   47159
 Updated by:   scott...@php.net
 Reported By:  pcdinh at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: SQLite related
 Operating System: Windows XP SP3
 PHP Version:  5.3.0alpha3
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This is loosely related to bug #47145 which I fixed last night.

I've however checked all the prepare calls now to make sure things are
free'd


Previous Comments:


[2009-01-20 03:38:36] pcdinh at gmail dot com

Description:

A database connection to SQLite3 can not be closed if I create a
prepared statement without executing it.

Of course, I have already closed that statement explicitly before
closing the database connection handler.

I had this warning: Unable to close due to unfinalised statements. It
means that an invocation to close() on a statement handler does not
work.

Reproduce code:
---
prepare($sql);

// Commenting out the line intentionally
// $rs = $stmt->execute();

if (true === $stmt->close())
{
echo 'Statement is already closed but in this case it is not. ';
}

if (false === $db->close())
{
echo 'But database connection can not be closed due to an error:
'.$db->lastErrorMsg();
}
?>

Expected result:

Database connection should be closed as usual

Actual result:
--
The error message:

Statement is already closed but in this case it is not.
Warning: SQLite3::close() [sqlite3.close]: Unable to close database: 5,
Unable to close due to unfinalised statements in
D:\wvbsrc\repos\pone\trunk\tests\Plugin\test2_sqlite3.php on line 18
But database connection can not be closed due to an error: Unable to
close due to unfinalised statements





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



#40339 [Com]: new superglobal...

2009-01-20 Thread a at b dot c dot de
 ID:   40339
 Comment by:   a at b dot c dot de
 Reported By:  randallgirard at hotmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows / Linux
 PHP Version:  5.2.0
 New Comment:

I can't even make out what "misc features like variable variables which
appear to utilize the local, then global scope if the var is not defined
locally" is even referring to - I've never seen global variables leaking
into the local scope without my asking for them.

If your coding is so borked that you don't even know what variables you
have or not you can get a list of local variables by taking
get_defined_vars() and subtracting $GLOBALS.


Previous Comments:


[2007-06-25 13:11:37] michael at chunkycow dot com dot au

This sounds totally bogus, I do not know of any other language that
comes close to providing such a thing.
If you have trouble keeping track of the scoping of a given variable
it's an implementation/programmer problem not a language one.



[2007-02-03 03:50:15] randallgirard at hotmail dot com

Description:

Just as there is a $GLOBALS var pointing to the global scope, there
should also be a $SCOPE or $LOCALS var pointing to the current local,
usually function/method scope. This would add alot of coding potential,
and should be included in the language because of misc features like
variable variables which appear to utilize the local, then global scope
if the var is not defined locally. It would also greatly aid in
debugging, as you could quickly and easily dump all var's in the
scope... And, I'm sure others could find many more uses for such a
feature.

If such a feature allready exists, I'm sorry for my ignorance and I
would greatly appreciate feedback informing me of how a local scope
array could be accessed. THANKS!!






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



#47161 [Opn]: Dereferencing for array/function access

2009-01-20 Thread a at b dot c dot de
 ID:   47161
 User updated by:  a at b dot c dot de
 Reported By:  a at b dot c dot de
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows (irrelevant)
 PHP Version:  5.3.0alpha3
 New Comment:

Perhaps I should just add
although I reference Bug #23022, I'm not asking for this to be over
_arbitrary_ expressions, only arrays and callables. I don't want this
language turning into Perl :)


Previous Comments:


[2009-01-20 09:08:50] a at b dot c dot de

Description:

See Bug #23022.

Since we can have arrays that contain arrays, arrays that contain
functions, functions that return arrays and functions return functions;

and since both arrays and functions effectively define mappings between
their arguments/indices and their values;

and since we can already dereference array accesses into higher
dimensions (i.e., we can write $foo[1][2]);

I would like to be able to do the same thing with the other three
cases. The bug cited above asks for $foo(1)[2]; I'd like to add a
request for $foo[1](2) and $foo(1)(2).

Please, sir: can we have these?

Reproduce code:
---


Expected result:

8

Actual result:
--
Parse error: syntax error, unexpected '(', expecting ',' or ';' in
C:\test.php on line 9





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



#47161 [NEW]: Dereferencing for array/function access

2009-01-20 Thread a at b dot c dot de
From: a at b dot c dot de
Operating system: Windows (irrelevant)
PHP version:  5.3.0alpha3
PHP Bug Type: Feature/Change Request
Bug description:  Dereferencing for array/function access

Description:

See Bug #23022.

Since we can have arrays that contain arrays, arrays that contain
functions, functions that return arrays and functions return functions;

and since both arrays and functions effectively define mappings between
their arguments/indices and their values;

and since we can already dereference array accesses into higher dimensions
(i.e., we can write $foo[1][2]);

I would like to be able to do the same thing with the other three cases.
The bug cited above asks for $foo(1)[2]; I'd like to add a request for
$foo[1](2) and $foo(1)(2).

Please, sir: can we have these?

Reproduce code:
---


Expected result:

8

Actual result:
--
Parse error: syntax error, unexpected '(', expecting ',' or ';' in
C:\test.php on line 9

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



#47160 [NEW]: $foo() syntax is too limited

2009-01-20 Thread a at b dot c dot de
From: a at b dot c dot de
Operating system: Windows (irrelevant)
PHP version:  5.3.0alpha3
PHP Bug Type: Feature/Change Request
Bug description:  $foo() syntax is too limited

Description:

It's already possible to have arrays that represent callable methods
(either static or instance), and 5.3's closures offer a third type of
"callable" function.

But the $foo() syntax that facilitates calling that callable function
still requires $foo to contain a string.

Since in general one cannot know in advance just what type of callable the
value of $foo actually is, and when one does know it's often NOT a string,
it's necessary to forego the syntax and rely on call_user_func($foo).

What would be nice is if $foo() also worked in the cases where $foo was a
callable array or Closure object. call_user_func() itself would largely be
relegated to the status of "function equivalent should you need it" and
complement to call_user_func_array().

Reproduce code:
---


Expected result:

Hello, World

Actual result:
--
Fatal error: Function name must be a string in C:\test.php on line 11


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