#43723 [Opn->Asn]: SOAP not sent properly from client for .

2008-10-07 Thread dmitry
 ID:   43723
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mcordell at authorize dot net
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Windows XP Pro
 PHP Version:  5.2.5
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-12-31 20:34:25] mcordell at authorize dot net

Description:

The wsdl contains a  element. When the SOAP client sends the
first element of the choice (ItemA) it works but if it sends the second
one (ItemB) instead, the xml does not get sent.


Reproduce code:
---
The WSDL can be found HERE:
http://www.youshare.com/view.php?file=BoxWebService.wsdl.txt


http://someurl.com/BoxWebService.asmx?wsdl";,
array('trace' => 1));
$req = new Foo();
$req->mybox = new Box();
if (FALSE) {
$req->mybox->myitemA = new ItemA();
$req->mybox->myitemA->myname = "somename";
} else {
$req->mybox->myitemB = new ItemB();
$req->mybox->myitemB->mynumber = 123;
}
$resp = $ws->__soapCall("Foo", array("Foo" => $req));
echo "Raw request: " . htmlspecialchars($ws->__getLastRequest()) .
"";
echo "Raw response: " . htmlspecialchars($ws->__getLastResponse()) .
"";
echo htmlspecialchars($resp->FooResult) . "";

?>

Expected result:

 http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://someurl.com/BoxWebService/";>123



Actual result:
--
 http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://someurl.com/BoxWebService/";>







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



#46248 [NEW]: caching pages

2008-10-07 Thread s_khreiss at hotmail dot com
From: s_khreiss at hotmail dot com
Operating system: windows XP
PHP version:  5.2.6
PHP Bug Type: *General Issues
Bug description:  caching pages

Description:

hi,
in my php file, i'am calling a file to count the hits (number of visitor)
but it doesn't work properly because of the cache. because the page is not
cached for a long time so the value of the variable will be lost.

and please tell me when and why we use these 2 statements:

header("Cache-control: private");
ob_start("ob_gzhandler");

thanks a lot for your support


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



#45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_parse()

2008-10-07 Thread ptn at post dot cz
 ID:   45996
 Comment by:   ptn at post dot cz
 Reported By:  phpbugs at colin dot guthr dot ie
 Status:   Assigned
 Bug Type: XML related
 Operating System: Mandriva Linux
 PHP Version:  5.2.6
 Assigned To:  rrichards
 New Comment:

this bug seems to be fixed in libxm2-2.7.2

http://svn.gnome.org/viewvc/libxml2?view=revision&revision=3798


Previous Comments:


[2008-09-09 23:06:00] phpbugs at colin dot guthr dot ie

Comments by Daniel Veillard on the libxml ML:

  The only thing I can think of is that libxml2 doesn't anymore ask
though a SAX callback when looking for entities references if they
are in the predefined set. This comes in essence by an old decision
from the XML working group stating that user definition for those 5
entities could not override the default predefined ones. So I guess
that change is logical. Now what is done on top of SAX to result
in that bug, I don't really know  :-\



[2008-09-06 15:43:29] [EMAIL PROTECTED]

Assigned to the maintainer (Rob, don't forget to change status too when
you assign something to yourself :)



[2008-09-04 17:29:21] phpbugs at colin dot guthr dot ie

Description:

With libxml2 2.7.1, When using the expat type xml parsing routines in
PHP, the characater data seems to silently drop any encoded text e.g.
> < and friends.

Please see Mandriva bug for details:
https://qa.mandriva.com/show_bug.cgi?id=43486

And also please note the thread on the libxml mailing list:
http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610

And most notably the reply to the above thread:

Can you report this as a PHP bug? It looks like some really old hack 
code in the PHP extension in order to mimic some specific expat 
functionality. The behavior change you see though resulting from a code
changes in libxml2 is really due to the hackish code in the extension
doing things it wasnt meant to be doing.


Reproduce code:
---
Please see this code:
https://qa.mandriva.com/attachment.cgi?id=10757

Expected result:

<
foo
>
wibble
<
/foo
>


Actual result:
--
foo
wibble
/foo






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



#46244 [Opn->NoF]: Virtual host specific magic_quotes_gpc setttings changing randomly

2008-10-07 Thread jani
 ID:   46244
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeremy at hooks dot me dot uk
-Status:   Open
+Status:   No Feedback
 Bug Type: PHP options/info functions
 Operating System: openSUSE 10.2
 PHP Version:  5.2.6


Previous Comments:


[2008-10-07 08:37:10] jeremy at hooks dot me dot uk

Jani.

Thank you for your response, unfortunately it is not practical for me
to install CVS-snapshot on this server as it is a production server.  If
I get chance I will try to see if I can recreate the bug on my openSUSE
11 laptop, using the CVS-snapshot.

BTW, this bug isn't a major problem for me, it just means I get
warnings from Joomla, which could be avoided. I noticed this bug in
5.2.5 but I thought when I upgraded to 5.2.6 it would be fixed that it
would be fixed by the solution to 43677 (SUSE only released an update to
5.2.6 two weeks ago (for 10.2 at least)).  However, I felt I ought to
report it in case it affects anything more important than
magic_quotes_gpc or someone who relies on magic_quotes_gpc.

Regards.

Jeremy.



[2008-10-06 21:00:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-10-06 17:57:29] jeremy at hooks dot me dot uk

Description:

First of all, forgive me if I already posted this bug today, my browser
crashed earlier and I am not sure if I posted before the crash.

