#36884 [Opn->Fbk]: *** glibc detected *** double free or corruption (!prev): 0x0000000000b4acc0 **

2006-03-27 Thread tony2001
 ID:   36884
 Updated by:   [EMAIL PROTECTED]
 Reported By:  guenther dot unterrainer at gknsintermetals dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: SLES9 SP3 x86-64
 PHP Version:  4.4.2
 New Comment:

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

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




Previous Comments:


[2006-03-28 09:40:34] guenther dot unterrainer at gknsintermetals dot
com

Description:

When I walk trough my php-program I accidentally get the following
errors in apache error.log:

[Mon Mar 27 14:50:24 2006] [notice] Accept mutex: sysvsem (Default:
sysvsem)
*** glibc detected *** double free or corruption (!prev):
0x00b4acc0 ***
[Mon Mar 27 14:52:16 2006] [notice] child pid 15561 exit signal
Segmentation fault (11)
[Mon Mar 27 14:53:59 2006] [notice] child pid 15558 exit signal
Segmentation fault (11)
*** glibc detected *** double free or corruption (out):
0x00f16c90 ***
*** glibc detected *** free(): invalid next size (fast):
0x00f16c60 ***
*** glibc detected *** corrupted double-linked list: 0x00f16c50
***
*** glibc detected *** free(): invalid pointer: 0x00f16c88 ***

Then the site crashes and the error.log-file reaches aprox. 300 MB
(always with the last errormessage: *** glibc detected *** free():
invalid pointer: 0x00f16c88 ***)

Same Problem with PHP 4.4.1

Apache Version is 1.3.34 with PHP as static module.







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


#36885 [NEW]: __clone() bug when it's define in class extending arrayObject SPL class

2006-03-27 Thread lta at lfdj dot com
From: lta at lfdj dot com
Operating system: solaris
PHP version:  5.1.2
PHP Bug Type: SPL related
Bug description:  __clone() bug when it's define in class extending arrayObject 
SPL class

Description:

When a __clone() function is defined for a class that extends arrayObject
from SPL, there is no way to clone the objects contained in arrayObject.
If you do same code for class not extending the SPL arrayObject but any
other objectContainer, there is no problem.



Reproduce code:
---
class bidon {
public $foo = "bidon 1";
}

class test extends ArrayObject  {
public $pub = 1;

public function __clone() {
$this->pub = "cloned";
foreach ($this as $k=>$item) {
$this[$k]= clone $item;
$this[$k]->foo++;
}
}
}
if($original === $cloned2) {
echo "bad master clone# $original $cloned2";
} else { echo "good master clone";}
foreach ($original as $k=>$obj) {
if($original[$k] === $cloned2[$k]) {
echo "bad clone childs# $original[$k] $cloned2[$k]";
} else { echo "good child clone";}
}


Expected result:

good master clone
good child clone
good child clone

Actual result:
--
good master clone
bad clone childs# Object id #7 Object id #7
bad clone childs# Object id #2 Object id #2


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


#36884 [NEW]: *** glibc detected *** double free or corruption (!prev): 0x0000000000b4acc0 **

2006-03-27 Thread guenther dot unterrainer at gknsintermetals dot com
From: guenther dot unterrainer at gknsintermetals dot com
Operating system: SLES9 SP3 x86-64
PHP version:  4.4.2
PHP Bug Type: Apache related
Bug description:  *** glibc detected *** double free or corruption (!prev): 
0x00b4acc0 **

Description:

When I walk trough my php-program I accidentally get the following errors
in apache error.log:

[Mon Mar 27 14:50:24 2006] [notice] Accept mutex: sysvsem (Default:
sysvsem)
*** glibc detected *** double free or corruption (!prev):
0x00b4acc0 ***
[Mon Mar 27 14:52:16 2006] [notice] child pid 15561 exit signal
Segmentation fault (11)
[Mon Mar 27 14:53:59 2006] [notice] child pid 15558 exit signal
Segmentation fault (11)
*** glibc detected *** double free or corruption (out): 0x00f16c90
***
*** glibc detected *** free(): invalid next size (fast):
0x00f16c60 ***
*** glibc detected *** corrupted double-linked list: 0x00f16c50
***
*** glibc detected *** free(): invalid pointer: 0x00f16c88 ***

Then the site crashes and the error.log-file reaches aprox. 300 MB (always
with the last errormessage: *** glibc detected *** free(): invalid pointer:
0x00f16c88 ***)

Same Problem with PHP 4.4.1

Apache Version is 1.3.34 with PHP as static module.



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


#36883 [NEW]: debug_backtrace information has mixed scope

2006-03-27 Thread k at phpkoala dot com
From: k at phpkoala dot com
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: Scripting Engine problem
Bug description:  debug_backtrace information has mixed scope

Description:

When I call debug_backtrace, I find that the results do not match
expectations. Specifically, the line number does not match the values for
function and class.

As shown below, I would expect to see the line number match the values for
function and class, at the point referenced. If this point is deemed to be
the point where debug_backtrace is called from, then I would expect the
details to show the function and class in scope at the line number that
debug_backtrace was called, and then as the next most recent entry, the
line number etc. for the code that called the function containing the
debug_backtrace command.

Otherwise, if the reported details should ignore the point in the code
that calls debug_backtrace (the current scope at that point) then that
entry should not be reported, and the function and class should be
relative to the line number that called the function.

It would appear that the second of these two options is intended, but that
the function and class are being reported for the scope "now" (when
debug_backtrace is called) rather than "then" (the last call, i.e. the
call to the function) which is what the line number reports.

To further clarify; I would expect the output to match the details that
would be shown if I used __FILE__, __LINE__, __FUNCTION__, __CLASS__ at
each call point. Surely these should all match up...?

I am running dot-deb packages for PHP 5.1.2. No customisations.

This issue also occurs on PHP 4.3.10.

Reproduce code:
---
 Array
(
[file] => /home/test.php
[line] => 13
[function] => 
[class] => 
[type] => 
[args] => 

)

)


Test 2:

Array
(
[0] => Array
(
[file] => /home/test.php
[line] => 8
[function] => check2
[class] => test
[type] => ::
[args] => Array
(
)

)

[1] => Array
(
[file] => /home/test.php
[line] => 16
[function] => 
[class] => 
[type] => 
[args] => 

)

)

  OR  

Test 1:

Array
(
[0] => Array
(
[file] => /home/test.php
[line] => 5
[function] => check1
[class] => test
[type] => ::
[args] => Array
(
)

)

[1] => Array
(
[file] => /home/test.php
[line] => 13
[function] => 
[class] => 
[type] => 
[args] => 

)

)


Test 2:

Array
(
[0] => Array
(
[file] => /home/test.php
[line] => 5
[function] => check1
[class] => test
[type] => ::
[args] => Array
(
)

)

[1] => Array
(
[file] => /home/test.php
[line] => 8
[function] => check2
[class] => test
[type] => ::
[args] => Array
(
)

)

[2] => Array
(
[file] => /home/test.php
[line] => 16
[function] => 
[class] => 
[type] => 
[args] => 

)

)


Actual result:
--
Test 1:

Array
(
[0] => Array
(
[file] => /home/test.php
[line] => 13
[function] => check1
[class] => test
[type] => ::
[args] => Array
(
)

)

)


Test 2:

Array
(
[0] => Array
(
[file] => /home/test.php
[line] => 8
[function] => check1
[class] => test
[type] => ::
[args] => Array
(
)

)

[1] => Array
(
[file] => /home/test.php
[line] => 16
[function] => check2
[class] => test
[type] => ::
[args] => Array
(
)

)

)


-- 
Edit bug report at http://bugs.php.net/?id=36883&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36883&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36883&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36883&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36883&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36883&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36883&r=needtrace
Need 

#36882 [NEW]: ftp upload failed if curlwrappers are enabled.

