#40906 [NEW]: meta tag automagically appears in XHTML documents

2007-03-23 Thread php at phihag dot de
From: php at phihag dot de
Operating system: independent
PHP version:  5.2.1
PHP Bug Type: DOM XML related
Bug description:  meta tag automagically appears in XHTML documents

Description:

When creating a  tag inside a XHTML document which is designated as
that by a specified doctype, a strange tag is inserted automatically.

I suppose this is because
http://www.w3.org/TR/xslt#section-HTML-Output-Method specifies this for
HTML output. However, this tag is even wrong in this XHTML case because it
states "Content-Type: text/html" instead of the right "Content-Type:
application/xhtml+xml".


Reproduce code:
---
loadXML('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>' .
'http://www.w3.org/1999/xhtml"; />');
$head = $doc->documentElement->appendChild($doc->createElement("head"));

echo $doc->saveXML();

?>


Expected result:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";>



Actual result:
--

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";>






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


#40905 [NEW]: Socket connection cycling when is more virtual hosts

2007-03-23 Thread pavel dot ondrej at centrum dot cz
From: pavel dot ondrej at centrum dot cz
Operating system: Debian 3.1
PHP version:  4.4.6
PHP Bug Type: Sockets related
Bug description:  Socket connection cycling when is more virtual hosts

Description:

Hi! 
When we have more than 987 virtual hosts on the server, so socket
functions and ftp functions don't work. When we try other from other server
virtual hosts config where is more than 1100 VH, so all is OK. We tried
change linux, hw,.. but nothing ... Here is phpinfo
http://mn31.gigant.cz/info.php

Thx a lot for any idea!

Reproduce code:
---
$fp = fsockopen("www.centrum.cz", 80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)\n";
} else {
   $out = "GET / HTTP/1.1\r\n";
   $out .= "Host: www.centrum.cz\r\n";
   $out .= "Connection: Close\r\n\r\n";

   fwrite($fp, $out);
   while (!feof($fp)) {
   echo fgets($fp, 128);
   }
   fclose($fp);
}


Expected result:

Afther this script or any other with ftp or socket connection browser  is
cyclicing and don't give any timeout.


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


#40901 [Asn->Fbk]: mssql_execute errror

2007-03-23 Thread fmk
 ID:   40901
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lh at moranti dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: ubuntu
 PHP Version:  5.2.1
 Assigned To:  fmk
 New Comment:

I've tested your sample code and it works just fine om my system. I did
modify it to get the return value back though:

$int=10;
$sp = mssql_init("test", $con); // stored proc name
mssql_bind($sp, "@sval", $int, SQLINT4);
mssql_bind($sp, "RETVAL", $ret, SQLINT4);
$query  = mssql_execute($sp) or die("oops");
echo "$ret\n";  
mssql_close($con);



Previous Comments:


[2007-03-23 11:20:07] lh at moranti dot com

Sorry the code schould look like this





[2007-03-23 11:15:14] lh at moranti dot com

The storedprocedure looks like this:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE PROCEDURE [dbo].[test]
(
   @sval int
) AS
return @sval+10


And the php code looks like this



is fails in this line "$query  = mssql_execute($sp) or die("oops");"



[2007-03-23 10:56:53] [EMAIL PROTECTED]

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.





[2007-03-23 10:29:27] lh at moranti dot com

Description:

I have a problem executing a stored procedure. 
It fails on my ubuntu installation with php 5.2.1 but when i run it
with php 5.1.6 no problem.

Reproduce code:
---
mssql_select_db("dbname", $conn);
$sp = mssql_init("procedurename", $conn); // stored proc name
$compId=1000;
$SessionId = substr(session_id(),0,8);

mssql_bind($sp, "@CompID",$compId,SQLVARCHAR);
mssql_bind($sp, "@SessionID",$SessionId,SQLVARCHAR);
mssql_bind($sp, "@BasketAmount",$BasketAmount,SQLVARCHAR,TRUE);
mssql_bind($sp, "@BasketTotalItem",$BasketTotalItem,SQLVARCHAR,TRUE);
$query  = mssql_execute($sp) or die("could not perform insert");

Actual result:
--
Warning: mssql_execute() [function.mssql-execute]: stored procedure
execution failed in /home/www/sitename/test_init.php on line 14





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


#32300 [Com]: 64bit libraries in */lib and */lib64

2007-03-23 Thread rwarner at snaplogic dot org
 ID:   32300
 Comment by:   rwarner at snaplogic dot org
 Reported By:  axelseaa at amadmax dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Fedora Core 3 64 Bit
 PHP Version:  5.0.3
 New Comment:

The problem persists.  I am having the same problem in 5.2.1 trying to
configure on RedHat ES 4 x64_86.  It still looks for the LDAP libraries
in /usr/lib rather than /usr/lib64 even with the appropriate flag set to
configure to tell it to use /usr/lib64 for the libraries.


Previous Comments:


[2005-04-02 07:41:34] darren at cpanel dot net

This also happens on RHEL 3. The vendor installs libraries via
up2date/rpms to both /usr/lib/ and /usr/lib64/ , however the php
configure script (4.3.11) has $i/lib/library.ext hardcoded in, where
$i=/usr/ and the library.ext we need to link against was installed by
the vendor in /usr/lib64/ . A couple examples are libjpeg and libpng,
both put in /usr/lib64/ (needed with the common GD support).



[2005-03-25 01:49:09] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2005-03-18 19:37:22] [EMAIL PROTECTED]

*sigh* You can always tell in configure of those mysql and postgresql
where they put the libraries..

IMO, you should always do whatever the distribution packages does: In
this case: Put the 64bit libs in /lib64 !!




[2005-03-16 15:26:22] axelseaa at amadmax dot com

Jabber compiles get around this by offering the following configuration
option: --with-extra-library-path=/usr/lib:/usr/lib64:/some/other/lib

Would something like this be doable?



[2005-03-16 13:51:53] axelseaa at amadmax dot com

They are both build for 64 bit system, its just that the fedora build
rpms stick the libs in the lib64 folder, where the custom compiled ones
do not.



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

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


#40586 [Opn]: _ENV vars get espcaped when magic_quotes_gpc is on

2007-03-23 Thread vrana
 ID:   40586
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gk at gknw dot de
 Status:   Open
-Bug Type: Documentation problem
+Bug Type: Strings related
 Operating System: at least NetWare, Win32
-PHP Version:  Irrelevant
+PHP Version:  4.4.x
 New Comment:

This behavior is wrong. _gpc stands for GET, POST, COOKIE.


Previous Comments:


[2007-02-21 20:30:40] gk at gknw dot de

Description:

With PHP 4.3.x and 4.4.x the _ENV superglobals get escaped if they
contain backslahes and magic_quotes_gpc is on.
This does happen with the Apache SAPI as well as with the CLI on
commandline. When I getenv() same environment vars this doesnt happen.
Also compared to PHP 5.2.x where this doesnt happen - regardless of the
magic_quotes_gpc setting.
I digged through the docu but couldnt find anything about this
'feature' mentioned with 4.x, nor the difference that it was dropped
with 5.x.


Expected result:

I think this 'feature' should be mentioned in the docu, and the
difference between 4.x and 5.x behaviour, also because with 4.x
magic_quotes_gpc is on by default.







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


#40556 [Opn]: Browser abort causes server hang with FastCGI

2007-03-23 Thread unreal at slashorg dot net
 ID:   40556
 User updated by:  unreal at slashorg dot net
 Reported By:  unreal at slashorg dot net
 Status:   Open
 Bug Type: CGI related
 Operating System: Linux 2.6.18
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

Some more information:

The issue only seems to appear when the client abandons the connection
without ending the http session properly. For example, we have an
antivirus gateway appliance that drops the connection with a tcp-reset
when the browser cancels. PHP doesn't seem to get informed that the
connection has ended and becomes non responsive until some timeout (?)
occures. If I use "lsof" while the php process is blocked, I can see the
process is still accessing the download file...


Previous Comments:


[2007-03-23 14:55:39] unreal at slashorg dot net

Here's a backtrace, tell me if this helps you:

(gdb) attach 1774
Attaching to process 1774.
Reading symbols for shared libraries . done
Reading symbols for shared libraries  done
0x900101b7 in write ()
(gdb) backtrace
#0  0x900101b7 in write ()
#1  0x004007c4 in safe_write (req=0x0, buf=0xbeb4, count=0) at
/home/unreal/compile/php-5.2.1/sapi/cgi/fastcgi.c:351
#2  0x2095 in start ()
(gdb)



[2007-03-23 10:11:57] [EMAIL PROTECTED]

>I guess I have to recompile php with debug support?
Yes, rebuild with --enable-debug is required.
- start PHP/FastCGI with just one process (-processes 1) 
- figure out pid of PHP (ps afx | grep php or see Apache error_log)
- start gdb (just type gdb and enter), then type "attach ",
this way you'll attach to already running PHP process.
- type "continue" for the process to continue running.
- after that reproduce the problem and see if the process stops.
- if it does, type "backtrace" and paste the output here.
- if it doesn't we'll continue in the next post.

You can also create an account on the server, I'll try to reproduce it
myself. 



[2007-03-06 13:27:53] unreal at slashorg dot net

Hello,

I haven't really used gdb before, I obtain a backtrace? I guess I have
to recompile php with debug support?

Thanks.



[2007-03-02 10:14:47] [EMAIL PROTECTED]

I am still not able to reproduce the problem.
Could you please attach debugger to stuck php process and show its
backtrace.



[2007-02-22 12:01:19] unreal at slashorg dot net

OK, I've done quite a lot more testing, and here are the results
(Apache 2.0.59/mod_fastcgi 2.4.2/PHP 5.2.1):

- I cannot reproduce the bug with your code either.

- The following code causes PHP workers to lock up if you abort during
download (and only if you abort):

 http://www.slashorg.net/ex/crash.txt

Note: notice the "session_start();" line

- If I remove the "session_start();" line, PHP doesn't crash anymore,
even when I abort the download.


It seems this bug is more complicated than I thought, I hope you'll be
able to reproduce it.

Thanks for your help.



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

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


#40671 [NoF->Csd]: segfault in ldap_get_entries() & LDAP functions implemented poorly

2007-03-23 Thread cardoe
 ID:   40671
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cardoe at gentoo dot org
-Status:   No Feedback
+Status:   Closed
 Bug Type: LDAP related
 Operating System: Linux
 PHP Version:  5.2.1
 New Comment:

Fixed in PHP 5_2 Branch and PHP Head


Previous Comments:


[2007-03-08 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".



[2007-02-28 20:03:09] [EMAIL PROTECTED]

Could you please post the same patch in internals@lists.php.net, so we
can discuss it there, not in the bug tracking system?
Thanks.



[2007-02-28 19:49:22] cardoe at gentoo dot org

diff -Nur php-5.1.6/ext/ldap/ldap.c php-5.1.6-ldap-api/ext/ldap/ldap.c
--- php-5.1.6/ext/ldap/ldap.c   2006-01-01 07:50:08.0 -0500
+++ php-5.1.6-ldap-api/ext/ldap/ldap.c  2007-02-28 11:04:05.0
-0500
@@ -116,7 +116,8 @@
PHP_FE(ldap_first_attribute,third_arg_force_ref)
PHP_FE(ldap_next_attribute, third_arg_force_ref)
PHP_FE(ldap_get_attributes,
NULL)
-   PHP_FE(ldap_get_values,
NULL)
+   PHP_FALIAS(ldap_get_values, ldap_get_values_len,   
NULL)
+/* PHP_FE(ldap_get_values,
NULL) */
PHP_FE(ldap_get_values_len,
NULL)
PHP_FE(ldap_get_dn,
NULL)
PHP_FE(ldap_explode_dn,
NULL)
@@ -1033,7 +1034,7 @@BerElement *ber;
char *attribute;
size_t attr_len;
-   char **ldap_value;
+   struct berval **ldap_value;
char *dn;
 
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &link,
&result) == FAILURE) {
@@ -1064,16 +1065,16 @@
attribute = ldap_first_attribute(ldap,
ldap_result_entry, &ber);
 
while (attribute != NULL) {
-   ldap_value = ldap_get_values(ldap,
ldap_result_entry, attribute);
-   num_values = ldap_count_values(ldap_value);
+   ldap_value = ldap_get_values_len(ldap,
ldap_result_entry, attribute);
+   num_values =
ldap_count_values_len(ldap_value);
 
MAKE_STD_ZVAL(tmp2);
array_init(tmp2);
add_assoc_long(tmp2, "count", num_values);
for (i = 0; i < num_values; i++) {
-   add_index_string(tmp2, i,
ldap_value[i], 1);
+   add_index_stringl(tmp2, i,
ldap_value[i]->bv_val, ldap_value[i]->bv_len, 1);
}   
-   ldap_value_free(ldap_value);
+   ldap_value_free_len(ldap_value);
 
attr_len = strlen(attribute);
zend_hash_update(Z_ARRVAL_P(tmp1),
php_strtolower(attribute, attr_len), attr_len+1, (void *) &tmp2,
sizeof(zval *), NULL);
@@ -1180,7 +1181,7 @@
ldap_linkdata *ld;
ldap_resultentry *resultentry;
char *attribute;
-   char **ldap_value;
+   struct berval **ldap_value;
int i, num_values, num_attrib;
BerElement *ber;

@@ -1196,16 +1197,16 @@

attribute = ldap_first_attribute(ld->link, resultentry->data,
&ber);
while (attribute != NULL) {
-   ldap_value = ldap_get_values(ld->link,
resultentry->data, attribute);
-   num_values = ldap_count_values(ldap_value);
+   ldap_value = ldap_get_values_len(ld->link,
resultentry->data, attribute);
+   num_values = ldap_count_values_len(ldap_value);

MAKE_STD_ZVAL(tmp);
array_init(tmp);
add_assoc_long(tmp, "count", num_values);
for (i = 0; i < num_values; i++) {
-   add_index_string(tmp, i, ldap_value[i], 1);
+   add_index_stringl(tmp, i,
ldap_value[i]->bv_val, ldap_value[i]->bv_len, 1);
}
-   ldap_value_free(ldap_value);
+   ldap_value_free_len(ldap_value);

zend_hash_update(Z_ARRVAL_P(return_value), attribute,
strlen(attribute)+1, (void *) &tmp, sizeof(zval *), NULL);
add_index_string(return_value, num_attrib, attribute,
1);
@@ -1226,46 +1227,6 @@
 }
 /* }}} */

-/* {{{ proto array ldap_get_values(reso

#40740 [Opn]: PDO::execute() errors when parameters are used in LIMIT clause

2007-03-23 Thread vrana
 ID:   40740
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at filofox dot com
 Status:   Open
-Bug Type: Documentation problem
+Bug Type: PDO related
 Operating System: Linux Debian Sarge 3.1
 PHP Version:  5.2.1
 New Comment:

Emulation is wrong if it doesn't work. Numbers after LIMIT should not
be quoted.


Previous Comments:


[2007-03-07 09:54:18] [EMAIL PROTECTED]

Use PDO::ATTR_EMULATE_PREPARES = false to turn off emulation of
prepared statements.
PDO_MYSQL uses it by default because native prepared statements in
MySQL are quite limited - you can't use SHOW statements, for example.

The documentation should mention it, though.
Reclassified as docu problem.



[2007-03-06 17:13:44] phpbugs at filofox dot com

Description:

The following emerged after upgrading from 5.2.0 to 5.2.1 and has been
checked in both versions: the error only occurs in 5.2.1 .

When passing parameters into a LIMIT clause using PDO::execute(), it
appears that PDO is quoting the parameters, which causes MYSQL to throw
an error. 

FYI: PDO_MYSQL is built against MySQL client library 5.0.18.

Reproduce code:
---
$dbh = new PDO('mysql:localhost;dbname=my_db', 'user', '' );
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

try{

$query = $dbh->prepare( 'SELECT * FROM some_table LIMIT :start,
:limit' );

if  ( $query->execute ( array ( 'start' => 0, 'limit' => 10 ) ) )
{
while ( $row = $query->fetch ( PDO::FETCH_ASSOC ) )
{
print_r($row);
}
$query->closeCursor();
}

} catch( Exception $e ){
print_r( $e );
}


Expected result:

A number of rows are returned.

Actual result:
--
An exception is thrown:

PDOException Object
(
[message:protected] => SQLSTATE[42000]: Syntax error or access
violation: 1064 You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near ''0', '10'' at line 1
[string:private] => 
[code:protected] => 42000
[file:protected] => [my_file].php
[line:protected] => 19
[trace:private] => Array
(
[0] => Array
(
[file] => [my_file].php
[line] => 19
[function] => execute
[class] => PDOStatement
[type] => ->
[args] => Array
(
[0] => Array
(
[start] => 0
[limit] => 10
)

)

)

)

[errorInfo] => Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ''0', '10'' at line 1
)

)





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


#40556 [Fbk->Opn]: Browser abort causes server hang with FastCGI

2007-03-23 Thread unreal at slashorg dot net
 ID:   40556
 User updated by:  unreal at slashorg dot net
 Reported By:  unreal at slashorg dot net
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Linux 2.6.18
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

Here's a backtrace, tell me if this helps you:

(gdb) attach 1774
Attaching to process 1774.
Reading symbols for shared libraries . done
Reading symbols for shared libraries  done
0x900101b7 in write ()
(gdb) backtrace
#0  0x900101b7 in write ()
#1  0x004007c4 in safe_write (req=0x0, buf=0xbeb4, count=0) at
/home/unreal/compile/php-5.2.1/sapi/cgi/fastcgi.c:351
#2  0x2095 in start ()
(gdb)


Previous Comments:


[2007-03-23 10:11:57] [EMAIL PROTECTED]

>I guess I have to recompile php with debug support?
Yes, rebuild with --enable-debug is required.
- start PHP/FastCGI with just one process (-processes 1) 
- figure out pid of PHP (ps afx | grep php or see Apache error_log)
- start gdb (just type gdb and enter), then type "attach ",
this way you'll attach to already running PHP process.
- type "continue" for the process to continue running.
- after that reproduce the problem and see if the process stops.
- if it does, type "backtrace" and paste the output here.
- if it doesn't we'll continue in the next post.

You can also create an account on the server, I'll try to reproduce it
myself. 



[2007-03-06 13:27:53] unreal at slashorg dot net

Hello,

I haven't really used gdb before, I obtain a backtrace? I guess I have
to recompile php with debug support?

Thanks.



[2007-03-02 10:14:47] [EMAIL PROTECTED]

I am still not able to reproduce the problem.
Could you please attach debugger to stuck php process and show its
backtrace.



[2007-02-22 12:01:19] unreal at slashorg dot net

OK, I've done quite a lot more testing, and here are the results
(Apache 2.0.59/mod_fastcgi 2.4.2/PHP 5.2.1):

- I cannot reproduce the bug with your code either.

- The following code causes PHP workers to lock up if you abort during
download (and only if you abort):

 http://www.slashorg.net/ex/crash.txt

Note: notice the "session_start();" line

- If I remove the "session_start();" line, PHP doesn't crash anymore,
even when I abort the download.


It seems this bug is more complicated than I thought, I hope you'll be
able to reproduce it.

Thanks for your help.



[2007-02-21 15:18:30] [EMAIL PROTECTED]

I am not able to reproduce the problem.

I tried to abort downloading from IE and download part of file running
the following PHP script from command line:

http://127.0.0.1/test/bug40556.php";, "r");
$s = fread($f, 1024*1024);
var_dump($s);
fclose($f);
?>

both cases work fine (Apache-1.3.28 with mod_fastcgi or ZendEnabler on
Linux 2.6.19)





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

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


#40899 [Asn->Csd]: memory leak when nesting list()

2007-03-23 Thread dmitry
 ID:   40899
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cweiske at cweiske dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

Fixed in CVS HEAD and PHP_5_2.


Previous Comments:


[2007-03-23 07:31:07] cweiske at cweiske dot de

Description:

I get memory leaks when nesting list() statements to assign array
variables to local variables. I get no leaks if list() is not nested.

Reproduce code:
---
php -a
Interactive shell

php > list(list($a,$b),$c)=array(array('a','b'),'c');
php > quit



Expected result:

Nothing.

Actual result:
--
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3533)
:  Freeing 0x08923060 (16 bytes), script=-
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(6308)
:  Freeing 0x0892323C (16 bytes), script=-
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3578)
:  Freeing 0x08923620 (44 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_API.c(819)
: Actual location (location was relayed)
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_variables.h(45)
:  Freeing 0x089236C4 (2 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_variables.c(120)
: Actual location (location was relayed)
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3564)
:  Freeing 0x089236F4 (35 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_hash.c(388)
: Actual location (location was relayed)
Last leak repeated 1 time
=== Total 9 memory leaks detected ===





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


#40858 [Asn]: Thread safety issue in GD

2007-03-23 Thread scottmacvicar at ntlworld dot com
 ID:   40858
 User updated by:  scottmacvicar at ntlworld dot com
 Reported By:  scottmacvicar at ntlworld dot com
 Status:   Assigned
 Bug Type: GD related
 Operating System: RHEL 4
 PHP Version:  5.2.1
 Assigned To:  pajoye
 New Comment:

I don't have access to a Windows machine at the moment but the
following patch should fix the issues in libGD, I'll try and do a test
when I have access to the machine.

PHP 5.2 Patch: http://public.vbulletin.com/bugs/php/gd-mutex-patch.txt
libGD Patch:
http://public.vbulletin.com/bugs/php/libgd-mutex-patch.txt

Explanation:
* pthread now initialises the mutex only once
* win32 can set the mutex within DLLMain
* Race condition fix by locking prior to checking font cache

Problems not fixed:
* calling gdFontCacheSetup before obtaining a lock is going to cause
the race condition still, I know the ruby wrappers do this.
* Unusure about behaviour of using the non bundled GD library on
windows with PHP since DLLMain and gdFontCacheMutexSetup may setup the
critical section twice. Could make gdMutexSetup(x) a no-op for win32
too.


Previous Comments:


[2007-03-23 01:21:26] [EMAIL PROTECTED]

Hi Scott, Nuno,

"Regarding the patch to the bundled GD library and the php wrapper,
does it look reasonable? We've been running it for the past 2 days now
without issue on a production server. I'd rather see something put
into
5.2.2 "

Yes, the patch for php (and unix) looks good. I will apply it during
the weekend as well (or Nuno, you can do it if you have the time
before).

For the windows version, that's a good news, thanks to take the time to
work on it.



[2007-03-23 00:31:35] scottmacvicar at ntlworld dot com

I have some time to spare over the weekend and a copy of VC6 installed
now so I'll have a go at the win32 implementation.

Regarding the patch to the bundled GD library and the php wrapper, does
it look reasonable? We've been running it for the past 2 days now
without issue on a production server. I'd rather see something put into
5.2.2 and then fix libGD.



[2007-03-22 23:15:13] [EMAIL PROTECTED]

yep, having a statically declared mutex would fix the problems we are
having. I've a patch identical to yours
(http://mega.ist.utl.pt/~ncpl/libgd_mutexes.txt) for a while, but we are
still waiting for a win32 implementation to merge the patches (there is
another open bug report in the gd bugs db about a similar issue) to
definitely fix those nasty TS issues.



[2007-03-21 01:37:18] scottmacvicar at ntlworld dot com

Patch is available at
http://public.vbulletin.com/bugs/php/gd-mutex-patch.txt

Quick explanation:
* The mutex is created at module startup and destroyed at module
shutdown courtesy of two new helper functions within the libGD code
base.
* The mutex is no longer destroyed at request shutdown.
* Locking is performed prior to checking fontCache to prevent the race
condition we're seeing.

This can't be merged back into libGD at the moment since it breaks
backwards compatibility by assuming a mutex has been allocated, the way
to fix this for pthread is fairly easy.

#define gdMutexDeclare(x) pthread_mutex_t x
#define gdMutexDeclare(x) pthread_mutex_t x
becomes
#define gdMutexDeclare(x) static pthread_mutex_t x =
PTHREAD_MUTEX_INITIALIZER
#define gdMutexSetup(x)

That would just leave the win32 implementation to deal with via
DLLMain, a quick patch to add that would only take a few minutes though
I don't have VC6 installed yet.



[2007-03-21 00:48:56] [EMAIL PROTECTED]

"Moving the code to PHP_MINIT fixes the problem for PHP but the
threading options of GD doesn't extend itself to this setup since the
function to create the mutex can be called more than once in a short
period of time."

Do you mean for libGD itself used a library in a random project? If
yes, a solution is very similar to this one. We have to do it at load
time (like DLLMain on windows). Many other libraries (and many related
to FT2, with ft2 cache or their own) rely on this solution. We can give
it a try, at least.

"I've got a patch that implements the PHP solution running on our
boxes, I can provide it if interested."

You can always post it, I still did not get the time to do it, so any
help is welcome.



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

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


#40900 [Bgs]: differed in formating in php5.0.2 with php5.2.0

2007-03-23 Thread p dot sivamurugan at gmail dot com
 ID:   40900
 User updated by:  p dot sivamurugan at gmail dot com
 Reported By:  p dot sivamurugan at gmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.1
 New Comment:

then how can i retrive the expected answer 98 from the  code 
echo $vLTVformated  =  "".number_format(0.98000,2,'','');
 in PHP5.2.0


Previous Comments:


[2007-03-23 10:58:05] [EMAIL PROTECTED]

The current behaviour is correct.



[2007-03-23 10:25:32] p dot sivamurugan at gmail dot com

Description:

php5.0.2
php5.2.0

differed in formating 


Reproduce code:
---
echo $vLTVformated  =  "".number_format(0.98000,2,'','');



Expected result:

php5.0.2 = 98
php5.2.0 = 98


Actual result:
--
php5.0.2 = 98
php5.2.0 = 098









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


#40904 [Opn->Fbk]: invalid request BLR at offset 169 Implementation

2007-03-23 Thread tony2001
 ID:   40904
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a_kassasys at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: InterBase related
 Operating System: Free BSF
 PHP Version:  5.2.1
 New Comment:

>the server will crash
The Interbase server?


Previous Comments:


[2007-03-23 11:15:02] a_kassasys at yahoo dot com

Description:

Similar on overflow of the buffer as at 1 inquiry, the server will
crash, in other case gives out that a block size limit 

Reproduce code:
---
Warning: ibase_fetch_row() [function.ibase-fetch-row]: Error reading
data from the connection. in /home/denis/user/0.php on line 51

Warning: Unknown: Unable to complete network request to host
"192.168.0.20". Error writing data to the connection. Broken pipe in
Unknown on line 0

Warning: Unknown: Unable to complete network request to host
"192.168.0.20". Error writing data to the connection. Broken pipe in
Unknown on line 0


Expected result:

Warning: ibase_query() [function.ibase-query]: 
invalid request BLR at offset 169 Implementation limit exceeded block
size exceeds implementation restriction 

Actual result:
--
$sql="select PR.ID as F0
, PB.ID as F1
, cast(trimx(skui(strlen((select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT', 'NAME', PR.ID))), (select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT', 'NAME', PR.ID)), PR.NAME))||' '||trimx(PB.NAME) as
VARCHAR(32000)) as F2
, PR.SEARCHCODE as F8
, cast(trimx(skui(strlen((select TEXTB from GET_LANGUAGE_TEXT2('ET',
'PRODUCT', 'ADDITIONAL', PR.ID))), (select TEXTB from
GET_LANGUAGE_TEXT2('ET', 'PRODUCT', 'ADDITIONAL', PR.ID)),
PR.ADDITIONAL)) as VARCHAR(32000)) as F3
, PR.PACKAGE as F7
, PR.PICTUREDATAEXT as F6
, skui(strlen((select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT_MEASUREMENT_UNIT', 'NAME', PR.MEASURUNIT_ID))),
 (select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT_MEASUREMENT_UNIT', 'NAME', PR.MEASURUNIT_ID)), PMU.NAME) as F4
, (select PG.POST from PRODUCT_GROUP PG where PG.ID=PR.GROUP_ID) as F9
, (select sum(PQ.FREEQUANTITY) from PRODUCT_QUANTITY PQ where
((PQ.PRODUCT_ID=PR.ID)  and (PQ.BACH_ID=PB.ID) and
(PQ.OBJECT_ID=PG.OBJECT_ID)))-rnull(PG.MINLIMIT) as F10
, rnull(0) as F11
, PR.PICTUREDATA as F15
, (select CTP.NAMEET from CUSTOM_PROD_TYPE CTP where CTP.ID=PR.A8) as
F60
, (select MAX(FILENAME) from ATTACHMENT where
(((TABLENAME='PRODUCT_BACH') and (TABLEITEM_ID=PB.ID))or
((TABLENAME='PRODUCT') and (TABLEITEM_ID=PR.ID))) and
(TRIMX(UPPER(FILENAME)) like '%.PDF' )) as F24
, PR.A7 as F51
, PR.A10 as F54
, PR.A11 as F55
, PR.A12 as F56
, PR.A13 as F57
, PR.A14 as F58
, PR.A9 as F53
/*, PR.CUSTOM_DESCRIPTION as A53*/
 from PRODUCT_BACH PB
left join PRODUCT PR on (PR.ID=PB.PRODUCT_ID)
left join PRODUCT_MEASUREMENT_UNIT PMU on (PMU.ID=PR.MEASURUNIT_ID)

left join PRODUCT_GROUP PG on (PG.ID=PR.GROUP_ID) 

where ((PB.ID=7053) and (PR.ID=4517))";

$sth1=ibase_query($dbh, $sql);
while ($res = ibase_fetch_row($sth1)) {
  print $res[0].'!';
  }







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


#40901 [Opn->Asn]: mssql_execute errror

2007-03-23 Thread tony2001
 ID:   40901
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lh at moranti dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MSSQL related
 Operating System: ubuntu
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  fmk


Previous Comments:


[2007-03-23 11:20:07] lh at moranti dot com

Sorry the code schould look like this





[2007-03-23 11:15:14] lh at moranti dot com

The storedprocedure looks like this:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE PROCEDURE [dbo].[test]
(
   @sval int
) AS
return @sval+10


And the php code looks like this



is fails in this line "$query  = mssql_execute($sp) or die("oops");"



[2007-03-23 10:56:53] [EMAIL PROTECTED]

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.





[2007-03-23 10:29:27] lh at moranti dot com

Description:

I have a problem executing a stored procedure. 
It fails on my ubuntu installation with php 5.2.1 but when i run it
with php 5.1.6 no problem.

Reproduce code:
---
mssql_select_db("dbname", $conn);
$sp = mssql_init("procedurename", $conn); // stored proc name
$compId=1000;
$SessionId = substr(session_id(),0,8);

mssql_bind($sp, "@CompID",$compId,SQLVARCHAR);
mssql_bind($sp, "@SessionID",$SessionId,SQLVARCHAR);
mssql_bind($sp, "@BasketAmount",$BasketAmount,SQLVARCHAR,TRUE);
mssql_bind($sp, "@BasketTotalItem",$BasketTotalItem,SQLVARCHAR,TRUE);
$query  = mssql_execute($sp) or die("could not perform insert");

Actual result:
--
Warning: mssql_execute() [function.mssql-execute]: stored procedure
execution failed in /home/www/sitename/test_init.php on line 14





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


#40901 [Opn]: mssql_execute errror

2007-03-23 Thread lh at moranti dot com
 ID:   40901
 User updated by:  lh at moranti dot com
 Reported By:  lh at moranti dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: ubuntu
 PHP Version:  5.2.1
 New Comment:

Sorry the code schould look like this




Previous Comments:


[2007-03-23 11:15:14] lh at moranti dot com

The storedprocedure looks like this:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE PROCEDURE [dbo].[test]
(
   @sval int
) AS
return @sval+10


And the php code looks like this



is fails in this line "$query  = mssql_execute($sp) or die("oops");"



[2007-03-23 10:56:53] [EMAIL PROTECTED]

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.





[2007-03-23 10:29:27] lh at moranti dot com

Description:

I have a problem executing a stored procedure. 
It fails on my ubuntu installation with php 5.2.1 but when i run it
with php 5.1.6 no problem.

Reproduce code:
---
mssql_select_db("dbname", $conn);
$sp = mssql_init("procedurename", $conn); // stored proc name
$compId=1000;
$SessionId = substr(session_id(),0,8);

mssql_bind($sp, "@CompID",$compId,SQLVARCHAR);
mssql_bind($sp, "@SessionID",$SessionId,SQLVARCHAR);
mssql_bind($sp, "@BasketAmount",$BasketAmount,SQLVARCHAR,TRUE);
mssql_bind($sp, "@BasketTotalItem",$BasketTotalItem,SQLVARCHAR,TRUE);
$query  = mssql_execute($sp) or die("could not perform insert");

Actual result:
--
Warning: mssql_execute() [function.mssql-execute]: stored procedure
execution failed in /home/www/sitename/test_init.php on line 14





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


#40901 [Fbk->Opn]: mssql_execute errror

2007-03-23 Thread lh at moranti dot com
 ID:   40901
 User updated by:  lh at moranti dot com
 Reported By:  lh at moranti dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MSSQL related
 Operating System: ubuntu
 PHP Version:  5.2.1
 New Comment:

The storedprocedure looks like this:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
CREATE PROCEDURE [dbo].[test]
(
   @sval int
) AS
return @sval+10


And the php code looks like this



is fails in this line "$query  = mssql_execute($sp) or die("oops");"


Previous Comments:


[2007-03-23 10:56:53] [EMAIL PROTECTED]

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.





[2007-03-23 10:29:27] lh at moranti dot com

Description:

I have a problem executing a stored procedure. 
It fails on my ubuntu installation with php 5.2.1 but when i run it
with php 5.1.6 no problem.

Reproduce code:
---
mssql_select_db("dbname", $conn);
$sp = mssql_init("procedurename", $conn); // stored proc name
$compId=1000;
$SessionId = substr(session_id(),0,8);

mssql_bind($sp, "@CompID",$compId,SQLVARCHAR);
mssql_bind($sp, "@SessionID",$SessionId,SQLVARCHAR);
mssql_bind($sp, "@BasketAmount",$BasketAmount,SQLVARCHAR,TRUE);
mssql_bind($sp, "@BasketTotalItem",$BasketTotalItem,SQLVARCHAR,TRUE);
$query  = mssql_execute($sp) or die("could not perform insert");

Actual result:
--
Warning: mssql_execute() [function.mssql-execute]: stored procedure
execution failed in /home/www/sitename/test_init.php on line 14





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


#40904 [NEW]: invalid request BLR at offset 169 Implementation

2007-03-23 Thread a_kassasys at yahoo dot com
From: a_kassasys at yahoo dot com
Operating system: Free BSF
PHP version:  5.2.1
PHP Bug Type: InterBase related
Bug description:  invalid request BLR at offset 169 Implementation

Description:

Similar on overflow of the buffer as at 1 inquiry, the server will crash,
in other case gives out that a block size limit 

Reproduce code:
---
Warning: ibase_fetch_row() [function.ibase-fetch-row]: Error reading data
from the connection. in /home/denis/user/0.php on line 51

Warning: Unknown: Unable to complete network request to host
"192.168.0.20". Error writing data to the connection. Broken pipe in
Unknown on line 0

Warning: Unknown: Unable to complete network request to host
"192.168.0.20". Error writing data to the connection. Broken pipe in
Unknown on line 0


Expected result:

Warning: ibase_query() [function.ibase-query]: 
invalid request BLR at offset 169 Implementation limit exceeded block size
exceeds implementation restriction 

Actual result:
--
$sql="select PR.ID as F0
, PB.ID as F1
, cast(trimx(skui(strlen((select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT', 'NAME', PR.ID))), (select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT', 'NAME', PR.ID)), PR.NAME))||' '||trimx(PB.NAME) as
VARCHAR(32000)) as F2
, PR.SEARCHCODE as F8
, cast(trimx(skui(strlen((select TEXTB from GET_LANGUAGE_TEXT2('ET',
'PRODUCT', 'ADDITIONAL', PR.ID))), (select TEXTB from
GET_LANGUAGE_TEXT2('ET', 'PRODUCT', 'ADDITIONAL', PR.ID)), PR.ADDITIONAL))
as VARCHAR(32000)) as F3
, PR.PACKAGE as F7
, PR.PICTUREDATAEXT as F6
, skui(strlen((select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT_MEASUREMENT_UNIT', 'NAME', PR.MEASURUNIT_ID))),
 (select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT_MEASUREMENT_UNIT', 'NAME', PR.MEASURUNIT_ID)), PMU.NAME) as F4
, (select PG.POST from PRODUCT_GROUP PG where PG.ID=PR.GROUP_ID) as F9
, (select sum(PQ.FREEQUANTITY) from PRODUCT_QUANTITY PQ where
((PQ.PRODUCT_ID=PR.ID)  and (PQ.BACH_ID=PB.ID) and
(PQ.OBJECT_ID=PG.OBJECT_ID)))-rnull(PG.MINLIMIT) as F10
, rnull(0) as F11
, PR.PICTUREDATA as F15
, (select CTP.NAMEET from CUSTOM_PROD_TYPE CTP where CTP.ID=PR.A8) as F60
, (select MAX(FILENAME) from ATTACHMENT where (((TABLENAME='PRODUCT_BACH')
and (TABLEITEM_ID=PB.ID))or ((TABLENAME='PRODUCT') and
(TABLEITEM_ID=PR.ID))) and (TRIMX(UPPER(FILENAME)) like '%.PDF' )) as F24
, PR.A7 as F51
, PR.A10 as F54
, PR.A11 as F55
, PR.A12 as F56
, PR.A13 as F57
, PR.A14 as F58
, PR.A9 as F53
/*, PR.CUSTOM_DESCRIPTION as A53*/
 from PRODUCT_BACH PB
left join PRODUCT PR on (PR.ID=PB.PRODUCT_ID)
left join PRODUCT_MEASUREMENT_UNIT PMU on (PMU.ID=PR.MEASURUNIT_ID) 
left join PRODUCT_GROUP PG on (PG.ID=PR.GROUP_ID) 

where ((PB.ID=7053) and (PR.ID=4517))";

$sth1=ibase_query($dbh, $sql);
while ($res = ibase_fetch_row($sth1)) {
  print $res[0].'!';
  }



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


#40579 [Opn->Fbk]: $_SERVER['SERVER_PORT'] is invalid during apache redirect

2007-03-23 Thread tony2001
 ID:   40579
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ruslan dot kyrychuk at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *Web Server problem
 Operating System: Windows 2003
 PHP Version:  5.2.1
 New Comment:

Works just fine here.

["SERVER_PORT"]=> string(4) "8887"
["SCRIPT_NAME"]=> string(11) "/index.html" 


Previous Comments:


[2007-03-23 10:58:01] ruslan dot kyrychuk at gmail dot com

Reproduce code:
---
1. Configure Apache to use port 8080
2. Create .htaccess file:
Options +FollowSymLinks -Indexes
RewriteEngine on 

RewriteCond %{REQUEST_FILENAME}  (.+)\.html
RewriteRule ^(.+)$ test.php [QSA,L]
3. Create test.php file

Run http://localhost:8080/test.html
Output: 80
Run http://localhost:8080/test.php
Output: 8080



[2007-03-01 01:00:01] php-bugs at lists dot php dot net

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



[2007-02-21 14:47:25] [EMAIL PROTECTED]

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.





[2007-02-21 14:37:51] ruslan dot kyrychuk at gmail dot com

Description:

With apache redirects (mode_rewrite) then in $_SERVER['SERVER_PORT'] is
always 80, even if Apache server is working on another port.

Reproduce code:
---
While apache redirect with following rewrite rule
RewriteRule ^(.+)$ index.php [QSA,L]
Then $_SERVER['SERVER_PORT'] is "80"
---
P.S. While 

RewriteRule ^(.+)$ index.php [E=PORT:%{SERVER_PORT},QSA,L]

then $_SERVER['REDIRECT_PORT'] is "8080"
So it looks like redirected value is sending correctly but doesn't save
correctly into $_SERVER array.

Expected result:

RewriteRule ^(.+)$ index.php [QSA,L]
During redirecting 
$_SERVER['SERVER_PORT'] must be correct port.

Actual result:
--
$_SERVER['SERVER_PORT'] is always "80" during apache redirect.





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


#40902 [Opn->Bgs]: PHP installation problems

2007-03-23 Thread tony2001
 ID:   40902
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xoriant at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: SunOS 5.10 Generic_118833-17 sun
 PHP Version:  5.2.1
 New Comment:

>do I need to uninstall it or can I delete the files and folders which
have old libxml? 
Can you delete a part of your system? I don't know if any other
components depend on it, so you better ask on some Solaris support
forum.


Previous Comments:


[2007-03-23 11:05:26] xoriant at yahoo dot com

Thanks a lot for your quick reply.
Yes I noticed that too... but I removed references of old libxml, i
mean i just renamed it... do I need to uninstall it or can I delete the
files and folders which have old libxml? Sorry for asking dumb
question..



[2007-03-23 11:01:27] [EMAIL PROTECTED]

You have two different libxml2 installed, see:
http://www.opensubscriber.com/message/php-install@lists.php.net/5943507.html



[2007-03-23 10:49:45] xoriant at yahoo dot com

Description:

I know these kind of bugs reported before.. but i am still stuck with
it and unable to move ahead. Trying to install PHP5 on Solaris10.
Installed related packages, apache, libxml2, etc. See the details
below.

Pre PHP installation steps i followed:

Box using:
SunOS 5.10 Generic_118833-17 sun4u sparc SUNW,Ultra-80:

gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with:
/gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)



LD_LIBRARY_PATH=/usr/local/lib:/usr/openwin/lib/X11:/usr/openwin/lib:/usr/local:/usr/bin/perl:/usr/lib:/oracle/product/10.2/lib:/usr/dt/lib
PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/ucb:/usr/dt/bin:/svn/bin

installed 
libtool-1.5
neon-0.25.5

open ssl failed to make using above path!

PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/usr/dt/bin:/svn/bin:/home/sjadhav/bin:/oracle/product/10.2/bin:/usr/local/bin

openssl-0.9.8e
CC="gcc" ./config --prefix=/www/apache2/openssl
--openssldir=/www/apache2/openssl
 ./make
 ./make install


httpd-2.2.4.tar

CC="gcc" ./configure \
--prefix=/www/apache2 \
--enable-dav \
--enable-dav-fs \
--enable-dav-lock \
--enable-deflate \
--enable-rewrite \
--enable-so=so \
--enable-speling \
--enable-ssl \
--with-ssl=/www/apache2/openssl \
--enable-info \
--enable-cgi \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-mime-magic

I have not done SSL CERT part yet (certificates) so only apache works
but not with https.

libxml2-2.6.26
 ./configure
 ./make
 ./make install

but xml2-config --version gives
2.6.10
then I removed all old 2.6.10 references from path.

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install





Actual result:
--
Installing PEAR environment:  /www/apache2/php/lib/php/
ld.so.1: php: fatal: relocation error: file
/source/php-5.2.1/sapi/cli/php: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found
*** Error code 137
The following command caused the error:
/source/php-5.2.1/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0
-dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1
-ddetect_unicode=0 pear/install-pear-nozlib.phar -d
"/www/apache2/php/lib/php" -b "/www/apache2/php/bin"
make: Fatal error: Command failed for target `install-pear-installer'
Current working directory /source/php-5.2.1
*** Error code 1
The following command caused the error:
if test -f pear/install-pear-nozlib.phar &&
/source/php-5.2.1/build/shtool mkdir -p /www/apache2/php/lib/php; then
\
make -s install-pear-installer; \
else \
cat /source/php-5.2.1/pear/install-pear.txt; \
fi
make: Fatal error: Command failed for target `install-pear'

then I tried without pear:
-

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install

./apachectl -k start
httpd: Syntax error on line 53 of /www/apache2/conf/httpd.conf: Cannot
load /www/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal:
relocation error: file /w

#40902 [Bgs->Opn]: PHP installation problems

2007-03-23 Thread xoriant at yahoo dot com
 ID:   40902
 User updated by:  xoriant at yahoo dot com
 Reported By:  xoriant at yahoo dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Apache2 related
 Operating System: SunOS 5.10 Generic_118833-17 sun
 PHP Version:  5.2.1
 New Comment:

Thanks a lot for your quick reply.
Yes I noticed that too... but I removed references of old libxml, i
mean i just renamed it... do I need to uninstall it or can I delete the
files and folders which have old libxml? Sorry for asking dumb
question..


Previous Comments:


[2007-03-23 11:01:27] [EMAIL PROTECTED]

You have two different libxml2 installed, see:
http://www.opensubscriber.com/message/php-install@lists.php.net/5943507.html



[2007-03-23 10:49:45] xoriant at yahoo dot com

Description:

I know these kind of bugs reported before.. but i am still stuck with
it and unable to move ahead. Trying to install PHP5 on Solaris10.
Installed related packages, apache, libxml2, etc. See the details
below.

Pre PHP installation steps i followed:

Box using:
SunOS 5.10 Generic_118833-17 sun4u sparc SUNW,Ultra-80:

gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with:
/gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)



LD_LIBRARY_PATH=/usr/local/lib:/usr/openwin/lib/X11:/usr/openwin/lib:/usr/local:/usr/bin/perl:/usr/lib:/oracle/product/10.2/lib:/usr/dt/lib
PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/ucb:/usr/dt/bin:/svn/bin

installed 
libtool-1.5
neon-0.25.5

open ssl failed to make using above path!

PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/usr/dt/bin:/svn/bin:/home/sjadhav/bin:/oracle/product/10.2/bin:/usr/local/bin

openssl-0.9.8e
CC="gcc" ./config --prefix=/www/apache2/openssl
--openssldir=/www/apache2/openssl
 ./make
 ./make install


httpd-2.2.4.tar

CC="gcc" ./configure \
--prefix=/www/apache2 \
--enable-dav \
--enable-dav-fs \
--enable-dav-lock \
--enable-deflate \
--enable-rewrite \
--enable-so=so \
--enable-speling \
--enable-ssl \
--with-ssl=/www/apache2/openssl \
--enable-info \
--enable-cgi \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-mime-magic

I have not done SSL CERT part yet (certificates) so only apache works
but not with https.

libxml2-2.6.26
 ./configure
 ./make
 ./make install

but xml2-config --version gives
2.6.10
then I removed all old 2.6.10 references from path.

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install





Actual result:
--
Installing PEAR environment:  /www/apache2/php/lib/php/
ld.so.1: php: fatal: relocation error: file
/source/php-5.2.1/sapi/cli/php: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found
*** Error code 137
The following command caused the error:
/source/php-5.2.1/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0
-dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1
-ddetect_unicode=0 pear/install-pear-nozlib.phar -d
"/www/apache2/php/lib/php" -b "/www/apache2/php/bin"
make: Fatal error: Command failed for target `install-pear-installer'
Current working directory /source/php-5.2.1
*** Error code 1
The following command caused the error:
if test -f pear/install-pear-nozlib.phar &&
/source/php-5.2.1/build/shtool mkdir -p /www/apache2/php/lib/php; then
\
make -s install-pear-installer; \
else \
cat /source/php-5.2.1/pear/install-pear.txt; \
fi
make: Fatal error: Command failed for target `install-pear'

then I tried without pear:
-

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install

./apachectl -k start
httpd: Syntax error on line 53 of /www/apache2/conf/httpd.conf: Cannot
load /www/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal:
relocation error: file /www/apache2/modules/libphp5.so: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found

I am not an expert but I tried with other options as well, but getting
the same error. Definitely I must be missing something..
Your help/solution is highly appreciated!





--

#40902 [Opn->Bgs]: PHP installation problems

2007-03-23 Thread tony2001
 ID:   40902
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xoriant at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: SunOS 5.10 Generic_118833-17 sun
 PHP Version:  5.2.1
 New Comment:

You have two different libxml2 installed, see:
http://www.opensubscriber.com/message/php-install@lists.php.net/5943507.html


Previous Comments:


[2007-03-23 10:49:45] xoriant at yahoo dot com

Description:

I know these kind of bugs reported before.. but i am still stuck with
it and unable to move ahead. Trying to install PHP5 on Solaris10.
Installed related packages, apache, libxml2, etc. See the details
below.

Pre PHP installation steps i followed:

Box using:
SunOS 5.10 Generic_118833-17 sun4u sparc SUNW,Ultra-80:

gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with:
/gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)



LD_LIBRARY_PATH=/usr/local/lib:/usr/openwin/lib/X11:/usr/openwin/lib:/usr/local:/usr/bin/perl:/usr/lib:/oracle/product/10.2/lib:/usr/dt/lib
PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/ucb:/usr/dt/bin:/svn/bin

installed 
libtool-1.5
neon-0.25.5

open ssl failed to make using above path!

PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/usr/dt/bin:/svn/bin:/home/sjadhav/bin:/oracle/product/10.2/bin:/usr/local/bin

openssl-0.9.8e
CC="gcc" ./config --prefix=/www/apache2/openssl
--openssldir=/www/apache2/openssl
 ./make
 ./make install


httpd-2.2.4.tar

CC="gcc" ./configure \
--prefix=/www/apache2 \
--enable-dav \
--enable-dav-fs \
--enable-dav-lock \
--enable-deflate \
--enable-rewrite \
--enable-so=so \
--enable-speling \
--enable-ssl \
--with-ssl=/www/apache2/openssl \
--enable-info \
--enable-cgi \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-mime-magic

I have not done SSL CERT part yet (certificates) so only apache works
but not with https.

libxml2-2.6.26
 ./configure
 ./make
 ./make install

but xml2-config --version gives
2.6.10
then I removed all old 2.6.10 references from path.

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install





Actual result:
--
Installing PEAR environment:  /www/apache2/php/lib/php/
ld.so.1: php: fatal: relocation error: file
/source/php-5.2.1/sapi/cli/php: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found
*** Error code 137
The following command caused the error:
/source/php-5.2.1/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0
-dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1
-ddetect_unicode=0 pear/install-pear-nozlib.phar -d
"/www/apache2/php/lib/php" -b "/www/apache2/php/bin"
make: Fatal error: Command failed for target `install-pear-installer'
Current working directory /source/php-5.2.1
*** Error code 1
The following command caused the error:
if test -f pear/install-pear-nozlib.phar &&
/source/php-5.2.1/build/shtool mkdir -p /www/apache2/php/lib/php; then
\
make -s install-pear-installer; \
else \
cat /source/php-5.2.1/pear/install-pear.txt; \
fi
make: Fatal error: Command failed for target `install-pear'

then I tried without pear:
-

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install

./apachectl -k start
httpd: Syntax error on line 53 of /www/apache2/conf/httpd.conf: Cannot
load /www/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal:
relocation error: file /www/apache2/modules/libphp5.so: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found

I am not an expert but I tried with other options as well, but getting
the same error. Definitely I must be missing something..
Your help/solution is highly appreciated!








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


#40900 [Opn->Bgs]: differed in formating in php5.0.2 with php5.2.0

2007-03-23 Thread tony2001
 ID:   40900
 Updated by:   [EMAIL PROTECTED]
 Reported By:  p dot sivamurugan at gmail dot com
-Status:   Open
+Status:   Bogus
-Bug Type: *General Issues
+Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.1
 New Comment:

The current behaviour is correct.


Previous Comments:


[2007-03-23 10:25:32] p dot sivamurugan at gmail dot com

Description:

php5.0.2
php5.2.0

differed in formating 


Reproduce code:
---
echo $vLTVformated  =  "".number_format(0.98000,2,'','');



Expected result:

php5.0.2 = 98
php5.2.0 = 98


Actual result:
--
php5.0.2 = 98
php5.2.0 = 098









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


#40579 [NoF->Opn]: $_SERVER['SERVER_PORT'] is invalid during apache redirect

2007-03-23 Thread ruslan dot kyrychuk at gmail dot com
 ID:   40579
 User updated by:  ruslan dot kyrychuk at gmail dot com
 Reported By:  ruslan dot kyrychuk at gmail dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: *Web Server problem
 Operating System: Windows 2003
 PHP Version:  5.2.1
 New Comment:

Reproduce code:
---
1. Configure Apache to use port 8080
2. Create .htaccess file:
Options +FollowSymLinks -Indexes
RewriteEngine on 

RewriteCond %{REQUEST_FILENAME}  (.+)\.html
RewriteRule ^(.+)$ test.php [QSA,L]
3. Create test.php file

Run http://localhost:8080/test.html
Output: 80
Run http://localhost:8080/test.php
Output: 8080


Previous Comments:


[2007-03-01 01:00:01] php-bugs at lists dot php dot net

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



[2007-02-21 14:47:25] [EMAIL PROTECTED]

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.





[2007-02-21 14:37:51] ruslan dot kyrychuk at gmail dot com

Description:

With apache redirects (mode_rewrite) then in $_SERVER['SERVER_PORT'] is
always 80, even if Apache server is working on another port.

Reproduce code:
---
While apache redirect with following rewrite rule
RewriteRule ^(.+)$ index.php [QSA,L]
Then $_SERVER['SERVER_PORT'] is "80"
---
P.S. While 

RewriteRule ^(.+)$ index.php [E=PORT:%{SERVER_PORT},QSA,L]

then $_SERVER['REDIRECT_PORT'] is "8080"
So it looks like redirected value is sending correctly but doesn't save
correctly into $_SERVER array.

Expected result:

RewriteRule ^(.+)$ index.php [QSA,L]
During redirecting 
$_SERVER['SERVER_PORT'] must be correct port.

Actual result:
--
$_SERVER['SERVER_PORT'] is always "80" during apache redirect.





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


#40901 [Opn->Fbk]: mssql_execute errror

2007-03-23 Thread tony2001
 ID:   40901
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lh at moranti dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: ubuntu
 PHP Version:  5.2.1
 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:


[2007-03-23 10:29:27] lh at moranti dot com

Description:

I have a problem executing a stored procedure. 
It fails on my ubuntu installation with php 5.2.1 but when i run it
with php 5.1.6 no problem.

Reproduce code:
---
mssql_select_db("dbname", $conn);
$sp = mssql_init("procedurename", $conn); // stored proc name
$compId=1000;
$SessionId = substr(session_id(),0,8);

mssql_bind($sp, "@CompID",$compId,SQLVARCHAR);
mssql_bind($sp, "@SessionID",$SessionId,SQLVARCHAR);
mssql_bind($sp, "@BasketAmount",$BasketAmount,SQLVARCHAR,TRUE);
mssql_bind($sp, "@BasketTotalItem",$BasketTotalItem,SQLVARCHAR,TRUE);
$query  = mssql_execute($sp) or die("could not perform insert");

Actual result:
--
Warning: mssql_execute() [function.mssql-execute]: stored procedure
execution failed in /home/www/sitename/test_init.php on line 14





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


#40903 [NEW]: Weird array sorting problems in Apache module

2007-03-23 Thread jan at horde dot org
From: jan at horde dot org
Operating system: Linux
PHP version:  4CVS-2007-03-23 (CVS)
PHP Bug Type: Arrays related
Bug description:  Weird array sorting problems in Apache module

Description:

This is a really weird edge case. See the unit test pasted below. If I run
this test on the command line, it works fine. But if run the same test
through the web server, the sorting simply doesn't happen. Apache is
version 2.2.0. Passing the array through mysort() by reference is
important, if I sort the array directly, everything is working fine.

Reproduce code:
---
--TEST--
uasort
--FILE--
 'Horde (horde)'),
array('sort' => 'E-Mail Mobil (mimp)'),
array('sort' => 'Webmail Dynamisch (dimp)'));

function mysort(&$array)
{
uasort($array, create_function('$a, $b', '$cmp =
strcoll(strtolower($a["sort"]), strtolower($b["sort"]));
var_dump($a["sort"], $b["sort"], $cmp); return $cmp;'));
}

mysort($array);

var_dump($array);

?>
--EXPECT--
string(19) "E-Mail Mobil (mimp)"
string(13) "Horde (horde)"
int(-1)
string(24) "Webmail Dynamisch (dimp)"
string(19) "E-Mail Mobil (mimp)"
int(1)
string(13) "Horde (horde)"
string(19) "E-Mail Mobil (mimp)"
int(1)
string(24) "Webmail Dynamisch (dimp)"
string(13) "Horde (horde)"
int(1)
array(3) {
  [1]=>
  array(1) {
["sort"]=>
string(19) "E-Mail Mobil (mimp)"
  }
  [0]=>
  array(1) {
["sort"]=>
string(13) "Horde (horde)"
  }
  [2]=>
  array(1) {
["sort"]=>
string(24) "Webmail Dynamisch (dimp)"
  }
}


Actual result:
--
Result if run through apache:

string(19) "E-Mail Mobil (mimp)"
string(13) "Horde (horde)"
int(-1)
string(24) "Webmail Dynamisch (dimp)"
string(19) "E-Mail Mobil (mimp)"
int(1)
string(13) "Horde (horde)"
string(19) "E-Mail Mobil (mimp)"
int(1)
string(24) "Webmail Dynamisch (dimp)"
string(13) "Horde (horde)"
int(1)
array(3) {
  [0]=>
  array(1) {
["sort"]=>
string(13) "Horde (horde)"
  }
  [1]=>
  array(1) {
["sort"]=>
string(19) "E-Mail Mobil (mimp)"
  }
  [2]=>
  array(1) {
["sort"]=>
string(24) "Webmail Dynamisch (dimp)"
  }
}


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


#40902 [NEW]: PHP installation problems

2007-03-23 Thread xoriant at yahoo dot com
From: xoriant at yahoo dot com
Operating system: SunOS 5.10 Generic_118833-17 sun
PHP version:  5.2.1
PHP Bug Type: Apache2 related
Bug description:  PHP installation problems

Description:

I know these kind of bugs reported before.. but i am still stuck with it
and unable to move ahead. Trying to install PHP5 on Solaris10.
Installed related packages, apache, libxml2, etc. See the details below.

Pre PHP installation steps i followed:

Box using:
SunOS 5.10 Generic_118833-17 sun4u sparc SUNW,Ultra-80:

gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with:
/gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)



LD_LIBRARY_PATH=/usr/local/lib:/usr/openwin/lib/X11:/usr/openwin/lib:/usr/local:/usr/bin/perl:/usr/lib:/oracle/product/10.2/lib:/usr/dt/lib
PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/ucb:/usr/dt/bin:/svn/bin

installed 
libtool-1.5
neon-0.25.5

open ssl failed to make using above path!

PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/usr/dt/bin:/svn/bin:/home/sjadhav/bin:/oracle/product/10.2/bin:/usr/local/bin

openssl-0.9.8e
CC="gcc" ./config --prefix=/www/apache2/openssl
--openssldir=/www/apache2/openssl
 ./make
 ./make install


httpd-2.2.4.tar

CC="gcc" ./configure \
--prefix=/www/apache2 \
--enable-dav \
--enable-dav-fs \
--enable-dav-lock \
--enable-deflate \
--enable-rewrite \
--enable-so=so \
--enable-speling \
--enable-ssl \
--with-ssl=/www/apache2/openssl \
--enable-info \
--enable-cgi \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-mime-magic

I have not done SSL CERT part yet (certificates) so only apache works but
not with https.

libxml2-2.6.26
 ./configure
 ./make
 ./make install

but xml2-config --version gives
2.6.10
then I removed all old 2.6.10 references from path.

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install





Actual result:
--
Installing PEAR environment:  /www/apache2/php/lib/php/
ld.so.1: php: fatal: relocation error: file
/source/php-5.2.1/sapi/cli/php: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found
*** Error code 137
The following command caused the error:
/source/php-5.2.1/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0
-dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1
-ddetect_unicode=0 pear/install-pear-nozlib.phar -d
"/www/apache2/php/lib/php" -b "/www/apache2/php/bin"
make: Fatal error: Command failed for target `install-pear-installer'
Current working directory /source/php-5.2.1
*** Error code 1
The following command caused the error:
if test -f pear/install-pear-nozlib.phar && /source/php-5.2.1/build/shtool
mkdir -p /www/apache2/php/lib/php; then \
make -s install-pear-installer; \
else \
cat /source/php-5.2.1/pear/install-pear.txt; \
fi
make: Fatal error: Command failed for target `install-pear'

then I tried without pear:
-

PHP:
./configure \
--with-apxs2=/www/apache2/bin/apxs \
--prefix=/www/apache2/php \
--with-config-file-path=/www/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--enable-libxml \
--with-libxml-dir=/usr/local

make
make install

./apachectl -k start
httpd: Syntax error on line 53 of /www/apache2/conf/httpd.conf: Cannot
load /www/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal:
relocation error: file /www/apache2/modules/libphp5.so: symbol
xmlParserInputBufferCreateFilenameDefault: referenced symbol not found

I am not an expert but I tried with other options as well, but getting the
same error. Definitely I must be missing something..
Your help/solution is highly appreciated!




-- 
Edit bug report at http://bugs.php.net/?id=40902&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40902&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40902&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40902&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40902&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=40902&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=40902&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=40902&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=40902&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=40902&

#40901 [NEW]: mssql_execute errror

2007-03-23 Thread lh at moranti dot com
From: lh at moranti dot com
Operating system: ubuntu
PHP version:  5.2.1
PHP Bug Type: MSSQL related
Bug description:  mssql_execute errror

Description:

I have a problem executing a stored procedure. 
It fails on my ubuntu installation with php 5.2.1 but when i run it with
php 5.1.6 no problem.

Reproduce code:
---
mssql_select_db("dbname", $conn);
$sp = mssql_init("procedurename", $conn); // stored proc name
$compId=1000;
$SessionId = substr(session_id(),0,8);

mssql_bind($sp, "@CompID",$compId,SQLVARCHAR);
mssql_bind($sp, "@SessionID",$SessionId,SQLVARCHAR);
mssql_bind($sp, "@BasketAmount",$BasketAmount,SQLVARCHAR,TRUE);
mssql_bind($sp, "@BasketTotalItem",$BasketTotalItem,SQLVARCHAR,TRUE);
$query  = mssql_execute($sp) or die("could not perform insert");

Actual result:
--
Warning: mssql_execute() [function.mssql-execute]: stored procedure
execution failed in /home/www/sitename/test_init.php on line 14

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


#40900 [NEW]: differed in formating in php5.0.2 with php5.2.0

2007-03-23 Thread p dot sivamurugan at gmail dot com
From: p dot sivamurugan at gmail dot com
Operating system: windows 
PHP version:  5.2.1
PHP Bug Type: *General Issues
Bug description:  differed in formating  in php5.0.2 with php5.2.0

Description:

php5.0.2
php5.2.0

differed in formating 


Reproduce code:
---
echo $vLTVformated  =  "".number_format(0.98000,2,'','');



Expected result:

php5.0.2 = 98
php5.2.0 = 98


Actual result:
--
php5.0.2 = 98
php5.2.0 = 098





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


#40556 [Opn->Fbk]: Browser abort causes server hang with FastCGI

2007-03-23 Thread tony2001
 ID:   40556
 Updated by:   [EMAIL PROTECTED]
 Reported By:  unreal at slashorg dot net
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Linux 2.6.18
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

>I guess I have to recompile php with debug support?
Yes, rebuild with --enable-debug is required.
- start PHP/FastCGI with just one process (-processes 1) 
- figure out pid of PHP (ps afx | grep php or see Apache error_log)
- start gdb (just type gdb and enter), then type "attach ",
this way you'll attach to already running PHP process.
- type "continue" for the process to continue running.
- after that reproduce the problem and see if the process stops.
- if it does, type "backtrace" and paste the output here.
- if it doesn't we'll continue in the next post.

You can also create an account on the server, I'll try to reproduce it
myself. 


Previous Comments:


[2007-03-06 13:27:53] unreal at slashorg dot net

Hello,

I haven't really used gdb before, I obtain a backtrace? I guess I have
to recompile php with debug support?

Thanks.



[2007-03-02 10:14:47] [EMAIL PROTECTED]

I am still not able to reproduce the problem.
Could you please attach debugger to stuck php process and show its
backtrace.



[2007-02-22 12:01:19] unreal at slashorg dot net

OK, I've done quite a lot more testing, and here are the results
(Apache 2.0.59/mod_fastcgi 2.4.2/PHP 5.2.1):

- I cannot reproduce the bug with your code either.

- The following code causes PHP workers to lock up if you abort during
download (and only if you abort):

 http://www.slashorg.net/ex/crash.txt

Note: notice the "session_start();" line

- If I remove the "session_start();" line, PHP doesn't crash anymore,
even when I abort the download.


It seems this bug is more complicated than I thought, I hope you'll be
able to reproduce it.

Thanks for your help.



[2007-02-21 15:18:30] [EMAIL PROTECTED]

I am not able to reproduce the problem.

I tried to abort downloading from IE and download part of file running
the following PHP script from command line:

http://127.0.0.1/test/bug40556.php";, "r");
$s = fread($f, 1024*1024);
var_dump($s);
fclose($f);
?>

both cases work fine (Apache-1.3.28 with mod_fastcgi or ZendEnabler on
Linux 2.6.19)





[2007-02-20 12:48:13] unreal at slashorg dot net

I've just upgraded to 5.2.2-dev as you suggested, and that hasn't fixed
the problem.

My server is still dying as soon as a connection gets aborted.



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

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


#40886 [Bgs]: static methods assigned to instances

2007-03-23 Thread andrea at 3site dot it
 ID:   40886
 User updated by:  andrea at 3site dot it
 Reported By:  andrea at 3site dot it
 Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Windows XP SP2
 PHP Version:  5.2.1
 New Comment:

Finally a developer show me what PHP 5 developers did with static
behaviour ... it's totally the same of Java language but you probably
forget a tiny thing: PHP is not Java and Java supports methods overload
too!

At this point you implemented a keyword that get us less features than
Java but its behaviour is the same of Java.

I remember you that PHP isn't "pseudo" compiled, isn't fast as Java
should be and, as I've just said, it doesn't support "pure" method
overload so with Java You can change a method behaviour even if one
overload is static but you can't do the same thing with PHP.

This is an OO logic "problem" (if you don't want to call them *bug*)
and to copy some Java concept inside a scripting language is not the way
to have a better PHP, IMHO.

Regards, Andrea Giammarchi


Previous Comments:


[2007-03-22 16:38:20] andrea at 3site dot it

That's what I think about this feature.
http://webreflection.blogspot.com/2007/03/php-5-developers-teach-us-what-does.html

If a method is static, it should be static ... with PHP 5 a static
method become an instance method (not static) ... what a feature!

The solution is to remove static keyword from my static methods, well
done!

I hope PHP 6 will not have this ambiguity, regards.



[2007-03-22 14:51:05] [EMAIL PROTECTED]

this bug really shows how one person's bug is another person's 
feature. :)

the syntax $a->method() allows you to call a static method of the 
class that $a is an instantiated object of, something I find useful 
for objects that contain static methods in a parent/child 
inheritance hierarchy.  Using $a->method(), I don't need to do 
hackery to figure out which class "$a" is in order to call one of 
its static methods.  Consider the alternative:



The above is the only alternative (save using reflection, which is 
even more verbose and inefficient) to:

method($arg1, $arg1);
?>

Which syntax do you prefer?

The big difference between php 4 and php 5 is that a method declared 
as "static" does not have $this set.  You'll get a fatal error, in 
fact, if you try to use $this in a static method.

Why do you care so much about whether it's called with 
class::method() or $this->method()?  You can't have two methods with 
the same name, one static and one non-static, so there is no 
possibility of accidentally calling the wrong one.

If you are wanting absolutely "perfect" OO, there are plenty of 
other languages that will provide exactly the straightjacket and 
punishment you desire.  If you want to code efficient, easy to 
maintain, working programs, use PHP.



[2007-03-22 12:28:44] andrea at 3site dot it

Derick, this is a bug (any Object Oriented logic).
There's something wrong in your static keyword implementation, at least
for methods that uses static keyword.

This my last call and this is my last example:

StaticExample = create_function('$never', 'return 
"welcome
PHP5 ambiguity";');
}

public final static function StaticExample(){
echo "StaticExample", "";
}
}

$test = new ExampleClass();
ExampleClass::StaticExample();
exit($test->StaticExample());
?>

What does static keyword mean for PHP 5 developers?
If this is an expected behaviour you should explain them in
documentation page.

Regards (I'll never open again this *bug*)



[2007-03-22 12:18:16] [EMAIL PROTECTED]

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





[2007-03-22 12:15:28] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in 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/40886

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


#40845 [Com]: Failure during make

2007-03-23 Thread regis dot jarde at alcatel-lucent dot fr
 ID:   40845
 Comment by:   regis dot jarde at alcatel-lucent dot fr
 Reported By:  steve dot cersosimo at att dot com
 Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Solaris 5.8
 PHP Version:  5.2.1
 New Comment:

Same issue on my side.

When I want to update my php 5.2.0 to the new  5.2.1 version i fall
into the same issue.

Notice I can compile from scratch the 5.2.0 without any problem (on the
same server with the same ./configuration parameters) but couldn't
compile the new 5.2.1 version.

./configure  --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--with-pgsql --enable-so --with-gettext --with-gd=/usr/local
--with-jpeg-dir

here is my error messages :

/bin/sh
/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/libtool
--silent --preserve-dup-deps --mode=compile /net/build/bin/gcc  -IZend/
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/Zend/
-DPHP_ATOM_INC
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/include
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/main
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1
-I/usr/local/include/libxml2
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/ext/date/lib
-I/usr/local/include -I/usr/local/include/mysql
-I/usr/local/pgsql/include
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/TSRM
-I/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/Zend
 -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -g -O2   -c
/a/pandora/vol/vol0/chantier/SunOS.5.9/client/usr-local/php-5.2.1/Zend/zend_strtod.c
-o Zend/zend_strtod.lo
/usr/ccs/bin/as: "/var/tmp//cccyeFEh.s", line 3337: error: constant
value must be between -4096 and 4095
make: *** [Zend/zend_strtod.lo] Error 1


Previous Comments:


[2007-03-17 19:25:18] [EMAIL PROTECTED]

Looks like a problem with your assembler binary:
>/usr/ccs/bin/as: "/var/tmp//ccr15Fwa.s", line 3341: error: constant
value must be between -4096 and 4095



[2007-03-17 19:17:36] steve dot cersosimo at att dot com

Description:

I am getting a failure when I try to make 5.2.1.  Here is the failure
line:
/bin/sh /home/software/apps/php-5.2.1/libtool --silent
--preserve-dup-deps --mode=compile gcc  -IZend/
-I/home/software/apps/php-5.2.1/Zend/ -DPHP_ATOM_INC
-I/home/software/apps/php-5.2.1/include
-I/home/software/apps/php-5.2.1/main -I/home/software/apps/php-5.2.1
-I/usr/local/include/libxml2 -I/usr/local/ssl/include
-I/usr/local/include -I/home/software/apps/php-5.2.1/ext/date/lib
-I/usr/local/mysql/include -I/home/oracle_8.1.7/OraHome/rdbms/public
-I/home/oracle_8.1.7/OraHome/rdbms/demo -I/usr/local/pgsql/include
-I/usr/local/freetds/include -I/home/software/apps/php-5.2.1/TSRM
-I/home/software/apps/php-5.2.1/Zend  -D_POSIX_PTHREAD_SEMANTICS 
-I/usr/local/include -g -O2   -c
/home/software/apps/php-5.2.1/Zend/zend_strtod.c -o Zend/zend_strtod.lo
/usr/ccs/bin/as: "/var/tmp//ccr15Fwa.s", line 3341: error: constant
value must be between -4096 and 4095
make: *** [Zend/zend_strtod.lo] Error 1

My configure options are:
./configure --with-apxs2=/home/apache/bin/apxs
--with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl
--with-config-file-path=/etc --with-pear --enable-ftp
--with-pgsql=/usr/local/pgsql --enable-sockets --with-ldap=/usr/local
--with-zlib=/usr/local --with-oci8=/home/oracle_8.1.7/OraHome
--with-sybase-ct=/usr/local/freetds --with-gmp=/usr/local
--with-mcrypt=/usr/local --with-snmp --enable-pcntl --enable-soap
--enable-zip

Any help is appreciated.







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


#40758 [Opn]: Test fcgi_is_fastcgi() is wrong on windows

2007-03-23 Thread dmitry
 ID:   40758
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jostb2345 at yahoo dot com
 Status:   Open
 Bug Type: CGI related
 Operating System: Windows (all versions)
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

ok. I'll add socket support for win32, but I am not sure when I'll have
time for this work.


Previous Comments:


[2007-03-13 16:29:28] jostb2345 at yahoo dot com

> May be older PHP versions were able to support sockets on win32, but
I
> have never seen any FastCGI plugin implmentation that passes
sockets.

PHPIntKitForWindows.zip

=> http://www.alphaworks.ibm.com/tech/phpintwasce/download


> Also I don't see any sockets advantages (only disadvantages).

I don't think named pipes work on all operating systems. Furthermore
Java supports only TCP socket communication (well, it is possible to
access Windows and Unix named pipes from Java. But one has to implement
it twice. RandomAccessFile on Windows, a pair of normal Files on Unix).


To be practical -- and for backward compatibility -- we need a working
TCP socket implementation on both operating systems. tcp sockets worked
in PHP versions < 5.2.0 and I don't see a good reason to drop this.


Regards,
Jost Boekemeier



[2007-03-12 17:21:32] [EMAIL PROTECTED]

yes. PHP expects pipe but not a socket.

In C you may even try to pass window HANDLE :)

May be older PHP versions were able to support sockets on win32, but I
have never seen any FastCGI plugin implmentation that passes sockets.
Also I don't see any sockets advantages (only disadvantages).




[2007-03-09 17:06:35] jostb2345 at yahoo dot com

> I don't understand for what reason some program passes stdout to
> PHP

Because I thought you need to distinguish sockets from named pipes.
I have attached code which crashes php since 5.2.0.


Regards,
Jost Boekemeier



[2007-03-09 17:01:01] jostb2345 at yahoo dot de

# include 
# include 
# define close closesocket

term() {
  printf("err:%d", (GetLastError()));
  exit(1);
}

struct sockaddr_in saddr;
main() {
  SOCKET listen_handle;
  SOCKADDR_IN saServer; 
  char *cmd = "php-cgi.exe";
  STARTUPINFO su_info;
  SECURITY_ATTRIBUTES sa = { 0 };
  WORD wVersionRequested = MAKEWORD(1,1);
  WSADATA wsaData;
  int n = WSAStartup(wVersionRequested, &wsaData);
  if (wsaData.wVersion != wVersionRequested) term();

  listen_handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
  
  saServer.sin_family = AF_INET;
  saServer.sin_addr.s_addr = INADDR_ANY;
  saServer.sin_port = htons(9667);

  n = bind(listen_handle, (LPSOCKADDR)&saServer, sizeof(struct
sockaddr));
  if (n == SOCKET_ERROR) term();

  n = listen(listen_handle, 20);
  if (n == SOCKET_ERROR) term();
  

  ZeroMemory(&su_info, sizeof(STARTUPINFO));
  su_info.cb = sizeof(STARTUPINFO);
  su_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
  su_info.wShowWindow = SW_HIDE;
  su_info.hStdInput = listen_handle;
  su_info.hStdError = INVALID_HANDLE_VALUE;
  su_info.hStdOutput = INVALID_HANDLE_VALUE;
  SetHandleInformation(su_info.hStdInput, HANDLE_FLAG_INHERIT, TRUE);

  PROCESS_INFORMATION p;
  if(CreateProcess(NULL, cmd, NULL, NULL, 1, 0, NULL, NULL, &su_info,
&p)) {
CloseHandle(p.hThread); closesocket(listen_handle);
  } else {
term();
  }
  if( WaitForSingleObject(p.hProcess, INFINITE) == WAIT_FAILED ){
term();
   }
  WSACleanup();
}



[2007-03-09 13:36:15] [EMAIL PROTECTED]

I don't see any difference with old code. See OS_IsFcgi() and
OS_LibInit().

Also I don't understand for what reason some program passes stdout to
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/40758

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


#40899 [Opn->Asn]: memory leak when nesting list()

2007-03-23 Thread tony2001
 ID:   40899
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cweiske at cweiske dot de
-Status:   Open
+Status:   Assigned
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-03-23 07:31:07] cweiske at cweiske dot de