The problem I am having appears very similar to
http://bugs.php.net/bug.php?id=43677 - which apparently is fixed

I have several virtual hosts, some of which have "php_admin_flag
magic_quotes_gpc off" in their Apache config.  Others have
"php_admin_flag magic_quotes_gpc On" in their config.

If I restart Apache and immediately browse one of the servers with
magic quotes set to on, it will be on, however if i go back later
(possibly after someone has browsed one of the other virtual hosts), it
will be turned off.

The main difference between this and 43677 is that it relates to
php_[admin_]flag rather than php_[admin_]value.  Also 43677 reportedly
(according to one post) only occurs if you mix php_admin_value and
php_value for the same ini-setting - I am only using php_admin_value for
the magic_quotes_gpc setting.






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



#46218 [Com]: apache2 reaches max clients limit with error in php_stdiop_set_option

2008-10-07 Thread funky2step at googlemail dot com
 ID:   46218
 Comment by:   funky2step at googlemail dot com
 Reported By:  funky2step at gmail dot com
 Status:   Open
 Bug Type: Streams related
 Operating System: RHEL ES Rel 4 (Nahant Update 6)
 PHP Version:  5.2.6
 New Comment:

Does anyone have any ideas about this? It's causing a lot of problems
as it happens quite frequently.


Previous Comments:


[2008-10-02 13:47:26] funky2step at gmail dot com

Description:

PHP is running with apache 2.2.9 (mpm=prefork)

./configure  --prefix=/usr/local/php5
--with-config-file-path=/usr/local/php5 --with-mysql --with-gd
--with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr
--enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-xsl
--with-curl=/usr/include --with-curlwrappers

The server reaches the maxclients limit but does not ever kill the old
processes.
The server does not respond to any more requests. This is not due to
heavy load.

GDB output shows an error in php_stdiop_set_option (see trace in actual
result section)

GDB output of all httpd processes attached to sockets in CLOSE_WAIT
state show the same as above.

Actual result:
--
Attaching to process 14035
Reading symbols from /usr/local/apache2/bin/httpd...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /usr/local/apache2/lib/libaprutil-1.so.0...done.
Loaded symbols for /usr/local/apache2/lib/libaprutil-1.so.0
Reading symbols from /usr/lib/libexpat.so.0...done.
Loaded symbols for /usr/lib/libexpat.so.0
Reading symbols from /usr/local/apache2/lib/libapr-1.so.0...done.
Loaded symbols for /usr/local/apache2/lib/libapr-1.so.0
Reading symbols from /lib/libuuid.so.1...done.
Loaded symbols for /lib/libuuid.so.1
Reading symbols from /lib/tls/librt.so.1...done.
Loaded symbols for /lib/tls/librt.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/tls/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread -1208387904 (LWP 14035)]
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/local/apache2/modules/libphp5.so...done.
Loaded symbols for /usr/local/apache2/modules/libphp5.so
Reading symbols from /usr/lib/libexslt.so.0...done.
Loaded symbols for /usr/lib/libexslt.so.0
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/local/lib/libcurl.so.4...done.
Loaded symbols for /usr/local/lib/libcurl.so.4
Reading symbols from /usr/lib/libxslt.so.1...done.
Loaded symbols for /usr/lib/libxslt.so.1
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libgpg-error.so.0...done.
Loaded symbols for /usr/lib/libgpg-error.so.0
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libldap-2.2.so.7...done.
Loaded symbols for /usr/lib/libldap-2.2.so.7
Reading symbols from /lib/libssl.so.4...done.
Loaded symbols for /lib/libssl.so.4
Reading symbols from /lib/libcrypto.so.4...done.
Loaded symbols for /lib/libcrypto.so.4
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /usr/lib/liblber-2.2.so.7...done.
Loaded symbols for /usr/lib/liblber-2.2.so.7
Reading symbols from /usr/lib/libsasl2.so.2...done.
Loaded symbols for /usr/lib/libsasl2.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
0x00b007a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2