2006-03-27 Thread sos at sokhapkin dot dyndns dot org
From: sos at sokhapkin dot dyndns dot org
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: FTP related
Bug description:  ftp upload failed if curlwrappers are enabled.

Description:

The following code fails with "fwrite failed" message if php is configured
with "--with-curlwrappers" option.

ftp://user:[EMAIL PROTECTED]/tmp/test", "w");
if(!$h)
die ("fopen failed");
if(!fwrite($h, "asd"))
die ("fwrite failed");
fclose($h);
?>

Reproduce code:
---
See description

Expected result:

FTP is OK

Actual result:
--
"fwrite failed" message. The code runs OK if PHP is configured without
"--with-curlwrappers" option.

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


#36881 [Bgs]: Session don't store after header("Location: ...")

2006-03-27 Thread kylnas at tiscali dot it
 ID:   36881
 User updated by:  kylnas at tiscali dot it
 Reported By:  kylnas at tiscali dot it
 Status:   Bogus
 Bug Type: Session related
 Operating System: OS Linux
 PHP Version:  4.4.2
 New Comment:

I use cookies...this is the code when session starts:

@ini_set('session.use_cookies', true);
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
@ini_set('arg_separator.output', '&');


Previous Comments:


[2006-03-28 01:09:22] [EMAIL PROTECTED]

Because if you don't use cookies, how do you think session ID should be
preserved?
There are only two ways to preserve it: save it in a cookie and keep it
in the URL.
Obviously you don't use cookies (otherwise it would work) and abusing
the second way.



[2006-03-28 00:58:08] kylnas at tiscali dot it

Really, sorry, but i don't understand why it's not a bug...=(



[2006-03-28 00:51:47] [EMAIL PROTECTED]

Use cookies to store session ID or add it to the URL manually.
No bug here.



[2006-03-28 00:37:16] kylnas at tiscali dot it

Description:

I saw other bugs like this, and I didn't solve it.

My situation:
- mysql session handler
- one page is "posted" to another page, that saves a session variable
and redirect to the first page again.

If I do the redirect the variable is not properly setted, otherwise
it's all ok.

My PHP version is 4.3.10-16






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


#36849 [Bgs->Opn]: hex to float request

2006-03-27 Thread esri at godseyfamily dot com
 ID:   36849
 User updated by:  esri at godseyfamily dot com
 Reported By:  esri at godseyfamily dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Liinux
 PHP Version:  5.1.2
 New Comment:

That does not change my request for a feature.  There is no way of
converting to type float or double from a raw form.  This is what I'm
asking for.

0x3F80 should be able to be converted to 1.00

This is a feature request, as indicated in the Category.


Previous Comments:


[2006-03-28 00:27:05] [EMAIL PROTECTED]

>What I am getting is the integer value

And the reason is:

#php -r 'echo 0x3f80;'
1065353216



[2006-03-28 00:24:04] esri at godseyfamily dot com

$num = 0x3F80;
   printf("%f",$num);

I would expect a return value of:
1.0

What I am getting is the integer value:
1065353216.00



[2006-03-24 21:17:29] esri at godseyfamily dot com

Description:

Would simply like to input a hex value and get the float of it back. 
The settype of course does not work, or any kind of casting.  A
function that parses the binary string introduces a huge amount of
overhead when I do 1024 of these values in a row.  I would think that
any programming language would have this basic capability.  I'm getting
raw data, and a data type that it needs to be converted to.

I checked and didn't see this requested, though I'm sure it has been.







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


#36881 [Bgs]: Session don't store after header("Location: ...")

2006-03-27 Thread tony2001
 ID:   36881
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kylnas at tiscali dot it
 Status:   Bogus
 Bug Type: Session related
 Operating System: OS Linux
 PHP Version:  4.4.2
 New Comment:

Because if you don't use cookies, how do you think session ID should be
preserved?
There are only two ways to preserve it: save it in a cookie and keep it
in the URL.
Obviously you don't use cookies (otherwise it would work) and abusing
the second way.


Previous Comments:


[2006-03-28 00:58:08] kylnas at tiscali dot it

Really, sorry, but i don't understand why it's not a bug...=(



[2006-03-28 00:51:47] [EMAIL PROTECTED]

Use cookies to store session ID or add it to the URL manually.
No bug here.



[2006-03-28 00:37:16] kylnas at tiscali dot it

Description:

I saw other bugs like this, and I didn't solve it.

My situation:
- mysql session handler
- one page is "posted" to another page, that saves a session variable
and redirect to the first page again.

If I do the redirect the variable is not properly setted, otherwise
it's all ok.

My PHP version is 4.3.10-16






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


#36881 [Bgs]: Session don't store after header("Location: ...")

2006-03-27 Thread kylnas at tiscali dot it
 ID:   36881
 User updated by:  kylnas at tiscali dot it
 Reported By:  kylnas at tiscali dot it
 Status:   Bogus
 Bug Type: Session related
 Operating System: OS Linux
 PHP Version:  4.4.2
 New Comment:

Really, sorry, but i don't understand why it's not a bug...=(


Previous Comments:


[2006-03-28 00:51:47] [EMAIL PROTECTED]

Use cookies to store session ID or add it to the URL manually.
No bug here.



[2006-03-28 00:37:16] kylnas at tiscali dot it

Description:

I saw other bugs like this, and I didn't solve it.

My situation:
- mysql session handler
- one page is "posted" to another page, that saves a session variable
and redirect to the first page again.

If I do the redirect the variable is not properly setted, otherwise
it's all ok.

My PHP version is 4.3.10-16






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


#36881 [Opn->Bgs]: Session don't store after header("Location: ...")

2006-03-27 Thread tony2001
 ID:   36881
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kylnas at tiscali dot it
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: OS Linux
 PHP Version:  4.4.2
 New Comment:

Use cookies to store session ID or add it to the URL manually.
No bug here.


Previous Comments:


[2006-03-28 00:37:16] kylnas at tiscali dot it

Description:

I saw other bugs like this, and I didn't solve it.

My situation:
- mysql session handler
- one page is "posted" to another page, that saves a session variable
and redirect to the first page again.

If I do the redirect the variable is not properly setted, otherwise
it's all ok.

My PHP version is 4.3.10-16






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


#36881 [NEW]: Session don't store after header("Location: ...")

2006-03-27 Thread kylnas at tiscali dot it
From: kylnas at tiscali dot it
Operating system: OS Linux
PHP version:  4.4.2
PHP Bug Type: Session related
Bug description:  Session don't store after header("Location: ...")

Description:

I saw other bugs like this, and I didn't solve it.

My situation:
- mysql session handler
- one page is "posted" to another page, that saves a session variable and
redirect to the first page again.

If I do the redirect the variable is not properly setted, otherwise it's
all ok.

My PHP version is 4.3.10-16


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


#36849 [Opn->Bgs]: hex to float request

2006-03-27 Thread tony2001
 ID:   36849
 Updated by:   [EMAIL PROTECTED]
 Reported By:  esri at godseyfamily dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Liinux
 PHP Version:  5.1.2
 New Comment:

>What I am getting is the integer value

And the reason is:

#php -r 'echo 0x3f80;'
1065353216


Previous Comments:


[2006-03-28 00:24:04] esri at godseyfamily dot com

$num = 0x3F80;
   printf("%f",$num);

I would expect a return value of:
1.0

What I am getting is the integer value:
1065353216.00



[2006-03-24 21:17:29] esri at godseyfamily dot com

Description:

Would simply like to input a hex value and get the float of it back. 
The settype of course does not work, or any kind of casting.  A
function that parses the binary string introduces a huge amount of
overhead when I do 1024 of these values in a row.  I would think that
any programming language would have this basic capability.  I'm getting
raw data, and a data type that it needs to be converted to.

I checked and didn't see this requested, though I'm sure it has been.







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


#36849 [Opn]: hex to float request

2006-03-27 Thread esri at godseyfamily dot com
 ID:   36849
 User updated by:  esri at godseyfamily dot com
 Reported By:  esri at godseyfamily dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Liinux
 PHP Version:  5.1.2
 New Comment:

$num = 0x3F80;
   printf("%f",$num);

I would expect a return value of:
1.0

What I am getting is the integer value:
1065353216.00


Previous Comments:


[2006-03-24 21:17:29] esri at godseyfamily dot com

Description:

Would simply like to input a hex value and get the float of it back. 
The settype of course does not work, or any kind of casting.  A
function that parses the binary string introduces a huge amount of
overhead when I do 1024 of these values in a row.  I would think that
any programming language would have this basic capability.  I'm getting
raw data, and a data type that it needs to be converted to.

I checked and didn't see this requested, though I'm sure it has been.







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


#36878 [Asn->Csd]: error messages are printed even though an exception has been thrown

2006-03-27 Thread tony2001
 ID:   36878
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5CVS-2006-03-27 (CVS)
 Assigned To:  tony2001
 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:


[2006-03-27 23:44:32] [EMAIL PROTECTED]

Description:

Error messages are printed when parsing invalid XML document despite of
the fact that they should be (and are) converted to exceptions.

Reproduce code:
---



d < 

getMessage());
}

?>


Expected result:

Exception caught
string(73) "DOMDocument::loadXML(): StartTag: invalid element name in
Entity, line: 4"

Actual result:
--
Warning: DOMDocument::loadXML(): expected '>' in Entity, line: 7 in
/tmp/1.php on line 26
Exception caught
string(73) "DOMDocument::loadXML(): StartTag: invalid element name in
Entity, line: 4"






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


#36880 [Opn->Fbk]: OciLogon crashes apache

2006-03-27 Thread tony2001
 ID:   36880
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jbond007 at atsat dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux RH4
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-03-28 00:05:53] jbond007 at atsat dot com

