#46148 [Com]: ((strlen($someString) <= $someInteger) ? someStatement : someStatement) fails

2008-09-22 Thread tf at oopsilon dot com
 ID:   46148
 Comment by:   tf at oopsilon dot com
 Reported By:  Yuji1 at mail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.6
 New Comment:

Firstly, your ternary's the wrong way up. You're asking whether a
string is less than 300 chars long, and if it is getting the first 300
chars.

Secondly, the ternary has a higher precedence than comparison: ($foo <
300 ? 1 : 2), for example, is ($foo < (300?1:2)).

Your statement should probably be:
(strlen($foo)<=300)?$foo:substr($foo,0,300)


Previous Comments:


[2008-09-22 02:40:33] Yuji1 at mail dot com

Description:

(somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement

and

((somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement)

fail

but

((somefunction($someObject someOperator $someObject) ? someStatement :
someStatement)

works. :/

Reproduce code:
---
$queryResults was an array of strings, [1] being a string. It had
length, yes.

I used:
$queryResults[1] = (strlen($queryResults[1]) <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

It however fails.

This fails too:

$queryResults[1] = strlen($queryResults[1]) <= 300 ?
substr($queryResults[1], 0, 300) : $queryResults[1];

This works:

$queryResults[1] = (strlen($queryResults[1] <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

Expected result:

I expected it to well, shorten the length to 300.

Actual result:
--
Completely fails. In fact, without the (strlen($queryResults[1] <= 300)
being that way, it does this (example is of a database query, and PER
ROW IT PRINTS OUT THE FOLLOWING STRING, THE POST STRING FOR NEWS):

First post:
StringStringStringString

Second post:
StringStringStringStringStringStringString

Third post:
StringStringStringStringStringStringStringStringStringString

Etc.





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



#46038 [Opn]: imagepsloadfont not working

2008-09-22 Thread cory dot mawhorter at ephective dot com
 ID:   46038
 User updated by:  cory dot mawhorter at ephective dot com
 Reported By:  cory dot mawhorter at ephective dot com
 Status:   Open
 Bug Type: GD related
 Operating System: Windows Vista
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

If you didn't receive the email with the font files I can make them
available for you to download elsewhere.


Previous Comments:


[2008-09-15 08:24:04] cory dot mawhorter at ephective dot com

I didn’t want to make them available online because of copyright.  I’ve
emailed you the two fonts I most recently tried.  

The first is Adobe’s Albertus MT and the second is Porcelain.

Let me know if for some reason you can't receive the attachment or
don't receive the email and I'll upload them someplace.



[2008-09-15 06:01:54] [EMAIL PROTECTED]

you do not need (and should not) download the T1Lib dll. It is already
in the extension.

Do you have the font files please?



[2008-09-15 00:38:48] [EMAIL PROTECTED]

Pierre, any idea?



[2008-09-10 06:03:14] cory dot mawhorter at ephective dot com

Description:

I can't get the the example given at http://php.net/imagepstext to work
at all under Windows.  I have GD with t1lib enabled but it is producing
an error and will not load the font.  The same code runs fine under
linux.

Originally, I was getting a "Font file not found" error even though the
font file was definitely there.  I downloaded and installed the T1Lib
from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ]
for giggles and the error changed to the one below.  This may just be a
coincidence, though.

Reproduce code:
---
Code from http://php.net/imagepstext example.  Comments removed.



Expected result:

Image rendered without errors.

Actual result:
--
Trying to run the above code gives the following error:

Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical
Error Scanning Font File in [path]\pstest.php on line 13

I've tried with a couple different fonts and always get the same
result.  I run the same code on my linux server with the same fonts
without issue.





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



#46148 [Opn]: ((strlen($someString) <= $someInteger) ? someStatement : someStatement) fails

2008-09-22 Thread Yuji1 at mail dot com
 ID:   46148
 User updated by:  Yuji1 at mail dot com
 Reported By:  Yuji1 at mail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.6
 New Comment:

Compare please, the following:

Your example: (strlen($foo)<=300)?$foo:substr($foo,0,300)
My example: ((strlen($foo) <= 300) ? substr($foo[1], 0, 300) :
$foo[1])

...So like, tell me where I screwed up then?


Previous Comments:


[2008-09-22 08:40:14] tf at oopsilon dot com

Firstly, your ternary's the wrong way up. You're asking whether a
string is less than 300 chars long, and if it is getting the first 300
chars.

Secondly, the ternary has a higher precedence than comparison: ($foo <
300 ? 1 : 2), for example, is ($foo < (300?1:2)).

Your statement should probably be:
(strlen($foo)<=300)?$foo:substr($foo,0,300)



[2008-09-22 02:40:33] Yuji1 at mail dot com

Description:

(somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement

and

((somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement)

fail

but

((somefunction($someObject someOperator $someObject) ? someStatement :
someStatement)

works. :/

Reproduce code:
---
$queryResults was an array of strings, [1] being a string. It had
length, yes.

I used:
$queryResults[1] = (strlen($queryResults[1]) <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

It however fails.

This fails too:

$queryResults[1] = strlen($queryResults[1]) <= 300 ?
substr($queryResults[1], 0, 300) : $queryResults[1];

This works:

$queryResults[1] = (strlen($queryResults[1] <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

Expected result:

I expected it to well, shorten the length to 300.

Actual result:
--
Completely fails. In fact, without the (strlen($queryResults[1] <= 300)
being that way, it does this (example is of a database query, and PER
ROW IT PRINTS OUT THE FOLLOWING STRING, THE POST STRING FOR NEWS):

First post:
StringStringStringString

Second post:
StringStringStringStringStringStringString

Third post:
StringStringStringStringStringStringStringStringStringString

Etc.





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



#46148 [Com]: ((strlen($someString) <= $someInteger) ? someStatement : someStatement) fails

2008-09-22 Thread Yuji1 at mail dot com
 ID:   46148
 Comment by:   Yuji1 at mail dot com
 Reported By:  Yuji1 at mail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.6
 New Comment:

Hell, even (strlen($foo) <= 300) ? substr($foo[1], 0, 300) : $foo[1]
How is it wrong?


Previous Comments:


[2008-09-22 09:38:00] Yuji1 at mail dot com

Compare please, the following:

Your example: (strlen($foo)<=300)?$foo:substr($foo,0,300)
My example: ((strlen($foo) <= 300) ? substr($foo[1], 0, 300) :
$foo[1])

...So like, tell me where I screwed up then?



[2008-09-22 08:40:14] tf at oopsilon dot com

Firstly, your ternary's the wrong way up. You're asking whether a
string is less than 300 chars long, and if it is getting the first 300
chars.

Secondly, the ternary has a higher precedence than comparison: ($foo <
300 ? 1 : 2), for example, is ($foo < (300?1:2)).

Your statement should probably be:
(strlen($foo)<=300)?$foo:substr($foo,0,300)



[2008-09-22 02:40:33] Yuji1 at mail dot com

Description:

(somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement

and

((somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement)

fail

but

((somefunction($someObject someOperator $someObject) ? someStatement :
someStatement)

works. :/

Reproduce code:
---
$queryResults was an array of strings, [1] being a string. It had
length, yes.

I used:
$queryResults[1] = (strlen($queryResults[1]) <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

It however fails.

This fails too:

$queryResults[1] = strlen($queryResults[1]) <= 300 ?
substr($queryResults[1], 0, 300) : $queryResults[1];

This works:

$queryResults[1] = (strlen($queryResults[1] <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

Expected result:

I expected it to well, shorten the length to 300.

Actual result:
--
Completely fails. In fact, without the (strlen($queryResults[1] <= 300)
being that way, it does this (example is of a database query, and PER
ROW IT PRINTS OUT THE FOLLOWING STRING, THE POST STRING FOR NEWS):

First post:
StringStringStringString

Second post:
StringStringStringStringStringStringString

Third post:
StringStringStringStringStringStringStringStringStringString

Etc.





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



#46148 [Opn->Bgs]: ((strlen($someString) <= $someInteger) ? someStatement : someStatement) fails

2008-09-22 Thread mkoppanen
 ID:   46148
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Yuji1 at mail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.6
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

http://php.net/manual/en/language.operators.comparison.php

You are checking if the string length is less or equal to 300
characters and in case it is you take 300 first characters.


Previous Comments:


[2008-09-22 09:39:04] Yuji1 at mail dot com

Hell, even (strlen($foo) <= 300) ? substr($foo[1], 0, 300) : $foo[1]
How is it wrong?



[2008-09-22 09:38:00] Yuji1 at mail dot com

Compare please, the following:

Your example: (strlen($foo)<=300)?$foo:substr($foo,0,300)
My example: ((strlen($foo) <= 300) ? substr($foo[1], 0, 300) :
$foo[1])

...So like, tell me where I screwed up then?



[2008-09-22 08:40:14] tf at oopsilon dot com

Firstly, your ternary's the wrong way up. You're asking whether a
string is less than 300 chars long, and if it is getting the first 300
chars.

Secondly, the ternary has a higher precedence than comparison: ($foo <
300 ? 1 : 2), for example, is ($foo < (300?1:2)).

Your statement should probably be:
(strlen($foo)<=300)?$foo:substr($foo,0,300)



[2008-09-22 02:40:33] Yuji1 at mail dot com

Description:

(somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement

and

((somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement)

fail

but

((somefunction($someObject someOperator $someObject) ? someStatement :
someStatement)

works. :/

Reproduce code:
---
$queryResults was an array of strings, [1] being a string. It had
length, yes.

I used:
$queryResults[1] = (strlen($queryResults[1]) <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

It however fails.

This fails too:

$queryResults[1] = strlen($queryResults[1]) <= 300 ?
substr($queryResults[1], 0, 300) : $queryResults[1];

This works:

$queryResults[1] = (strlen($queryResults[1] <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

Expected result:

I expected it to well, shorten the length to 300.

Actual result:
--
Completely fails. In fact, without the (strlen($queryResults[1] <= 300)
being that way, it does this (example is of a database query, and PER
ROW IT PRINTS OUT THE FOLLOWING STRING, THE POST STRING FOR NEWS):

First post:
StringStringStringString

Second post:
StringStringStringStringStringStringString

Third post:
StringStringStringStringStringStringStringStringStringString

Etc.





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



#46148 [Bgs]: ((strlen($someString) <= $someInteger) ? someStatement : someStatement) fails

2008-09-22 Thread Yuji1 at mail dot com
 ID:   46148
 User updated by:  Yuji1 at mail dot com
 Reported By:  Yuji1 at mail dot com
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows XP Pro SP2
 PHP Version:  5.2.6
 New Comment:

I just realized. Apologies, I haven't had my spot of tea today. Remove
post? >///>;


Previous Comments:


[2008-09-22 09:51:44] [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

http://php.net/manual/en/language.operators.comparison.php

You are checking if the string length is less or equal to 300
characters and in case it is you take 300 first characters.



[2008-09-22 09:39:04] Yuji1 at mail dot com

Hell, even (strlen($foo) <= 300) ? substr($foo[1], 0, 300) : $foo[1]
How is it wrong?



[2008-09-22 09:38:00] Yuji1 at mail dot com

Compare please, the following:

Your example: (strlen($foo)<=300)?$foo:substr($foo,0,300)
My example: ((strlen($foo) <= 300) ? substr($foo[1], 0, 300) :
$foo[1])

...So like, tell me where I screwed up then?



[2008-09-22 08:40:14] tf at oopsilon dot com

Firstly, your ternary's the wrong way up. You're asking whether a
string is less than 300 chars long, and if it is getting the first 300
chars.

Secondly, the ternary has a higher precedence than comparison: ($foo <
300 ? 1 : 2), for example, is ($foo < (300?1:2)).

Your statement should probably be:
(strlen($foo)<=300)?$foo:substr($foo,0,300)



[2008-09-22 02:40:33] Yuji1 at mail dot com

Description:

(somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement

and

((somefunction($someObject) someOperator $someObject) ? someStatement :
someStatement)

fail

but

((somefunction($someObject someOperator $someObject) ? someStatement :
someStatement)

works. :/

Reproduce code:
---
$queryResults was an array of strings, [1] being a string. It had
length, yes.

I used:
$queryResults[1] = (strlen($queryResults[1]) <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

It however fails.

This fails too:

$queryResults[1] = strlen($queryResults[1]) <= 300 ?
substr($queryResults[1], 0, 300) : $queryResults[1];

This works:

$queryResults[1] = (strlen($queryResults[1] <= 300) ?
substr($queryResults[1], 0, 300) : $queryResults[1]);

Expected result:

I expected it to well, shorten the length to 300.

Actual result:
--
Completely fails. In fact, without the (strlen($queryResults[1] <= 300)
being that way, it does this (example is of a database query, and PER
ROW IT PRINTS OUT THE FOLLOWING STRING, THE POST STRING FOR NEWS):

First post:
StringStringStringString

Second post:
StringStringStringStringStringStringString

Third post:
StringStringStringStringStringStringStringStringStringString

Etc.





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



#46127 [Opn]: [PATCH] php_openssl_tcp_sockop_accept forgets to set context on accepted stream

2008-09-22 Thread mark at hell dot ne dot jp
 ID:   46127
 User updated by:  mark at hell dot ne dot jp
-Summary:  OpenSSL php_openssl_tcp_sockop_accept forgets to set
   context on accepted stream
 Reported By:  mark at hell dot ne dot jp
 Status:   Open
 Bug Type: OpenSSL related
 Operating System: Gentoo Linux
 PHP Version:  5.3.0alpha2
 Assigned To:  pajoye
 New Comment:

(Adding [PATCH] tag to bug summary)


Previous Comments:


[2008-09-21 09:05:42] mark at hell dot ne dot jp

This bug is fixed by the following patch. I found this out while
reading the code and comparing the OpenSSL and non-OpenSSL versions of
the connection accept process.

This one-line-patch shouldn't require that much testing, and fixes this
problem.

NB: Even if the reference to the context wasn't done, the context's
refcount was increased, causing a minor memoryleak if on a ssl server
stream, at least one connection was attempted (and failed).

Fix:

http://ookoo.org/svn/snip/ssl_test/ssl_fix_5.3.0alpha2.diff



[2008-09-19 15:50:36] mark at hell dot ne dot jp

Description:

A SSL socket created with stream_socket_server() isn't able to accept
any connection. It returns an SSL_R_NO_SHARED_CIPHER error, as if the
context wasn't passed from the listener socket to the created socket in
stream_socket_accept()

This is causing me some problems as I'm writing an application which
needs SSL sockets.

Reproduce code:
---
http://ookoo.org/svn/snip/ssl_test/ssl_test.php

Expected result:

Running on 5.2.6-pl6-gentoo
Linux Memol.ooKoo.org 2.6.25-gentoo-r1-tux #1 SMP Sat Apr 19 21:17:22
CEST 2008 x86_64

Actual result:
--
Running on 5.3.0alpha2

Warning: stream_socket_accept(): SSL_R_NO_SHARED_CIPHER: no suitable
shared cipher could be used.  This could be because the server is
missing an SSL certificate (local_cert context option) in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14

Warning: stream_socket_accept(): Failed to enable crypto in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14

Warning: stream_socket_accept(): accept failed: Success in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14077410:SSL routines:func(119):reason(1040) in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38

Warning: fsockopen(): Failed to enable crypto in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38

Warning: fsockopen(): unable to connect to ssl://127.0.0.1:21673
(Unknown error) in /home/magicaltux/projects/snip/ssl_test/ssl_test.php
on line 38





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



#46138 [Opn]: XML parser strippig < and >

2008-09-22 Thread daniel dot miksik at gmail dot com
 ID:   46138
 User updated by:  daniel dot miksik at gmail dot com
 Reported By:  daniel dot miksik at gmail dot com
 Status:   Open
-Bug Type: XML Reader
+Bug Type: XML related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Further info from our webmaster:
- Linux Fedora 9
- libxml 2.7.1

I have also tested the given example code in PHP 5.2.6 running on WinXP
machine, it worked fine.


Previous Comments:


[2008-09-20 18:19:55] daniel dot miksik at gmail dot com

I forgot to link to a very similar bug reported for PHP 5.0.3 at
http://bugs.php.net/bug.php?id=31139.



[2008-09-20 18:09:47] daniel dot miksik at gmail dot com

Description:

Configure command: './configure' '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib64' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--without-pear' '--with-bz2' '--with-curl'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-expat-dir=/usr'
'--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack'
'--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop'
'--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic'
'--without-sqlite' '--with-libxml-dir=/usr' '--with-xml'
'--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql'
'--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'
'--without-unixODBC' '--disable-pdo' '--disable-xmlreader'
'--disable-xmlwriter' '--disable-json' '--without-pspell'

libxml2 Version: 2.6.32


Reproduce code:
---
This is a link to Example;.",
$vals);
xml_parser_free($xml_parser);
echo "Vals array\n";
print_r($vals);
?>

Expected result:

Vals array
Array
(
[0] => Array
(
[tag] => SUMMARY
[type] => complete
[level] => 1
[value] => This is a link to http://example.com";>Example.
)

)

Actual result:
--
Vals array
Array
(
[0] => Array
(
[tag] => SUMMARY
[type] => complete
[level] => 1
[value] => This is a link to a
href=http://example.comExample/a.
)

)





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



#46138 [Opn->Csd]: XML parser strippig < and >

2008-09-22 Thread daniel dot miksik at gmail dot com
 ID:   46138
 User updated by:  daniel dot miksik at gmail dot com
 Reported By:  daniel dot miksik at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: XML related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Looks like this has already been reported at
http://bugs.php.net/bug.php?id=45996, so closing.


Previous Comments:


[2008-09-22 10:33:10] daniel dot miksik at gmail dot com

Further info from our webmaster:
- Linux Fedora 9
- libxml 2.7.1

I have also tested the given example code in PHP 5.2.6 running on WinXP
machine, it worked fine.



[2008-09-20 18:19:55] daniel dot miksik at gmail dot com

I forgot to link to a very similar bug reported for PHP 5.0.3 at
http://bugs.php.net/bug.php?id=31139.



[2008-09-20 18:09:47] daniel dot miksik at gmail dot com

Description:

Configure command: './configure' '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib64' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--without-pear' '--with-bz2' '--with-curl'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-expat-dir=/usr'
'--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack'
'--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop'
'--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic'
'--without-sqlite' '--with-libxml-dir=/usr' '--with-xml'
'--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql'
'--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'
'--without-unixODBC' '--disable-pdo' '--disable-xmlreader'
'--disable-xmlwriter' '--disable-json' '--without-pspell'

libxml2 Version: 2.6.32


Reproduce code:
---
This is a link to Example;.",
$vals);
xml_parser_free($xml_parser);
echo "Vals array\n";
print_r($vals);
?>

Expected result:

Vals array
Array
(
[0] => Array
(
[tag] => SUMMARY
[type] => complete
[level] => 1
[value] => This is a link to http://example.com";>Example.
)

)

Actual result:
--
Vals array
Array
(
[0] => Array
(
[tag] => SUMMARY
[type] => complete
[level] => 1
[value] => This is a link to a
href=http://example.comExample/a.
)

)





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



#46138 [Csd->Bgs]: XML parser strippig < and >

2008-09-22 Thread pajoye
 ID:   46138
 Updated by:   [EMAIL PROTECTED]
 Reported By:  daniel dot miksik at gmail dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: XML related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

duplicate of #45996 > bogus.


Previous Comments:


[2008-09-22 10:49:20] daniel dot miksik at gmail dot com

Looks like this has already been reported at
http://bugs.php.net/bug.php?id=45996, so closing.



[2008-09-22 10:33:10] daniel dot miksik at gmail dot com

Further info from our webmaster:
- Linux Fedora 9
- libxml 2.7.1

I have also tested the given example code in PHP 5.2.6 running on WinXP
machine, it worked fine.



[2008-09-20 18:19:55] daniel dot miksik at gmail dot com

I forgot to link to a very similar bug reported for PHP 5.0.3 at
http://bugs.php.net/bug.php?id=31139.



[2008-09-20 18:09:47] daniel dot miksik at gmail dot com

Description:

Configure command: './configure' '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib64' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--without-pear' '--with-bz2' '--with-curl'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-expat-dir=/usr'
'--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack'
'--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop'
'--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic'
'--without-sqlite' '--with-libxml-dir=/usr' '--with-xml'
'--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql'
'--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'
'--without-unixODBC' '--disable-pdo' '--disable-xmlreader'
'--disable-xmlwriter' '--disable-json' '--without-pspell'

libxml2 Version: 2.6.32


Reproduce code:
---
This is a link to Example;.",
$vals);
xml_parser_free($xml_parser);
echo "Vals array\n";
print_r($vals);
?>

Expected result:

Vals array
Array
(
[0] => Array
(
[tag] => SUMMARY
[type] => complete
[level] => 1
[value] => This is a link to http://example.com";>Example.
)

)

Actual result:
--
Vals array
Array
(
[0] => Array
(
[tag] => SUMMARY
[type] => complete
[level] => 1
[value] => This is a link to a
href=http://example.comExample/a.
)

)





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



#46149 [NEW]: openssl_sign() can't generate the signature where sign DSA Private key

2008-09-22 Thread hanbsd at 163 dot com
From: hanbsd at 163 dot com
Operating system: Centos 5.0
PHP version:  5.2.6
PHP Bug Type: OpenSSL related
Bug description:  openssl_sign() can't generate the signature where sign DSA 
Private key

Description:

I create private key with 
$configargs = array(
  "digest_alg" => "sha1",
  "private_key_bits" => 1024,
  "private_key_type" => OPENSSL_KEYTYPE_DSA,
  "encrypt_key" => false
);

But I can not get signature by openssl_sign($data, $signature, $key).

Then I use openssl  in shell
#openssl dgst -dss1 -sign id_dsa foo.sha1 > sigfile.bin
openssl create a signature file : sigfile.bin
#openssl dgst -dss1 -verify id_dsa.pub -signature sigfile.bin foo.sha1
openssl print: "Verified OK"


It looks something bug of PHP function openssl_sign()

Reproduce code:
---
$data = "sfsdfsdfs";
$fp = fopen("/home/id_dsa", "r");
$pkey = fread($fp, 8192);
fclose($fp);
$key = openssl_get_privatekey($pkey);
openssl_sign($data, $signature, $key);
openssl_free_key($key);
echo $signature;

Expected result:

openssl_sign() can create signature 

Actual result:
--
openssl_sign() can not create signature , $signature is empty

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



#46150 [NEW]: File Upload does not work after upgarde from 4.X

2008-09-22 Thread npandey2 at sapient dot com
From: npandey2 at sapient dot com
Operating system: Windows Server 2003
PHP version:  5.2.6
PHP Bug Type: Filesystem function related
Bug description:  File Upload does not work after upgarde from 4.X

Description:

We upgraded out Data Hosting platform from PHP Version 4.4.2 to 5.2.6 and
after that the script to upload files keeps failing.

The relevent settings in PHP.ini file

open_basedir = NOT Set
safe_mode = On
file_uploads = On
upload_tmp_dir = C:\Windows\Temp

Cannot submit URL as the installation is curerntly at the integration
environment

Reproduce code:
---
PHP Script : 

DataUpload per PHP

";
echo "fileuploads: " . get_cfg_var('file_uploads') . "";
echo "upload_tmp_dir: " . get_cfg_var('upload_tmp_dir') . "";
echo "file_dir: " . $file_dir . "";
echo "userfile: " . $userfile . "";
echo "tmp :" . $tmp . "";

if ($_POST['submit'] == "Senden") {
if ($_FILES["file"]["error"] > 0){ 
echo "Return Code: " . $_FILES["file"]["error"] . "";
} elseif (file_exists($file_dir.$userfile)) {
die ("File does not exists!");
} elseif (move_uploaded_file($tmp, $file_dir.$userfile)) {
die ("Data file $userfile copied");
}
else{
die ("Data Upload failed!");
}}
else {
?>

Data File:  






Expected result:

PHP Script : phpversion: 5.2.4
fileuploads: 1
upload_tmp_dir: C:\Windows\Temp
file_dir: ./files/
userfile: 2.txt
tmp :C:\WINDOWS\Temp\php8487.tmp

Data file 2.txt copied

Actual result:
--
PHP Script : phpversion: 5.2.4
fileuploads: 1
upload_tmp_dir: C:\Windows\Temp
file_dir: ./files/
userfile: 2.txt
tmp :

Return Code: 6
Data Upload failed!

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



#46139 [Com]: PDOStatement->setFetchMode() forgets FETCH_PROPS_LATE

2008-09-22 Thread matt at mattfarina dot com
 ID:   46139
 Comment by:   matt at mattfarina dot com
 Reported By:  chsc at peytz dot dk
 Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.3.0alpha2
 New Comment:

I've found this same problem in PHP 5.2.6.


Previous Comments:


[2008-09-20 19:46:57] chsc at peytz dot dk

Suggested fix:

Index: ext/pdo/pdo_stmt.c
===
RCS file: /repository/php-src/ext/pdo/pdo_stmt.c,v
retrieving revision 1.118.2.38.2.24.2.22
diff -u -8 -p -r1.118.2.38.2.24.2.22 pdo_stmt.c
--- ext/pdo/pdo_stmt.c  12 Aug 2008 17:20:25 - 
1.118.2.38.2.24.2.22
+++ ext/pdo/pdo_stmt.c  20 Sep 2008 19:44:43 -
@@ -902,24 +902,25 @@ static int do_fetch_opt_finish(pdo_stmt_
 }
 /* }}} */

 /* perform a fetch.  If do_bind is true, update any bound columns.
  * If return_value is not null, store values into it according to HOW.
*/
 static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval
*return_value,
enum pdo_fetch_type how, enum pdo_fetch_orientation ori, long
offset, zval *return_all TSRMLS_DC) /* {{{ */
 {
-   int flags = how & PDO_FETCH_FLAGS, idx, old_arg_count = 0;
+   int flags, idx, old_arg_count = 0;
zend_class_entry *ce = NULL, *old_ce = NULL;
zval grp_val, *grp, **pgrp, *retval, *old_ctor_args = NULL;
int colno;

if (how == PDO_FETCH_USE_DEFAULT) {
how = stmt->default_fetch_type;
}
+   flags = how & PDO_FETCH_FLAGS;
how = how & ~PDO_FETCH_FLAGS;

if (!do_fetch_common(stmt, ori, offset, do_bind TSRMLS_CC)) {
return 0;
}

if (how == PDO_FETCH_BOUND) {
RETVAL_TRUE;


Inspired by the fix for bug 41971:
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.21&r2=1.118.2.38.2.22



[2008-09-20 19:43:53] chsc at peytz dot dk

Description:

PDO::FETCH_PROPS_LATE only works if it specified in both the
$stmt->setFetchMode() call and in the following $stmt->fetch().

Calling
  $stmt->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE,
'MyClass');
  $obj = $stmt->fetch();
yields the same result as
  $stmt->setFetchMode(PDO::FETCH_CLASS, 'MyClass');
  $obj$stmt->fetch();
In order to make it work you should specify FETCH_PROPS_LATE in both
calls, i.e.
  $stmt->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE,
'MyClass');
  $obj = $stmt->fetch(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE);


Reproduce code:
---
class Person {
public $name = NULL;
public function __construct() {
var_dump($this->name);
}
}
$db = new PDO("mysql:dbname=foo", "foo", "secret");
$db->exec("CREATE TABLE person (id INTEGER NOT NULL, name
VARCHAR(100))");
$db->exec("INSERT INTO person (id, name) VALUES (1, 'Sven')");
$stmt1 = $db->query('SELECT * FROM person');
$stmt1->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE,
'Person');
$obj1 = $stmt1->fetch(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE);
var_dump($obj1->name);
$stmt1 = NULL;
$stmt2 = $db->query('SELECT * FROM person');
$stmt2->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE,
'Person');
$obj2 = $stmt2->fetch();
var_dump($obj2->name);


Expected result:

NULL
string(4) "Sven"
NULL
string(4) "Sven"


Actual result:
--
NULL
string(4) "Sven"
string(4) "Sven"
string(4) "Sven"






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



#46151 [NEW]: file_get_contents() doesn't use mmap

2008-09-22 Thread Keisial at gmail dot com
From: Keisial at gmail dot com
Operating system: 
PHP version:  5.2CVS-2008-09-22 (snap)
PHP Bug Type: Streams related
Bug description:  file_get_contents() doesn't use mmap

Description:

As opposed to 5.3 on 5.2 php_stream_copy_to_mem doesn't use
php_stream_mmap_range, even though there is a comment on the call to
php_stream_copy_to_mem saying 'uses mmap if possible' (on 
file_get_contents, at file.c:562)

5.2 is using read() calls instead. Still, 5.2 is faster both in loading
and treating the file.


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



#42571 [Com]: Method variable array's missing

2008-09-22 Thread labibhat at yahoo dot com
 ID:   42571
 Comment by:   labibhat at yahoo dot com
 Reported By:  rockerboo at gmail dot com
 Status:   No Feedback
 Bug Type: SimpleXML related
 Operating System: CentOS 5
 PHP Version:  5.2.4
 New Comment:

hay


Previous Comments:


[2007-09-14 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-09-10 01:06:44] hubert dot roksor at gmail dot com

This is not a bug. The reporter expects is_array() to return true when
passed a SimpleXML_Element object.

@rockerboo: even though you can access a SimpleXML_Element as an array,
it doesn't mean that it is considered as an array, therefore is_array()
is expected to return false.



[2007-09-06 22:38:50] [EMAIL PROTECTED]

Please, try come up with shorter script that clearly (!) shows the
problem you have. (without the extra empty lines please)



[2007-09-06 10:43:35] [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-09-05 20:01:16] rockerboo at gmail dot com

Description:

I create an SimpleXmlElement, and see if one of the member variable
array's in an array, and it says it is not. But I am able to foreach
through the array, and when I do, the key states they 2nd parent's key
as the key. 

Linux virbdevel.com 2.6.18-8.1.4.el5.028stab035.1 #1 SMP Sat Jun 9
01:43:20 MSD 2007 i686

'./configure' '--with-apxs2=/usr/sbin/apxs'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--libdir=/usr/lib' '--with-libdir=lib' '--with-mysql' '--with-mysqli'
'--with-pear' '--with-zlib' '--with-openssl' '--with-png'
'--with-jpeg-dir=/usr/lib' '--with-bz2' '--enable-bcmath'
'--enable-exif' '--with-fam' '--with-gd' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/lib' '--enable-gd-jis-conv' '--with-imap'
'--with-imap-ssl' '--enable-mbstring' '--with-iconv' '--with-mcrypt'
'--enable-shmop' '--enable-imap' '--enable-imap-ssl' '--with-kerberos'
'--with-xsl' '--with-dom' '--enable-soap' '--enable-simplexml'
'--with-mhash' '--with-curl' '--enable-calendar' '--enable-dbx'
'--with-xml' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-track-vars' '--enable-trans-sid' '--enable-sockets'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--disable-ffmpeg'

Reproduce code:
---
http://pastebin.com/f252f4872

Expected result:


SimpleXMLElement Object
(
[EMAIL PROTECTED] => Array
(
[type] => array
)

[status] => Array
(
[0] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 + 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch
automatically receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[1] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:02:46 + 2007
[id] => 249393302
[text] => iPodTouch? No. iPodBadTouch. Don't touch
your iPod that way.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen

#46152 [NEW]: Exit() don't stop execute

2008-09-22 Thread paszczak at thecamels dot org
From: paszczak at thecamels dot org
Operating system: 
PHP version:  5.2.6
PHP Bug Type: *General Issues
Bug description:  Exit() don't stop execute

Description:

Why exit don't stop execute of PHP script?

Reproduce code:
---
class innaklasa
{
public function __construct()
{
print "inna klasa";
}
public function zrob()
{
print "inna klasa zrob";
}
}
class klasa
{
public function __construct()
{
print "konstruktor";
}
public function __destruct()
{
print "destruktor";
$innaklasa = new innaklasa;
$innaklasa->zrob();
}
}
$c = new klasa;
exit;

Expected result:

konstruktor

Actual result:
--
konstruktor
inna klasa
inna klasa zrob

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



#46088 [Asn->Csd]: RegexIterator::accept - segfault

2008-09-22 Thread felipe
 ID:  46088
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Assigned
+Status:  Closed
 Bug Type:SPL related
 PHP Version: 5.3CVS-2008-09-15 (CVS)
 Assigned To: colder
 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-09-15 22:52:36] [EMAIL PROTECTED]

Marcus, can I commit it or have you a better fix? :)



[2008-09-15 22:52:12] [EMAIL PROTECTED]

Description:

A simple detail:


Index: ext/spl/spl_iterators.c
===
RCS file: /repository/php-src/ext/spl/spl_iterators.c,v
retrieving revision 1.73.2.30.2.28.2.14
diff -u -p -r1.73.2.30.2.28.2.14 spl_iterators.c
--- ext/spl/spl_iterators.c 9 Sep 2008 19:44:15 -  
1.73.2.30.2.28.2.14
+++ ext/spl/spl_iterators.c 15 Sep 2008 22:46:02 -
@@ -1690,6 +1690,10 @@ SPL_METHOD(RegexIterator, accept)
intsubject_len, use_copy, count, result_len;
zval   subject_copy, zcount, *replacement;
 
+   if (intern->current.data == NULL) {
+   RETURN_FALSE;
+   }
+
if (intern->u.regex.flags & REGIT_USE_KEY) {
if (intern->current.key_type == HASH_KEY_IS_LONG) {
subject_len = slprintf(tmp, sizeof(tmp), "%ld",
intern->current.int_key);


Reproduce code:
---
accept());

?>

Using the flag RegexIterator::USE_KEY too.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211655776 (LWP 768)]
zend_make_printable_zval (expr=0x0, expr_copy=0xbf8b9360,
use_copy=0xbf8b9374) at /home/felipe/dev/php5/Zend/zend.c:208
208 if (Z_TYPE_P(expr)==IS_STRING) {
(gdb) bt
#0  zend_make_printable_zval (expr=0x0, expr_copy=0xbf8b9360,
use_copy=0xbf8b9374) at /home/felipe/dev/php5/Zend/zend.c:208
#1  0x081941d0 in zim_spl_RegexIterator_accept (ht=0,
return_value=0x8786d34, return_value_ptr=0x0, this_ptr=0x8785de8,
return_value_used=1, 
tsrm_ls=0x8642050) at
/home/felipe/dev/php5/ext/spl/spl_iterators.c:1704
#2  0x0834e7f0 in zend_do_fcall_common_helper_SPEC
(execute_data=0x87b82d8, tsrm_ls=0x8642050) at
/home/felipe/dev/php5/Zend/zend_vm_execute.h:315
#3  0x0833c913 in execute (op_array=0x8786238, tsrm_ls=0x8642050) at
/home/felipe/dev/php5/Zend/zend_vm_execute.h:104
#4  0x08316d8f in zend_execute_scripts (type=8, tsrm_ls=0x8642050,
retval=0x0, file_count=3) at /home/felipe/dev/php5/Zend/zend.c:1197
#5  0x082bdd0d in php_execute_script (primary_file=0xbf8bb848,
tsrm_ls=0x8642050) at /home/felipe/dev/php5/main/main.c:2075
#6  0x083aea45 in main (argc=2, argv=0xbf8bb9a4) at
/home/felipe/dev/php5/sapi/cli/php_cli.c:1130






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



#46152 [Opn->Bgs]: Exit() don't stop execute

2008-09-22 Thread tularis
 ID:  46152
 Updated by:  [EMAIL PROTECTED]
 Reported By: paszczak at thecamels dot org
-Status:  Open
+Status:  Bogus
 Bug Type:*General Issues
 PHP Version: 5.2.6
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Destructors are called after request finishes and are meant to handle
any cleanup required (ie. closing database connections). This is
intended behaviour.


Previous Comments:


[2008-09-22 12:55:02] paszczak at thecamels dot org

Description:

Why exit don't stop execute of PHP script?

Reproduce code:
---
class innaklasa
{
public function __construct()
{
print "inna klasa";
}
public function zrob()
{
print "inna klasa zrob";
}
}
class klasa
{
public function __construct()
{
print "konstruktor";
}
public function __destruct()
{
print "destruktor";
$innaklasa = new innaklasa;
$innaklasa->zrob();
}
}
$c = new klasa;
exit;

Expected result:

konstruktor

Actual result:
--
konstruktor
inna klasa
inna klasa zrob





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



#46150 [Opn->Bgs]: File Upload does not work after upgarde from 4.X

2008-09-22 Thread tularis
 ID:   46150
 Updated by:   [EMAIL PROTECTED]
 Reported By:  npandey2 at sapient dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Windows Server 2003
 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.

http://nl.php.net/manual/en/features.file-upload.errors.php


Previous Comments:


[2008-09-22 11:46:14] npandey2 at sapient dot com

Description:

We upgraded out Data Hosting platform from PHP Version 4.4.2 to 5.2.6
and after that the script to upload files keeps failing.

The relevent settings in PHP.ini file

open_basedir = NOT Set
safe_mode = On
file_uploads = On
upload_tmp_dir = C:\Windows\Temp

Cannot submit URL as the installation is curerntly at the integration
environment

Reproduce code:
---
PHP Script : 

DataUpload per PHP

";
echo "fileuploads: " . get_cfg_var('file_uploads') . "";
echo "upload_tmp_dir: " . get_cfg_var('upload_tmp_dir') . "";
echo "file_dir: " . $file_dir . "";
echo "userfile: " . $userfile . "";
echo "tmp :" . $tmp . "";

if ($_POST['submit'] == "Senden") {
if ($_FILES["file"]["error"] > 0){ 
echo "Return Code: " . $_FILES["file"]["error"] . "";
} elseif (file_exists($file_dir.$userfile)) {
die ("File does not exists!");
} elseif (move_uploaded_file($tmp, $file_dir.$userfile)) {
die ("Data file $userfile copied");
}
else{
die ("Data Upload failed!");
}}
else {
?>

Data File:  






Expected result:

PHP Script : phpversion: 5.2.4
fileuploads: 1
upload_tmp_dir: C:\Windows\Temp
file_dir: ./files/
userfile: 2.txt
tmp :C:\WINDOWS\Temp\php8487.tmp

Data file 2.txt copied

Actual result:
--
PHP Script : phpversion: 5.2.4
fileuploads: 1
upload_tmp_dir: C:\Windows\Temp
file_dir: ./files/
userfile: 2.txt
tmp :

Return Code: 6
Data Upload failed!





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



#46153 [NEW]: fputcsv doesn't respect RFC4180

2008-09-22 Thread PHP at sebseb01 dot net
From: PHP at sebseb01 dot net
Operating system: Ubuntu 8.04
PHP version:  5.2.6
PHP Bug Type: *General Issues
Bug description:  fputcsv doesn't respect RFC4180

Description:

the rfc4180 (http://tools.ietf.org/html/rfc4180) say
" Each record is located on a separate line, delimited by a line break
(CRLF)"

But actually fputcsv send only a LF


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



#46153 [Opn->Csd]: fputcsv doesn't respect RFC4180

2008-09-22 Thread PHP at sebseb01 dot net
 ID:   46153
 User updated by:  PHP at sebseb01 dot net
 Reported By:  PHP at sebseb01 dot net
-Status:   Open
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Ubuntu 8.04
 PHP Version:  5.2.6
 New Comment:

oups Note's of documentation answer to this bug


Previous Comments:


[2008-09-22 14:36:35] PHP at sebseb01 dot net

Description:

the rfc4180 (http://tools.ietf.org/html/rfc4180) say
" Each record is located on a separate line, delimited by a line break
(CRLF)"

But actually fputcsv send only a LF






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



#46153 [Csd->Bgs]: fputcsv doesn't respect RFC4180

2008-09-22 Thread felipe
 ID:   46153
 Updated by:   [EMAIL PROTECTED]
 Reported By:  PHP at sebseb01 dot net
-Status:   Closed
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Ubuntu 8.04
 PHP Version:  5.2.6


Previous Comments:


[2008-09-22 14:51:30] PHP at sebseb01 dot net

oups Note's of documentation answer to this bug



[2008-09-22 14:36:35] PHP at sebseb01 dot net

Description:

the rfc4180 (http://tools.ietf.org/html/rfc4180) say
" Each record is located on a separate line, delimited by a line break
(CRLF)"

But actually fputcsv send only a LF






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



#43402 [Com]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2008-09-22 Thread nobody at example dot org
 ID:   43402
 Comment by:   nobody at example dot org
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Filter related
 Operating System: *
 PHP Version:  5.2.5
 New Comment:

I see no reason support for hostnames can't be added. 

 filter_var ($addr, FILTER_VALIDATE_EMAIL, FILTER_PERMIT_NON_FQDNS);

That's fine on a LAN and the additional flag stops web miscreants doing
what would, if this were the default behaviour, otherwise be
inevitable.

Back on topic, FILTER_VALIDATE_EMAIL validates nothing. It fails to
ensure an address is syntactically valid. 


--FILE--

--EXPECT--  
bool(true)



[2007-11-26 11:34:19] nobody at example dot org

I may be missing something about the unit tests, following regex update
to php_filter_validate_email() will not pass my test case (after doing
rm ext/filter/tests/*.o ext/filter/tests/*.lo, clearing .out .log .exp
.diff from tests and doing make; make test).

const char regexp[] =
"/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}\\=\\?]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/D";

Yet the equivalent regex works as expected in both PHP and my patched
install.

true,
  '[EMAIL PROTECTED]'=>false,
  "!#$%&'*+-/=.?^_`{|[EMAIL PROTECTED]"=>true,
  );

$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!(validate_email($k) === $v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using PHP func\n";
  print_r($fail);
}
$failed = 0;
$fail = array();

foreach ($test as $k => $v){
  if (!((bool)filter_var($k, FILTER_VALIDATE_EMAIL) == (bool)$v)){
$failed++;
$fail[].= $k;
  }
}

if ($failed > 0){
  echo "Failed $failed of ",count($test), " tests using filter
func\n";
  print_r($fail);
}



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

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



#42552 [Com]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-22 Thread weisz at vcpc dot univie dot ac dot at
 ID:   42552
 Comment by:   weisz at vcpc dot univie dot ac dot at
 Reported By:  weisz at vcpc dot univie dot ac dot at
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

I'm sorry to have overlooked the request to test getenv(): no getenv()
doesnt provide the anser either.

Now I'm at PHP version 5.2.6 and the bug is still there. phpinfo()
shows clearly that only SSL_CLIENT_S_DN_OU is available to PHP, not the
values for SSL_CLIENT_S_DN_OU_n (n being an integer value).

PHP doesn't transmit transparently the value of the string parameter to
Apache, but seems to "censor" any Apache variable name it seems not to
know.

Please reopen this bug report, change this behavior to enable the use
of important and very helpful developments in Apache.


Previous Comments:


[2007-11-06 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-10-29 14:40:35] [EMAIL PROTECTED]

As this function only fetches stuff from the apache environment, it's
not possible to be a PHP bug if these are not set in it. Have you tried 
to access those using getenv() instead?



[2007-09-04 21:32:17] weisz at vcpc dot univie dot ac dot at

Description:

apache_getenv("SSL_CLIENT_S_DN_OU_n") with n=0,1,2 returns false.

Apache introduced the environment variables SSL_CLIENT_S_DN_OU_n with
mod_ssl in version 2.2 (the actual version is 2.2.4). PHP didn't follow
this development. Please catch up!






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



#42552 [NoF->Opn]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-22 Thread weisz at vcpc dot univie dot ac dot at
 ID:   42552
 User updated by:  weisz at vcpc dot univie dot ac dot at
 Reported By:  weisz at vcpc dot univie dot ac dot at
-Status:   No Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
-PHP Version:  5.2.4
+PHP Version:  5.2.6
 New Comment:

Please reopen this bug report that is still present in PHP 5.2.6


Previous Comments:


[2008-09-22 17:10:11] weisz at vcpc dot univie dot ac dot at

I'm sorry to have overlooked the request to test getenv(): no getenv()
doesnt provide the anser either.

Now I'm at PHP version 5.2.6 and the bug is still there. phpinfo()
shows clearly that only SSL_CLIENT_S_DN_OU is available to PHP, not the
values for SSL_CLIENT_S_DN_OU_n (n being an integer value).

PHP doesn't transmit transparently the value of the string parameter to
Apache, but seems to "censor" any Apache variable name it seems not to
know.

Please reopen this bug report, change this behavior to enable the use
of important and very helpful developments in Apache.



[2007-11-06 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-10-29 14:40:35] [EMAIL PROTECTED]

As this function only fetches stuff from the apache environment, it's
not possible to be a PHP bug if these are not set in it. Have you tried 
to access those using getenv() instead?



[2007-09-04 21:32:17] weisz at vcpc dot univie dot ac dot at

Description:

apache_getenv("SSL_CLIENT_S_DN_OU_n") with n=0,1,2 returns false.

Apache introduced the environment variables SSL_CLIENT_S_DN_OU_n with
mod_ssl in version 2.2 (the actual version is 2.2.4). PHP didn't follow
this development. Please catch up!






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



#46154 [NEW]: Un expexted result of empty string key of array

2008-09-22 Thread akam at akameng dot com
From: akam at akameng dot com
Operating system: Windows XP SP2
PHP version:  5.2.6
PHP Bug Type: Scripting Engine problem
Bug description:  Un expexted result of empty string key of array

Description:

due to this line of php manual:
"Using the empty string as a key will create (or overwrite) a key 
with the empty string and its value;"
but empty string key will work.

Reproduce code:
---
 'php.net', '' => 'php.net', "" => 'php.net' );

//test
echo $test['zero']."\n"; //output: php.net
echo $test['']."\n";  //output: php.net
echo $test[""]."\n"; //output: php.net

foreach ($test as $key => $value ){
echo "\$key = $key and \$value = $value \n";
}
//out put
/*
$key = zero and $value = php.net 
$key = and $value = php.net
*/
?>

Expected result:

php.net



php.net






Actual result:
--
php.net
php.net
php.net

php.net
php.net





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



#46154 [Opn]: Un expexted result of empty string key of array

2008-09-22 Thread akam at akameng dot com
 ID:   46154
 User updated by:  akam at akameng dot com
 Reported By:  akam at akameng dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP SP2
 PHP Version:  5.2.6
 New Comment:

Actual result:
--
php.net 
php.net 
php.net 
$key = zero and $value = php.net 
$key = and $value = php.net


Previous Comments:


[2008-09-22 20:50:32] akam at akameng dot com

Description:

due to this line of php manual:
"Using the empty string as a key will create (or overwrite) a key 
with the empty string and its value;"
but empty string key will work.

Reproduce code:
---
 'php.net', '' => 'php.net', "" => 'php.net' );

//test
echo $test['zero']."\n"; //output: php.net
echo $test['']."\n";  //output: php.net
echo $test[""]."\n"; //output: php.net

foreach ($test as $key => $value ){
echo "\$key = $key and \$value = $value \n";
}
//out put
/*
$key = zero and $value = php.net 
$key = and $value = php.net
*/
?>

Expected result:

php.net



php.net






Actual result:
--
php.net
php.net
php.net

php.net
php.net









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



#46152 [Bgs]: Exit() don't stop execute

2008-09-22 Thread paszczak at thecamels dot org
 ID:  46152
 User updated by: paszczak at thecamels dot org
 Reported By: paszczak at thecamels dot org
 Status:  Bogus
 Bug Type:*General Issues
 PHP Version: 5.2.6
 New Comment:

Maybe its not a bug. But if I want to terminate the current script
(immediately), which function should I use?

http://pl2.php.net/manual/pl/function.exit.php
exit — Output a message and terminate the current script

I thought that die() are called destructors after request finishes and
are meant to handle, but exit() terminate the current script
immediately.


Previous Comments:


[2008-09-22 14:13:46] [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

Destructors are called after request finishes and are meant to handle
any cleanup required (ie. closing database connections). This is
intended behaviour.



[2008-09-22 12:55:02] paszczak at thecamels dot org

Description:

Why exit don't stop execute of PHP script?

Reproduce code:
---
class innaklasa
{
public function __construct()
{
print "inna klasa";
}
public function zrob()
{
print "inna klasa zrob";
}
}
class klasa
{
public function __construct()
{
print "konstruktor";
}
public function __destruct()
{
print "destruktor";
$innaklasa = new innaklasa;
$innaklasa->zrob();
}
}
$c = new klasa;
exit;

Expected result:

konstruktor

Actual result:
--
konstruktor
inna klasa
inna klasa zrob





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



#46154 [Opn->Bgs]: Un expexted result of empty string key of array

2008-09-22 Thread tularis
 ID:   46154
 Updated by:   [EMAIL PROTECTED]
 Reported By:  akam at akameng dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows XP SP2
 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.

This is completely expected.
First of all, '' === "", seriously, there is 0 difference between those
two. Next, I think you misunderstood the manual. It just says you CAN
use an empty string, and it WILL work. If an empty string is already
defined as a key, it will simply overwrite it.

$test = array('zero' => '1', '' => '2', "" => '3' );

echo $test['zero']."\n"; //outputs: 1
echo $test['']."\n";  //outputs: 3
echo $test[""]."\n"; //outputs: 3

'' = empty string
"" = exact same empty string
you could even use a heredoc to make such an empty string. They are all
exactly the same. Read up on single and double quotes to find out how
they differ.


Previous Comments:


[2008-09-22 21:01:01] akam at akameng dot com

Actual result:
--
php.net 
php.net 
php.net 
$key = zero and $value = php.net 
$key = and $value = php.net



[2008-09-22 20:50:32] akam at akameng dot com

Description:

due to this line of php manual:
"Using the empty string as a key will create (or overwrite) a key 
with the empty string and its value;"
but empty string key will work.

Reproduce code:
---
 'php.net', '' => 'php.net', "" => 'php.net' );

//test
echo $test['zero']."\n"; //output: php.net
echo $test['']."\n";  //output: php.net
echo $test[""]."\n"; //output: php.net

foreach ($test as $key => $value ){
echo "\$key = $key and \$value = $value \n";
}
//out put
/*
$key = zero and $value = php.net 
$key = and $value = php.net
*/
?>

Expected result:

php.net



php.net






Actual result:
--
php.net
php.net
php.net

php.net
php.net









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



#46146 [Opn]: XMLReader should be able to work on an open stream

2008-09-22 Thread Keisial at gmail dot com
 ID:  46146
 User updated by: Keisial at gmail dot com
 Reported By: Keisial at gmail dot com
 Status:  Open
 Bug Type:XML Reader
 PHP Version: 5.2CVS-2008-09-21 (snap)
 New Comment:

Implementation: http://pastebin.com/f50204f1f


Previous Comments:


[2008-09-21 23:09:12] Keisial at gmail dot com

Description:

XMLReader should be able to work on an open stream.

The extension is already stream-aware so it's only a matter of
xmlAllocParserInputBuffer() the xmlParserInputBuffer as in
php_libxml_input_buffer_create_filename() (see ext/libxml/libxml.c) and
load that with xmlNewTextReader(), providing a nice method for that
(open_stream?, attach_to_stream?)






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



#46155 [NEW]: Installer fails

2008-09-22 Thread thomas dot j dot owens at gmail dot com
From: thomas dot j dot owens at gmail dot com
Operating system: Windows XP SP3
PHP version:  5.2.6
PHP Bug Type: Windows Installer
Bug description:  Installer fails

Description:

Before the installer finishes, I get an error message.

The options I use are:
Installing PHP to C:\Program Files\PHP
Setting up Apache 2.2.x Module
Apache Configuration Directory is C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
Chose to install ALL features

The error message says "There is a problem with this Windows Installer
package. A script required for this install to complete could not be run.
Contract your support personnel or package vendor."

I'm downloading the MSI from php.net.


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



#42552 [Opn->Fbk]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-22 Thread pajoye
 ID:   42552
 Updated by:   [EMAIL PROTECTED]
 Reported By:  weisz at vcpc dot univie dot ac dot at
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

I do not see why PHP would not fetch these vars if apache made them
available.

Have you tried:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg17637.html


Previous Comments:


[2008-09-22 17:13:29] weisz at vcpc dot univie dot ac dot at

Please reopen this bug report that is still present in PHP 5.2.6



[2008-09-22 17:10:11] weisz at vcpc dot univie dot ac dot at

I'm sorry to have overlooked the request to test getenv(): no getenv()
doesnt provide the anser either.

Now I'm at PHP version 5.2.6 and the bug is still there. phpinfo()
shows clearly that only SSL_CLIENT_S_DN_OU is available to PHP, not the
values for SSL_CLIENT_S_DN_OU_n (n being an integer value).

PHP doesn't transmit transparently the value of the string parameter to
Apache, but seems to "censor" any Apache variable name it seems not to
know.

Please reopen this bug report, change this behavior to enable the use
of important and very helpful developments in Apache.



[2007-11-06 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-10-29 14:40:35] [EMAIL PROTECTED]

As this function only fetches stuff from the apache environment, it's
not possible to be a PHP bug if these are not set in it. Have you tried 
to access those using getenv() instead?



[2007-09-04 21:32:17] weisz at vcpc dot univie dot ac dot at

Description:

apache_getenv("SSL_CLIENT_S_DN_OU_n") with n=0,1,2 returns false.

Apache introduced the environment variables SSL_CLIENT_S_DN_OU_n with
mod_ssl in version 2.2 (the actual version is 2.2.4). PHP didn't follow
this development. Please catch up!






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