Thread 1 (Thread -1208387904 (

#43723 [Asn->Fbk]: SOAP not sent properly from client for .

2008-10-07 Thread dmitry
 ID:   43723
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mcordell at authorize dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: SOAP related
 Operating System: Windows XP Pro
 PHP Version:  5.2.5
 Assigned To:  dmitry
 New Comment:

The wsdl file is not accessible. Could you please provide a valid link.


Previous Comments:


[2007-12-31 20:34:25] mcordell at authorize dot net

Description:

The wsdl contains a  element. When the SOAP client sends the
first element of the choice (ItemA) it works but if it sends the second
one (ItemB) instead, the xml does not get sent.


Reproduce code:
---
The WSDL can be found HERE:
http://www.youshare.com/view.php?file=BoxWebService.wsdl.txt


http://someurl.com/BoxWebService.asmx?wsdl";,
array('trace' => 1));
$req = new Foo();
$req->mybox = new Box();
if (FALSE) {
$req->mybox->myitemA = new ItemA();
$req->mybox->myitemA->myname = "somename";
} else {
$req->mybox->myitemB = new ItemB();
$req->mybox->myitemB->mynumber = 123;
}
$resp = $ws->__soapCall("Foo", array("Foo" => $req));
echo "Raw request: " . htmlspecialchars($ws->__getLastRequest()) .
"";
echo "Raw response: " . htmlspecialchars($ws->__getLastResponse()) .
"";
echo htmlspecialchars($resp->FooResult) . "";

?>

Expected result:

 http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://someurl.com/BoxWebService/";>123



Actual result:
--
 http://schemas.xmlsoap.org/soap/envelope/";
xmlns:ns1="http://someurl.com/BoxWebService/";>







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



#5007 [Ana->Csd]: enable no-resolve mode for here docs

2008-10-07 Thread johannes
 ID:   5007
 Updated by:   [EMAIL PROTECTED]
 Reported By:  waldschrott at kiffen dot de
-Status:   Analyzed
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0 Latest CVS (13/06/2000)
 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.

Yes, 5.3 implements such a feature.


Previous Comments:


[2008-10-07 10:27:31] mark at hell dot ne dot jp

I believe this feature request can now be closed (with PHP 5.3.0).

http://fr.php.net/language.types.string#language.types.string.syntax.nowdoc



[2000-08-28 01:49:53] [EMAIL PROTECTED]

in addition we could make here-docs structured code friendly by adding
sth. like a parameter (don´t know where,maybe <<<3"MARK")
indicationg how many tabs are prepended, thus the above would render
echo <<<3"MARK"
\t\t\tHello
\t\t\tMr. Foobar
\t\t\t\tTest
MARK;
as

Hello
Mr. Foobar
\tTest

and not with these redundant 3*\t´s in front of every line

then users can user here-docs in classes and functions *without*
crippling their code to ugliness  



[2000-07-08 10:49:48] waldschrott at kiffen dot de


The format of here-documents is as follows:

  <<[-]word
here-document
  delimiter

No parameter expansion, command  substitution,  arithmetic
expansion, or pathname expansion is performed on word.  If
any characters in word are quoted, the  delimiter  is  the
result  of  quote  removal  on  word, and the lines in the
here-document are not expanded.  If word is unquoted,  all
lines  of  the  here-document  are  subjected to parameter
expansion, command substitution, and arithmetic expansion.
In  the  latter case, the character sequence \ is
ignored, and \ must be used to quote the characters \,  $,
and `.

If  the  redirection operator is <<-, then all leading tab
characters are stripped from  input  lines  and  the  line
containing  delimiter.   This allows here-documents within
shell scripts to be indented in a natural fashion.
  




[2000-06-13 19:22:54] waldschrott at kiffen dot de

Perl has <<"MARK" and <<'MARK' (as Stas told me),
it would be handy for PHP too...
I think sample code isn´t need, because it´s an existing feature in
Perl core devolpers know of.





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



#46248 [Opn->Bgs]: caching pages

2008-10-07 Thread johannes
 ID:   46248
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s_khreiss at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: windows XP
 PHP Version:  5.2.6
 New Comment:

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

Thank you for your interest in PHP.

.


Previous Comments:


[2008-10-07 13:20:06] s_khreiss at hotmail dot com

Description:

hi,
in my php file, i'am calling a file to count the hits (number of
visitor) but it doesn't work properly because of the cache. because the
page is not cached for a long time so the value of the variable will be
lost.

and please tell me when and why we use these 2 statements:

header("Cache-control: private");
ob_start("ob_gzhandler");

thanks a lot for your support






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



#5007 [Com]: enable no-resolve mode for here docs

2008-10-07 Thread mark at hell dot ne dot jp
 ID:   5007
 Comment by:   mark at hell dot ne dot jp
 Reported By:  waldschrott at kiffen dot de
 Status:   Analyzed
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0 Latest CVS (13/06/2000)
 New Comment:

I believe this feature request can now be closed (with PHP 5.3.0).

http://fr.php.net/language.types.string#language.types.string.syntax.nowdoc


Previous Comments:


[2000-08-28 01:49:53] [EMAIL PROTECTED]

in addition we could make here-docs structured code friendly by adding
sth. like a parameter (don´t know where,maybe <<<3"MARK")
indicationg how many tabs are prepended, thus the above would render
echo <<<3"MARK"
\t\t\tHello
\t\t\tMr. Foobar
\t\t\t\tTest
MARK;
as

Hello
Mr. Foobar
\tTest

and not with these redundant 3*\t´s in front of every line

then users can user here-docs in classes and functions *without*
crippling their code to ugliness  



[2000-07-08 10:49:48] waldschrott at kiffen dot de


The format of here-documents is as follows:

  <<[-]word
here-document
  delimiter

No parameter expansion, command  substitution,  arithmetic
expansion, or pathname expansion is performed on word.  If
any characters in word are quoted, the  delimiter  is  the
result  of  quote  removal  on  word, and the lines in the
here-document are not expanded.  If word is unquoted,  all
lines  of  the  here-document  are  subjected to parameter
expansion, command substitution, and arithmetic expansion.
In  the  latter case, the character sequence \ is
ignored, and \ must be used to quote the characters \,  $,
and `.

If  the  redirection operator is <<-, then all leading tab
characters are stripped from  input  lines  and  the  line
containing  delimiter.   This allows here-documents within
shell scripts to be indented in a natural fashion.
  




[2000-06-13 19:22:54] waldschrott at kiffen dot de

Perl has <<"MARK" and <<'MARK' (as Stas told me),
it would be handy for PHP too...
I think sample code isn´t need, because it´s an existing feature in
Perl core devolpers know of.





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



#46244 [Fbk->Opn]: Virtual host specific magic_quotes_gpc setttings changing randomly

2008-10-07 Thread jeremy at hooks dot me dot uk
 ID:   46244
 User updated by:  jeremy at hooks dot me dot uk
 Reported By:  jeremy at hooks dot me dot uk
-Status:   Feedback
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: openSUSE 10.2
 PHP Version:  5.2.6
 New Comment:

Jani.

Thank you for your response, unfortunately it is not practical for me
to install CVS-snapshot on this server as it is a production server.  If
I get chance I will try to see if I can recreate the bug on my openSUSE
11 laptop, using the CVS-snapshot.

BTW, this bug isn't a major problem for me, it just means I get
warnings from Joomla, which could be avoided. I noticed this bug in
5.2.5 but I thought when I upgraded to 5.2.6 it would be fixed that it
would be fixed by the solution to 43677 (SUSE only released an update to
5.2.6 two weeks ago (for 10.2 at least)).  However, I felt I ought to
report it in case it affects anything more important than
magic_quotes_gpc or someone who relies on magic_quotes_gpc.

Regards.

Jeremy.


Previous Comments:


[2008-10-06 21:00:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-10-06 17:57:29] jeremy at hooks dot me dot uk

Description:

First of all, forgive me if I already posted this bug today, my browser
crashed earlier and I am not sure if I posted before the crash.

The problem I am having appears very similar to
http://bugs.php.net/bug.php?id=43677 - which apparently is fixed

I have several virtual hosts, some of which have "php_admin_flag
magic_quotes_gpc off" in their Apache config.  Others have
"php_admin_flag magic_quotes_gpc On" in their config.

If I restart Apache and immediately browse one of the servers with
magic quotes set to on, it will be on, however if i go back later
(possibly after someone has browsed one of the other virtual hosts), it
will be turned off.

The main difference between this and 43677 is that it relates to
php_[admin_]flag rather than php_[admin_]value.  Also 43677 reportedly
(according to one post) only occurs if you mix php_admin_value and
php_value for the same ini-setting - I am only using php_admin_value for
the magic_quotes_gpc setting.






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



#46214 [Opn->Bgs]: strpos() returns varying results

2008-10-07 Thread jani
 ID:   46214
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dimedrol at tut dot by
-Status:   Open
+Status:   Bogus
 Bug Type: Strings related
 Operating System: GNU/Linux i686 2.6.9
 PHP Version:  5.2.6
 New Comment:

Yes, use mbstring. No bug here.


Previous Comments:


[2008-10-01 18:13:55] dimedrol at tut dot by

In my sample code cyrillic characters were replaced by unicode escape
sequences. Please note that originally they were single-byte cp-1251
characters.



[2008-10-01 18:11:55] dimedrol at tut dot by

Description:

When I run short script below I every time receive different values in
output. It may print 7 and may print 11. PHP-file has encoding cp-1251.

Here's version info from my webserver

-bash-2.05b$ /usr/sbin/httpd -V
Server version: Apache/2.0.63
Server built: Jul 22 2008 23:09:16
Architecture: 32-bit
Server compiled with
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache"
-D SUEXEC_BIN="/usr/local/apache/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Reproduce code:
---


it contains cyrillic characters. If I replace them with latin ones
everything works fine

Expected result:

I expect 11 to be printed

Actual result:
--
Actual results is sometimes 11 and sometimes 7. 7 looks like cyrillic
characters are simply omitted during calculation.





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



#46247 [Asn->Csd]: ibase_set_event_handler() is allowing to pass callback without event

2008-10-07 Thread felipe
 ID:  46247
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Assigned
+Status:  Closed
 Bug Type:InterBase related
 PHP Version: 5.2CVS, 5.3CVS, 6CVS
 Assigned To: felipe
 New Comment:

This bug has been fixed in CVS.

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

Fixed in 5.2, 5.3 and HEAD.


Previous Comments:


[2008-10-07 00:00:47] [EMAIL PROTECTED]

Description:

See below.

Reproduce code:
---
http://bugs.php.net/?id=46247&edit=1



#45726 [Opn->Asn]: PHP_Archive / Archive.php missing

2008-10-07 Thread jani
 ID:   45726
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
-Status:   Open
+Status:   Assigned
 Bug Type: PHAR related
 Operating System: *
 PHP Version:  5.3CVS-2008-08-06
 Assigned To:  helly


Previous Comments:


[2008-10-02 23:19:59] [EMAIL PROTECTED]

Well, I think that we should add a check for directory, as it's 
possible to some OSs `cat /dir/`.


Index: ext/phar/phar/pharcommand.inc
===
RCS file: /repository/php-src/ext/phar/phar/pharcommand.inc,v
retrieving revision 1.49.2.12
diff -u -r1.49.2.12 pharcommand.inc
--- ext/phar/phar/pharcommand.inc   12 Sep 2008 16:09:01 - 

1.49.2.12
+++ ext/phar/phar/pharcommand.inc   2 Oct 2008 23:10:22 -
@@ -488,7 +488,9 @@

if (isset($loader)) {
$s = "";
-   $s .= file_get_contents($loader);
+   if (!is_dir($loader)) {
+   $s .= 
file_get_contents($loader);
+   }
$s .= "setStub('#!/apache/php/b...')
#1 /home/bwiberg/rpm/BUILD/php5.3-200809161030/ext/phar/phar.php(1054):
PharCommand->phar_set_stub_begin(Object(Phar), '/home/bwiberg/r...',
'/home/bwiberg/r...', '/apache/php/bin...')
#2 [internal function]: PharCommand->cli_cmd_run_pack(Array)
#3 /home/bwiberg/rpm/BUILD/php5.3-200809161030/ext/phar/phar.php(225):
call_user_func(Array, Array)
#4 /home/bwiberg/rpm/BUILD/php5.3-200809161030/ext/phar/phar.php(2073):
CLICommand->__construct(19, Array)
#5 {main}
  thrown in
/home/bwiberg/rpm/BUILD/php5.3-200809161030/ext/phar/phar.php on line
994
make: *** [ext/phar/phar.phar] Error 255
Bad exit status from /var/opt/freeware/tmp/rpm-tmp.12271 (%build)
[EMAIL PROTECTED]:~/rpm/SPECS$
--->8---



[2008-09-16 12:03:51] Bjorn dot Wiberg at its dot uu dot se

It doesn't like my autoconf, so running buildconf is unfortunately a
no-go for me...

Awaiting responses to felipe's comments instead -- they sound very
interesting!

Best regards,
Björn


---8<---
+ ./buildconf --force
Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.59 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
   Running cvsclean for you.
   To avoid this, install autoconf-2.13.
"build/build2.mk", line 32: make: Dependency line needs colon or double
colon operator.
"build/build2.mk", line 33: make: Dependency line needs colon or double
colon operator.
"build/build2.mk", line 35: make: Dependency line needs colon or double
colon operator.
make: Fatal errors encountered -- cannot continue.
make: The error code from the last command is 2.
--->8---



[2008-09-14 15:13:07] [EMAIL PROTECTED]

s/php executable path/php directory/

The file_get_contents() is reading the dir. as a real file.

sapi/cli/php -r 'var_dump(file_get_contents("/home/felipe/php5"));'

string(2560) "��l
 .�k
..-�l
buildmk.stamp��.�l  
CVS��l▒
.cvsignoreB�.gdbinitw�U��CODING_STANDARDS�j��CREDITS��l




[2008-09-14 13:48:05] [EMAIL PROTECTED]

Hi,
I can reproduce on BSD.

The php executable path (/usr/home/felipe/php5)  is being passed to
phar_set_stub_begin() in the $loader parameter, hence the binary is
included in string passed to $phar->setStub();



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

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



#46246 [Opn->Asn]: difference between call_user_func(array($this, $method)) and $this->$method()

2008-10-07 Thread dmitry
 ID:   46246
 Updated by:   [EMAIL PROTECTED]
 Reported By:  borysf at wp dot pl
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  dmiry


Previous Comments:


[2008-10-07 04:58:40] borysf at wp dot pl

I made a mistake in the code snipped. Method Test in class A should be
declared as private, then the problem occures. Here is the corrected
code:

class A
{
private function Test()
{
echo 'Hello from '.get_class($this);
}

public function call($method, $args = array())
{
return $this->$method();
//return call_user_func(array($this, $method));
}
}

class B extends A
{
protected function Test()
{
echo 'Overridden hello from '.get_class($this);
}
}

$a = new A;
$b = new B;

$a->call('Test');
$b->call('Test');



[2008-10-06 23:26:43] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Can't reproduce on 5.2.6 and 5.2.7-dev.



[2008-10-06 21:51:30] borysf at wp dot pl

Description:

There is a difference in behavior of call_user_func(array($this,
$method)) and $this->$method() while class B inherits from class A and
both declares the same method. The call_user_func() function seems to
work as expected, but using $this->$method() seems to invoke parent
method implementation instead of the overridden one.

Reproduce code:
---
class A
{
protected function Test()
{
echo 'Hello from '.get_class($this);
}

public function call($method, $args = array())
{
return $this->$method();
//return call_user_func(array($this, $method));
}
}

class B extends A
{
protected function Test()
{
echo 'Overridden hello from '.get_class($this);
}
}

$a = new A;
$b = new B;

$a->call('Test');
$b->call('Test');

Expected result:

Hello from A
Overridden hello from B

Actual result:
--
Hello from A
Hello from B





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



#46112 [Opn]: Segfault when throwing exception during class construction

2008-10-07 Thread erikg at codepoet dot no
 ID:   46112
 User updated by:  erikg at codepoet dot no
 Reported By:  erikg at codepoet dot no
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: ArchLinux
 PHP Version:  5.2.6
 New Comment:

The crash doesn't occur when I compile PHP with debug symbols - no idea
why.


Previous Comments:


[2008-09-19 11:57:32] erikg at codepoet dot no

CVS works when compiled on my laptop (32-bit Intel Core2), but still
segfaults when compiled on a development server (64-bit AMD Opteron
running in 32-bit mode).

Here is a backtrace (unfortunately only have debugging-symbols in
apache and php, but it should be sufficient):

#0  0xb766c676 in zend_do_fcall_common_helper_SPEC ()
   from /usr/lib/apache/libphp5.so
#1  0xb7658758 in execute () from /usr/lib/apache/libphp5.so
#2  0xb762f886 in zend_execute_scripts () from
/usr/lib/apache/libphp5.so
#3  0xb75e519a in php_execute_script () from
/usr/lib/apache/libphp5.so
#4  0xb76a9f31 in php_handler () from /usr/lib/apache/libphp5.so
#5  0x08084fa8 in ap_run_handler ()
#6  0x080884f1 in ap_invoke_handler ()
#7  0x080c1056 in ap_process_request ()
#8  0x080bdab8 in ?? ()
#9  0x08410a88 in ?? ()
#10 0x0004 in ?? ()
#11 0x08410a88 in ?? ()
#12 0x0014 in ?? ()
#13 0x0001 in ?? ()
#14 0x081eba60 in ?? ()
#15 0xbfbc4be8 in ?? ()
#16 0x0808ce98 in ap_run_process_connection ()



[2008-09-18 14:26:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I can't reproduce this.

PHP Fatal error:  Uncaught exception 'Exception' with message 'error'
in /tmp/test.php:3
Stack trace:
#0 /tmp/test.php(8): error()
#1 /tmp/test.php(17): Foo->__construct()
#2 {main}
  thrown in /tmp/test.php on line 3



[2008-09-18 10:07:16] erikg at codepoet dot no

Oops, the $item variables weren't supposed to be there. Doesn't matter
though, the segfault still triggers.



[2008-09-18 10:04:08] erikg at codepoet dot no

Description:

Apache segfaults when throwing an exception in a function whose return
value is used to construct a class within another class' constructor.

That sentence made my head hurt, just read the code :) I haven't been
able to remove any code while still reproducing the crash.

Reproduce code:
---
function error($item) {
throw new Exception("error");
}

class Foo {
function __construct() {
new Bar(error($item));
}
}

class Bar {
function __construct($param) {
}
}

new Foo();

Expected result:

Foo object to be instantiated

Actual result:
--
Apache segfaults





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



#46112 [Opn->Fbk]: Segfault when throwing exception during class construction

2008-10-07 Thread felipe
 ID:   46112
 Updated by:   [EMAIL PROTECTED]
 Reported By:  erikg at codepoet dot no
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: ArchLinux
 PHP Version:  5.2.6
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


[2008-10-07 17:44:31] erikg at codepoet dot no

The crash doesn't occur when I compile PHP with debug symbols - no idea
why.



[2008-09-19 11:57:32] erikg at codepoet dot no

CVS works when compiled on my laptop (32-bit Intel Core2), but still
segfaults when compiled on a development server (64-bit AMD Opteron
running in 32-bit mode).

Here is a backtrace (unfortunately only have debugging-symbols in
apache and php, but it should be sufficient):

#0  0xb766c676 in zend_do_fcall_common_helper_SPEC ()
   from /usr/lib/apache/libphp5.so
#1  0xb7658758 in execute () from /usr/lib/apache/libphp5.so
#2  0xb762f886 in zend_execute_scripts () from
/usr/lib/apache/libphp5.so
#3  0xb75e519a in php_execute_script () from
/usr/lib/apache/libphp5.so
#4  0xb76a9f31 in php_handler () from /usr/lib/apache/libphp5.so
#5  0x08084fa8 in ap_run_handler ()
#6  0x080884f1 in ap_invoke_handler ()
#7  0x080c1056 in ap_process_request ()
#8  0x080bdab8 in ?? ()
#9  0x08410a88 in ?? ()
#10 0x0004 in ?? ()
#11 0x08410a88 in ?? ()
#12 0x0014 in ?? ()
#13 0x0001 in ?? ()
#14 0x081eba60 in ?? ()
#15 0xbfbc4be8 in ?? ()
#16 0x0808ce98 in ap_run_process_connection ()



[2008-09-18 14:26:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I can't reproduce this.

PHP Fatal error:  Uncaught exception 'Exception' with message 'error'
in /tmp/test.php:3
Stack trace:
#0 /tmp/test.php(8): error()
#1 /tmp/test.php(17): Foo->__construct()
#2 {main}
  thrown in /tmp/test.php on line 3



[2008-09-18 10:07:16] erikg at codepoet dot no

Oops, the $item variables weren't supposed to be there. Doesn't matter
though, the segfault still triggers.



[2008-09-18 10:04:08] erikg at codepoet dot no

Description:

Apache segfaults when throwing an exception in a function whose return
value is used to construct a class within another class' constructor.

That sentence made my head hurt, just read the code :) I haven't been
able to remove any code while still reproducing the crash.

Reproduce code:
---
function error($item) {
throw new Exception("error");
}

class Foo {
function __construct() {
new Bar(error($item));
}
}

class Bar {
function __construct($param) {
}
}

new Foo();

Expected result:

Foo object to be instantiated

Actual result:
--
Apache segfaults





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



#46249 [NEW]: pdo_pgsql always fill in NULL for empty BLOB

2008-10-07 Thread hswong3i at gmail dot com
From: hswong3i at gmail dot com
Operating system: Debian
PHP version:  5.2.6
PHP Bug Type: PDO related
Bug description:  pdo_pgsql always fill in NULL for empty BLOB

Description:

When pdo_pgsql working with:
  1. BLOB field,
  2. running INSERT/UPDATE queries, and
  3. BLOB value with empty string ''

It will always fill NULL into database and so result as buggy.
INSERT/UPDATE BLOB value with NULL will function correctly.

P.S. pdo_mysql is NOT buggy when running with similar programming logic,
empty string pass into database correctly. Tested with PHP5.2.6 and
PHP5.3-dev, both are buggy.

Reproduce code:
---
Please refer to http://drupal.org/node/316095#comment-1047830 for more
information.

Expected result:

Empty string should fill into database correctly.

Actual result:
--
Empty string is now stored as NULL.

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



#45575 [Asn->Csd]: [PATCH] Segfault with invalid non-string as event handler callback

2008-10-07 Thread felipe
 ID:   45575
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chris_se at gmx dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: InterBase related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  felipe
 New Comment:

This bug has been fixed in CVS.

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

Fixed in 5.2, 5.3 and HEAD.

Thanks for the patch. :)


Previous Comments:


[2008-07-21 07:51:13] chris_se at gmx dot net

Description:

Same problem as with bug #4 - just for a different extension: The
interbase extension accepts arbitrary zvals as callbacks (which is fine)
but always uses Z_STRVAL(zval) to display an error message if the
callback is invalid. This will cause a segfault if e.g. int(1) is passed
as a callback.

The following patch against PHP_5_3 (it also applies against PHP 5.2)
solves the problem (there are two places where error messages are
generated):

http://www.christian-seiler.de/temp/ibase-5.3.patch

And the same patch ported to HEAD:

http://www.christian-seiler.de/temp/ibase-6.patch

Please note that I only found this bug because I did a source review of
all core extensions that call callbacks in order to ensure they are
compatible with closures. I have no knowledge or experience whatsoever
with Interbase or Firebird so I can't actually test this. But by reading
the source it is clear that this will crash PHP (see bug #4 where
the same problem occurred but where I could test the issue).

Reproduce code:
---
Probably something like:
ibase_set_event_handler($connection, 1, "whatever");

Expected result:

Callback argument 1 is not a callable function

Actual result:
--
Segmentation fault.





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



#40773 [NoF->Fbk]: Apache crash when ibase.dateformat "%d-%m-%Y"

2008-10-07 Thread felipe
 ID:   40773
 Updated by:   [EMAIL PROTECTED]
 Reported By:  treck at nano dot lv
-Status:   No Feedback
+Status:   Feedback
 Bug Type: InterBase related
 Operating System: FreeBSD
 PHP Version:  5.2.1
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


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

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



[2007-03-11 14:40:22] [EMAIL PROTECTED]

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

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





[2007-03-10 20:24:29] treck at nano dot lv

Description:

When ibase.dateformat is set to "%d-%m-%Y" in php.ini or via ini_set
php crashes with Bus error.






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



#46112 [Fbk->Opn]: Segfault when throwing exception during class construction

2008-10-07 Thread erikg at codepoet dot no
 ID:   46112
 User updated by:  erikg at codepoet dot no
 Reported By:  erikg at codepoet dot no
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: ArchLinux
 PHP Version:  5.2.6
 New Comment:

I can still reproduce the crash with the latest 5.2 snapshot. However,
it seems to work fine using the 5.3 snapshot.


Previous Comments:


[2008-10-07 17:56:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-10-07 17:44:31] erikg at codepoet dot no

The crash doesn't occur when I compile PHP with debug symbols - no idea
why.



[2008-09-19 11:57:32] erikg at codepoet dot no

CVS works when compiled on my laptop (32-bit Intel Core2), but still
segfaults when compiled on a development server (64-bit AMD Opteron
running in 32-bit mode).

Here is a backtrace (unfortunately only have debugging-symbols in
apache and php, but it should be sufficient):

#0  0xb766c676 in zend_do_fcall_common_helper_SPEC ()
   from /usr/lib/apache/libphp5.so
#1  0xb7658758 in execute () from /usr/lib/apache/libphp5.so
#2  0xb762f886 in zend_execute_scripts () from
/usr/lib/apache/libphp5.so
#3  0xb75e519a in php_execute_script () from
/usr/lib/apache/libphp5.so
#4  0xb76a9f31 in php_handler () from /usr/lib/apache/libphp5.so
#5  0x08084fa8 in ap_run_handler ()
#6  0x080884f1 in ap_invoke_handler ()
#7  0x080c1056 in ap_process_request ()
#8  0x080bdab8 in ?? ()
#9  0x08410a88 in ?? ()
#10 0x0004 in ?? ()
#11 0x08410a88 in ?? ()
#12 0x0014 in ?? ()
#13 0x0001 in ?? ()
#14 0x081eba60 in ?? ()
#15 0xbfbc4be8 in ?? ()
#16 0x0808ce98 in ap_run_process_connection ()



[2008-09-18 14:26:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I can't reproduce this.

PHP Fatal error:  Uncaught exception 'Exception' with message 'error'
in /tmp/test.php:3
Stack trace:
#0 /tmp/test.php(8): error()
#1 /tmp/test.php(17): Foo->__construct()
#2 {main}
  thrown in /tmp/test.php on line 3



[2008-09-18 10:07:16] erikg at codepoet dot no

Oops, the $item variables weren't supposed to be there. Doesn't matter
though, the segfault still triggers.



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

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



#44597 [Com]: Postgres driver does not prepare booleans correctly

2008-10-07 Thread dac514 at hotmail dot com
 ID:   44597
 Comment by:   dac514 at hotmail dot com
 Reported By:  kenaniah at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Red Hat 4.1.1
 PHP Version:  5.2.5
 New Comment:

This is happening to me too, OS X and CentOS, PHP 5.2.6

I am converting a web application from MySql to PostgreSQL and i've 
run into a roadbloack that is forcing me to find every single boolean 
query and manually binding it instead of benefiting from execute() 
$input_parameters. PITA! I discovered the explanation to this "bug" 
here:

http://ca.php.net/manual/en/pdostatement.execute.php#84990

As of 5.2.6 you still can't use PDOStatement->execute() 
$input_parameters to pass a boolean to PostgreSQL. To do that, you'll 
have to call bindParam() with explicit types for *each* parameter in 
the query.

Pseudo example, where col5 is of type boolean (i.e. tinyint(1) in 
MySQL)

$q = 'INSERT INTO table (col1, col2, col3, col4, col5, col6) VALUES (?
, ?, ?, ?, ?, ?)';
$v = array('foo1', 'foo2', 'foo3', foo4', false, 'foo6');
$st = $db->prepare($q);
$st->execute($v);

PostgreSQL complains and the script dies. Leaving me in the cold and I

have to rewrite the code, which becomes excessively painful when the 
queries are dynamically generated. PostgreSQL workaround, boo!

$q = 'INSERT INTO table (col1, col2, col3, col4, col5, col6) VALUES (?
, ?, ?, ?, ?, ?)';
$v = array('foo1', 'foo2', 'foo3', foo4', false, 'foo6');
$st = $db->prepare($q);
$st->bindParam(1, $v[0]], PDO::PARAM_STR);
$st->bindParam(2, $v[1]], PDO::PARAM_STR);
$st->bindParam(3, $v[2]], PDO::PARAM_STR);
$st->bindParam(4, $v[3]], PDO::PARAM_STR);
$st->bindParam(5, $v[4]], PDO::PARAM_BOOL);
$st->bindParam(6, $v[5]], PDO::PARAM_STR);
$st->execute();