Description:

I installed php 5.1.2 working with Apache 2.2
(the problem occurs with Apache 1.X.Y too and with 
 php4.X too).

When I ask  everything appears correctly,
ORACLE_HOME, LD_LIBRARY_PATH and other env vars 
are correct.
But OciLogon crashes apache with a segmentation Fault,
each time I use it.
If I use Ocilogon with php in cgi mode, it works fine,
and I could connect to my database, but not with apache.



Reproduce code:
---
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs --with-openssl --with-bz2
--with-mysql=/usr/local/mysql --enable-ftp
--with-oci8=/oraclebase/u01/app/oracle/product/10.2.0 --enable-bcmath
--enable-calendar --enable-sigchild
--with-pdo-oci=/oraclebase/u01/app/oracle/product/10.2.0

The script to start apache is:

ORACLE_BASE=/oraclebase/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH
/usr/local/apache/bin/apachectl start






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


#36880 [NEW]: OciLogon crashes apache

2006-03-27 Thread jbond007 at atsat dot com
From: jbond007 at atsat dot com
Operating system: Linux RH4
PHP version:  5.1.2
PHP Bug Type: Apache2 related
Bug description:  OciLogon crashes apache

Description:

I installed php 5.1.2 working with Apache 2.2
(the problem occurs with Apache 1.X.Y too and with 
 php4.X too).

When I ask  everything appears correctly,
ORACLE_HOME, LD_LIBRARY_PATH and other env vars 
are correct.
But OciLogon crashes apache with a segmentation Fault,
each time I use it.
If I use Ocilogon with php in cgi mode, it works fine,
and I could connect to my database, but not with apache.



Reproduce code:
---
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs --with-openssl --with-bz2
--with-mysql=/usr/local/mysql --enable-ftp
--with-oci8=/oraclebase/u01/app/oracle/product/10.2.0 --enable-bcmath
--enable-calendar --enable-sigchild
--with-pdo-oci=/oraclebase/u01/app/oracle/product/10.2.0

The script to start apache is:

ORACLE_BASE=/oraclebase/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH
/usr/local/apache/bin/apachectl start


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


#36879 [Opn->Bgs]: Collation Charset of connection is unchangeable

2006-03-27 Thread dbarth at gmx dot net
 ID:   36879
 User updated by:  dbarth at gmx dot net
 Reported By:  dbarth at gmx dot net
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Mandrake
 PHP Version:  5.1.2
 New Comment:

Sorry folks for bothering you,

sometimes it only needs an email for finding the failure...

it was my fault, i just missed a database.


Previous Comments:


[2006-03-27 23:56:36] dbarth at gmx dot net

Description:

Hello,

im working on some mysql-connections and queries, and now im getting
the mysql-error messages of "Illegal mix of collations". So i changed
everthing to the right collation. in my case, latin1_german1_ci. Now,
also setting the right collation right before sending the query, mysql
seems to ingnore the charset. it looks that php sends its mysqlcommand
with some precompiled collations.

Now, i'm wondering if this is a bug in php or not. did i miss
something?

thanks in advance

Actual result:
--
array(7) {
  [0]=>
  array(2) {
["variable_name"]=>
string(20) "character_set_client"
["value"]=>
string(6) "latin1"
  }
  [1]=>
  array(2) {
["variable_name"]=>
string(24) "character_set_connection"
["value"]=>
string(6) "latin1"
  }
  [2]=>
  array(2) {
["variable_name"]=>
string(22) "character_set_database"
["value"]=>
string(6) "latin1"
  }
  [3]=>
  array(2) {
["variable_name"]=>
string(21) "character_set_results"
["value"]=>
string(6) "latin1"
  }
  [4]=>
  array(2) {
["variable_name"]=>
string(20) "character_set_server"
["value"]=>
string(6) "latin1"
  }
  [5]=>
  array(2) {
["variable_name"]=>
string(20) "character_set_system"
["value"]=>
string(4) "utf8"
  }
  [6]=>
  array(2) {
["variable_name"]=>
string(18) "character_sets_dir"
["value"]=>
string(26) "/usr/share/mysql/charsets/"
  }
}



array(3) {
  [0]=>
  array(2) {
["variable_name"]=>
string(20) "collation_connection"
["value"]=>
string(17) "latin1_german1_ci"
  }
  [1]=>
  array(2) {
["variable_name"]=>
string(18) "collation_database"
["value"]=>
string(17) "latin1_german1_ci"
  }
  [2]=>
  array(2) {
["variable_name"]=>
string(16) "collation_server"
["value"]=>
string(17) "latin1_german1_ci"
  }
}