Description:

I get memory leaks when nesting list() statements to assign array
variables to local variables. I get no leaks if list() is not nested.

Reproduce code:
---
php -a
Interactive shell

php > list(list($a,$b),$c)=array(array('a','b'),'c');
php > quit



Expected result:

Nothing.

Actual result:
--
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3533)
:  Freeing 0x08923060 (16 bytes), script=-
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(6308)
:  Freeing 0x0892323C (16 bytes), script=-
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3578)
:  Freeing 0x08923620 (44 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_API.c(819)
: Actual location (location was relayed)
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_variables.h(45)
:  Freeing 0x089236C4 (2 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_variables.c(120)
: Actual location (location was relayed)
Last leak repeated 1 time
[Fri Mar 23 08:28:26 2007]  Script:  '-'
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_vm_execute.h(3564)
:  Freeing 0x089236F4 (35 bytes), script=-
/var/tmp/portage/dev-lang/php-5.2.1-r3/work/php-5.2.1/Zend/zend_hash.c(388)
: Actual location (location was relayed)
Last leak repeated 1 time
=== Total 9 memory leaks detected ===





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


#40898 [Opn->Csd]: MySQLi segfaults during module initialization

2007-03-23 Thread tony2001
 ID:   40898
 Updated by:   [EMAIL PROTECTED]
 Reported By:  demiurg at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: MySQLi related
 Operating System: Linux i686
 PHP Version:  6CVS-2007-03-23 (CVS)
 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:


[2007-03-23 00:41:57] demiurg at gmail dot com

Description:

Please, delete the extra STANDARD_MODULE_HEADER line at
ext/mysqli/mysqli.c:442


Reproduce code:
---
# sapi/cli/php -m
Segmentation fault

(gdb) bt
#0  0xb68474c3 in strlen () from /lib/libc.so.6
#1  0x083a0546 in zend_register_module_ex (module=0x85e19c0) at
Zend/zend_API.c:1923
#2  0x0834ba8c in php_register_extensions (ptr=0x85fe7a4, count=54) at
main/main.c:1531
#3  0x0842689b in php_register_internal_extensions () at
main/internal_functions_cli.c:149
#4  0x0834ca4b in php_module_startup (sf=0x85fe600,
additional_modules=0x0, num_additional_modules=0)
at main/main.c:1749
#5  0x08423dbd in php_cli_startup (sapi_module=0x85fe600) at
sapi/cli/php_cli.c:341
#6  0x0842454c in main (argc=2, argv=0xbfca8f14) at
sapi/cli/php_cli.c:719






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


#40855 [Fbk->Opn]: Inserting double values into mysql database with UNIQUE index causes heap crash

2007-03-23 Thread donauinsel at hotmail dot com
 ID:   40855
 User updated by:  donauinsel at hotmail dot com
 Reported By:  donauinsel at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: W2K
 PHP Version:  5.2.1
 New Comment:

With PHP latest DEV and UNIQUE on INT(15) it will happen too; without
UNIQUE not.


Previous Comments:


[2007-03-20 17:43:39] [EMAIL PROTECTED]

> Did you checked the drwtsn.log file already ? 
Yes, I saw it.
I believe these drwatson logs are not supposed to be human readable,
therefore they are just useless.
Please test the snapshot.



[2007-03-20 17:34:58] donauinsel at hotmail dot com

Did you checked the drwtsn.log file already ? 
I have no problems with php 5.2.1 and the code since removing the
UNIQUE index and setting regular index on this field.



[2007-03-20 17:30:53] [EMAIL PROTECTED]

Unfortunately, it's not really useful.
Did you test the snapshot?



[2007-03-20 17:19:52] donauinsel at hotmail dot com

I emailed the latest drwtsn log file to your adress, may this helps:

*> Raw Stack Dump <*
2e93f3a4  68 4f db 02 5a a8 4b 00 - 00 cf 0f 28 68 4f db 02 
hO..Z.K(hO..
2e93f3b4  a4 c5 66 00 36 80 db 02 - a7 f5 7f 00 00 cf 0f 28 
..f.6..(
2e93f3c4  88 c8 51 00 68 4f db 02 - 01 00 00 00 0c 05 00 00 
..Q.hO..
2e93f3d4  78 f4 93 2e b8 1b dc 02 - 68 4f db 02 20 b5 e4 02 
x...hO.. ...
2e93f3e4  f8 f3 93 2e 02 00 00 00 - 80 00 00 00 00 00 00 00 

2e93f3f4  f8 88 75 00 2d 31 00 00 - 05 00 00 00 70 ce 0f 28 
..u.-1..p..(
2e93f404  00 00 00 00 06 00 00 00 - f8 a4 4c 00 20 b5 e4 02 
..L. ...
2e93f414  02 00 00 00 f8 c0 0f 28 - 00 00 00 00 00 00 00 00 
...(
2e93f424  00 00 00 00 20 b5 e4 02 - f8 c0 0f 28 84 f9 93 2e  
..(
2e93f434  02 00 00 00 24 c2 0f 28 - c8 c2 0f 28 b8 c6 e4 02 
$..(...(
2e93f444  57 a5 4c 00 20 b5 e4 02 - 02 00 00 00 f8 c0 0f 28  W.L.
..(
2e93f454  ef 0e 46 00 10 31 85 00 - cb e4 4c 00 20 b5 e4 02 
..F..1L. ...
2e93f464  f8 c0 0f 28 f8 ba e4 02 - 1f 10 46 00 10 31 85 00 
...(..F..1..
2e93f474  f8 c0 0f 28 49 6e 63 6f - 72 72 65 63 74 20 74 69 
...(Incorrect ti
2e93f484  6d 65 20 76 61 6c 75 65 - 3a 20 27 2d 31 27 20 66  me value:
'-1' f
2e93f494  6f 72 20 63 6f 6c 75 6d - 6e 20 27 71 75 65 72 79  or column
'query
2e93f4a4  5f 74 69 6d 65 27 20 61 - 74 20 72 6f 77 20 30 00  _time' at
row 0.
2e93f4b4  0c f9 93 2e 01 f6 93 2e - 0d 00 00 00 01 00 00 00 

2e93f4c4  2b 00 00 00 99 e5 57 00 - 16 90 a4 db e4 f6 93 2e 
+.W.
2e93f4d4  0d 00 00 00 dc f4 93 2e - 01 00 00 00 da 6b 4b 00 
.kK.

So may the error message is written back in wrong memory buffer.



[2007-03-20 17:02:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#40608 [Opn->Fbk]: break within foreach causes strange behaviour

2007-03-23 Thread cweiske
 ID:   40608
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eric dot broersma at phil dot uu dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: Sun Solaris
 PHP Version:  5.2.1


Previous Comments:


[2007-03-23 07:53:12] [EMAIL PROTECTED]

I cannot reproduce this on Gentoo with 5.2.1



[2007-03-20 16:40:30] [EMAIL PROTECTED]

I wasn't feeling spunky enough to mark the bug "closed", though...
figured I'd better leave that to the real PHP devs...



[2007-03-20 16:35:58] [EMAIL PROTECTED]

My bad... pretending to be a dev myself there, by selecting the "Quick
Fix" option to "notify" the original bug submitter (and all readers)
about the snapshot option.



[2007-03-19 20:48:54] [EMAIL PROTECTED]

Are you asking yourself to try fresh snapshot?
Or did you click wrong link?



[2007-03-19 20:40:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#40608 [Fbk->Opn]: break within foreach causes strange behaviour

2007-03-23 Thread cweiske
 ID:   40608
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eric dot broersma at phil dot uu dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: Arrays related
 Operating System: Sun Solaris
 PHP Version:  5.2.1


Previous Comments:


[2007-03-23 07:53:12] [EMAIL PROTECTED]

I cannot reproduce this on Gentoo with 5.2.1



[2007-03-20 16:40:30] [EMAIL PROTECTED]

I wasn't feeling spunky enough to mark the bug "closed", though...
figured I'd better leave that to the real PHP devs...



[2007-03-20 16:35:58] [EMAIL PROTECTED]

My bad... pretending to be a dev myself there, by selecting the "Quick
Fix" option to "notify" the original bug submitter (and all readers)
about the snapshot option.



[2007-03-19 20:48:54] [EMAIL PROTECTED]

Are you asking yourself to try fresh snapshot?
Or did you click wrong link?



[2007-03-19 20:40:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#40883 [Bgs->Csd]: mysql_query() is allocating memory incorrectly

2007-03-23 Thread dmitry
 ID:   40883
 Updated by:   [EMAIL PROTECTED]
 Reported By:  edwin at aucs dot org
-Status:   Bogus
+Status:   Closed
 Bug Type: MySQL related
 Operating System: WinXP
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

The problem was in Zend Memory Manager, that cached small memory blocks
and didn't reuse cache on erealloc().

Fixed in CVS HEAD and PHP_5_2.


Previous Comments:


[2007-03-21 16:26:25] [EMAIL PROTECTED]

The engine caches small memory blocks.



[2007-03-21 16:13:57] edwin at aucs dot org

Description:

Memory leak in mysql_query, memory not being able to be freed by
mysql_free_result properly

Reproduce code:
---
Refer to Listing 4 to 7 of
http://www-128.ibm.com/developerworks/opensource/library/os-php-v521/

Expected result:

No memory leakage

Actual result:
--
mysql_query() is allocating memory incorrectly, even with the latest
CVS snap





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