Can we get a fix for this soon?


Previous Comments:


[2008-04-01 21:00:50] kenaniah at gmail dot com

Description:

When using postgres via PDO and attempting to execute an INSERT or
UPDATE query using $stmt->execute(array_values($data)) syntax, postgres
returns an error for any boolean fields that may be present. 



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

$stmt->execute($values);

?>

Expected result:

PDO will recognize that the values in the array are boolean, and will
provide these values to the prepared statement as correctly-formatted
booleans.

Actual result:
--
PostgreSQL 8.1.9 returns an error stating that the provided values for
the booleans are not in the correct format, and may need to be
type-casted.





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



#46214 [Bgs]: strpos() returns varying results

2008-10-07 Thread dimedrol at tut dot by
 ID:   46214
 User updated by:  dimedrol at tut dot by
 Reported By:  dimedrol at tut dot by
 Status:   Bogus
 Bug Type: Strings related
 Operating System: GNU/Linux i686 2.6.9
 PHP Version:  5.2.6
 New Comment:

I would underline, that mbstring is intended for multibyte characters
whereas I use single-byte encoding CP-1251 so why would I need mbstring
then?


Previous Comments:


[2008-10-07 12:25:25] [EMAIL PROTECTED]

Yes, use mbstring. No bug here.



[2008-10-01 18:13:55] dimedrol at tut dot by