Fatal error: 1267 - Illegal mix of collations
(latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for
operation '='






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


#36879 [NEW]: Collation Charset of connection is unchangeable

2006-03-27 Thread dbarth at gmx dot net
From: dbarth at gmx dot net
Operating system: Mandrake
PHP version:  5.1.2
PHP Bug Type: MySQL related
Bug description:  Collation Charset of connection is unchangeable

Description:

Hello,

im working on some mysql-connections and queries, and now im getting the
mysql-error messages of "Illegal mix of collations". So i changed
everthing to the right collation. in my case, latin1_german1_ci. Now, also
setting the right collation right before sending the query, mysql seems to
ingnore the charset. it looks that php sends its mysqlcommand with some
precompiled collations.

Now, i'm wondering if this is a bug in php or not. did i miss something?

thanks in advance

Actual result:
--
array(7) {
  [0]=>
  array(2) {
["variable_name"]=>
string(20) "character_set_client"
["value"]=>
string(6) "latin1"
  }
  [1]=>
  array(2) {
["variable_name"]=>
string(24) "character_set_connection"
["value"]=>
string(6) "latin1"
  }
  [2]=>
  array(2) {
["variable_name"]=>
string(22) "character_set_database"
["value"]=>
string(6) "latin1"
  }
  [3]=>
  array(2) {
["variable_name"]=>
string(21) "character_set_results"
["value"]=>
string(6) "latin1"
  }
  [4]=>
  array(2) {
["variable_name"]=>
string(20) "character_set_server"
["value"]=>
string(6) "latin1"
  }
  [5]=>
  array(2) {
["variable_name"]=>
string(20) "character_set_system"
["value"]=>
string(4) "utf8"
  }
  [6]=>
  array(2) {
["variable_name"]=>
string(18) "character_sets_dir"
["value"]=>
string(26) "/usr/share/mysql/charsets/"
  }
}



array(3) {
  [0]=>
  array(2) {
["variable_name"]=>
string(20) "collation_connection"
["value"]=>
string(17) "latin1_german1_ci"
  }
  [1]=>
  array(2) {
["variable_name"]=>
string(18) "collation_database"
["value"]=>
string(17) "latin1_german1_ci"
  }
  [2]=>
  array(2) {
["variable_name"]=>
string(16) "collation_server"
["value"]=>
string(17) "latin1_german1_ci"
  }
}



Fatal error: 1267 - Illegal mix of collations (latin1_german1_ci,IMPLICIT)
and (latin1_swedish_ci,IMPLICIT) for operation '='


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


#36878 [Opn->Asn]: error messages are printed even though an exception has been thrown

2006-03-27 Thread tony2001
 ID:   36878
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5CVS-2006-03-27 (CVS)
-Assigned To:  
+Assigned To:  tony2001


Previous Comments:


[2006-03-27 23:44:32] [EMAIL PROTECTED]

Description:

Error messages are printed when parsing invalid XML document despite of
the fact that they should be (and are) converted to exceptions.

Reproduce code:
---



d < 

getMessage());
}

?>


Expected result:

Exception caught
string(73) "DOMDocument::loadXML(): StartTag: invalid element name in
Entity, line: 4"

Actual result:
--
Warning: DOMDocument::loadXML(): expected '>' in Entity, line: 7 in
/tmp/1.php on line 26
Exception caught
string(73) "DOMDocument::loadXML(): StartTag: invalid element name in
Entity, line: 4"






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


#36878 [NEW]: error messages are printed even though an exception has been thrown

2006-03-27 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  5CVS-2006-03-27 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  error messages are printed even though an exception has been 
thrown

Description:

Error messages are printed when parsing invalid XML document despite of
the fact that they should be (and are) converted to exceptions.

Reproduce code:
---



d < 

getMessage());
}

?>


Expected result:

Exception caught
string(73) "DOMDocument::loadXML(): StartTag: invalid element name in
Entity, line: 4"

Actual result:
--
Warning: DOMDocument::loadXML(): expected '>' in Entity, line: 7 in
/tmp/1.php on line 26
Exception caught
string(73) "DOMDocument::loadXML(): StartTag: invalid element name in
Entity, line: 4"


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


#36875 [Opn]: open_basedir doesn't affect is_writable

2006-03-27 Thread bjori
 ID:   36875
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rebe at unit01 dot net
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

Greg: Solves the issue with is_readable() and friends, but not is_dir()
and pals.

This however does:
http://php.is/bugs/36875/open_basedir.phpHEAD.patch.txt
http://php.is/bugs/36875/open_basedir.php51.patch.txt

-Hannes


Previous Comments:


[2006-03-27 22:05:56] [EMAIL PROTECTED]

this patch may solve the issue

http://pastebin.com/625633



[2006-03-27 16:55:43] rebe at unit01 dot net

Description:

I'm not sure is it ok but open_basedir restriction in php.ini does not
affect is_writable() behaviour. 

It means that function returns true even if path is out of open_basedir
setting and any try to write there finishes with "open_basedir
restriction in effect".






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


#36342 [Asn->Csd]: missing values on recordset with a very simple request

2006-03-27 Thread wez
 ID:   36342
 Updated by:   [EMAIL PROTECTED]
 Reported By:  teissierb at hotmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: PDO related
 Operating System: WIN32
 PHP Version:  5.1.2
 Assigned To:  wez
 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.

Fixed in CVS; try the next snapshot.


Previous Comments:


[2006-03-15 16:03:38] [EMAIL PROTECTED]

This is actually a limitation of ODBC; "long" columns must be the last
columns bound in a query.  It is possible for PDO to workaround this by
using an alternate, slower, approach to fetching the data.  In the long
run, you are better off making sure you query the big columns out last.



[2006-03-08 00:04:17] marshmallow007 at hotmail dot com

I'have the same bug for the 1 row with Firebird but not with MySQL!

Firebird:
Array ( [INDEX] => [DATE] => [TEXTE] => )

MySQL:
Array ( [INDEX] => 1 [DATE] => 1969-05-07 [TEXTE] => marshmallow)



[2006-02-23 01:07:14] travis at raybold dot com

i've got a simpler test case...
ON Windows XP, IIS6, PHP 5.1.2 (With the 5.1.0 php_pdo.dll and
php_pdo_odbc.dll to avoid bug #35671), SQL Server 2000 accessed through
PDO_ODBC.

creating a simple table and inserting one row as follows:

--
CREATE TABLE zTest_TBL (
Test varchar (256), 
TestID int 
)
INSERT INTO zTest_TBL ( Test ) VALUES ('test')
--

then try to query with:
--
$oConnection = new PDO($sDSN);
foreach($oConnection->query('SELECT * FROM zTest_TBL ') as $aRow) {
  print_r($aRow);
}
--

returns:
--
Array ( [Test] => [0] => [TestID] => [1] => )
--

expected:
--
Array ( [Test] => test [0] => test [TestID] => [1] => )
--

Note: reducing the size to 255 makes it work as expected. it also works
as expected if there is just the one field, regardless of the size.
adding another field, be it integer or varchar kills the long field. I
tested with the 5.1.2 php_pdo.dll and php_pdo_odbc.dll with the same
results.



[2006-02-10 15:18:28] [EMAIL PROTECTED]

Assigned to the maintainer.



[2006-02-09 15:27:59] teissierb at hotmail dot com

Description:

On SQL Server 2005 Express (free), using Windows XP, Wamp 1.6.0 (php
5.1.1) and PDO ODBC:

With a simple table PDO doesn't return what I expect him to. Might be
dued to the mix of varchar and (small, tiny)int.

Reproduce code:
---
create table T (
[A] varchar(80) NOT NULL,
[B] tinyint NOT NULL,
[C] varchar(100) NOT NULL,
[D] smallint NOT NULL,
[E] varchar(1024) NOT NULL,
[F] varchar(255) NOT NULL,
[G] varchar(255) NOT NULL,
[H] varchar(1000) NOT NULL,
[I] varchar(100) NOT NULL,
[J] tinyint NOT NULL,
[K] varchar(255) NULL 
)

insert into T values ('A', '1', 'C', '2', 'E', 'F', 'G', 'H', 'I', '3',
'K')
//
try {
$db = new PDO('odbc:Driver={SQL
Server};Server=HOST\INSTANCENAME;Database=;', "user", "pass");
} catch( PDOException $e ){
die( $e->getMessage() );
}

foreach( $db->query("SELECT * FROM T ", PDO::FETCH_NUM) as $row ) {
 echo ""; print_r( $row );echo "";
}

Expected result:

[0] => A
[1] => 1
[2] => C
[3] => 2
[4] => E
[5] => F
[6] => G
[7] => H
[8] => I
[9] => 3
[10] => K

Actual result:
--
[0] => A
[1] => 1
[2] => C
[3] => 2
[4] => 
[5] => F
[6] => G
[7] => 
[8] => I
[9] => 3
[10] => K





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


#35671 [Asn->Csd]: Named parameters not working in PDO_ODBC

2006-03-27 Thread wez
 ID:   35671
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mknobloch at midstate dot edu
-Status:   Assigned
+Status:   Closed
 Bug Type: PDO related
 Operating System: Windows 2003 SP1
 PHP Version:  5.1.2
 Assigned To:  wez
 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.

See also http://pecl.php.net/bugs/bug.php?id=6504.



Previous Comments:


[2006-03-09 10:09:39] alien at mosfasad dot ru

No bug in sqlite2 and sqlite Driver.
$oPdo = new PDO('sqlite:test.lite');
$oStat = $oPdo->prepare("INSERT INTO php_qqq (name, value) VALUES (?,
?)");
$oStat->execute(array('1','444'));

in table php_qqq have values (1 and 444);



[2006-03-09 09:54:45] alien at mosfasad dot ru

bug exists in snapshot of 09 Mar 2006 04:32:09 +0100



[2006-03-02 18:32:00] bubblenut at gmail dot com

I'm getting this problem with all parameters (named and otherwise) with
PDO_MYSQL 1.0.1 with both php-5.1.2 and php-5.1.3-dev on Linux (Kubuntu
Breezy)



[2006-02-17 19:02:14] dkrook at hotmail dot com

I've encountered the same problem with DB2 and '?' parameter markers.

http://marc.theaimsgroup.com/?l=php-db&m=114014376609292&w=2



[2006-02-16 00:20:43] stoens at activegrid dot com

I am seeing the same thing with the OCI and the ODBC drivers on Windows
and Linux (FC4). Same PHP version.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/35671

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


#35386 [Asn->Opn]: first row is null

2006-03-27 Thread wez
 ID:   35386
 Updated by:   [EMAIL PROTECTED]
 Reported By:  slapaf at hotmail dot com
-Status:   Assigned
+Status:   Open
 Bug Type: PDO related
 Operating System: winxp sp2
 PHP Version:  5CVS-2006-12-02 (snap)
 Assigned To:  wez
 New Comment:

Looking for someone to maintain the firebird driver.


Previous Comments:


[2006-03-21 16:11:10] salbefe at inf dot upv dot es

I have the same problem in Windows 2003 SP1.



[2006-03-10 09:49:11] astro101 at hotmail dot com

Yes had same problem WinXP SP2 Firebird 1.5.3 and firebird 2 and PHP
5.1.2, PHP5.1.3RC1, PHP5.1.3RC2.



[2006-02-11 17:25:16] thomas at last-it dot de

same problem on linux, php 5.1.2
I tried to debug the problem, but imho the problem is strange.
The reason why the first row is null is as following:
file: ext/pdo/pdo_stmt.c
line: 532

case PDO_PARAM_STR:
  if (value && !(value_len == 0 && stmt->dbh->oracle_nulls ==
PDO_NULL_EMPTY_STRING)) {
ZVAL_STRINGL(dest, value, value_len, !caller_frees);
if (caller_frees) {
  caller_frees = 0;
}
break;
  }
default:
ZVAL_NULL(dest);

With the first returned row from DB the first if clause above evaluates
to false.
so ZVAL_NULL is called. thats the reason for the null values in the
first result set.

Normally should "value" point to the argument "ptr" of the
firebird_stmt_get_col function (in firebird_statement.c).

gdp says that ptr is filled with the data out of DB properly.

So why is "value" not the same as "ptr" and why is this only in the
first result set??

greetz Thomas



[2006-02-08 18:49:28] turyak at gmail dot com

yep, experiencing same problem..
php 5.1.2, firebird 1.5.2
is there solution already?



[2005-11-25 11:38:32] slapaf at hotmail dot com

Description:

When using PDO for simple query in Firebird it returns first row as
null.
I've tried using ADODB for control and it returns the correct results. 

Reproduce code:
---
$dbh = new PDO("firebird:dbname=localhost:test.fdb","","**");
$sql='SELECT EVENT_NAME FROM EVENTS';

foreach($dbh->query($sql) as $row){
print ''.gettype($row['EVENT_NAME']).' : 
'.$row['EVENT_NAME'];
}

Expected result:

string : name 1

string : name 2

string : name 3

string : name 4

Actual result:
--
NULL : 

string : name 2

string : name 3

string : name 4





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


#36875 [Opn]: open_basedir doesn't affect is_writable

2006-03-27 Thread cellog
 ID:   36875
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rebe at unit01 dot net
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

this patch may solve the issue

http://pastebin.com/625633


Previous Comments:


[2006-03-27 16:55:43] rebe at unit01 dot net

Description:

I'm not sure is it ok but open_basedir restriction in php.ini does not
affect is_writable() behaviour. 

It means that function returns true even if path is out of open_basedir
setting and any try to write there finishes with "open_basedir
restriction in effect".






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


#36876 [NEW]: [PATCH] SysV Message Queue Enhancement

2006-03-27 Thread tim dot hentenaar at securityconfidence dot com
From: tim dot hentenaar at securityconfidence dot com
Operating system: Linux
PHP version:  5CVS-2006-03-27 (CVS)
PHP Bug Type: Feature/Change Request
Bug description:  [PATCH] SysV Message Queue Enhancement

Description:

This patch adds the function msg_id_to_queue() which converts a message
queue ID number into a message queue resource. I wrote this primarily for
easy access to already-created queues.

Patch for PHP5 CVS:
http://portal.sec-con.net/patches/sysvmsg-5dev.patch

Patch for PHP6 CVS:
http://portal.sec-con.net/patches/sysvmsg-6.patch

Tim

Reproduce code:
---
Example: 

$queue = msg_id_to_queue(10759); 

Would return queue 10759 as a resource, or false if unable to open it.


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


#36854 [Opn->Csd]: SOAP Server cannot issue a SoapFault when a SoapClient is created

2006-03-27 Thread tony2001
 ID:   36854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  markslemko at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: SOAP related
 Operating System: sever 2003 & Open BSD
 PHP Version:  5.1.2
 New Comment:

Works -> closed.


Previous Comments:


[2006-03-27 18:32:27] markslemko at gmail dot com

It is working on the latest CVS snapshot! 
Thanks!



[2006-03-26 00:44:44] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-03-25 01:13:34] markslemko at gmail dot com

Description:

I am trying to use a SOAP client within a SOAP server and it caused the
SOAP server to fail to respond properly to its clients with a SoapFault
when a problem arose. It works fine if there is no error to return to
the client.

so a diagram might help...

[SOAP Client A]
   |
   |
[SOAP Server A]
  +[SOAP Client B] ---> [SOAP Server B]
  +[return SoapFault]

...looks like we got no XML document...

The response (SoapFault) to the SOAP Client A looks like it is empty.
I'm wondering if the SoapFault mechanism is corrupted by the SoapClient
initialization. I've tested the idea of faking a response from the SOAP
Server B, i.e. don't create a SOAP Client B, and the returning
SoapFault works as expected.


Reproduce code:
---
// code snippets to get help my issue accross
$server = new SoapServer(null,array('uri'=>$NAMESPACE));
$server->setClass('MyClass');
$server->handle();

// a class that creates a soap client within the server
class MyClass {
public function Make($something) {
  $client = new SoapClient('http://somewhere.com/soap.wsdl');  
  return new SoapFault('Validation','bogus');
}
}

// -- another file -- an originating client
try {
$clientA = new soapClient('http://localhost/soap.php');
} catch (SoapFault $e) {
echo $e->faultstring; // error occurs here. wrong error message =>
expected "bogus"
}

Expected result:

expected the message "bogus" to be echoed

expect to catch a SoapFault with an error message on the originating
client (Client A above).

Actual result:
--
looks like we got no XML document





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


#36854 [Fbk->Opn]: SOAP Server cannot issue a SoapFault when a SoapClient is created