In my sample code cyrillic characters were replaced by unicode escape
sequences. Please note that originally they were single-byte cp-1251
characters.



[2008-10-01 18:11:55] dimedrol at tut dot by

Description:

When I run short script below I every time receive different values in
output. It may print 7 and may print 11. PHP-file has encoding cp-1251.

Here's version info from my webserver

-bash-2.05b$ /usr/sbin/httpd -V
Server version: Apache/2.0.63
Server built: Jul 22 2008 23:09:16
Architecture: 32-bit
Server compiled with
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache"
-D SUEXEC_BIN="/usr/local/apache/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Reproduce code:
---


it contains cyrillic characters. If I replace them with latin ones
everything works fine

Expected result:

I expect 11 to be printed

Actual result:
--
Actual results is sometimes 11 and sometimes 7. 7 looks like cyrillic
characters are simply omitted during calculation.





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



#46250 [NEW]: wrong session id passed to read handler

2008-10-07 Thread axel dot starck at contec dot ca
From: axel dot starck at contec dot ca
Operating system: Linux RedHat 8, 2.4.20-20.8cus 
PHP version:  5.3.0alpha2
PHP Bug Type: Session related
Bug description:  wrong session id passed to read handler

Description:

we have our own db base session handler.
it looks like with v5.3.0 the session id passed to the read handler is not
not the one passed as parameter to the script.
the code is in production for years. switching back to v5.2.6
solves the problem. see code/trace snipped below


Reproduce code:
---
error_log ("-1-".$_SERVER["REQUEST_URI"]."--".print_r ($_REQUEST,
true)."--");

function sess_read ($id)
{
  error_log ("--sess_read (id=$id)--");
  ...
}
.
session_set_save_handler ('sess_open', 'sess_close', 'sess_read',
'sess_write', 'sess_destroy', 'sess_gc');

if (session_start ()) error_log ("session_start:GOOD");
else  error_log ("session_start:BAAD");
error_log ("-2-SID:".SID."--".print_r ($_SESSION, true)."--");

-
[07-Oct-2008 16:29:53]
-1-/projects/svn/ui/base/index.php?HORNET=d72592f9adf5b04c74bb269a799aef53--Array
(
[HORNET] => d72592f9adf5b04c74bb269a799aef53
)
--
[07-Oct-2008 16:29:53] --sess_read
(id=22cf7b3c5d839f71bc5ae12e608c1675)--
[07-Oct-2008 16:29:53] session_start:GOOD
[07-Oct-2008 16:29:53]
-2-SID:HORNET=22cf7b3c5d839f71bc5ae12e608c1675--Array
(
)
--



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