2006-03-27 Thread markslemko at gmail dot com
 ID:   36854
 User updated by:  markslemko at gmail dot com
 Reported By:  markslemko at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: SOAP related
 Operating System: sever 2003 & Open BSD
 PHP Version:  5.1.2
 New Comment:

It is working on the latest CVS snapshot! 
Thanks!


Previous Comments:


[2006-03-26 00:44:44] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-03-25 01:13:34] markslemko at gmail dot com

Description:

I am trying to use a SOAP client within a SOAP server and it caused the
SOAP server to fail to respond properly to its clients with a SoapFault
when a problem arose. It works fine if there is no error to return to
the client.

so a diagram might help...

[SOAP Client A]
   |
   |
[SOAP Server A]
  +[SOAP Client B] ---> [SOAP Server B]
  +[return SoapFault]

...looks like we got no XML document...

The response (SoapFault) to the SOAP Client A looks like it is empty.
I'm wondering if the SoapFault mechanism is corrupted by the SoapClient
initialization. I've tested the idea of faking a response from the SOAP
Server B, i.e. don't create a SOAP Client B, and the returning
SoapFault works as expected.


Reproduce code:
---
// code snippets to get help my issue accross
$server = new SoapServer(null,array('uri'=>$NAMESPACE));
$server->setClass('MyClass');
$server->handle();

// a class that creates a soap client within the server
class MyClass {
public function Make($something) {
  $client = new SoapClient('http://somewhere.com/soap.wsdl');  
  return new SoapFault('Validation','bogus');
}
}

// -- another file -- an originating client
try {
$clientA = new soapClient('http://localhost/soap.php');
} catch (SoapFault $e) {
echo $e->faultstring; // error occurs here. wrong error message =>
expected "bogus"
}

Expected result:

expected the message "bogus" to be echoed

expect to catch a SoapFault with an error message on the originating
client (Client A above).

Actual result:
--
looks like we got no XML document





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


#36802 [Asn->Csd]: Signal 11 with with mysqli_set_charset ()

2006-03-27 Thread georg
 ID:   36802
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mdalton at galaxytelecom dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.1.2
 Assigned To:  georg
 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:


[2006-03-22 10:55:43] [EMAIL PROTECTED]

reopened



[2006-03-21 16:35:55] [EMAIL PROTECTED]

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.





[2006-03-20 23:57:36] judas dot iscariote at gmail dot com

although Im not an expert on this,

seems the OP example lacks of a valid internal "mysql_link" (created
with mysqli_real_connect or similar ) and some validation is missing in
the mysqli extension an that result in a crash...

I deduce this because using a valid mysqli link the function works as
expected.

This is a bug anyway, no userspace code should crash PHP.



[2006-03-20 23:28:15] judas dot iscariote at gmail dot com

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912513283232 (LWP 30938)]
0x2e4b9c65 in mysql_send_query () from
/usr/lib64/libmysqlclient.so.15
(gdb) bt
#0  0x2e4b9c65 in mysql_send_query () from
/usr/lib64/libmysqlclient.so.15
#1  0x2e4b9cd9 in mysql_real_query () from
/usr/lib64/libmysqlclient.so.15
#2  0x2e4ba011 in mysql_set_character_set () from
/usr/lib64/libmysqlclient.so.15
#3  0x2e6dcbc2 in zif_mysqli_set_charset (ht=, return_value=0x950488,
return_value_ptr=, this_ptr=, return_value_used=)
at /usr/src/debug/php-5.1.2/ext/mysqli/mysqli_nonapi.c:329
#4  0x00d0 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fb1d2a0) at zend_vm_execute.h:200
#5  0x00554c53 in execute (op_array=0x9657a8) at
zend_vm_execute.h:92
#6  0x0053857c in zend_execute_scripts (type=8, retval=, file_count=3)
at /usr/src/debug/php-5.1.2/Zend/zend.c:1109
#7  0x004fac35 in php_execute_script
(primary_file=0x7fb1f950) at
/usr/src/debug/php-5.1.2/main/main.c:1725
#8  0x005c9285 in main (argc=2, argv=0x7fb1fb08) at
/usr/src/debug/php-5.1.2/sapi/cli/php_cli.c:1092

php -v

PHP 5.1.3RC2-dev (cli) (built: Mar 20 2006 17:23:27)



[2006-03-20 19:51:37] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

If you still can reproduce it with plain PHP, please provide gdb
backtrace (see http://bugs.php.net/bugs-generating-backtrace.php).



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

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


#36875 [NEW]: open_basedir doesn't affect is_writable

2006-03-27 Thread rebe at unit01 dot net
From: rebe at unit01 dot net
Operating system: linux
PHP version:  5.1.2
PHP Bug Type: Filesystem function related
Bug description:  open_basedir doesn't affect is_writable

Description:

I'm not sure is it ok but open_basedir restriction in php.ini does not
affect is_writable() behaviour. 

It means that function returns true even if path is out of open_basedir
setting and any try to write there finishes with "open_basedir restriction
in effect".


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


#36874 [NEW]: PDO quote null change

2006-03-27 Thread stochnagara at hotmail dot com
From: stochnagara at hotmail dot com
Operating system: win xp
PHP version:  5.1.3RC1
PHP Bug Type: Feature/Change Request
Bug description:  PDO quote null change

Description:

Currently PDO quotes null value as a string '' . I suggest to change this
behaviour and quote null as sql NULL.

Reproduce code:
---
quote (null));


Expected result:

null

Actual result:
--
string ('')

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


#36873 [Bgs]: go-pear.php web installation

2006-03-27 Thread pajoye
 ID:   36873
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rebe at unit01 dot net
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

Please open a PEAR bug using pear.php.net:
http://pear.php.net/bugs/report.php?package=PEAR


Previous Comments:


[2006-03-27 16:08:55] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please report bugs in PEAR in the PEAR bug tracker at
http://pear.php.net/bugs/
Thank you.



[2006-03-27 15:59:50] rebe at unit01 dot net

Description:

Latest go-pear:
 $Id: go-pear,v 1.81 2006/03/11 14:15:20 pajoye Exp $
fails on php5 with open_basedir restriction.
Function tmp_dir() about line 1156 has check code:

$_temp = my_env('TMPDIR');
if (!$_temp) {
if (is_writable('/tmp')) {
$_temp = '/tmp';
}
}
which fails cause is_writable('/tmp') return true (!!) even if php
cannot write anything there because of restrictions, so then in line
423:

$ptmp = tempnam($foo, 'gope');

$ptmp becomes ampty - script is downloading packages into current dir
which makes then conflicts and errors.

I suggest to change this:
if (!$_temp) {
if (is_writable('/tmp')) {
$_temp = '/tmp';
}
}

to something like that:
if (!$_temp) {
$test = '/tmp/'.uniqid();
if (@mkdir($test)) {
@rmdir($test);
$_temp = '/tmp';
}
}
which forces to create something to check if its possible.



Second small bug is that after i fixed that code above and installation
finished with success i got link:
"Start Web Frontend of the PEAR Installer >>"
which points to pear/pear/index.php dir instead of pear/index.php dir
(where "pear" was my dir i choosed to put go-pear.php there and run
with defaults).







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


#36873 [Opn->Bgs]: go-pear.php web installation

2006-03-27 Thread bjori
 ID:   36873
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rebe at unit01 dot net
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please report bugs in PEAR in the PEAR bug tracker at
http://pear.php.net/bugs/
Thank you.


Previous Comments:


[2006-03-27 15:59:50] rebe at unit01 dot net

Description:

Latest go-pear:
 $Id: go-pear,v 1.81 2006/03/11 14:15:20 pajoye Exp $
fails on php5 with open_basedir restriction.
Function tmp_dir() about line 1156 has check code:

$_temp = my_env('TMPDIR');
if (!$_temp) {
if (is_writable('/tmp')) {
$_temp = '/tmp';
}
}
which fails cause is_writable('/tmp') return true (!!) even if php
cannot write anything there because of restrictions, so then in line
423:

$ptmp = tempnam($foo, 'gope');

$ptmp becomes ampty - script is downloading packages into current dir
which makes then conflicts and errors.

I suggest to change this:
if (!$_temp) {
if (is_writable('/tmp')) {
$_temp = '/tmp';
}
}

to something like that:
if (!$_temp) {
$test = '/tmp/'.uniqid();
if (@mkdir($test)) {
@rmdir($test);
$_temp = '/tmp';
}
}
which forces to create something to check if its possible.



Second small bug is that after i fixed that code above and installation
finished with success i got link:
"Start Web Frontend of the PEAR Installer >>"
which points to pear/pear/index.php dir instead of pear/index.php dir
(where "pear" was my dir i choosed to put go-pear.php there and run
with defaults).







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


#36873 [NEW]: go-pear.php web installation

2006-03-27 Thread rebe at unit01 dot net
From: rebe at unit01 dot net
Operating system: linux
PHP version:  5.1.2
PHP Bug Type: *General Issues
Bug description:  go-pear.php web installation

Description:

Latest go-pear:
 $Id: go-pear,v 1.81 2006/03/11 14:15:20 pajoye Exp $
fails on php5 with open_basedir restriction.
Function tmp_dir() about line 1156 has check code:

$_temp = my_env('TMPDIR');
if (!$_temp) {
if (is_writable('/tmp')) {
$_temp = '/tmp';
}
}
which fails cause is_writable('/tmp') return true (!!) even if php cannot
write anything there because of restrictions, so then in line 423:

$ptmp = tempnam($foo, 'gope');

$ptmp becomes ampty - script is downloading packages into current dir
which makes then conflicts and errors.

I suggest to change this:
if (!$_temp) {
if (is_writable('/tmp')) {
$_temp = '/tmp';
}
}

to something like that:
if (!$_temp) {
$test = '/tmp/'.uniqid();
if (@mkdir($test)) {
@rmdir($test);
$_temp = '/tmp';
}
}
which forces to create something to check if its possible.



Second small bug is that after i fixed that code above and installation
finished with success i got link:
"Start Web Frontend of the PEAR Installer >>"
which points to pear/pear/index.php dir instead of pear/index.php dir
(where "pear" was my dir i choosed to put go-pear.php there and run with
defaults).



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


#34972 [Asn]: STDIN won't allow nonblocking.

2006-03-27 Thread VJTD3 at VJTD3 dot com
 ID:   34972
 User updated by:  VJTD3 at VJTD3 dot com
 Reported By:  VJTD3 at VJTD3 dot com
 Status:   Assigned
 Bug Type: Streams related
 Operating System: *
 PHP Version:  php6.0-200602191730, php5.1-200603270630,
   php4-STABLE-200603270430 (also in *nix equaliviants)
 Assigned To:  wez
 New Comment:

error in last message, "stream_select()" was ment.

code using "stream_select()" that still blocks:

 data: '.(strlen(@$data4) ? $data4 :
'empty')."\n";
  unset($data4);
  sleep('1');
 }

?>

the second you type/click a arrow key/anything it goes into blocking
mode again.


Previous Comments:


[2006-03-27 13:32:01] VJTD3 at VJTD3 dot com

bug #36030 is very similar to my bug, they might be related.

It looks like anything to STDIN (reguardless of access method like
php://stdin and constant('STDIN') and STDIN are all effected.)

When doing anything, be it select, timeout, or anything to "monitor"
the resource where a window is set (ie to timeout the blocking, set
nonblocking, or similar.) the input "stalls" (it's not really a stall,
it's just waiting for the input.) or fails (such as timeout setting
that fails and returns false.)

Tested on:
php4-STABLE-200603270430
php5.1-200603270630
php6.0-200602191730

Also tested as well on their *nix snaps version and all with the same
result. (blocking when they should not be blocking.)

Better code to make debugging easier and includes examples from
suggestions that don't work:

 data: '.(strlen($data1) ? $data1 :
'empty')."\n";
  sleep('1');
 }

 echo 'notice how the data loads unblocked and clearly there is no data
because this IP is invalid to connect to.'."\n";
 $demo2 = @fsockopen('0.0.0.0', 80, $errno, $errstr, 1);
 stream_set_blocking($demo2, FALSE);
 for ($i=1;$i<11;$i++) {
  # this is expected to be a invalid resource.
  $data2 = @fread($demo2, 1500);
  $data2 = str_replace("\r\n", "\n", $data2);
  $data2 = str_replace("\n\r", "\n", $data2);
  $data2 = str_replace("\r", "\n", $data2);
  $data2 = str_replace("\n", '', $data2);
  echo 'pass: '.$i.' -> data: '.(strlen($data2) ? $data2 :
'empty')."\n";
  sleep('1');
 }

 echo 'a person said to use select, this shows select won\'t work. (and
shouldn\'t it\'s not a socket.) It won\'t even allow input during select
calls.'."\n";
 for ($i=1;$i<11;$i++) {
  unset($read);
  $read[] = STDIN;
  socket_select($read, $write = null, $except = null, $tv = 0);
  print_r($read);
  sleep('1');
 }

 echo 'same code as yahoo and 0.0.0.0 with fread and blocked
reguardless of setting this to nonblocking.'."\n";
 stream_set_blocking(STDIN, FALSE);
 for ($i=1;$i<11;$i++) {
  echo 'Watch me stall till you type enter I\'m blocking you!'."\n";
  $data3 = fread(STDIN, 10);
  $data3 = str_replace("\r\n", "\n", $data3);
  $data3 = str_replace("\n\r", "\n", $data3);
  $data3 = str_replace("\r", "\n", $data3);
  $data3 = str_replace("\n", '', $data3);
  echo 'pass: '.$i.' -> data: '.(strlen($data3) ? $data3 :
'empty')."\n";
  sleep('1');
 }

?>

anything I can do to help with details/make the bug easier to fix?



[2005-11-09 20:58:26] [EMAIL PROTECTED]

Assigned to the streams maintainer.



[2005-10-25 04:23:31] VJTD3 at VJTD3 dot com





[2005-10-25 01:26:58] [EMAIL PROTECTED]

FYI, using fgets() with a non-blocking resource makes no sense.

To implement what you're after, use stream_select() and fread(); these
work on stdin just fine.



[2005-10-24 23:07:00] VJTD3 at VJTD3 dot com

Description:

STDIN won't allow nonblocking.

Reproduce code:
---


Expected result:

The test code should be a infinate loop with "infinate loop showing
nonblocking problem" said trillions of times fast like a infinate loop
is suposto do when you make a boo boo. instead it will say it once then
wait for input then wait again etc as a blocked resource is expected.
but "stream_set_blocking(STDIN, FALSE);" should be allowing it to do
the loop unblocked resulting in major screen flooding yet unblocking
the resource is ignored.

This means you can't do something like a client program in your shell
that is "interactive" like a Telnet client or similar.

I can dig the whole not reading as typing because that would be too
"raw" for common usage... [ie phrasing the backspaces etc though maybe
a seperate abaility? this would allow arrow key kinda stuff and
similar...] But waiting for a "\n" or whatever file ending shouldn't
have any effect on that loop. It should act just like a TCP or any
other connection when unblocked there the resource just has a return of
no data.

"php -f test.php" I use to run it.

Actual re

#34972 [Asn]: STDIN won't allow nonblocking.

2006-03-27 Thread VJTD3 at VJTD3 dot com
 ID:   34972
 User updated by:  VJTD3 at VJTD3 dot com
 Reported By:  VJTD3 at VJTD3 dot com
 Status:   Assigned
 Bug Type: Streams related
 Operating System: *
-PHP Version:  5CVS-2005-11-09 (snap)
+PHP Version:  php6.0-200602191730, php5.1-200603270630,
   php4-STABLE-200603270430 (also in *nix equaliviants)
 Assigned To:  wez
 New Comment:

bug #36030 is very similar to my bug, they might be related.

It looks like anything to STDIN (reguardless of access method like
php://stdin and constant('STDIN') and STDIN are all effected.)

When doing anything, be it select, timeout, or anything to "monitor"
the resource where a window is set (ie to timeout the blocking, set
nonblocking, or similar.) the input "stalls" (it's not really a stall,
it's just waiting for the input.) or fails (such as timeout setting
that fails and returns false.)

Tested on:
php4-STABLE-200603270430
php5.1-200603270630
php6.0-200602191730

Also tested as well on their *nix snaps version and all with the same
result. (blocking when they should not be blocking.)

Better code to make debugging easier and includes examples from
suggestions that don't work:

 data: '.(strlen($data1) ? $data1 :
'empty')."\n";
  sleep('1');
 }

 echo 'notice how the data loads unblocked and clearly there is no data
because this IP is invalid to connect to.'."\n";
 $demo2 = @fsockopen('0.0.0.0', 80, $errno, $errstr, 1);
 stream_set_blocking($demo2, FALSE);
 for ($i=1;$i<11;$i++) {
  # this is expected to be a invalid resource.
  $data2 = @fread($demo2, 1500);
  $data2 = str_replace("\r\n", "\n", $data2);
  $data2 = str_replace("\n\r", "\n", $data2);
  $data2 = str_replace("\r", "\n", $data2);
  $data2 = str_replace("\n", '', $data2);
  echo 'pass: '.$i.' -> data: '.(strlen($data2) ? $data2 :
'empty')."\n";
  sleep('1');
 }

 echo 'a person said to use select, this shows select won\'t work. (and
shouldn\'t it\'s not a socket.) It won\'t even allow input during select
calls.'."\n";
 for ($i=1;$i<11;$i++) {
  unset($read);
  $read[] = STDIN;
  socket_select($read, $write = null, $except = null, $tv = 0);
  print_r($read);
  sleep('1');
 }

 echo 'same code as yahoo and 0.0.0.0 with fread and blocked
reguardless of setting this to nonblocking.'."\n";
 stream_set_blocking(STDIN, FALSE);
 for ($i=1;$i<11;$i++) {
  echo 'Watch me stall till you type enter I\'m blocking you!'."\n";
  $data3 = fread(STDIN, 10);
  $data3 = str_replace("\r\n", "\n", $data3);
  $data3 = str_replace("\n\r", "\n", $data3);
  $data3 = str_replace("\r", "\n", $data3);
  $data3 = str_replace("\n", '', $data3);
  echo 'pass: '.$i.' -> data: '.(strlen($data3) ? $data3 :
'empty')."\n";
  sleep('1');
 }

?>

anything I can do to help with details/make the bug easier to fix?


Previous Comments:


[2005-11-09 20:58:26] [EMAIL PROTECTED]

Assigned to the streams maintainer.



[2005-10-25 04:23:31] VJTD3 at VJTD3 dot com





[2005-10-25 01:26:58] [EMAIL PROTECTED]

FYI, using fgets() with a non-blocking resource makes no sense.

To implement what you're after, use stream_select() and fread(); these
work on stdin just fine.



[2005-10-24 23:07:00] VJTD3 at VJTD3 dot com

Description:

STDIN won't allow nonblocking.

Reproduce code:
---


Expected result:

The test code should be a infinate loop with "infinate loop showing
nonblocking problem" said trillions of times fast like a infinate loop
is suposto do when you make a boo boo. instead it will say it once then
wait for input then wait again etc as a blocked resource is expected.
but "stream_set_blocking(STDIN, FALSE);" should be allowing it to do
the loop unblocked resulting in major screen flooding yet unblocking
the resource is ignored.

This means you can't do something like a client program in your shell
that is "interactive" like a Telnet client or similar.

I can dig the whole not reading as typing because that would be too
"raw" for common usage... [ie phrasing the backspaces etc though maybe
a seperate abaility? this would allow arrow key kinda stuff and
similar...] But waiting for a "\n" or whatever file ending shouldn't
have any effect on that loop. It should act just like a TCP or any
other connection when unblocked there the resource just has a return of
no data.

"php -f test.php" I use to run it.

Actual result:
--
uses blocking when "stream_set_blocking(STDIN, FALSE);" was used.





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


#36872 [NEW]: session_destroy() fails after call to session_regenerate_id()

2006-03-27 Thread chris at dented-planet dot net
From: chris at dented-planet dot net
Operating system: mac os x 10.3.9
PHP version:  5.1.2
PHP Bug Type: Session related
Bug description:  session_destroy() fails after call to session_regenerate_id()

Description:

Calling session_destroy() after call to session_regenerate_id() results in
the failed session destruction and the following warning:

Warning: session_destroy() [function.session-destroy]: Session object
destruction failed...

If I remove the call to session_regenerate() then session_destroy() works
correctly.

Reproduce code:
---


Expected result:

Session should be destroyed

Actual result:
--
Warning: session_destroy() [function.session-destroy]: Session object
destruction failed...

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


#36871 [NEW]: minmax(...) == min($max, max($min, $val))

2006-03-27 Thread zabmilenko at charter dot net
From: zabmilenko at charter dot net
Operating system: Any
PHP version:  5.1.2
PHP Bug Type: Feature/Change Request
Bug description:  minmax(...) == min($max, max($min, $val))

Description:

I find myself reusing the following code to adjust numbers into a desired
range and precision:

$val = min($max, max($min, round($val, $prec));

This could be more elegantly written like:

$val = minmax($val, $min, $max[, $prec]);


In my opinion.

Thank you.


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


#36870 [NEW]: odbc_execute can't insert a string that starts and ends with a single quote

2006-03-27 Thread mjs at beebo dot org
From: mjs at beebo dot org
Operating system: Windows
PHP version:  5.1.2
PHP Bug Type: ODBC related
Bug description:  odbc_execute can't insert a string that starts and ends with 
a single quote

Description:

odbc_execute has a feature whereby if the string to be inserted starts and
ends with a single quote, the string is interpreted as a filename whose
contents are interpreted as the value of the placeholder.

There does not appear to be a way to insert a string that begins and ends
with a single quote--neither backslashing nor double-quoting works, and it
appears from reading the source (php_odbc.c:1014) that nothing else will
either.

Reproduce code:
---
$sth = odbc_prepare($dbh, "INSERT INTO people(name) VALUES(?)");
$res = odbc_execute($sth, array('\'The Count\''));


Expected result:

The string \'The Count\' inserted into the database.

Actual result:
--
The string is interpreded as a filename, resulting in the erro "Can't open
file XXX" in the error log.

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


#36869 [Opn->Csd]: ob_start memory leak

2006-03-27 Thread tony2001
 ID:   36869
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chen dot daqi at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Output Control
 Operating System: linux
 PHP Version:  5.1.2
 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:


[2006-03-27 06:43:41] chen dot daqi at gmail dot com

Description:

ob_start memory leak when specify chunsize parameter

Reproduce code:
---



Expected result:

boolean(true)
Hi!abc

Actual result:
--
bool(true)
Hi!abc[Mon Mar 27 12:32:37 2006]  Script:  'ob_start_memory_leak.php'
/home/xlchen/php-5.1.2/main/output.c(458) :  Freeing 0x0847F8D4 (9
bytes), script=ob_start_memory_leak.php
[Mon Mar 27 12:32:37 2006]  Script:  'ob_start_memory_leak.php'
/home/xlchen/php-5.1.2/main/output.c(456) :  Freeing 0x0846D384 (16
bytes), script=ob_start_memory_leak.php
=== Total 2 memory leaks detected ===






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