#42311 [Opn->Asn]: Intermittent failure of test bug35885.phpt

2007-08-15 Thread jani
 ID:   42311
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robin_fernandes at uk dot ibm dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Windows
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  derick
 New Comment:

Assigned to the ext/date maintainer.


Previous Comments:


[2007-08-15 13:53:16] robin_fernandes at uk dot ibm dot com

Below is a suggested patch which modifies the test to allow for a 1
second margin between the timestamps. I have confirmed the resulting
test passes consistently on Windows on PHP 5.2.3, but have done no
further testing.


Index: C:/php5-latest-phpt/ext/date/tests/bug35885.phpt
===
--- C:/php5-latest-phpt/ext/date/tests/bug35885.phpt(revision 13029)
+++ C:/php5-latest-phpt/ext/date/tests/bug35885.phpt(working copy)
@@ -4,15 +4,15 @@
 



[2007-08-15 13:48:21] robin_fernandes at uk dot ibm dot com

Description:

Test http://lxr.php.net/source/php-src/ext/date/tests/bug35885.phpt
compares two time stamps representing the current time. However, these
timestamps are seized in separate statements.

The comparison fails intermittently, because the seconds occasionally
tick over between the two calls.

Below is bug35885.phpt enclosed in a loop to prove that it fails
intermittently. It will break out of the loop on failure. Expected time
to failure is less than 10 seconds.

Reproduce code:
---


Expected result:

N/A (loop)

Actual result:
--
bool(true)
bool(true)
[...]
bool(true)
bool(false)
string(24) "2007-08-15T13:26:05+"
string(24) "2007-08-15T13:26:06+"





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


#41350 [Com]: Error in my_thread_global_end()

2007-08-15 Thread a at asdf dot com
 ID:   41350
 Comment by:   a at asdf dot com
 Reported By:  graham at directhostinguk dot com
 Status:   Assigned
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.3
 Assigned To:  edink
 New Comment:

I get this bug when running a Wiki, through IIS6 on Win2k3. I get 3-4
threads didn't exit. Other than that, the Wiki works fine. I am using
MySQL, but I was getting it yesterday, when I was using PostgreSQL.
(insert DA-duh--DUMMM!!! sound for extra suspense).

Setting the mysql_allow_persistent variable to off makes no difference
for me either.

I replaced the libmysql.dll with one from PHP5.2.1, but then the Wiki
reported that it couldn't access php_mysql.dll because access is denied.
I replaced the file again and rebooted the server and that problem is
gone, but I'm still getting 3-4 threads didn't exit. I tried replacing
the file again, and get an exception with a huge stack trace, so I went
back to using the 5.2.3 file.

Btw, Win2k3 and PHP5 are both 64bit installs.


Also, YOU IDIOTS! Spelling out your email address (ie. dudeguy at
domain dot tld) is *not* going to fool an email address harvester! You
need to be more creative!
[EMAIL PROTECTED]/c*m


Previous Comments:


[2007-08-14 21:45:33] sghasemi at mail dot com

I am getting this error using the PHPMailer to send SMTP e-mails on a
Windows XP PC. It send the mail OK but at the end gives me the error:
"Error in my_thread_global_end(): 1 threads didn't exit"
Any ideas?



[2007-08-08 01:23:51] xavier at codewordx dot com

So, it looks like this problem has not been fixed. Has it?

Is there a CVS snap to php 521? Or can somebody just email me the
correct libmysql.dll? It would be great to finally fix this issue.

Thanks,
Xavier



[2007-08-02 14:01:32] phpuser at gmail dot com

Please don't forget about php_pdo_mysql.dll!



[2007-07-24 10:45:26] [EMAIL PROTECTED]

Assigning to edink since we need to upgrade the bundled MySQL
libraries.



[2007-07-24 10:24:18] nick dot dixon at gmail dot com

I see the same with 5.2.3 on Windows 2000 whenever php_mysql or
php_mysqli (or both) are enabled

So either the fault is in both php_mysql.dll AND php_mysqli.dll, or
it's a problem with the MySQL client library (libmySQL.dll).

Setting mysql.allow_persistent = Off makes no difference.

MySQL version is 5.0.45, with the libmySQL.dll copied to a directory
that's in the PATH (the PHP ext directory)

Minimal test case using PHP cli:
php -v
PHP 5.2.3 (cli) (built: May 31 2007 09:37:22)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Now if I run the CLI and send EOF:

php
^Z
   (...pause of about 6 seconds...)
Error in my_thread_global_end(): 1 threads didn't exit



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

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


#42293 [Opn->Bgs]: segmentation fault at TEST_PHP_EXECUTABLE (install-pear-installer)

2007-08-15 Thread jani
 ID:   42293
 Updated by:   [EMAIL PROTECTED]
 Reported By:  m dot artuso at etraspa dot it
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: linux debian testing/unstable
 PHP Version:  5CVS-2007-08-16 (snap)
 New Comment:

>From the valgrind output:

==29380==at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so)
==29380==by 0x7A91E50: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A91F14: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A907E2: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A90A17: _nss_db_getprotobyname_r (in
/usr/lib/libnss_db-2.2.3.so)
==29380==by 0x6F474F7: getprotobyname_r@@GLIBC_2.2.5
(getXXbyYY_r.c:210)

We only call 'getprotobyname()' in PHP. And as I can't reproduce this
anywhere -> bogus.


Previous Comments:


[2007-08-16 06:13:26] m dot artuso at etraspa dot it

Ok, I'll try not to post irrelevant text (but to a non-expert the
crossing line is sometimes not so evident).

I downloaded today's snapshot, deleted /etc/php5 and this is the
result:
- without --enable-sockets I got some failed test on some functions (I
sent the report), but no more bogus "Unable to load dynamic library"
lines
- with --enable-sockets I got the segfault

Core was generated by `./sapi/cli/php'.
Program terminated with signal 11, Segmentation fault.
#0  0x2b8a7cc6c9ea in ?? ()
warning: not using untrusted file
"/usr/src/tmp/php5.2-200708160430/.gdbinit"
(gdb) bt
#0  0x2b8a7cc6c9ea in ?? ()
(gdb) quit

==29380== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==29380== For more details, rerun with: -v
==29380==
==29380== Invalid write of size 4
==29380==at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so)
==29380==by 0x7A91E50: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A91F14: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A907E2: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A90A17: _nss_db_getprotobyname_r (in
/usr/lib/libnss_db-2.2.3.so)
==29380==by 0x6F474F7: getprotobyname_r@@GLIBC_2.2.5
(getXXbyYY_r.c:210)
==29380==by 0x6F4737F: getprotobyname (getXXbyYY.c:116)
==29380==by 0x5FF42C: zm_startup_sockets (sockets.c:521)
==29380==by 0x758A82: zend_startup_module_ex (zend_API.c:1466)
==29380==by 0x7607AB: zend_hash_apply (zend_hash.c:673)
==29380==by 0x758C80: zend_startup_modules (zend_API.c:1513)
==29380==by 0x6F2300: php_module_startup (main.c:1802)
==29380==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29380==
==29380== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==29380==  Access not within mapped region at address 0x0
==29380==at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so)
==29380==by 0x7A91E50: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A91F14: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A907E2: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A90A17: _nss_db_getprotobyname_r (in
/usr/lib/libnss_db-2.2.3.so)
==29380==by 0x6F474F7: getprotobyname_r@@GLIBC_2.2.5
(getXXbyYY_r.c:210)
==29380==by 0x6F4737F: getprotobyname (getXXbyYY.c:116)
==29380==by 0x5FF42C: zm_startup_sockets (sockets.c:521)
==29380==by 0x758A82: zend_startup_module_ex (zend_API.c:1466)
==29380==by 0x7607AB: zend_hash_apply (zend_hash.c:673)
==29380==by 0x758C80: zend_startup_modules (zend_API.c:1513)
==29380==by 0x6F2300: php_module_startup (main.c:1802)
==29380==
==29380== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 7 from
4)
==29380== malloc/free: in use at exit: 998,371 bytes in 6,052 blocks.
==29380== malloc/free: 6,371 allocs, 319 frees, 1,063,402 bytes
allocated.
==29380== For counts of detected errors, rerun with: -v
==29380== searching for pointers to 6,052 not-freed blocks.
==29380== checked 1,507,816 bytes.
==29380==
==29380== LEAK SUMMARY:
==29380==definitely lost: 0 bytes in 0 blocks.
==29380==  possibly lost: 0 bytes in 0 blocks.
==29380==still reachable: 998,371 bytes in 6,052 blocks.
==29380== suppressed: 0 bytes in 0 blocks.
==29380== Reachable blocks (those to which a pointer was found) are not
shown.
==29380== To see them, rerun with: --leak-check=full
--show-reachable=yes
Segmentation fault

Is it possible to identify the improperly installed/not working library
that causes the the sockets crash? If this is just a loss of time for
the project I'll live without.



[2007-08-14 21:44:09] [EMAIL PROTECTED]

And the sockets crash is caused by some borked library in your system..



[2007-08-14 21:42:35] [EMAIL PROTECTED]

How about you didn't add such huge piles of unasked text here next
time?
I'm deleting the irrelavant part, this is relev

#42312 [Opn->Fbk]: BOM mark interpreted as output

2007-08-15 Thread jani
 ID:   42312
 Updated by:   [EMAIL PROTECTED]
 Reported By:  draconpern at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: I18N and L10N related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

And using --enable-zend-multibyte does not work for you?



Previous Comments:


[2007-08-15 19:49:52] draconpern at hotmail dot com

All the other bugs suggested ignoring/discarding the output which is
incorrect.  The correct action should be to read the script, and save
the BOM.  Do the header processing, and then output the BOM as part of
the output content.



[2007-08-15 15:40:45] [EMAIL PROTECTED]

And how isn't this exactly same what bug #22247 is about?
Or bug #22108 ? 



[2007-08-15 14:59:34] draconpern at hotmail dot com

Description:

BOM marks on utf files are interpreted as output.  So any php script
that has to output before any file content has problems.  This is not a
duplicate of bug #22247.  Instead, BOM should be passed through to
output, but not interpreted as output.

Expected result:

Any php file with BOM.






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


#42314 [Opn->Bgs]: bug in function declaration

2007-08-15 Thread jani
 ID:   42314
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ramymb at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: windows 2003
 PHP Version:  5.2.3
 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:


[2007-08-16 02:14:22] ramymb at gmail dot com

Description:

OS: windows 2003 + IIS
PHP Version: 5.2.3

when I'm declare my own function myFun in a file func.php, I'm included
into my main index.php, it's working at first time without any problem,
when I'm using current page to submit data into the same page I'm
getting the following error:

Fatal error: Cannot redeclare myfun() (previously declared in
C:\accounts\panela\tmp\func.php:2) in C:\accounts\panela\tmp\func.php on
line 2

I don't know whats the problem, I'm tried to solve this problem but I'm
failed :(
this error is not logic, and the same script working in other php
version like php 4.X


Reproduce code:
---
--- file: func.php ---


--- file: index.php ---






Expected result:

this code when submit data into same php page.
I'm solved this problem by:




but unfortunately, when I'm refreshing the page I'm cant see my last
editing in my function, for example, now I will edit the function to:


now with function_exists I cant see the new function $a*$b, but I'm see
only the old function $a-$b.







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


#42293 [Fbk->Opn]: segmentation fault at TEST_PHP_EXECUTABLE (install-pear-installer)

2007-08-15 Thread m dot artuso at etraspa dot it
 ID:   42293
 User updated by:  m dot artuso at etraspa dot it
 Reported By:  m dot artuso at etraspa dot it
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: linux debian testing/unstable
-PHP Version:  5CVS-2007-08-14 (snap)
+PHP Version:  5CVS-2007-08-16 (snap)
 New Comment:

Ok, I'll try not to post irrelevant text (but to a non-expert the
crossing line is sometimes not so evident).

I downloaded today's snapshot, deleted /etc/php5 and this is the
result:
- without --enable-sockets I got some failed test on some functions (I
sent the report), but no more bogus "Unable to load dynamic library"
lines
- with --enable-sockets I got the segfault

Core was generated by `./sapi/cli/php'.
Program terminated with signal 11, Segmentation fault.
#0  0x2b8a7cc6c9ea in ?? ()
warning: not using untrusted file
"/usr/src/tmp/php5.2-200708160430/.gdbinit"
(gdb) bt
#0  0x2b8a7cc6c9ea in ?? ()
(gdb) quit

==29380== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==29380== For more details, rerun with: -v
==29380==
==29380== Invalid write of size 4
==29380==at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so)
==29380==by 0x7A91E50: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A91F14: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A907E2: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A90A17: _nss_db_getprotobyname_r (in
/usr/lib/libnss_db-2.2.3.so)
==29380==by 0x6F474F7: getprotobyname_r@@GLIBC_2.2.5
(getXXbyYY_r.c:210)
==29380==by 0x6F4737F: getprotobyname (getXXbyYY.c:116)
==29380==by 0x5FF42C: zm_startup_sockets (sockets.c:521)
==29380==by 0x758A82: zend_startup_module_ex (zend_API.c:1466)
==29380==by 0x7607AB: zend_hash_apply (zend_hash.c:673)
==29380==by 0x758C80: zend_startup_modules (zend_API.c:1513)
==29380==by 0x6F2300: php_module_startup (main.c:1802)
==29380==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29380==
==29380== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==29380==  Access not within mapped region at address 0x0
==29380==at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so)
==29380==by 0x7A91E50: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A91F14: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A907E2: (within /usr/lib/libnss_db-2.2.3.so)
==29380==by 0x7A90A17: _nss_db_getprotobyname_r (in
/usr/lib/libnss_db-2.2.3.so)
==29380==by 0x6F474F7: getprotobyname_r@@GLIBC_2.2.5
(getXXbyYY_r.c:210)
==29380==by 0x6F4737F: getprotobyname (getXXbyYY.c:116)
==29380==by 0x5FF42C: zm_startup_sockets (sockets.c:521)
==29380==by 0x758A82: zend_startup_module_ex (zend_API.c:1466)
==29380==by 0x7607AB: zend_hash_apply (zend_hash.c:673)
==29380==by 0x758C80: zend_startup_modules (zend_API.c:1513)
==29380==by 0x6F2300: php_module_startup (main.c:1802)
==29380==
==29380== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 7 from
4)
==29380== malloc/free: in use at exit: 998,371 bytes in 6,052 blocks.
==29380== malloc/free: 6,371 allocs, 319 frees, 1,063,402 bytes
allocated.
==29380== For counts of detected errors, rerun with: -v
==29380== searching for pointers to 6,052 not-freed blocks.
==29380== checked 1,507,816 bytes.
==29380==
==29380== LEAK SUMMARY:
==29380==definitely lost: 0 bytes in 0 blocks.
==29380==  possibly lost: 0 bytes in 0 blocks.
==29380==still reachable: 998,371 bytes in 6,052 blocks.
==29380== suppressed: 0 bytes in 0 blocks.
==29380== Reachable blocks (those to which a pointer was found) are not
shown.
==29380== To see them, rerun with: --leak-check=full
--show-reachable=yes
Segmentation fault

Is it possible to identify the improperly installed/not working library
that causes the the sockets crash? If this is just a loss of time for
the project I'll live without.


Previous Comments:


[2007-08-14 21:44:09] [EMAIL PROTECTED]

And the sockets crash is caused by some borked library in your system..



[2007-08-14 21:42:35] [EMAIL PROTECTED]

How about you didn't add such huge piles of unasked text here next
time?
I'm deleting the irrelavant part, this is relevant:

PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php/20060613-debug/curl.so' -
/usr/lib/php/20060613-debug/curl.so: cannot open shared object file:
No
such file or directory in Unknown on line 0

Why don't you first disable this stuff before you do anything else?
Try "rm -rf /etc/php5" for starters..



[2007-08-14 09:49:46] [EMAIL PROTECTED]

Sorry, didn't notice you had --enable-debug there.
Please try this:

# rm config.cache && ./configure && make test

And if that doesn't crash, add the rest of the configu

#42305 [NEW]: Segmentation fault after php script proccessing end

2007-08-15 Thread danil dot megrabjan at gmail dot com
From: danil dot megrabjan at gmail dot com
Operating system: reproducible
PHP version:  5.2.4RC1
PHP Bug Type: Reproducible crash
Bug description:  Segmentation fault after php script proccessing end

Description:

After proccessing php-script i have my total result in browser, but in
apache logs i see that "[Wed Aug 15 11:16:11 2007] [notice] child pid 8922
exit signal Segmentation fault (11)"
I use gdb so that i have any details about this problem.

I think, that main problem consist in php garbage collector whe it try  to
free...

Reproduce code:
---
Very many code... i dont`n now how i may send this big code. Just as i
don't know how i can this code made is shorten in 20 lines.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213375712 (LWP 9388)]
0xb7cc7f49 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7cc7f49 in free () from /lib/libc.so.6
#1  0xb79302c1 in free_zend_constant (c=0x804a9bd7) at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:35
#2  0xb7949ae5 in zend_hash_apply_deleter (ht=0x4ab08800, p=0x804a9ba0) at
/usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#3  0xb7949bee in zend_hash_reverse_apply (ht=0x800b7068,
apply_func=0xb792f240 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#4  0xb7930138 in clean_non_persistent_constants () at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#5  0xb7931ab4 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#6  0xb793eecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#7  0xb78f579d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#8  0xb79c541c in php_handler (r=0x8048fd38) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#9  0x8002f94d in ap_run_handler (r=0x8048fd38) at config.c:157
#10 0x80033227 in ap_invoke_handler (r=0x8048fd38) at config.c:372
#11 0x8003f084 in ap_internal_redirect (new_uri=0x8048fd18
"/infin.php?query=start/1/66", r=0x80486f48)
at http_request.c:477
#12 0xb756ec10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#13 0x8048fd18 in ?? ()
#14 0x80486f48 in ?? ()
#15 0xb757367f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#16 0x8048fc50 in ?? ()
#17 0x in ?? ()

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


#38094 [Opn->Bgs]: Custom 404 does not receive POST variables

2007-08-15 Thread jani
 ID:   38094
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mdcore at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: IIS related
 Operating System: win32
 PHP Version:  5.1.4
 New Comment:

It's hard for PHP to mangle those variables since it sets them to
whatever IIS says them to be. So obviously you can't POST to custom 404
anymore. You should use $_REQUEST to refer to variables passed in such
cases where you can't be sure where they come from. ;)

IIS bugs are not PHP bugs -> bogus.


Previous Comments:


[2006-09-18 20:41:27] dangos at gmail dot com

I have confimed this issue, and it _is_ a PHP bug. When presented with
an HTTP POST through an IIS 6 custom error handler, PHP receives the raw
POST data into php://input, but fails to parse it into $_POST etc.

For comparison, ASP scripts do receive POST variables from IIS 6 custom
error handlers, whereas PHP scripts do not. PHP also mangles
$_SERVER['QUERY_STRING'] and $_GET and incorrectly reports
$_SERVER['REQUEST_METHOD'] as 'GET' in this situation.

I can suggest that the likely reason for the above problems is that
when presenting a custom error to a script ISAPI filter IIS6 prepends
the error status code to the beginning of the URL (e.g.
404;http://www.example.com/) - this odd format is possibly causing
confusion when PHP attempts to process the server variables.



[2006-07-13 12:57:46] mdcore at gmail dot com

Thanks for responding so quickly Tony!

I think it is a bug in the PHP ISAPI filter because if I use a custom
404 ASP page then the POST variables do come through. It's only with PHP
pages that it does not work.



[2006-07-13 12:53:30] [EMAIL PROTECTED]

It clearly DOES pass them, as you said it yourself:
>this works in IIS5 but not in IIS6. 
Please report it to Microsoft.



[2006-07-13 12:47:44] mdcore at gmail dot com

Why is the PHP ISAPI filter not passing the POST variables to the
script?



[2006-07-13 12:38:08] mdcore at gmail dot com

Description:

I'm using a custom 404 page in IIS to handle a form of mod_rewrite. But
if I post a form then the custom 404 does not get the POST variables.
this works in IIS5 but not in IIS6. 

Reproduce code:
---
formtest.php:





Set this up as a custom 404 page in IIS.
custom404.php:




Expected result:

non-empty _FORM and REQUEST_METHOD of POST

Actual result:
--
empty _FORM and REQUEST_METHOD of GET





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


#42311 [NEW]: Intermittent failure of test bug35885.phpt

2007-08-15 Thread robin_fernandes at uk dot ibm dot com
From: robin_fernandes at uk dot ibm dot com
Operating system: Windows
PHP version:  5.2.3
PHP Bug Type: Date/time related
Bug description:  Intermittent failure of test bug35885.phpt

Description:

Test http://lxr.php.net/source/php-src/ext/date/tests/bug35885.phpt
compares two time stamps representing the current time. However, these
timestamps are seized in separate statements.

The comparison fails intermittently, because the seconds occasionally tick
over between the two calls.

Below is bug35885.phpt enclosed in a loop to prove that it fails
intermittently. It will break out of the loop on failure. Expected time to
failure is less than 10 seconds.

Reproduce code:
---


Expected result:

N/A (loop)

Actual result:
--
bool(true)
bool(true)
[...]
bool(true)
bool(false)
string(24) "2007-08-15T13:26:05+"
string(24) "2007-08-15T13:26:06+"

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


#42287 [Bgs]: PHP 5.2.3 with openssl and imap compilation problem

2007-08-15 Thread maddox at webster dot edu
 ID:   42287
 User updated by:  maddox at webster dot edu
 Reported By:  maddox at webster dot edu
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Solaris 10
 PHP Version:  5CVS-2007-08-13 (snap)
 New Comment:

I compiled openssl with the -shared flag and attempted to compile PHP
5.2.3 again and I am still receiving the same error message.

Here is how I configured openssl:

./configure --prefix=/usr/local/ssl -shared


Previous Comments:


[2007-08-13 21:57:02] [EMAIL PROTECTED]

You should compile openssl with -shared flag. This is not any PHP bug.

For more info, google for the error message..



[2007-08-13 18:31:34] maddox at webster dot edu

Description:

Attempting to compile PHP 5.2.3 with openssl and imap support and
compilation is failing.

OpenSSL 0.9.8e is installed in /usr/local/ssl 
 
IMAP 2006 has been compiled in /opt/src/imap-2006i

Reproduce code:
---
./configure --prefix=/opt/local/apache2/php
--with-apxs2=/opt/local/apache2/bin/apxs --with-gettext --with-dom
--with-mcrypt=/usr/local/lib/libmcrypt --with-iconv
--enable-mbstring=all --enable-mbregex --with-gd --with-png-dir=/usr
--with-jpeg-dir=/usr --with-mime-magic=/usr/local/share/file/magic.mime
--with-zlib-dir=/usr/include --with-openssl=/usr/local/ssl
--with-imap-ssl=/opt/src/imap-2006i

the Make file is created but then after executing make an error message
is received (see Actual result)

Expected result:

makefile should be created 

Actual result:
--
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libphp5.la'





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


#42294 [Opn->Fbk]: round will not use PHP_ROUND_FUZZ on 64bit CPUs

2007-08-15 Thread jani
 ID:   42294
 Updated by:   [EMAIL PROTECTED]
 Reported By:  oliver at teqneers dot de
-Status:   Open
+Status:   Feedback
 Bug Type: *Configuration Issues
 Operating System: OpenSuSE 10.2
 PHP Version:  5.2.4RC1
 New Comment:

Can you please provide a short PHP code example which fails because of
this..?


Previous Comments:


[2007-08-14 10:46:19] oliver at teqneers dot de

Description:

Because of the nature of floats to be not exact enough in binary
system, PHP uses a kind of fuzzy login to round more precisely turning
on PHP_ROUND_FUZZ in some cases.

The problem is the "configure" check. The check does not work for AMD
nor INTEL 64bit CPUs.

The number to test against is not sufficient. So maybe it is possible
to add or change it???

Reproduce code:
---
#include 
  /* keep this out-of-line to prevent use of gcc inline floor() */
  double somefn(double n) {
return floor(n*pow(10,2) + 0.5);
  }
  int main() {
return somefn(0.045)/10.0 != 0.5;
  }

this will return 1 on a 32bit but 0 on a 64bit engine.

Expected result:

it should also fail on a 64bit and return 1. The following code would
actually work on 64bit, because it will test 0.45 as well as 0.285:


#include 
  /* keep this out-of-line to prevent use of gcc inline floor() */
  double somefn(double n) {
return floor(n*pow(10,2) + 0.5);
  }
  int main() {
return (somefn(0.285)/100.0 != 0.29) || (somefn(0.045) / 10.0 !=
0.5);
  }

Actual result:
--
Instead of using the fuzzy round, PHP just takes 0.5 and
adds/substracts it from the given float (math.c)





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


#42314 [NEW]: bug in function declaration

2007-08-15 Thread ramymb at gmail dot com
From: ramymb at gmail dot com
Operating system: windows 2003
PHP version:  5.2.3
PHP Bug Type: Unknown/Other Function
Bug description:  bug in function declaration

Description:

OS: windows 2003 + IIS
PHP Version: 5.2.3

when I'm declare my own function myFun in a file func.php, I'm included
into my main index.php, it's working at first time without any problem,
when I'm using current page to submit data into the same page I'm getting
the following error:

Fatal error: Cannot redeclare myfun() (previously declared in
C:\accounts\panela\tmp\func.php:2) in C:\accounts\panela\tmp\func.php on
line 2

I don't know whats the problem, I'm tried to solve this problem but I'm
failed :(
this error is not logic, and the same script working in other php version
like php 4.X


Reproduce code:
---
--- file: func.php ---


--- file: index.php ---






Expected result:

this code when submit data into same php page.
I'm solved this problem by:




but unfortunately, when I'm refreshing the page I'm cant see my last
editing in my function, for example, now I will edit the function to:


now with function_exists I cant see the new function $a*$b, but I'm see
only the old function $a-$b.



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


#32162 [Com]: dirname returning \ for root entries

2007-08-15 Thread ich at der-bigga dot de
 ID:   32162
 Comment by:   ich at der-bigga dot de
 Reported By:  paul at wavebreaks dot com
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows XP SP2
 PHP Version:  5.0.3
 New Comment:

This problem still exists with version 5.2.3 (OS: Windows XP SP 2,
German) like loom at nons dot de mentioned. The string dirname() return
should always include the same directory separator character as the
string provided. So if I use the following:
print (dirname('/foo')."\n");
the function should return '/' because I used the slash as directory
seperator character, too.


Previous Comments:


[2005-05-05 14:01:07] loom at nons dot de

still this problem with PHP 5.0.4 WinXP SP2

Details:
PHP Version 5.0.4
System  Windows NT LOOM-M 5.1 build 2600
Build Date  Mar 31 2005 02:44:34
Configure Command   cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Server API  Apache
Virtual Directory Support   enabled
Configuration File (php.ini) Path   C:\WINDOWS\php.ini
PHP API 20031224
PHP Extension   20041030
Zend Extension  220040412
Debug Build no
Thread Safety   enabled

apache
Apache for Windows 95/NT

Apache Version  Apache/1.3.29 (Win32) PHP/5.0.4
Apache Release  10329100
Apache API Version  19990320



[2005-03-20 18:11:20] [EMAIL PROTECTED]

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





[2005-03-06 16:26:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-03-02 08:21:05] paul at wavebreaks dot com

Description:

This is probably the same or related to
http://bugs.php.net/bug.php?id=25450 and
http://bugs.php.net/bug.php?id=18710 but since they are for Win 2k
and/or closed, I thought the best bet was to open a new one.

When a path-like-string is passed to dirname, if, and only if, the last
entity (file, dir) is on the root (ie: only one / in the string) then
dirname returns a backslash instead of a forward slash.

There doesn't appear to be a config to tell PHP which part seperator to
use, thus the dirname function is pointlessly broken unless you can
guarentee it will never be given a root level entry.

This, also, breaks your example in the documentation for header() for
Location: header types.

Reproduce code:
---
print (dirname('/foo')."\n");
print (dirname('/foo/bar')."\n");

Expected result:

/
/foo

Actual result:
--
\
/foo

You might argue it's not a bug since Windows is meant to handle both
types of path seperator, but a URI does not, and this is you main
audience. 

This issue has been around for way past way too long.





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


#42236 [Fbk->Opn]: unwanted array reset within recursive call

2007-08-15 Thread remy215 at laposte dot net
 ID:   42236
 User updated by:  remy215 at laposte dot net
 Reported By:  remy215 at laposte dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Arrays related
 Operating System: debian
 PHP Version:  5.2CVS-2007-08-12
 New Comment:

I know that foreach reset the array.
In fact I am not looking for a workaround, I already have one.
It's just that the behavior of php looks quite unexpected to me and it
could be a bug.

Normally, calling << getParent('a0'); >> or calling <<
getParent('a0',$array); >> should lead exactly to the same result since 
when the second argument is not provided, it defaults to $array.
But that's not the case, the first call leads to an infinite loop while
the second delivers the expected result (null).

I hope I am not wrong. In any case, thanks for your help.
Regards,
Remy


Previous Comments:


[2007-08-15 15:46:41] [EMAIL PROTECTED]

Try replace the foreach() calls with while/each struct...foreach() does
a reset on the array..



[2007-08-15 12:47:01] remy215 at laposte dot net

Hi Jani,
First thank you for your support.
Here is a cleaner version (without the infinite-loop checking):
array(
'a1'=>array(
'a2'=>array(),
'b2'=>array()
),'b1'=>array()
),'b0'=>array()
);

function getParent($id,$_subtree=null) {
$found_parent=null;
if(!$_subtree) {
global $array;
$_subtree=$array;
}
foreach($_subtree as $parent=>$children) {
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
echo "\nparent of b2 is: ".getParent('b2'); // expected result: 'a1' --
actual result: 'a1'
echo "\nparent of a0 is: ".getParent('a0'); // expected result: null --
actual result: infinite loop
?>

What's really strange is that if you call getParent('a0',$array), it
works perfectly ! it's the [global $array; $_subtree=$array;] used for
initialization that triggers an infinite loop.

Regards,
Remy



[2007-08-15 08:44:39] [EMAIL PROTECTED]

Please provide the simplest possible script that shows exactly what is
going wrong. The current example is too complex and seems to contain all
kinds of useless workarounds..



[2007-08-12 21:36:09] remy215 at laposte dot net

I tested with latest cvs snapshot, still unexpectingly reseting the
array, leading to an unpredictable infinite loop.



[2007-08-07 17:21:17] remy215 at laposte dot net

Description:

I have an array of nested arrays (ie. each id can have nested
children). The function returns the parent of the provided id but end in
an infinite loop when the id does not exists !
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();


Reproduce code:
---
array('a1'=>array('a2'=>array(),'b2'=>array()),'b1'=>array()),'b0'=>array());
$searched=array(); // to avoid infinite loop
function getParent($id,$_subtree=null) {
if(!$_subtree) { // if first call
global $array;
$_subtree=$array; // entire tree
}
global $searched; // to avoid infinite loop
$found_parent=null;
foreach($_subtree as $parent=>$children) {
if(in_array($parent,$searched)) { // if already looped => stop 
(ie.
infinite loop)
die('Infinite loop: '.$parent);
}
array_push($searched,$parent); // to avoid infinite loop
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
$search='a0';
echo 'parent of '.$search.' is: '.getParent($search);
?>

Expected result:

When you provide as argument a nested id, the function works ('b2'
returns 'a1').
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function should return null.

Actual result:
--
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function end up in an infinite loop.
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();






-- 
Edit this bug report at http://bu

#42189 [Opn]: xmlrpc_set_type() crashes php

2007-08-15 Thread giunta dot gaetano at gmail dot com
 ID:   42189
 User updated by:  giunta dot gaetano at gmail dot com
 Reported By:  giunta dot gaetano at gmail dot com
 Status:   Open
 Bug Type: XMLRPC-EPI related
 Operating System: windows xp or 2000
 PHP Version:  5.2.3
 New Comment:

I do not think it is going away anytime soon, as much as everybody
could 
wish it, just because of the critical mass it has reached (kinda likle

http and html...). It is widely used in blogging tools for trackbacks,

by red hat for their rhn system update tool, and has a lot of libraries

written in every conceivable language. Oh, and least I forget, it is 
also used by PEAR as THE distribution protocol, isn't it? Iirc breaking

support for HTTP_RAW_MESSAGE (and hence pear xmlrpc) in php 5.2.2
caused 
quite an unpheaval in the user base...

Otoh, xmlrpc might be dead and cold in the grave, it does not mean that

a crasher bug has got to be left unpatched (imho, of course ;)


Previous Comments:


[2007-08-15 08:41:02] [EMAIL PROTECTED]

To me it seems like xmlrpc is dead fish, I can't even access
http://www.xmlrpc.com/ anymore. (dunno if it's temporary issue though)





[2007-08-06 10:00:04] giunta dot gaetano at gmail dot com

As a side note, mostly to comments on #22468 - the official epi lib has
not seen any cvs commit in about 5 years, and the php engine is possibly
the biggest user of the lib, so I would not mind too much forking the
underlying codebase (bug #69492 was opened there after the php devs
refused to fix 22468, but it's till open after 4,5 years...)



[2007-08-02 20:56:37] giunta dot gaetano at gmail dot com

Description:

Trying to cast a non-iso8601 conforming string to an xmlrpc datetime
object crashes php.
This happens if the characters in position 0 to 6 are too high in the
ascii table, presumably moving the converted date too far away in the
future

This is repro with php 447 and 523

Note that it 'might' be the same bug as #22468 (the cause looks the
same allright), with the difference that you get corrupted data on
gentoo, and a core dump on winblows...

Reproduce code:
---


Expected result:

false

Actual result:
--
CRASH'N'BURN





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


#42312 [Fbk->Opn]: BOM mark interpreted as output

2007-08-15 Thread draconpern at hotmail dot com
 ID:   42312
 User updated by:  draconpern at hotmail dot com
 Reported By:  draconpern at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: I18N and L10N related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

All the other bugs suggested ignoring/discarding the output which is
incorrect.  The correct action should be to read the script, and save
the BOM.  Do the header processing, and then output the BOM as part of
the output content.


Previous Comments:


[2007-08-15 15:40:45] [EMAIL PROTECTED]

And how isn't this exactly same what bug #22247 is about?
Or bug #22108 ? 



[2007-08-15 14:59:34] draconpern at hotmail dot com

Description:

BOM marks on utf files are interpreted as output.  So any php script
that has to output before any file content has problems.  This is not a
duplicate of bug #22247.  Instead, BOM should be passed through to
output, but not interpreted as output.

Expected result:

Any php file with BOM.






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


#42303 [WFx->Csd]: json_encode() creates objects when array has gaps in the index

2007-08-15 Thread dev at lenss dot nl
 ID:   42303
 User updated by:  dev at lenss dot nl
 Reported By:  dev at lenss dot nl
-Status:   Wont fix
+Status:   Closed
 Bug Type: JSON related
 Operating System: *
 PHP Version:  5.2CVS-2007-08-14
 New Comment:

I know it re-enumerates the array. That's what the javascript JSON
encoder does. 

But when i think of it. It's probably better how it is.

Thnx for the support.


Previous Comments:


[2007-08-15 18:15:35] [EMAIL PROTECTED]

The problem is that if you save a non-sequential array as an array you

lose the sequence and encoding process re-enumerates the array values

so array(0 => foo, 2 => bar) becomes array(0 => foo, 1 => bar)



[2007-08-15 09:39:08] dev at lenss dot nl

Tested the snaps on windows and linux. Bug still is active in the
snapshots.



[2007-08-15 08:42:51] dev at lenss dot nl

Changed version of report to PHP 5.2.3.



[2007-08-15 06:34:39] dev at lenss dot nl

Description:

When encoding an array with sequental keys. Everything works out fine.
When encoding an array with gaps between the keys. The json encoder
creates an object instead of an array. Wich maybe ideal in some places.
But it's inconsistant with the JSON javascript parser at json.org. I
selected the PHP 4.4.7 version. But also tested in PHP 5.2.3 with the
same result.

In json.c the following code is causing this:

--- ext/json/json.c.orig2007-08-14 22:38:20.0 +0200
+++ ext/json/json.c 2007-08-14 22:36:51.0 +0200
@@ -106,10 +106,6 @@
 
 if (i == HASH_KEY_IS_STRING) {
 return 1;
-} else {
-if (index != idx) {
-return 1;
-}
 }
 idx++;
 }

Reproduce code:
---


Expected result:

Result in array: [["foo"],["bar","test"]]
Result in object: [["foo"],["bar","test"]]

Actual result:
--
Result in array: [["foo"],["bar","test"]]
Result in object: {"0":["foo"],"2":["bar","test"]}





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


#42310 [Fbk->Bgs]: Information disclousre when using invalid symbol in the session id

2007-08-15 Thread johannes
 ID:   42310
 Updated by:   [EMAIL PROTECTED]
 Reported By:  astalor at gmail dot com
-Status:   Feedback
+Status:   Bogus
 Bug Type: Session related
 Operating System: ALL
 PHP Version:  5.2.4RC1
 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

Well, if display of errors is activated we give the error message. As
usual user data should be filtered by you before doing anything with
them and display_Errors should be disabled on production system...


Previous Comments:


[2007-08-15 15:42:32] [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





[2007-08-15 13:28:54] astalor at gmail dot com

Description:

If you put invalid symbol in the session ID and PHP warnings are turned
on you can retrieve information about files and paths on the server and
also in some cases the configured session.save_path variable from
PHP.INI, this can display warnings (and sometimes break pages that count
on redirection with header()) on pages that are perfectly correct and
without any errors in them.

Reproduce code:
---
Warning<\/b>:(.*)/i",$output,$match);
preg_match_all("/session.save_path is correct
\((.*)\)/i",$output,$path);
#echo $output;
echo "";
echo "Checking $url\n";
if (count($match[0]) > 0) {
echo "Warnings found:\n";
echo implode("\n",$match[0]);
} else {
echo "Warning are disabled\n";
}
if ($_GET['debug'] == 1) {
echo "Displaying page:\n";
echo $output;
}
#print_r($path);
}
checkWarnings($_GET['url']);
?>

Expected result:

Warning:  session_start() [function.session-start]: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'
in /home/user/public_html/main/file.php on line 32
Warning:  Unknown: Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in
Unknown on line 0


Actual result:
--
the same as the expected result, as long as the PHP warning are enabled





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


#42303 [Opn->WFx]: json_encode() creates objects when array has gaps in the index

2007-08-15 Thread iliaa
 ID:   42303
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dev at lenss dot nl
-Status:   Open
+Status:   Wont fix
 Bug Type: JSON related
 Operating System: *
 PHP Version:  5.2CVS-2007-08-14
 New Comment:

The problem is that if you save a non-sequential array as an array you

lose the sequence and encoding process re-enumerates the array values

so array(0 => foo, 2 => bar) becomes array(0 => foo, 1 => bar)


Previous Comments:


[2007-08-15 09:39:08] dev at lenss dot nl

Tested the snaps on windows and linux. Bug still is active in the
snapshots.



[2007-08-15 08:42:51] dev at lenss dot nl

Changed version of report to PHP 5.2.3.



[2007-08-15 06:34:39] dev at lenss dot nl

Description:

When encoding an array with sequental keys. Everything works out fine.
When encoding an array with gaps between the keys. The json encoder
creates an object instead of an array. Wich maybe ideal in some places.
But it's inconsistant with the JSON javascript parser at json.org. I
selected the PHP 4.4.7 version. But also tested in PHP 5.2.3 with the
same result.

In json.c the following code is causing this:

--- ext/json/json.c.orig2007-08-14 22:38:20.0 +0200
+++ ext/json/json.c 2007-08-14 22:36:51.0 +0200
@@ -106,10 +106,6 @@
 
 if (i == HASH_KEY_IS_STRING) {
 return 1;
-} else {
-if (index != idx) {
-return 1;
-}
 }
 idx++;
 }

Reproduce code:
---


Expected result:

Result in array: [["foo"],["bar","test"]]
Result in object: [["foo"],["bar","test"]]

Actual result:
--
Result in array: [["foo"],["bar","test"]]
Result in object: {"0":["foo"],"2":["bar","test"]}





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


#42308 [Opn->Bgs]: objects and variable together in session mix up the $_SESSION

2007-08-15 Thread johannes
 ID:   42308
 Updated by:   [EMAIL PROTECTED]
 Reported By:  domnuprofesor at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Fedora Core 6
 PHP Version:  4.4.7
 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

Looks like register_globals is activated on your host. Please see the
documentation for more information about register_globals.


Previous Comments:


[2007-08-15 13:01:17] domnulnopcea at yahoo dot com

yes..i came across the same problem...

I did not even put the object in $_SESSION and it was there



[2007-08-15 12:43:49] domnuprofesor at yahoo dot com

Description:

I came across this situation:
I had and object named "grid" which was a wrapper for a table.
In $_SESSION I already had a mysql singleton wrapper.
I tried to set another session variable with the key "grid1" and value,
lets say "text". The result I got was that PHP loaded the object "grid1"
in $_SESSION.
After I changed the key name, let say "grid1_text" I got the expected
results!

Reproduce code:
---
$grid1 = new GridPrototype();
$grid1->setPerPage(4);
$grid1->setID("1"); 
$grid1->setKey();

$id = "1";
$key = "grid" . $id;
$_SESSION[$key] = $status;



Expected result:

I expect to have the $status variable accessible via $_SESSION['grid1']

Actual result:
--
$_SESSION['grid1'] points to the object $grid1





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


#42309 [Asn->Bgs]: select of nvarchar() delivers only the first 250 letters

2007-08-15 Thread fmk
 ID:   42309
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bc at ringwald dot name
-Status:   Assigned
+Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Windows
 PHP Version:  5.2.3
 Assigned To:  fmk
 New Comment:

(n)char and (n)varchar columns has a limit of 256 bytes. This is a
limitation in ntwdblib.dll from Microsoft and can't be fixed in the PHP
extension.

Workaround: use php_dblib.dll as a drop in replacement for
php_mssql.dll. This extension is build on the FreeTDS version of dblib
and does not have the same limitations.


Previous Comments:


[2007-08-15 15:43:48] [EMAIL PROTECTED]

Assigned to the maintainer.



[2007-08-15 12:58:56] bc at ringwald dot name

Description:

select of nvarchar() delivers only the first 250 letters

workaround: convert(text, attribut)








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


#27372 [Ver->Asn]: parse error loading browscap.ini at apache startup (new parser required)

2007-08-15 Thread jani
 ID:   27372
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php-bug-27372 at ryandesign dot com
-Status:   Verified
+Status:   Assigned
 Bug Type: *General Issues
 Operating System: *
 PHP Version:  6CVS, 5CVS, 4CVS (2005-08-25)
-Assigned To:  
+Assigned To:  jani


Previous Comments:


[2004-10-04 17:05:44] [EMAIL PROTECTED]

This would have to be caught during module start up, but 
what should be done about it? Have the parser crap out and 
stop processing when this happens, leaving an error 
message in the logs or on stderr or whatever? Spit out a 
warning but continue processing? What assumptions should 
be made about the screwed up entry, should it just be 
discarded? 
 
This should probably be in it's own bug report, btw, this 
is a seperate issue from the original report. (The new 
parser fixes the original bug report, but not this issue, 
which may or may not be fixed, as it's kind of a problem 
with the ini file itself, akin to calling a function with 
infinite recursion...) 
 
J 



[2004-10-02 21:54:48] alexandre at alapetite dot remove dot net

Gary Keith has already (2004-10-02) kindly modified his browscap.ini in
order to prevent a specific crash about the Nutch browser. But the
browscap parser should anyway include a security: when one assign a
parent to the same parent in browscap.ini, there is an infinite loop
that should be prevented.

Example in browscap.ini:
[Nutch]
parent=Nutch

Then in a PHP script:
$browser=get_browser('Nutch');

Effect:
Infinite loop that takes 100% CPU forever.



[2004-08-31 21:22:34] [EMAIL PROTECTED]

I posted this on internals but I should probably add it to 
the bug report, too... 
 
A patch for this against HEAD is available at 
 
http://bugs.tutorbuddy.com/download.php/browscap.patch.tar.gz 
 
It contains the new parser (which goes into ext/standard) 
and updates to the makefiles for *ix and win32. I've 
tested the patch on linux and win2k, and I'd like to 
commit to HEAD for inclusion in 5.1. Backporting to 5.0 
would be nice, too, if possible. 
 
J 



[2004-02-26 18:32:25] php_bug_27372 at garykeith dot com

Hi, Derick.

Since there are so many people still using very early versions of 4.3.x
I know it will be a very long time before everyone upgrades to 5.* and
that means I'll be stuck in the same untenable situation I'm in right
now for a very long time.

Kindly remove the link to my website from your documentation page. It's
not fair to your users to refer them to a browscap.ini file that does
not work in PHP.

~gary.



[2004-02-24 11:14:33] php_bug_27372 at garykeith dot com

Oh, and the reason I cannot delimit certain values with double-quotes
is because browscap.dll does not strip out the quotes. If I entered
"Yahoo! Slurp" as a browser name then everyone using browscap.ini on IIS
would see "Yahoo! Slurp", including the double quotes as the browser
name.



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

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


#42299 [Com]: fails to configure with libedit

2007-08-15 Thread jakub at gentoo dot org
 ID:   42299
 Comment by:   jakub at gentoo dot org
 Reported By:  volkmar dot glauche at uniklinik-freiburg dot de
 Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Gentoo Linux
 PHP Version:  5.2.4RC1
 New Comment:

Latest CVS snapshot doesn't solve anything, see
http://bugs.gentoo.org/show_bug.cgi?id=165633 for downstream bug.


Previous Comments:


[2007-08-14 19:59:15] [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





[2007-08-14 17:52:35] volkmar dot glauche at uniklinik-freiburg dot de

Description:

There are configure checks for (at least) libedit which use -Wl,-rpath
/usr/X11R6/lib linker flags. This fails on Gentoo, because
/usr/X11R6/lib has only a libedit.so linker script, but no libedit.so
ELF library.
I can provide an config.log upon request.

Reproduce code:
---
emerge -u php

Expected result:

build php

Actual result:
--
configure stops, because it can not link libedit.so in many tests.





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


#37076 [Asn]: SimpleXML ignores .=

2007-08-15 Thread bjori
 ID:   37076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Assigned
 Bug Type: SimpleXML related
 Operating System: *
-PHP Version:  6, 5.2.*
+PHP Version:  5CVS-2007-08-15 (CVS)
 Assigned To:  helly
 New Comment:

(Updated version).

Marcus: Still doesn't work.. :)


Previous Comments:


[2006-05-27 10:40:24] [EMAIL PROTECTED]

http://php.is/bugs/37076/bug37076.phpt
(fails still)



[2006-05-27 01:12:01] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Can you please write a test case?



[2006-04-14 12:03:29] [EMAIL PROTECTED]

Reproduced in HEAD
It does however work in 5.0..



[2006-04-14 10:58:40] [EMAIL PROTECTED]

This cannot work in 5.1. Please test HEAD and assign to me if it is not
working in HEAD or close if it does.



[2006-04-14 00:30:30] [EMAIL PROTECTED]

Description:

Simplexml doesn't respect .=

Reproduce code:
---
");
$xml->foo = "foo";
$xml->foo .= "bar";
print $xml->asXML();

Expected result:


foobar

Actual result:
--

foo





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


#42287 [Opn->Bgs]: PHP 5.2.3 with openssl and imap compilation problem

2007-08-15 Thread jani
 ID:   42287
 Updated by:   [EMAIL PROTECTED]
 Reported By:  maddox at webster dot edu
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Solaris 10
 PHP Version:  5CVS-2007-08-13 (snap)
 New Comment:

It's still not any PHP bug. Use google to find references about the
error you get. 


Previous Comments:


[2007-08-15 14:45:32] maddox at webster dot edu

Correction:

Here is how I configured openssl:

./config --prefix=/usr/local/ssl -shared



[2007-08-15 14:16:12] maddox at webster dot edu

I compiled openssl with the -shared flag and attempted to compile PHP
5.2.3 again and I am still receiving the same error message.

Here is how I configured openssl:

./configure --prefix=/usr/local/ssl -shared



[2007-08-13 21:57:02] [EMAIL PROTECTED]

You should compile openssl with -shared flag. This is not any PHP bug.

For more info, google for the error message..



[2007-08-13 18:31:34] maddox at webster dot edu

Description:

Attempting to compile PHP 5.2.3 with openssl and imap support and
compilation is failing.

OpenSSL 0.9.8e is installed in /usr/local/ssl 
 
IMAP 2006 has been compiled in /opt/src/imap-2006i

Reproduce code:
---
./configure --prefix=/opt/local/apache2/php
--with-apxs2=/opt/local/apache2/bin/apxs --with-gettext --with-dom
--with-mcrypt=/usr/local/lib/libmcrypt --with-iconv
--enable-mbstring=all --enable-mbregex --with-gd --with-png-dir=/usr
--with-jpeg-dir=/usr --with-mime-magic=/usr/local/share/file/magic.mime
--with-zlib-dir=/usr/include --with-openssl=/usr/local/ssl
--with-imap-ssl=/opt/src/imap-2006i

the Make file is created but then after executing make an error message
is received (see Actual result)

Expected result:

makefile should be created 

Actual result:
--
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libphp5.la'





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


#42236 [Opn->Fbk]: unwanted array reset within recursive call

2007-08-15 Thread jani
 ID:   42236
 Updated by:   [EMAIL PROTECTED]
 Reported By:  remy215 at laposte dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: debian
 PHP Version:  5.2CVS-2007-08-12
 New Comment:

Try replace the foreach() calls with while/each struct...foreach() does
a reset on the array..


Previous Comments:


[2007-08-15 12:47:01] remy215 at laposte dot net

Hi Jani,
First thank you for your support.
Here is a cleaner version (without the infinite-loop checking):
array(
'a1'=>array(
'a2'=>array(),
'b2'=>array()
),'b1'=>array()
),'b0'=>array()
);

function getParent($id,$_subtree=null) {
$found_parent=null;
if(!$_subtree) {
global $array;
$_subtree=$array;
}
foreach($_subtree as $parent=>$children) {
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
echo "\nparent of b2 is: ".getParent('b2'); // expected result: 'a1' --
actual result: 'a1'
echo "\nparent of a0 is: ".getParent('a0'); // expected result: null --
actual result: infinite loop
?>

What's really strange is that if you call getParent('a0',$array), it
works perfectly ! it's the [global $array; $_subtree=$array;] used for
initialization that triggers an infinite loop.

Regards,
Remy



[2007-08-15 08:44:39] [EMAIL PROTECTED]

Please provide the simplest possible script that shows exactly what is
going wrong. The current example is too complex and seems to contain all
kinds of useless workarounds..



[2007-08-12 21:36:09] remy215 at laposte dot net

I tested with latest cvs snapshot, still unexpectingly reseting the
array, leading to an unpredictable infinite loop.



[2007-08-07 17:21:17] remy215 at laposte dot net

Description:

I have an array of nested arrays (ie. each id can have nested
children). The function returns the parent of the provided id but end in
an infinite loop when the id does not exists !
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();


Reproduce code:
---
array('a1'=>array('a2'=>array(),'b2'=>array()),'b1'=>array()),'b0'=>array());
$searched=array(); // to avoid infinite loop
function getParent($id,$_subtree=null) {
if(!$_subtree) { // if first call
global $array;
$_subtree=$array; // entire tree
}
global $searched; // to avoid infinite loop
$found_parent=null;
foreach($_subtree as $parent=>$children) {
if(in_array($parent,$searched)) { // if already looped => stop 
(ie.
infinite loop)
die('Infinite loop: '.$parent);
}
array_push($searched,$parent); // to avoid infinite loop
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
$search='a0';
echo 'parent of '.$search.' is: '.getParent($search);
?>

Expected result:

When you provide as argument a nested id, the function works ('b2'
returns 'a1').
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function should return null.

Actual result:
--
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function end up in an infinite loop.
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();






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


#42309 [Opn->Asn]: select of nvarchar() delivers only the first 250 letters

2007-08-15 Thread jani
 ID:   42309
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bc at ringwald dot name
-Status:   Open
+Status:   Assigned
 Bug Type: MSSQL related
 Operating System: Windows
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  fmk
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-08-15 12:58:56] bc at ringwald dot name

Description:

select of nvarchar() delivers only the first 250 letters

workaround: convert(text, attribut)








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


#42310 [Opn->Fbk]: Information disclousre when using invalid symbol in the session id

2007-08-15 Thread jani
 ID:   42310
 Updated by:   [EMAIL PROTECTED]
 Reported By:  astalor at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: ALL
 PHP Version:  5.2.4RC1
 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-08-15 13:28:54] astalor at gmail dot com

Description:

If you put invalid symbol in the session ID and PHP warnings are turned
on you can retrieve information about files and paths on the server and
also in some cases the configured session.save_path variable from
PHP.INI, this can display warnings (and sometimes break pages that count
on redirection with header()) on pages that are perfectly correct and
without any errors in them.

Reproduce code:
---
Warning<\/b>:(.*)/i",$output,$match);
preg_match_all("/session.save_path is correct
\((.*)\)/i",$output,$path);
#echo $output;
echo "";
echo "Checking $url\n";
if (count($match[0]) > 0) {
echo "Warnings found:\n";
echo implode("\n",$match[0]);
} else {
echo "Warning are disabled\n";
}
if ($_GET['debug'] == 1) {
echo "Displaying page:\n";
echo $output;
}
#print_r($path);
}
checkWarnings($_GET['url']);
?>

Expected result:

Warning:  session_start() [function.session-start]: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'
in /home/user/public_html/main/file.php on line 32
Warning:  Unknown: Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in
Unknown on line 0


Actual result:
--
the same as the expected result, as long as the PHP warning are enabled





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


#42312 [Opn->Fbk]: BOM mark interpreted as output

2007-08-15 Thread jani
 ID:   42312
 Updated by:   [EMAIL PROTECTED]
 Reported By:  draconpern at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: I18N and L10N related
 Operating System: FreeBSD
 PHP Version:  5.2.3
 New Comment:

And how isn't this exactly same what bug #22247 is about?
Or bug #22108 ? 


Previous Comments:


[2007-08-15 14:59:34] draconpern at hotmail dot com

Description:

BOM marks on utf files are interpreted as output.  So any php script
that has to output before any file content has problems.  This is not a
duplicate of bug #22247.  Instead, BOM should be passed through to
output, but not interpreted as output.

Expected result:

Any php file with BOM.






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


#42312 [NEW]: BOM mark interpreted as output

2007-08-15 Thread draconpern at hotmail dot com
From: draconpern at hotmail dot com
Operating system: FreeBSD
PHP version:  5.2.3
PHP Bug Type: I18N and L10N related
Bug description:  BOM mark interpreted as output

Description:

BOM marks on utf files are interpreted as output.  So any php script that
has to output before any file content has problems.  This is not a
duplicate of bug #22247.  Instead, BOM should be passed through to output,
but not interpreted as output.

Expected result:

Any php file with BOM.


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


#42287 [Bgs->Opn]: PHP 5.2.3 with openssl and imap compilation problem

2007-08-15 Thread maddox at webster dot edu
 ID:   42287
 User updated by:  maddox at webster dot edu
 Reported By:  maddox at webster dot edu
-Status:   Bogus
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Solaris 10
 PHP Version:  5CVS-2007-08-13 (snap)
 New Comment:

Correction:

Here is how I configured openssl:

./config --prefix=/usr/local/ssl -shared


Previous Comments:


[2007-08-15 14:16:12] maddox at webster dot edu

I compiled openssl with the -shared flag and attempted to compile PHP
5.2.3 again and I am still receiving the same error message.

Here is how I configured openssl:

./configure --prefix=/usr/local/ssl -shared



[2007-08-13 21:57:02] [EMAIL PROTECTED]

You should compile openssl with -shared flag. This is not any PHP bug.

For more info, google for the error message..



[2007-08-13 18:31:34] maddox at webster dot edu

Description:

Attempting to compile PHP 5.2.3 with openssl and imap support and
compilation is failing.

OpenSSL 0.9.8e is installed in /usr/local/ssl 
 
IMAP 2006 has been compiled in /opt/src/imap-2006i

Reproduce code:
---
./configure --prefix=/opt/local/apache2/php
--with-apxs2=/opt/local/apache2/bin/apxs --with-gettext --with-dom
--with-mcrypt=/usr/local/lib/libmcrypt --with-iconv
--enable-mbstring=all --enable-mbregex --with-gd --with-png-dir=/usr
--with-jpeg-dir=/usr --with-mime-magic=/usr/local/share/file/magic.mime
--with-zlib-dir=/usr/include --with-openssl=/usr/local/ssl
--with-imap-ssl=/opt/src/imap-2006i

the Make file is created but then after executing make an error message
is received (see Actual result)

Expected result:

makefile should be created 

Actual result:
--
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libphp5.la'





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


#42289 [Bgs->Opn]: xpath relative paths incorrectly returns no match

2007-08-15 Thread cpriest at warpmail dot net
 ID:   42289
 User updated by:  cpriest at warpmail dot net
 Reported By:  cpriest at warpmail dot net
-Status:   Bogus
+Status:   Open
 Bug Type: SimpleXML related
 Operating System: Windows & Linux
 PHP Version:  5.2.4RC1
 New Comment:

According to the specs:
> Always returns an array of SimpleXMLElement objects.

While the xpath() is actually returning a boolean value.  Here is some
revised code which demonstrates an incorrect return value:

INVALID';
   
$objXML = new SimpleXMLElement($ResponseBody);
   
$tMatches = $objXML->xpath('postresponse/status/@accept');
print_r($tMatches);
print_r(gettype($tMatches));
//print_r((string)$tMatches[0]);
?>


Previous Comments:


[2007-08-14 11:56:16] [EMAIL PROTECTED]

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

output is correct. $objXML is document element



[2007-08-14 01:12:55] cpriest at warpmail dot net

Description:

Non-absolute paths using ->xpath() do not match appropriately.  With
the  given example, changing the xpath to '/postresponse/status/@accept'
correctly returns "no"

Reproduce code:
---
INVALID';

$objXML = new SimpleXMLElement($ResponseBody);

$tMatches = $objXML->xpath('postresponse/status/@accept');
print_r((string)$tMatches[0]);
?>

Expected result:

"no"

Actual result:
--
xpath() returns no results





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


#14908 [Com]: Unable to create Java Virtual Machine

2007-08-15 Thread patelbhupi at yahoo dot com
 ID:   14908
 Comment by:   patelbhupi at yahoo dot com
 Reported By:  fusion at factmusic dot com
 Status:   No Feedback
 Bug Type: Java related
 Operating System: W2K
 PHP Version:  4.1.1
 New Comment:

hello,
i need to know how to configure php with java,
Thanks in advance


Previous Comments:


[2002-03-26 11:31:22] ben at gostrategic dot com

I am receiving the following error using Win2k / Apache1.3.22 /
PHP4.1.2 / JDK1.2.2 -- Unable to initalize Java Virtual Machine --
immediately after loading a script that uses Java.  I can remedy the
problem by restarting Apache, which is obviously not feasible.



[2002-03-25 01:00:50] fusion at factmusic dot com

No, I have never been able to get this to work.  Maybe someone else
can?



[2002-03-25 00:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".



[2002-03-05 03:52:31] lilyprasad at hotmail dot com

With reference to the Bug:14908 from [EMAIL PROTECTED] dated 7Jan, i
would like to put following question as i am also facing the same
problem:

Were you able to solve your problem!

We are also trying to install PHP4.1.1 with java spport having jdk
version 1.2.2, linux 7.1, apache 1.3.19.

I also get the same error while testing a test php4 file having :



The error is Fatal error: Unable to create Java Virtual Machine in
/var/www/html/test/test.php4.

[Java]
java.class.path = /var/www/php/php-4.1.1/ext/java/php_java.jar
java.home =
/var/www/php/php-4.1.1/ext/java/jdk1.2.2:/var/www/php/php-4.1.1/ext/
java/jdk1.2.2/bin:/var/www/php/php-4.1.1/ext/java/jdk1.2.2/jre/bin:/var/www/php/
php-4.1.1/ext/java/jdk1.2.2/jre/lib
;java.library.path =
/var/www/php/php-4.1.1/ext/java/jdk1.2.2/jre/lib/i386
;java.library = libjava.so
java.library.path =
/var/www/php/php-4.1.1/ext/java/jdk1.2.2/jre/lib/i386/classi
c
java.library = libjvm.so
extension_dir =
/usr/local/lib/php/extensions/no-debug-non-zts-20010901
extension = libphp_java.so
 
This is our present setting in the php.ini file.

Kindly help us.

With Regards,
Lily



[2002-02-26 13:24:37] thiller at sandvine dot com

I am really looking for a fix to this problem.  Just playing with INI
file settings doesn't seem to cut it.  I have noticed that if you set
KEEPALIVE to off in Apache you can only access Java once (otherwise as
long as you refreshed the page every few seconds it would keep working).
 I think this problem has something to do with what happens when the
module is unloaded.  It might be ending up in an unusable but loaded
state which prevents it from being loaded again.  It is obvious it is
web server independant.



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

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


#42311 [Opn]: Intermittent failure of test bug35885.phpt

2007-08-15 Thread robin_fernandes at uk dot ibm dot com
 ID:   42311
 User updated by:  robin_fernandes at uk dot ibm dot com
 Reported By:  robin_fernandes at uk dot ibm dot com
 Status:   Open
 Bug Type: Date/time related
 Operating System: Windows
 PHP Version:  5.2.3
 New Comment:

Below is a suggested patch which modifies the test to allow for a 1
second margin between the timestamps. I have confirmed the resulting
test passes consistently on Windows on PHP 5.2.3, but have done no
further testing.


Index: C:/php5-latest-phpt/ext/date/tests/bug35885.phpt
===
--- C:/php5-latest-phpt/ext/date/tests/bug35885.phpt(revision 13029)
+++ C:/php5-latest-phpt/ext/date/tests/bug35885.phpt(working copy)
@@ -4,15 +4,15 @@
 


Previous Comments:


[2007-08-15 13:48:21] robin_fernandes at uk dot ibm dot com

Description:

Test http://lxr.php.net/source/php-src/ext/date/tests/bug35885.phpt
compares two time stamps representing the current time. However, these
timestamps are seized in separate statements.

The comparison fails intermittently, because the seconds occasionally
tick over between the two calls.

Below is bug35885.phpt enclosed in a loop to prove that it fails
intermittently. It will break out of the loop on failure. Expected time
to failure is less than 10 seconds.

Reproduce code:
---


Expected result:

N/A (loop)

Actual result:
--
bool(true)
bool(true)
[...]
bool(true)
bool(false)
string(24) "2007-08-15T13:26:05+"
string(24) "2007-08-15T13:26:06+"





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


#42310 [NEW]: Information disclousre when using invalid symbol in the session id

2007-08-15 Thread astalor at gmail dot com
From: astalor at gmail dot com
Operating system: ALL
PHP version:  5.2.4RC1
PHP Bug Type: Session related
Bug description:  Information disclousre when using invalid symbol in the 
session id

Description:

If you put invalid symbol in the session ID and PHP warnings are turned on
you can retrieve information about files and paths on the server and also
in some cases the configured session.save_path variable from PHP.INI, this
can display warnings (and sometimes break pages that count on redirection
with header()) on pages that are perfectly correct and without any errors
in them.

Reproduce code:
---
Warning<\/b>:(.*)/i",$output,$match);
preg_match_all("/session.save_path is correct
\((.*)\)/i",$output,$path);
#echo $output;
echo "";
echo "Checking $url\n";
if (count($match[0]) > 0) {
echo "Warnings found:\n";
echo implode("\n",$match[0]);
} else {
echo "Warning are disabled\n";
}
if ($_GET['debug'] == 1) {
echo "Displaying page:\n";
echo $output;
}
#print_r($path);
}
checkWarnings($_GET['url']);
?>

Expected result:

Warning:  session_start() [function.session-start]: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in
/home/user/public_html/main/file.php on line 32
Warning:  Unknown: Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in Unknown
on line 0


Actual result:
--
the same as the expected result, as long as the PHP warning are enabled

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


#42308 [Com]: objects and variable together in session mix up the $_SESSION

2007-08-15 Thread domnulnopcea at yahoo dot com
 ID:   42308
 Comment by:   domnulnopcea at yahoo dot com
 Reported By:  domnuprofesor at yahoo dot com
 Status:   Open
 Bug Type: Session related
 Operating System: Fedora Core 6
 PHP Version:  4.4.7
 New Comment:

yes..i came across the same problem...

I did not even put the object in $_SESSION and it was there


Previous Comments:


[2007-08-15 12:43:49] domnuprofesor at yahoo dot com

Description:

I came across this situation:
I had and object named "grid" which was a wrapper for a table.
In $_SESSION I already had a mysql singleton wrapper.
I tried to set another session variable with the key "grid1" and value,
lets say "text". The result I got was that PHP loaded the object "grid1"
in $_SESSION.
After I changed the key name, let say "grid1_text" I got the expected
results!

Reproduce code:
---
$grid1 = new GridPrototype();
$grid1->setPerPage(4);
$grid1->setID("1"); 
$grid1->setKey();

$id = "1";
$key = "grid" . $id;
$_SESSION[$key] = $status;



Expected result:

I expect to have the $status variable accessible via $_SESSION['grid1']

Actual result:
--
$_SESSION['grid1'] points to the object $grid1





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


#42309 [NEW]: select of nvarchar() delivers only the first 250 letters

2007-08-15 Thread bc at ringwald dot name
From: bc at ringwald dot name
Operating system: Windows
PHP version:  5.2.3
PHP Bug Type: MSSQL related
Bug description:  select of nvarchar() delivers only the first 250 letters

Description:

select of nvarchar() delivers only the first 250 letters

workaround: convert(text, attribut)




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


#42236 [Fbk->Opn]: unwanted array reset within recursive call

2007-08-15 Thread remy215 at laposte dot net
 ID:   42236
 User updated by:  remy215 at laposte dot net
 Reported By:  remy215 at laposte dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Arrays related
 Operating System: debian
 PHP Version:  5.2.4RC1
 New Comment:

Hi Jani,
First thank you for your support.
Here is a cleaner version (without the infinite-loop checking):
array(
'a1'=>array(
'a2'=>array(),
'b2'=>array()
),'b1'=>array()
),'b0'=>array()
);

function getParent($id,$_subtree=null) {
$found_parent=null;
if(!$_subtree) {
global $array;
$_subtree=$array;
}
foreach($_subtree as $parent=>$children) {
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
echo "\nparent of b2 is: ".getParent('b2'); // expected result: 'a1' --
actual result: 'a1'
echo "\nparent of a0 is: ".getParent('a0'); // expected result: null --
actual result: infinite loop
?>

What's really strange is that if you call getParent('a0',$array), it
works perfectly ! it's the [global $array; $_subtree=$array;] used for
initialization that triggers an infinite loop.

Regards,
Remy


Previous Comments:


[2007-08-15 08:44:39] [EMAIL PROTECTED]

Please provide the simplest possible script that shows exactly what is
going wrong. The current example is too complex and seems to contain all
kinds of useless workarounds..



[2007-08-12 21:36:09] remy215 at laposte dot net

I tested with latest cvs snapshot, still unexpectingly reseting the
array, leading to an unpredictable infinite loop.



[2007-08-11 11:58:17] [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





[2007-08-07 17:21:17] remy215 at laposte dot net

Description:

I have an array of nested arrays (ie. each id can have nested
children). The function returns the parent of the provided id but end in
an infinite loop when the id does not exists !
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();


Reproduce code:
---
array('a1'=>array('a2'=>array(),'b2'=>array()),'b1'=>array()),'b0'=>array());
$searched=array(); // to avoid infinite loop
function getParent($id,$_subtree=null) {
if(!$_subtree) { // if first call
global $array;
$_subtree=$array; // entire tree
}
global $searched; // to avoid infinite loop
$found_parent=null;
foreach($_subtree as $parent=>$children) {
if(in_array($parent,$searched)) { // if already looped => stop 
(ie.
infinite loop)
die('Infinite loop: '.$parent);
}
array_push($searched,$parent); // to avoid infinite loop
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
$search='a0';
echo 'parent of '.$search.' is: '.getParent($search);
?>

Expected result:

When you provide as argument a nested id, the function works ('b2'
returns 'a1').
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function should return null.

Actual result:
--
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function end up in an infinite loop.
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();






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


#42308 [NEW]: objects and variable together in session mix up the $_SESSION

2007-08-15 Thread domnuprofesor at yahoo dot com
From: domnuprofesor at yahoo dot com
Operating system: Fedora Core 6
PHP version:  4.4.7
PHP Bug Type: Session related
Bug description:  objects and variable together in session mix up the $_SESSION

Description:

I came across this situation:
I had and object named "grid" which was a wrapper for a table.
In $_SESSION I already had a mysql singleton wrapper.
I tried to set another session variable with the key "grid1" and value,
lets say "text". The result I got was that PHP loaded the object "grid1" in
$_SESSION.
After I changed the key name, let say "grid1_text" I got the expected
results!

Reproduce code:
---
$grid1 = new GridPrototype();
$grid1->setPerPage(4);
$grid1->setID("1"); 
$grid1->setKey();

$id = "1";
$key = "grid" . $id;
$_SESSION[$key] = $status;



Expected result:

I expect to have the $status variable accessible via $_SESSION['grid1']

Actual result:
--
$_SESSION['grid1'] points to the object $grid1

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


#42305 [Fbk->Opn]: Segmentation fault after php script proccessing end

2007-08-15 Thread danil dot megrabjan at gmail dot com
 ID:   42305
 User updated by:  danil dot megrabjan at gmail dot com
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: SLES10
 PHP Version:  5.2.3
 New Comment:

I`m comment all zend extension in php.ini. And i have new in
backtrace...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213826272 (LWP 10758)]
0xb7c59f6e in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7c59f6e in free () from /lib/libc.so.6
#1  0xb762320b in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#2  0xb7623126 in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#3  0xb7623126 in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#4  0xb7622f4e in xmlFreeDoc () from /usr/lib/libxml2.so.2
#5  0xb779aa6a in php_libxml_decrement_doc_ref (object=0xb446cb00) at
/usr/src/debug/php-5.2.3/ext/libxml/libxml.c:966
#6  0xb779acbd in php_libxml_node_decrement_resource
(object=0xb446cb00)
at /usr/src/debug/php-5.2.3/ext/libxml/libxml.c:1039
#7  0xb7321264 in dom_objects_free_storage (object=0xb446cb00) at
/usr/src/debug/php-5.2.3/ext/dom/php_dom.c:974
#8  0xb78f10da in zend_objects_store_del_ref_by_handle (handle=21) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:206
#9  0xb78f1128 in zend_objects_store_del_ref (zobject=0xb44213c8) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:168
#10 0xb78d07b9 in _zval_dtor_func (zvalue=0xb44213c8) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.c:52
#11 0xb78c3458 in _zval_ptr_dtor (zval_ptr=0xb4421134) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.h:35
#12 0xb78dbe64 in zend_hash_destroy (ht=0xb4420ff8) at
/usr/src/debug/php-5.2.3/Zend/zend_hash.c:717
#13 0xb78eda13 in zend_object_std_dtor (object=0xb4420ed4) at
/usr/src/debug/php-5.2.3/Zend/zend_objects.c:45
#14 0xb78eda52 in zend_objects_free_object_storage (object=0xb4420ed4)
at /usr/src/debug/php-5.2.3/Zend/zend_objects.c:122
#15 0xb78f10da in zend_objects_store_del_ref_by_handle (handle=19) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:206
#16 0xb78f1128 in zend_objects_store_del_ref (zobject=0xb4420910) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:168
#17 0xb78d07b9 in _zval_dtor_func (zvalue=0xb4420910) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.c:52
#18 0xb78c3458 in _zval_ptr_dtor (zval_ptr=0xb444e5d8) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.h:35
#19 0xb78dbe64 in zend_hash_destroy (ht=0xb444e2fc) at
/usr/src/debug/php-5.2.3/Zend/zend_hash.c:717
#20 0xb78c7866 in destroy_zend_class (pce=0x8039960c) at
/usr/src/debug/php-5.2.3/Zend/zend_opcode.c:182
#21 0xb78dbae5 in zend_hash_apply_deleter (ht=0x800b5f98, p=0x80399600)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#22 0xb78dbbee in zend_hash_reverse_apply (ht=0x800b5f98,
apply_func=0xb78c29a0 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#23 0xb78c3b19 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:291
#24 0xb78d0ecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#25 0xb788779d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#26 0xb795741c in php_handler (r=0x80354260) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#27 0x8002f94d in ap_run_handler (r=0x80354260) at config.c:157
#28 0x80033227 in ap_invoke_handler (r=0x80354260) at config.c:372
#29 0x8003f084 in ap_internal_redirect (new_uri=0x80354240
"/infin.php?query=start/1/66", r=0x8034b470)
at http_request.c:477
#30 0xb7500c10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#31 0x80354240 in ?? ()
#32 0x8034b470 in ?? ()
#33 0xb750567f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#34 0x80354178 in ?? ()
#35 0x in ?? ()


Previous Comments:


[2007-08-15 11:05:02] [EMAIL PROTECTED]

You do have disabled ALL shared extensions, including Zend extensions
prior to getting that GDB backtrace? If you haven't please do so.



[2007-08-15 10:56:14] danil dot megrabjan at gmail dot com

I use remote debug with ZendDebugger. I need in `--disable-debug`.
I try it for experiment only.



[2007-08-15 10:35:13] [EMAIL PROTECTED]

I would also try compiling without using these:

--enable-inline-optimization
--enable-zend-multibyte
--disable-rpath
--disable-static
--enable-shared
--with-pic
--disable-debug

And change last to --enable-debug to get sane GDB backtrace.



[2007-08-15 10:14:25] danil dot megrabjan at gmail dot com

OS: SLES 10 on VM Ware under Win2003Server. Now i go to try compile
5.2-dev from cvs.

current php build:

PHP Version 5.2.3

System  Linux 2.6.16.21-0.8-default #1 Mon Jul 3 18:25:39 UTC 2006
i686
'../configure' '--prefix=/usr'

#42305 [Opn->Fbk]: Segmentation fault after php script proccessing end

2007-08-15 Thread jani
 ID:   42305
 Updated by:   [EMAIL PROTECTED]
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: SLES10
 PHP Version:  5.2.3
 New Comment:

Please don't send more backtraces from outdated PHP. Use the CVS
snapshot of 5.2. We're about to release 5.2.4 soon so..


Previous Comments:


[2007-08-15 11:30:26] danil dot megrabjan at gmail dot com

I`m comment all zend extension in php.ini. And i have new in
backtrace...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213826272 (LWP 10758)]
0xb7c59f6e in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7c59f6e in free () from /lib/libc.so.6
#1  0xb762320b in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#2  0xb7623126 in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#3  0xb7623126 in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#4  0xb7622f4e in xmlFreeDoc () from /usr/lib/libxml2.so.2
#5  0xb779aa6a in php_libxml_decrement_doc_ref (object=0xb446cb00) at
/usr/src/debug/php-5.2.3/ext/libxml/libxml.c:966
#6  0xb779acbd in php_libxml_node_decrement_resource
(object=0xb446cb00)
at /usr/src/debug/php-5.2.3/ext/libxml/libxml.c:1039
#7  0xb7321264 in dom_objects_free_storage (object=0xb446cb00) at
/usr/src/debug/php-5.2.3/ext/dom/php_dom.c:974
#8  0xb78f10da in zend_objects_store_del_ref_by_handle (handle=21) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:206
#9  0xb78f1128 in zend_objects_store_del_ref (zobject=0xb44213c8) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:168
#10 0xb78d07b9 in _zval_dtor_func (zvalue=0xb44213c8) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.c:52
#11 0xb78c3458 in _zval_ptr_dtor (zval_ptr=0xb4421134) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.h:35
#12 0xb78dbe64 in zend_hash_destroy (ht=0xb4420ff8) at
/usr/src/debug/php-5.2.3/Zend/zend_hash.c:717
#13 0xb78eda13 in zend_object_std_dtor (object=0xb4420ed4) at
/usr/src/debug/php-5.2.3/Zend/zend_objects.c:45
#14 0xb78eda52 in zend_objects_free_object_storage (object=0xb4420ed4)
at /usr/src/debug/php-5.2.3/Zend/zend_objects.c:122
#15 0xb78f10da in zend_objects_store_del_ref_by_handle (handle=19) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:206
#16 0xb78f1128 in zend_objects_store_del_ref (zobject=0xb4420910) at
/usr/src/debug/php-5.2.3/Zend/zend_objects_API.c:168
#17 0xb78d07b9 in _zval_dtor_func (zvalue=0xb4420910) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.c:52
#18 0xb78c3458 in _zval_ptr_dtor (zval_ptr=0xb444e5d8) at
/usr/src/debug/php-5.2.3/Zend/zend_variables.h:35
#19 0xb78dbe64 in zend_hash_destroy (ht=0xb444e2fc) at
/usr/src/debug/php-5.2.3/Zend/zend_hash.c:717
#20 0xb78c7866 in destroy_zend_class (pce=0x8039960c) at
/usr/src/debug/php-5.2.3/Zend/zend_opcode.c:182
#21 0xb78dbae5 in zend_hash_apply_deleter (ht=0x800b5f98, p=0x80399600)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#22 0xb78dbbee in zend_hash_reverse_apply (ht=0x800b5f98,
apply_func=0xb78c29a0 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#23 0xb78c3b19 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:291
#24 0xb78d0ecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#25 0xb788779d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#26 0xb795741c in php_handler (r=0x80354260) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#27 0x8002f94d in ap_run_handler (r=0x80354260) at config.c:157
#28 0x80033227 in ap_invoke_handler (r=0x80354260) at config.c:372
#29 0x8003f084 in ap_internal_redirect (new_uri=0x80354240
"/infin.php?query=start/1/66", r=0x8034b470)
at http_request.c:477
#30 0xb7500c10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#31 0x80354240 in ?? ()
#32 0x8034b470 in ?? ()
#33 0xb750567f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#34 0x80354178 in ?? ()
#35 0x in ?? ()



[2007-08-15 11:05:02] [EMAIL PROTECTED]

You do have disabled ALL shared extensions, including Zend extensions
prior to getting that GDB backtrace? If you haven't please do so.



[2007-08-15 10:56:14] danil dot megrabjan at gmail dot com

I use remote debug with ZendDebugger. I need in `--disable-debug`.
I try it for experiment only.



[2007-08-15 10:35:13] [EMAIL PROTECTED]

I would also try compiling without using these:

--enable-inline-optimization
--enable-zend-multibyte
--disable-rpath
--disable-static
--enable-shared
--with-pic
--disable-debug

And change last to --enable-debug to get sane GDB backtrace.



[2007-08-15 10:14:25] danil dot megrabjan at gmail 

#42294 [Fbk->Opn]: round will not use PHP_ROUND_FUZZ on 64bit CPUs

2007-08-15 Thread oliver at teqneers dot de
 ID:   42294
 User updated by:  oliver at teqneers dot de
 Reported By:  oliver at teqneers dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *Configuration Issues
 Operating System: OpenSuSE 10.2
 PHP Version:  5.2.4RC1
 New Comment:

this is an example of the comment block of the round documentation
(http://de.php.net/manual/en/function.round.php):

 ",round(0.285,2));  
// incorrect result 0.28

printf("1.285 - %s  ",round(1.285,2));  
// correct result 1.29

printf("1.255 - %s ",round(1.255,2));   
// incorrect result 1.25

?>


Previous Comments:


[2007-08-15 08:47:36] [EMAIL PROTECTED]

Can you please provide a short PHP code example which fails because of
this..?



[2007-08-14 10:46:19] oliver at teqneers dot de

Description:

Because of the nature of floats to be not exact enough in binary
system, PHP uses a kind of fuzzy login to round more precisely turning
on PHP_ROUND_FUZZ in some cases.

The problem is the "configure" check. The check does not work for AMD
nor INTEL 64bit CPUs.

The number to test against is not sufficient. So maybe it is possible
to add or change it???

Reproduce code:
---
#include 
  /* keep this out-of-line to prevent use of gcc inline floor() */
  double somefn(double n) {
return floor(n*pow(10,2) + 0.5);
  }
  int main() {
return somefn(0.045)/10.0 != 0.5;
  }

this will return 1 on a 32bit but 0 on a 64bit engine.

Expected result:

it should also fail on a 64bit and return 1. The following code would
actually work on 64bit, because it will test 0.45 as well as 0.285:


#include 
  /* keep this out-of-line to prevent use of gcc inline floor() */
  double somefn(double n) {
return floor(n*pow(10,2) + 0.5);
  }
  int main() {
return (somefn(0.285)/100.0 != 0.29) || (somefn(0.045) / 10.0 !=
0.5);
  }

Actual result:
--
Instead of using the fuzzy round, PHP just takes 0.5 and
adds/substracts it from the given float (math.c)





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


#42305 [Opn->Fbk]: Segmentation fault after php script proccessing end

2007-08-15 Thread jani
 ID:   42305
 Updated by:   [EMAIL PROTECTED]
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: SLES10
 PHP Version:  5.2.3
 New Comment:

You do have disabled ALL shared extensions, including Zend extensions
prior to getting that GDB backtrace? If you haven't please do so.


Previous Comments:


[2007-08-15 10:56:14] danil dot megrabjan at gmail dot com

I use remote debug with ZendDebugger. I need in `--disable-debug`.
I try it for experiment only.



[2007-08-15 10:35:13] [EMAIL PROTECTED]

I would also try compiling without using these:

--enable-inline-optimization
--enable-zend-multibyte
--disable-rpath
--disable-static
--enable-shared
--with-pic
--disable-debug

And change last to --enable-debug to get sane GDB backtrace.



[2007-08-15 10:14:25] danil dot megrabjan at gmail dot com

OS: SLES 10 on VM Ware under Win2003Server. Now i go to try compile
5.2-dev from cvs.

current php build:

PHP Version 5.2.3

System  Linux 2.6.16.21-0.8-default #1 Mon Jul 3 18:25:39 UTC 2006
i686
'../configure' '--prefix=/usr' '--datadir=/usr/share/php5'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib'
'--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2'
'--with-config-file-path=/etc/php5/apache2'
'--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml'
'--enable-session' '--with-mm' '--with-pcre-regex' '--enable-xml'
'--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug'
'--enable-memory-limit' '--enable-inline-optimization'
'--enable-zend-multibyte' '--disable-rpath' '--disable-static'
'--enable-shared' '--program-suffix=5' '--with-pic'
'--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'



[2007-08-15 09:35:51] [EMAIL PROTECTED]

What OS do you have? How did you build PHP? Have you tried latest CVS
snapshot found at http://snaps.php.net/ ?



[2007-08-15 08:47:28] danil dot megrabjan at gmail dot com

Description:

After proccessing php-script i have my total result in browser, but in
apache logs i see that "[Wed Aug 15 11:16:11 2007] [notice] child pid
8922 exit signal Segmentation fault (11)"
I use gdb so that i have any details about this problem.

I think, that main problem consist in php garbage collector whe it try 
to free...

Reproduce code:
---
Very many code... i dont`n now how i may send this big code. Just as i
don't know how i can this code made is shorten in 20 lines.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213375712 (LWP 9388)]
0xb7cc7f49 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7cc7f49 in free () from /lib/libc.so.6
#1  0xb79302c1 in free_zend_constant (c=0x804a9bd7) at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:35
#2  0xb7949ae5 in zend_hash_apply_deleter (ht=0x4ab08800, p=0x804a9ba0)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#3  0xb7949bee in zend_hash_reverse_apply (ht=0x800b7068,
apply_func=0xb792f240 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#4  0xb7930138 in clean_non_persistent_constants () at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#5  0xb7931ab4 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#6  0xb793eecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#7  0xb78f579d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#8  0xb79c541c in php_handler (r=0x8048fd38) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#9  0x8002f94d in ap_run_handler (r=0x8048fd38) at config.c:157
#10 0x80033227 in ap_invoke_handler (r=0x8048fd38) at config.c:372
#11 0x8003f084 in ap_internal_redirect (new_uri=0x8048fd18
"/infin.php?query=start/1/66", r=0x80486f48)
at http_request.c:477
#12 0xb756ec10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#13 0x8048fd18 in ?? ()
#14 0x80486f48 in ?? ()
#15 0xb757367f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#16 0x8048fc50 in ?? ()
#17 0x in ?? ()





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


#42305 [Fbk->Opn]: Segmentation fault after php script proccessing end

2007-08-15 Thread danil dot megrabjan at gmail dot com
 ID:   42305
 User updated by:  danil dot megrabjan at gmail dot com
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: SLES10
 PHP Version:  5.2.3
 New Comment:

I use remote debug with ZendDebugger. I need in `--disable-debug`.
I try it for experiment only.


Previous Comments:


[2007-08-15 10:35:13] [EMAIL PROTECTED]

I would also try compiling without using these:

--enable-inline-optimization
--enable-zend-multibyte
--disable-rpath
--disable-static
--enable-shared
--with-pic
--disable-debug

And change last to --enable-debug to get sane GDB backtrace.



[2007-08-15 10:14:25] danil dot megrabjan at gmail dot com

OS: SLES 10 on VM Ware under Win2003Server. Now i go to try compile
5.2-dev from cvs.

current php build:

PHP Version 5.2.3

System  Linux 2.6.16.21-0.8-default #1 Mon Jul 3 18:25:39 UTC 2006
i686
'../configure' '--prefix=/usr' '--datadir=/usr/share/php5'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib'
'--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2'
'--with-config-file-path=/etc/php5/apache2'
'--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml'
'--enable-session' '--with-mm' '--with-pcre-regex' '--enable-xml'
'--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug'
'--enable-memory-limit' '--enable-inline-optimization'
'--enable-zend-multibyte' '--disable-rpath' '--disable-static'
'--enable-shared' '--program-suffix=5' '--with-pic'
'--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'



[2007-08-15 09:35:51] [EMAIL PROTECTED]

What OS do you have? How did you build PHP? Have you tried latest CVS
snapshot found at http://snaps.php.net/ ?



[2007-08-15 08:47:28] danil dot megrabjan at gmail dot com

Description:

After proccessing php-script i have my total result in browser, but in
apache logs i see that "[Wed Aug 15 11:16:11 2007] [notice] child pid
8922 exit signal Segmentation fault (11)"
I use gdb so that i have any details about this problem.

I think, that main problem consist in php garbage collector whe it try 
to free...

Reproduce code:
---
Very many code... i dont`n now how i may send this big code. Just as i
don't know how i can this code made is shorten in 20 lines.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213375712 (LWP 9388)]
0xb7cc7f49 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7cc7f49 in free () from /lib/libc.so.6
#1  0xb79302c1 in free_zend_constant (c=0x804a9bd7) at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:35
#2  0xb7949ae5 in zend_hash_apply_deleter (ht=0x4ab08800, p=0x804a9ba0)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#3  0xb7949bee in zend_hash_reverse_apply (ht=0x800b7068,
apply_func=0xb792f240 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#4  0xb7930138 in clean_non_persistent_constants () at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#5  0xb7931ab4 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#6  0xb793eecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#7  0xb78f579d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#8  0xb79c541c in php_handler (r=0x8048fd38) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#9  0x8002f94d in ap_run_handler (r=0x8048fd38) at config.c:157
#10 0x80033227 in ap_invoke_handler (r=0x8048fd38) at config.c:372
#11 0x8003f084 in ap_internal_redirect (new_uri=0x8048fd18
"/infin.php?query=start/1/66", r=0x80486f48)
at http_request.c:477
#12 0xb756ec10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#13 0x8048fd18 in ?? ()
#14 0x80486f48 in ?? ()
#15 0xb757367f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#16 0x8048fc50 in ?? ()
#17 0x in ?? ()





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


#42305 [Opn->Fbk]: Segmentation fault after php script proccessing end

2007-08-15 Thread jani
 ID:   42305
 Updated by:   [EMAIL PROTECTED]
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: SLES10
 PHP Version:  5.2.3
 New Comment:

I would also try compiling without using these:

--enable-inline-optimization
--enable-zend-multibyte
--disable-rpath
--disable-static
--enable-shared
--with-pic
--disable-debug

And change last to --enable-debug to get sane GDB backtrace.


Previous Comments:


[2007-08-15 10:14:25] danil dot megrabjan at gmail dot com

OS: SLES 10 on VM Ware under Win2003Server. Now i go to try compile
5.2-dev from cvs.

current php build:

PHP Version 5.2.3

System  Linux 2.6.16.21-0.8-default #1 Mon Jul 3 18:25:39 UTC 2006
i686
'../configure' '--prefix=/usr' '--datadir=/usr/share/php5'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib'
'--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2'
'--with-config-file-path=/etc/php5/apache2'
'--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml'
'--enable-session' '--with-mm' '--with-pcre-regex' '--enable-xml'
'--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug'
'--enable-memory-limit' '--enable-inline-optimization'
'--enable-zend-multibyte' '--disable-rpath' '--disable-static'
'--enable-shared' '--program-suffix=5' '--with-pic'
'--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'



[2007-08-15 09:35:51] [EMAIL PROTECTED]

What OS do you have? How did you build PHP? Have you tried latest CVS
snapshot found at http://snaps.php.net/ ?



[2007-08-15 08:47:28] danil dot megrabjan at gmail dot com

Description:

After proccessing php-script i have my total result in browser, but in
apache logs i see that "[Wed Aug 15 11:16:11 2007] [notice] child pid
8922 exit signal Segmentation fault (11)"
I use gdb so that i have any details about this problem.

I think, that main problem consist in php garbage collector whe it try 
to free...

Reproduce code:
---
Very many code... i dont`n now how i may send this big code. Just as i
don't know how i can this code made is shorten in 20 lines.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213375712 (LWP 9388)]
0xb7cc7f49 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7cc7f49 in free () from /lib/libc.so.6
#1  0xb79302c1 in free_zend_constant (c=0x804a9bd7) at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:35
#2  0xb7949ae5 in zend_hash_apply_deleter (ht=0x4ab08800, p=0x804a9ba0)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#3  0xb7949bee in zend_hash_reverse_apply (ht=0x800b7068,
apply_func=0xb792f240 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#4  0xb7930138 in clean_non_persistent_constants () at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#5  0xb7931ab4 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#6  0xb793eecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#7  0xb78f579d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#8  0xb79c541c in php_handler (r=0x8048fd38) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#9  0x8002f94d in ap_run_handler (r=0x8048fd38) at config.c:157
#10 0x80033227 in ap_invoke_handler (r=0x8048fd38) at config.c:372
#11 0x8003f084 in ap_internal_redirect (new_uri=0x8048fd18
"/infin.php?query=start/1/66", r=0x80486f48)
at http_request.c:477
#12 0xb756ec10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#13 0x8048fd18 in ?? ()
#14 0x80486f48 in ?? ()
#15 0xb757367f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#16 0x8048fc50 in ?? ()
#17 0x in ?? ()





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


#42306 [Opn->Asn]: current/next/prev/key usage on the same array as foreach() is looping

2007-08-15 Thread jani
 ID:   42306
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hannes dot magnusson at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Arrays related
 Operating System: Linux/Ubuntu 7.04
 PHP Version:  5CVS-2007-08-15 (CVS)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:



Output:

without reference:
1 - b
1 - b
1 - b
1 - b
1 - b
1 - b
with reference:
1 - b
2 - c
3 - d
4 - e
5 - f
 - 



Previous Comments:


[2007-08-15 09:19:53] hannes dot magnusson at gmail dot com

Description:

If I use current/next/prev/key() on the same array as foreach() is
currently looping over the internal pointer is only increased on the
first iteration.

However. If I compare the value ($b) to something before using
current/next/prev/key() I get the expected results:

$a = range(0, 10);
foreach($a as $b) {
if($b == 5) {
var_dump(current($a)); // int(6)
}
}



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


#42305 [Fbk->Opn]: Segmentation fault after php script proccessing end

2007-08-15 Thread danil dot megrabjan at gmail dot com
 ID:   42305
 User updated by:  danil dot megrabjan at gmail dot com
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
-Operating System: ?
+Operating System: SLES10
 PHP Version:  5.2.3
 New Comment:

OS: SLES 10 on VM Ware under Win2003Server. Now i go to try compile
5.2-dev from cvs.

current php build:

PHP Version 5.2.3

System  Linux 2.6.16.21-0.8-default #1 Mon Jul 3 18:25:39 UTC 2006
i686
'../configure' '--prefix=/usr' '--datadir=/usr/share/php5'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib'
'--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2'
'--with-config-file-path=/etc/php5/apache2'
'--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml'
'--enable-session' '--with-mm' '--with-pcre-regex' '--enable-xml'
'--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug'
'--enable-memory-limit' '--enable-inline-optimization'
'--enable-zend-multibyte' '--disable-rpath' '--disable-static'
'--enable-shared' '--program-suffix=5' '--with-pic'
'--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'


Previous Comments:


[2007-08-15 09:35:51] [EMAIL PROTECTED]

What OS do you have? How did you build PHP? Have you tried latest CVS
snapshot found at http://snaps.php.net/ ?



[2007-08-15 08:47:28] danil dot megrabjan at gmail dot com

Description:

After proccessing php-script i have my total result in browser, but in
apache logs i see that "[Wed Aug 15 11:16:11 2007] [notice] child pid
8922 exit signal Segmentation fault (11)"
I use gdb so that i have any details about this problem.

I think, that main problem consist in php garbage collector whe it try 
to free...

Reproduce code:
---
Very many code... i dont`n now how i may send this big code. Just as i
don't know how i can this code made is shorten in 20 lines.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213375712 (LWP 9388)]
0xb7cc7f49 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7cc7f49 in free () from /lib/libc.so.6
#1  0xb79302c1 in free_zend_constant (c=0x804a9bd7) at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:35
#2  0xb7949ae5 in zend_hash_apply_deleter (ht=0x4ab08800, p=0x804a9ba0)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#3  0xb7949bee in zend_hash_reverse_apply (ht=0x800b7068,
apply_func=0xb792f240 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#4  0xb7930138 in clean_non_persistent_constants () at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#5  0xb7931ab4 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#6  0xb793eecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#7  0xb78f579d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#8  0xb79c541c in php_handler (r=0x8048fd38) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#9  0x8002f94d in ap_run_handler (r=0x8048fd38) at config.c:157
#10 0x80033227 in ap_invoke_handler (r=0x8048fd38) at config.c:372
#11 0x8003f084 in ap_internal_redirect (new_uri=0x8048fd18
"/infin.php?query=start/1/66", r=0x80486f48)
at http_request.c:477
#12 0xb756ec10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#13 0x8048fd18 in ?? ()
#14 0x80486f48 in ?? ()
#15 0xb757367f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#16 0x8048fc50 in ?? ()
#17 0x in ?? ()





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


#41055 [Opn->Asn]: DOTNET not instantiating fully-pathed assembly

2007-08-15 Thread jani
 ID:   41055
 Updated by:   [EMAIL PROTECTED]
 Reported By:  daarond at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: WinXP
 PHP Version:  5CVS-2007-04-11 (snap)
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-04-11 18:06:02] daarond at gmail dot com

Description:

Bug #29800 did not pursue it, but I would like to go forward with
resolving it.

I have a strongly-typed assembly that I added to the GAC. By the way,
the simplest way to get the token information is to use gacutil with the
/l switch.

To fully reproduce it, you can download the DLLs I am using:
http://www.angorasoftware.com/test/Core.zip


Reproduce code:
---


Expected result:

It should open a web page.

Actual result:
--
PHP Fatal error:  Uncaught exception 'com_exception' with message
'Failed to instantiate .Net object [CreateInstance] [0x80131604] ' in
C:\PHP5\wtest.php:3
Stack trace:
#0 C:\PHP5\wtest.php(3): dotnet->dotnet('watin.core, Ver...',
'WatiN.Core.IE')
#1 {main}
  thrown in C:\PHP5\wtest.php on line 3





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


#42303 [Fbk->Opn]: json encode creates objects from array with gaps in the index

2007-08-15 Thread dev at lenss dot nl
 ID:   42303
 User updated by:  dev at lenss dot nl
 Reported By:  dev at lenss dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: JSON related
 Operating System: windows, linux
 PHP Version:  5.2.3
 New Comment:

Tested the snaps on windows and linux. Bug still is active in the
snapshots.


Previous Comments:


[2007-08-15 08:45:14] [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





[2007-08-15 08:42:51] dev at lenss dot nl

Changed version of report to PHP 5.2.3.



[2007-08-15 06:34:39] dev at lenss dot nl

Description:

When encoding an array with sequental keys. Everything works out fine.
When encoding an array with gaps between the keys. The json encoder
creates an object instead of an array. Wich maybe ideal in some places.
But it's inconsistant with the JSON javascript parser at json.org. I
selected the PHP 4.4.7 version. But also tested in PHP 5.2.3 with the
same result.

In json.c the following code is causing this:

--- ext/json/json.c.orig2007-08-14 22:38:20.0 +0200
+++ ext/json/json.c 2007-08-14 22:36:51.0 +0200
@@ -106,10 +106,6 @@
 
 if (i == HASH_KEY_IS_STRING) {
 return 1;
-} else {
-if (index != idx) {
-return 1;
-}
 }
 idx++;
 }

Reproduce code:
---


Expected result:

Result in array: [["foo"],["bar","test"]]
Result in object: [["foo"],["bar","test"]]

Actual result:
--
Result in array: [["foo"],["bar","test"]]
Result in object: {"0":["foo"],"2":["bar","test"]}





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


#42305 [Opn->Fbk]: Segmentation fault after php script proccessing end

2007-08-15 Thread jani
 ID:   42305
 Updated by:   [EMAIL PROTECTED]
 Reported By:  danil dot megrabjan at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
-Operating System: reproducible
+Operating System: ?
 PHP Version:  5.2.4RC1
 New Comment:

What OS do you have? How did you build PHP? Have you tried latest CVS
snapshot found at http://snaps.php.net/ ?


Previous Comments:


[2007-08-15 08:47:28] danil dot megrabjan at gmail dot com

Description:

After proccessing php-script i have my total result in browser, but in
apache logs i see that "[Wed Aug 15 11:16:11 2007] [notice] child pid
8922 exit signal Segmentation fault (11)"
I use gdb so that i have any details about this problem.

I think, that main problem consist in php garbage collector whe it try 
to free...

Reproduce code:
---
Very many code... i dont`n now how i may send this big code. Just as i
don't know how i can this code made is shorten in 20 lines.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213375712 (LWP 9388)]
0xb7cc7f49 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7cc7f49 in free () from /lib/libc.so.6
#1  0xb79302c1 in free_zend_constant (c=0x804a9bd7) at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:35
#2  0xb7949ae5 in zend_hash_apply_deleter (ht=0x4ab08800, p=0x804a9ba0)
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:805
#3  0xb7949bee in zend_hash_reverse_apply (ht=0x800b7068,
apply_func=0xb792f240 )
at /usr/src/debug/php-5.2.3/Zend/zend_hash.c:954
#4  0xb7930138 in clean_non_persistent_constants () at
/usr/src/debug/php-5.2.3/Zend/zend_constants.c:231
#5  0xb7931ab4 in shutdown_executor () at
/usr/src/debug/php-5.2.3/Zend/zend_execute_API.c:303
#6  0xb793eecf in zend_deactivate () at
/usr/src/debug/php-5.2.3/Zend/zend.c:941
#7  0xb78f579d in php_request_shutdown (dummy=0x0) at
/usr/src/debug/php-5.2.3/main/main.c:1323
#8  0xb79c541c in php_handler (r=0x8048fd38) at
/usr/src/debug/php-5.2.3/sapi/apache2handler/sapi_apache2.c:467
#9  0x8002f94d in ap_run_handler (r=0x8048fd38) at config.c:157
#10 0x80033227 in ap_invoke_handler (r=0x8048fd38) at config.c:372
#11 0x8003f084 in ap_internal_redirect (new_uri=0x8048fd18
"/infin.php?query=start/1/66", r=0x80486f48)
at http_request.c:477
#12 0xb756ec10 in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#13 0x8048fd18 in ?? ()
#14 0x80486f48 in ?? ()
#15 0xb757367f in ?? () from /usr/lib/apache2-prefork/mod_rewrite.so
#16 0x8048fc50 in ?? ()
#17 0x in ?? ()





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


#42306 [NEW]: Using current/next/prev/key on the same array as foreach() is currently looping

2007-08-15 Thread hannes dot magnusson at gmail dot com
From: hannes dot magnusson at gmail dot com
Operating system: Linux/Ubuntu 7.04
PHP version:  5CVS-2007-08-15 (CVS)
PHP Bug Type: Arrays related
Bug description:  Using current/next/prev/key on the same array as foreach() is 
currently looping

Description:

If I use current/next/prev/key() on the same array as foreach() is
currently looping over the internal pointer is only increased on the first
iteration.

However. If I compare the value ($b) to something before using
current/next/prev/key() I get the expected results:

$a = range(0, 10);
foreach($a as $b) {
if($b == 5) {
var_dump(current($a)); // int(6)
}
}



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


#41189 [Opn->Asn]: Multi-dimensional array in COM function causes hang

2007-08-15 Thread jani
 ID:   41189
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rrosamond at sccd dot ctc dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows 2003 Server
 PHP Version:  5CVS-2007-04-25 (snap)
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-04-25 18:55:53] rrosamond at sccd dot ctc dot edu

Description:

This is a similar issue to the one posted by spymail at 21cn dot com on
26 Apr 2004 6:00pm UTC, Bug #28161
(http://bugs.php.net/bug.php?id=28161).

I should be able to call the COM function and set an attribute in a
multi-dimensional array using one of the functions in that COM object.

No changes have been made to php.ini.  I'm using the out-of-the-box
config files and extensions packaged with the latest CVS of PHP5.

Reproduce code:
---
Attribute["options"] = $options;

?>

Expected result:

The attribute "options" should be set.

Actual result:
--
Apache (2.2.4) and/or PHP (5.2.2RC2-dev/cvs built 4/25/2007 16:30 GMT)
hangs on the script.  The page never completely loads after running this
function.  PHP never actually "crashes" from what I can tell.  It just
simply doesn't complete processing the script.  If I could get it to
crash, I would submit a backtrace.

Note, in PHP 5.2.0, the result was different: Uncaught exception
'com_exception' with message 'Error [0x8002000e] Invalid number of
parameters.

In 5.2.2RC2-dev/csv, no error is produced.





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


#42298 [Asn]: preg_match with /u gives different results for \S\S and \S{2}

2007-08-15 Thread nlopess
 ID:   42298
 Updated by:   [EMAIL PROTECTED]
 Reported By:  matthew-php at dracos dot co dot uk
 Status:   Assigned
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5CVS-2007-08-14 (snap)
 Assigned To:  nlopess
 New Comment:

submited upstream: http://bugs.exim.org/580
I will provide more feedback when I end my vacations.


Previous Comments:


[2007-08-15 08:43:03] [EMAIL PROTECTED]

Assigned to PCRE maintainer.



[2007-08-14 16:46:48] matthew-php at dracos dot co dot uk

Description:

When using the /u modifier, preg_match, preg_match_all, and
preg_replace all give incorrect results using /\S{2}/u but work fine
with /\S\S/u which should be equivalent.

Reproduce code:
---
$s = "A\xc2\xa3BC";
preg_match_all('/\S\S/u', $s, $m);
print_r($m[0]);
preg_match_all('/\S{2}/u', $s, $m);
print_r($m[0]);


Expected result:

Array
(
[0] => A£
[1] => BC
)
Array
(
[0] => A£
[1] => BC
)


Actual result:
--
Array
(
[0] => A£
[1] => BC
)
Array
(
[0] => A
[1] => 
)






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


#42303 [Opn->Fbk]: json encode creates objects from array with gaps in the index

2007-08-15 Thread jani
 ID:   42303
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dev at lenss dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: JSON related
 Operating System: windows, linux
 PHP Version:  5.2.3
 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-08-15 08:42:51] dev at lenss dot nl

Changed version of report to PHP 5.2.3.



[2007-08-15 06:34:39] dev at lenss dot nl

Description:

When encoding an array with sequental keys. Everything works out fine.
When encoding an array with gaps between the keys. The json encoder
creates an object instead of an array. Wich maybe ideal in some places.
But it's inconsistant with the JSON javascript parser at json.org. I
selected the PHP 4.4.7 version. But also tested in PHP 5.2.3 with the
same result.

In json.c the following code is causing this:

--- ext/json/json.c.orig2007-08-14 22:38:20.0 +0200
+++ ext/json/json.c 2007-08-14 22:36:51.0 +0200
@@ -106,10 +106,6 @@
 
 if (i == HASH_KEY_IS_STRING) {
 return 1;
-} else {
-if (index != idx) {
-return 1;
-}
 }
 idx++;
 }

Reproduce code:
---


Expected result:

Result in array: [["foo"],["bar","test"]]
Result in object: [["foo"],["bar","test"]]

Actual result:
--
Result in array: [["foo"],["bar","test"]]
Result in object: {"0":["foo"],"2":["bar","test"]}





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


#42236 [Opn->Fbk]: unwanted array reset within recursive call

2007-08-15 Thread jani
 ID:   42236
 Updated by:   [EMAIL PROTECTED]
 Reported By:  remy215 at laposte dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: debian
 PHP Version:  5.2.4RC1
 New Comment:

Please provide the simplest possible script that shows exactly what is
going wrong. The current example is too complex and seems to contain all
kinds of useless workarounds..


Previous Comments:


[2007-08-12 21:36:09] remy215 at laposte dot net

I tested with latest cvs snapshot, still unexpectingly reseting the
array, leading to an unpredictable infinite loop.



[2007-08-11 11:58:17] [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





[2007-08-07 17:21:17] remy215 at laposte dot net

Description:

I have an array of nested arrays (ie. each id can have nested
children). The function returns the parent of the provided id but end in
an infinite loop when the id does not exists !
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();


Reproduce code:
---
array('a1'=>array('a2'=>array(),'b2'=>array()),'b1'=>array()),'b0'=>array());
$searched=array(); // to avoid infinite loop
function getParent($id,$_subtree=null) {
if(!$_subtree) { // if first call
global $array;
$_subtree=$array; // entire tree
}
global $searched; // to avoid infinite loop
$found_parent=null;
foreach($_subtree as $parent=>$children) {
if(in_array($parent,$searched)) { // if already looped => stop 
(ie.
infinite loop)
die('Infinite loop: '.$parent);
}
array_push($searched,$parent); // to avoid infinite loop
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
$search='a0';
echo 'parent of '.$search.' is: '.getParent($search);
?>

Expected result:

When you provide as argument a nested id, the function works ('b2'
returns 'a1').
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function should return null.

Actual result:
--
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function end up in an infinite loop.
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();






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


#42298 [Opn->Asn]: preg_match with /u gives different results for \S\S and \S{2}

2007-08-15 Thread jani
 ID:   42298
 Updated by:   [EMAIL PROTECTED]
 Reported By:  matthew-php at dracos dot co dot uk
-Status:   Open
+Status:   Assigned
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5CVS-2007-08-14 (snap)
-Assigned To:  
+Assigned To:  nlopess
 New Comment:

Assigned to PCRE maintainer.


Previous Comments:


[2007-08-14 16:46:48] matthew-php at dracos dot co dot uk

Description:

When using the /u modifier, preg_match, preg_match_all, and
preg_replace all give incorrect results using /\S{2}/u but work fine
with /\S\S/u which should be equivalent.

Reproduce code:
---
$s = "A\xc2\xa3BC";
preg_match_all('/\S\S/u', $s, $m);
print_r($m[0]);
preg_match_all('/\S{2}/u', $s, $m);
print_r($m[0]);


Expected result:

Array
(
[0] => A£
[1] => BC
)
Array
(
[0] => A£
[1] => BC
)


Actual result:
--
Array
(
[0] => A£
[1] => BC
)
Array
(
[0] => A
[1] => 
)






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


#42303 [Opn]: json encode creates objects from array with gaps in the index

2007-08-15 Thread dev at lenss dot nl
 ID:   42303
 User updated by:  dev at lenss dot nl
 Reported By:  dev at lenss dot nl
 Status:   Open
 Bug Type: JSON related
 Operating System: windows, linux
-PHP Version:  4.4.7
+PHP Version:  5.2.3
 New Comment:

Changed version of report to PHP 5.2.3.


Previous Comments:


[2007-08-15 06:34:39] dev at lenss dot nl

Description:

When encoding an array with sequental keys. Everything works out fine.
When encoding an array with gaps between the keys. The json encoder
creates an object instead of an array. Wich maybe ideal in some places.
But it's inconsistant with the JSON javascript parser at json.org. I
selected the PHP 4.4.7 version. But also tested in PHP 5.2.3 with the
same result.

In json.c the following code is causing this:

--- ext/json/json.c.orig2007-08-14 22:38:20.0 +0200
+++ ext/json/json.c 2007-08-14 22:36:51.0 +0200
@@ -106,10 +106,6 @@
 
 if (i == HASH_KEY_IS_STRING) {
 return 1;
-} else {
-if (index != idx) {
-return 1;
-}
 }
 idx++;
 }

Reproduce code:
---


Expected result:

Result in array: [["foo"],["bar","test"]]
Result in object: [["foo"],["bar","test"]]

Actual result:
--
Result in array: [["foo"],["bar","test"]]
Result in object: {"0":["foo"],"2":["bar","test"]}





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


#42189 [Opn]: xmlrpc_set_type() crashes php

2007-08-15 Thread jani
 ID:   42189
 Updated by:   [EMAIL PROTECTED]
 Reported By:  giunta dot gaetano at gmail dot com
 Status:   Open
 Bug Type: XMLRPC-EPI related
 Operating System: windows xp or 2000
 PHP Version:  5.2.3
 New Comment:

To me it seems like xmlrpc is dead fish, I can't even access
http://www.xmlrpc.com/ anymore. (dunno if it's temporary issue though)




Previous Comments:


[2007-08-06 10:00:04] giunta dot gaetano at gmail dot com

As a side note, mostly to comments on #22468 - the official epi lib has
not seen any cvs commit in about 5 years, and the php engine is possibly
the biggest user of the lib, so I would not mind too much forking the
underlying codebase (bug #69492 was opened there after the php devs
refused to fix 22468, but it's till open after 4,5 years...)



[2007-08-02 20:56:37] giunta dot gaetano at gmail dot com

Description:

Trying to cast a non-iso8601 conforming string to an xmlrpc datetime
object crashes php.
This happens if the characters in position 0 to 6 are too high in the
ascii table, presumably moving the converted date too far away in the
future

This is repro with php 447 and 523

Note that it 'might' be the same bug as #22468 (the cause looks the
same allright), with the difference that you get corrupted data on
gentoo, and a core dump on winblows...

Reproduce code:
---


Expected result:

false

Actual result:
--
CRASH'N'BURN





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


#36959 [Opn->Asn]: ReadRecords Method (Crystal Reports XI) Hangs

2007-08-15 Thread jani
 ID:   36959
 Updated by:   [EMAIL PROTECTED]
 Reported By:  djogopatrao at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows XP
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-05-22 15:34:57] i_geber at hotmail dot com

If I would like to call a report that has parameters, how do I write
the syntax?

thanks



[2006-04-03 15:41:05] djogopatrao at gmail dot com

I modified slightly the code (see below, I called it hang.php)

Running thru apache2, it hangs. No response from the browser  (it's
still "loading", started 2h ago). No entries in "error.log" since then.
Commenting the $creport->ReadRecords(); line, it works.


But when running by PHP CLI

C:\>"Arquivos de programas\Apache Group\Apache2\bin\php.exe" hang.php

C:\>


It runs just fine!


- hang.php

$my_report = 'C:\Arquivos de programas\Apache
Group\Apache2\htdocs\webdisc\relatorios\cadastro1.rpt';
$my_pdf = 'c:\18530.pdf';

$ObjectFactory= New COM("CrystalReports115.ObjectFactory.1");
$crapp =
$ObjectFactory->CreateObject("CrystalDesignRunTime.Application");
$creport = $crapp->OpenReport($my_report, 1);
$creport->ReadRecords(); //hangs here, not thru PHPCLI
$creport->ExportOptions->DiskFileName=$my_pdf;
$creport->ExportOptions->PDFExportAllPages=true;
$creport->ExportOptions->DestinationType=1; // Export to File
$creport->ExportOptions->FormatType=31; // Type: PDF
$creport->Export(false);



[2006-04-03 14:49:18] [EMAIL PROTECTED]

Error log entries related to the problem would be more helpful than
just "hangs".
Also, you can try to run the same code with PHP CLI and check for any
error messages.



[2006-04-03 14:33:24] djogopatrao at gmail dot com

When I say that it hangs, I mean that the browser keeps on loading the
page forever, until it gets timeout.

More information? I would gladly give an example report file, but as it
depends on a database server and ODBC configuration, I don't know how to
proceed.

Please contact me if is there anything that I can do.

dfcp



[2006-04-03 14:23:03] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.


Please define "hangs" and add more information if possible.



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

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


#37562 [Opn->Asn]: Unable to lookup "ParameterFieldDefinitions"

2007-08-15 Thread jani
 ID:   37562
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mitohuffman at yahoo dot com dot mx
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows XP SP2
 PHP Version:  5.1.4
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-05-23 16:42:26] mitohuffman at yahoo dot com dot mx

Description:

I made a script that open a Crystal Reports file and export it to PDF.
I set the database info, the RecordSelectionFormula string and de
ExportOptions and all works fine. The problem comes when i try to call
the ParameterFieldDefinitions class.


GBY

Reproduce code:
---
$ObjectFactory= New COM("CrystalReports10.ObjectFactory.1");
$crapp =
$ObjectFactory->CreateObject("CrystalDesignRunTime.Application");
$creport = $crapp->OpenReport($report, 1);
$creport->Database->Tables->Item(1)->ConnectionProperties['User ID'] = 
"MyUser";
$creport->Database->Tables->Item(1)->ConnectionProperties['Password'] =
"MyPass";
$creport->FormulaSyntax = 0;
$creport->RecordSelectionFormula =
"{V_CON_LOTES.ID_CONCURSO}=$id_concurso and
{LOTES_CONCURSO_COTIZADOS.ID_ESTATUS}=1"; 
$param1 = $creport->ParameterFieldDefinitions->Item("fecha_imp"); //
Error Point. I tried using Item(1) and i get the same error.



Expected result:

Get the "Fecha_imp" parameter, set (before) in the Crystal Reports
Designer, for setting the corresponding value.

Actual result:
--
Fatal error: Uncaught exception 'com_exception' with message 'Unable to
lookup `ParameterFieldDefinitions': Nombre desconocido. ' in
C:\Inetpub\wwwroot\Crystal_reports\test.php:19 Stack trace: #0
C:\Inetpub\wwwroot\Crystal_reports\test.php(19): unknown() #1 {main}
thrown in C:\Inetpub\wwwroot\Crystal_reports\test.php on line 19





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


#40581 [Opn->Asn]: Pass Struct type to COM object from PHP

2007-08-15 Thread jani
 ID:   40581
 Updated by:   [EMAIL PROTECTED]
 Reported By:  elvir at innvue dot com
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows Server 2003
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-02-21 17:40:09] elvir at innvue dot com

c++ codes:

typedef [uuid(5A0CB3A7-798A-42ff-B864-F8D90B55DB7C)] struct mystruct 
{
LPSTR var1;
LPSTR var2;
LPSTR var3;
LPSTR var4;
} mystruct


ResetS(struct, GUID);
   }else{
 echo "method doesn't exist...";
   }


?>

Question is: how can i create a struct (c++) type in php to pass to
COM.



[2007-02-21 17:29:27] elvir at innvue dot com

Description:

hello,
I have a COM object created in c++. One of methods accept a struct as a
parameter. I have to call this method from PHP script.


Reproduce code:
---
object accepted:
typedef [uuid(5A0CB3A7-798A-42ff-B864-F8D90B55DB7C)] struct mystruct 
{
LPSTR var1;
LPSTR var2;
LPSTR var3;
LPSTR var4;
} mystruct

$newCom = new COM("classname.methodname") or die (" COM exeption");
   
   if(method_exists ($newCom, "ResetS"))
// this retun true






Expected result:

what i want is:
call my method with the following param from php:

$newCom->mymethod(mystruct sructPHP, GUID sku);

Please can you help me?

Actual result:
--
I tryed to create an object in PHP and call method i get the following
error:
'com_exception' with message 'Error [0x80028019] Old format or invalid
type library.





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


#40664 [Opn->Asn]: String conversion functions wrong for multibyte chars

2007-08-15 Thread jani
 ID:   40664
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fjortiz at comunet dot es
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Win32
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-07-25 14:28:09] ameoba32 at gmail dot com

i found this bug too, so code is like this:

$word = new COM("Word.Application", null, CP_UTF8);
$word->Visible = true;
$doc = $word->Documents->Add();
$word->Selection->TypeText( "UTF8 text here, russian in my case" );

In word appears "Normal text " + garbage.

can this be fixed in CVS ? i have to compile php on win32 by myself ;)



[2007-05-28 15:07:30] [EMAIL PROTECTED]

Unfortunately the extension is currently unmaintained, so I don't think
anybody is going to commit your patch in the nearest future.




[2007-05-23 11:51:16] fjortiz at comunet dot es

Any updates about this?. I'm showing you the code so fix the issue.
Please tell me what else you may need to carry this into the main tree.

TIA



[2007-02-28 11:38:27] fjortiz at comunet dot es

Description:

when converting a UTF-8 encoded, multibyte string (Russian for
example), to a COM string, a wrong number of bytes are allocated, thus
creating the COM string with junk bytes at the end.

For example, when I pass my COM-based ADODB driver a 5-letter word in
Russian, I get at destination a 10 (5*2) characters string, the first 5
are the right Russian chars and the rest 5 are junk characters.

This was also explained for 4.4.2 in bug #37899


Actual result:
--
this is solved patching two files:
\ext\com_dotnet\com_variant.c, function php_com_variant_from_zval, line
156:

156,157c156
<   V_BSTR(v) = SysAllocString((char*)olestring);
---
>   V_BSTR(v) = SysAllocStringByteLen((char*)olestring, 
> Z_STRLEN_P(z)
* sizeof(OLECHAR));

\ext\com_dotnet\com_olechar.c, function php_com_string_to_olestring:

37d36
<   uint unicode_strlen;
39,40c38,44
<   unicode_strlen = MultiByteToWideChar(codepage, (codepage == CP_UTF8
?
<   0 : MB_PRECOMPOSED | MB_ERR_INVALID_CHARS), string, -1, NULL, 
0);
---
>   if (string_len == -1) {
>   /* determine required length for the buffer (includes NUL
terminator) */
>   string_len = MultiByteToWideChar(codepage, flags, string, -1, 
> NULL,
0);
>   } else {
>   /* allow room for NUL terminator */
>   string_len++;
>   }
42,44c46,48
<   if (unicode_strlen > 0) {
<   olestring = (OLECHAR*)safe_emalloc(sizeof(OLECHAR), 
unicode_strlen,
0);
<   ok = MultiByteToWideChar(codepage, flags, string, -1, olestring,
unicode_srlen);
---
>   if (strlen > 0) {
>   olestring = (OLECHAR*)safe_emalloc(sizeof(OLECHAR), string_len,
0);
>   ok = MultiByteToWideChar(codepage, flags, string, string_len,
olestring, string_len);







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


#41577 [Opn->Asn]: DOTNET is successful once per server run

2007-08-15 Thread jani
 ID:   41577
 Updated by:   [EMAIL PROTECTED]
 Reported By:  boen dot robot at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows XP Professional SP2
 PHP Version:  5CVS-2007-06-03 (snap)
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-06-03 15:31:09] boen dot robot at gmail dot com

Description:

When I run any PHP file using the DOTNET class, The class is first run
as it should (the sample from the documentation does ineed produce
"Hello .Net"), but after a page refresh, or if a navigate away from the
page and go back, the server crashes.

I have PHP installed locally as an Apache 2.2.4 module.

I tryed turning off my antivirus (NOD32 in case it's relevant), but
that didn't helped either.

I have all .NET 1.1, .NET 2.0 and .NET 3.0 with all updates from
Microsoft Update.

Reproduce code:
---


Expected result:

The file should output "created" every time it's executed, unless
perhaps I had an error in the constructor, in which case it should
output "not created".

Actual result:
--
"created" is only outputted the first time. After that... A server
crash with this in the error details:

szAppName : httpd.exe szAppVer : 2.2.4.0 szModName : php5ts.dll

szModVer : 5.2.4.4 offset : 000e622d





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


#41388 [Opn->Asn]: Error in COM Object results

2007-08-15 Thread jani
 ID:   41388
 Updated by:   [EMAIL PROTECTED]
 Reported By:  superfelo at yahoo dot com
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows XP and 2003
 PHP Version:  5.2.2
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-05-14 15:29:36] superfelo at yahoo dot com

Description:

As it is possible to see bellow, a COM Object is opened, then Data Base
is read by a Recordset and a OLE object is loaded in such Recordset.

Later, using a GetChunk which is a Recordset function a number of bytes
in OLE object is read but this function just result in the number of
printable characters and it discards or ignore for instance, byte 0 or
any other not printable character.

In the second example, it is possible to see a function to read 20
bytes after a certain position. Now the problem is similar. The 20 bytes
has been counted by the results are just printable characters of such 20
bytes. So, result is less than 20 character because not all 20
characters are printable. 

Reproduce code:
---
$engine = new COM("DAO.DBEngine.35");
$engine->SystemDB = "c:\system.mda";
$engine->defaultuser = "admin";
$engine->defaultpassword = "";
$db = $engine->OpenDataBase("c:\bd.mdb");

$sqlstr = "SELECT DISTINCTROW tabla1.* FROM tabla1;" ;
$rst = $db->OpenRecordset("RsConfig",$sqlstr);
echo $rst->Fields["Campo1"]->GetChunk(1,20);
//-
$mstream =  new COM("ADODB.Stream");
$mstream->Type = 1; // 'adTypeBinary
$mstream->Open;
$mstream->Write($rst->Fields["Campo1"]->Value);
$mstream->position = 0;
echo $mstream->Read(20);


Expected result:

The actual number of bytes in a OLE object stored in a Recordset: This
number of bytes of course, must include printable and not printable
characters.

Actual result:
--
Just the number of printable characters.





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


#41368 [Opn->Asn]: ADODB.Recordset ActiveConnection property - can't set with PHP 5.2.1+

2007-08-15 Thread jani
 ID:   41368
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ben dot crum at colony101uk dot com
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: Windows XP SP2
 PHP Version:  5.2.2
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2007-05-11 17:29:29] ben dot crum at colony101uk dot com

Description:

This seems similar to Bug #22162 - Program performs "illegal
operation", but that was for PHP 4.3.1-dev.

I originally had PHP 5.1.6 installed on my PC and had written a few
scripts using ADODB Connections and Recordsets.  These ran fine as web
pages served by Apache's HTTP Server v2.0.

I upgraded to PHP 5.2.2 using the MSI and my scripts reported errors
for the same line of code.


Overwriting the contents of my C:\PHP\ folder with the contents of the
PHP 5.2.0 Zip file, I do NOT get these errors when running my scripts as
web pages through Apache or from the command line (i.e. "php.exe
c:\Web\simple.php").

If I overwrite the contents of my C:\PHP\ folder with the PHP 5.2.1 or
5.2.2 Zip files I get the error mentioned above when running them
through Apache or from the command line.

Reproduce code:
---
Here is a simple sample that works with PHP 5.2.0, but breaks for me
when using PHP 5.2.1+:

--
ActiveConnection = 'PROVIDER=SQLOLEDB; DATA SOURCE=(local);
UID=sa; PWD=password; INITIAL CATALOG=myDB';
$rs->CursorLocation = 3;
$rs->Source = 'SELECT * FROM [myTable]';
$rs->Open();

if ( $rs->EoF )
{
print( '- No records returned. -' );
}
else
{
print( 'Returned records: ' . $rs->RecordCount );
}

$rs->Close();
$rs = NULL;

?>
--

Expected result:

This is the error I get on lines that set an ADODB.Recordset object's
.ActiveConnection property:

Fatal error: Uncaught exception 'com_exception' with message
'Source: ProviderDescription: Type mismatch.' in
C:\Web\simple.php:4 Stack trace: #0 C:\Web\simple.php(4): unknown() #1
{main} thrown in C:\Web\simple.php on line 4

Actual result:
--
I don't think it's the objects and their properties coz this works as a
VBScript (.vbs) file (no hissing please!):

--
OPTION EXPLICIT

DIM rs

SET rs = CreateObject("ADODB.Recordset")
rs.ActiveConnection = "PROVIDER=SQLOLEDB; DATA SOURCE=(local); UID=sa;
PWD=password; INITIAL CATALOG=myDB"
rs.CursorLocation = 3
rs.Source = "SELECT * FROM [myTable]"
rs.Open

IF ( rs.EoF ) THEN
WScript.Echo( "- No records returned. -" )
ELSE
WScript.Echo( "Returned records: " & rs.RecordCount )
END IF

rs.Close
SET rs = Nothing
--


It looks to me that after 5.2.0, PHP no longer lets you set the
.ActiveConnection of an ADODB.Recordset (or I've just messed up my PHP
folder...).

Thanks for your help.





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


#40735 [Opn->Bgs]: stream_select returns 0 for php > 5.1.6

2007-08-15 Thread jani
 ID:   40735
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rodricg at sellingsource dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Streams related
 Operating System: x86_64 GNU/Linux
 PHP Version:  5.2.3
 New Comment:

Nobody else is able to reproduce this on several different (or same)
types of systems -> bogus. (reopen if you can reproduce this on 2
different machines using Fedorda..I can't. :)


Previous Comments:


[2007-08-03 22:42:15] rodricg at sellingsource dot com

Just verified that I still see the same behavior with:
php-5.2.3
openssl-0.9.8e
gcc-4.1.2

I am using the same test script as before.  

Changing it to use:

-O1 --with-openssl
 *or*
-O2 --without-openssl
 
gives the correct behavior.



[2007-08-03 21:12:20] blade at debian dot org

It is even worse on the current Debian Sid, with 5.2.3-1+b1. It returns
0 and the modified arrays contain just nothing, but there is obviosly
data available there. Tested with slightly adapted code from 
http://netevil.org/blog/2005/may/guru-multiplexing .



[2007-03-16 23:06:09] [EMAIL PROTECTED]

I have a x86(-32) gentoo box with the same gcc version as you and your
script works perfectly. anyway if this is a compiler error, you need
report it to gentoo guys, that will then investigate to see if it is
caused by their patchset or not.



[2007-03-13 19:24:05] [EMAIL PROTECTED]

Still works perfectly fine with or without OpenSSL, with and without
-O2.
I think I'll need an acccount on your machine to reproduce it.



[2007-03-13 16:26:40] rodricg at sellingsource dot com

The following script reproduces the behavior (for me):

http://11434.com/stream_select.sh


Changing -O2 to -O1 or removing --with-openssl fixes the problem.

gcc version 4.1.2
openssl version 0.9.8d



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

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


#42086 [Opn->Asn]: SoapServer return Procedure '' not present for WSIBasic compliant wsdl

2007-08-15 Thread jani
 ID:   42086
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sanderovich at avaya dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: linux
 PHP Version:  5.2.3
 Assigned To:  dmitry
 New Comment:

Dmitry, feedback was given..


Previous Comments:


[2007-08-15 06:12:05] sanderovich at avaya dot com

I believe that there are here two different problems.
The first is that the Soap client does not create the SoapBody
correctly for a function without parameters(the SoapBody is empty),
that's why my SoapClient includes the following lines:
if ( $parameters == null)
{
  $return = $itc_client->__soapCall($methodName, array(new
SoapParam(null, $methodName)), null, $security_header);
//  $return = $itc_client->__soapCall($methodName, 
array(), null,
$security_header);
}   

The second problem is in the SoapServer that does recognize functions
without parameters.



[2007-08-15 02:29:37] michael dot tutty at gmail dot com

This bug seems to be the root of the problem. Has it been fixed??

http://bugs.php.net/bug.php?id=30302



[2007-08-15 01:47:52] michael dot tutty at gmail dot com

Also, the zip file referenced by the O.P. is available as of two
minutes ago. Must have been a temporary outage.



[2007-08-15 01:26:53] michael dot tutty at gmail dot com

Here's a minimal WSDL that shows the problem:
http://pastebin.com/m18b5d1fc

Here's the class file I used to reproduce with the WSDL above:
http://pastebin.com/m28bdf0f0

Here's a test client script: http://pastebin.com/m303880eb



[2007-08-01 11:10:27] [EMAIL PROTECTED]

I am not able to get code. Link doesn't work. "The file you are
requesting is not accesible due to a hardware or ISP problem. Please
retry Later".



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

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


#42304 [Opn->Bgs]: strtoupper('č') doesn't work

2007-08-15 Thread jani
 ID:   42304
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gustavs dot cirulis at cervon dot net
-Status:   Open
+Status:   Bogus
 Bug Type: *Unicode Issues
 Operating System: Mac OS X 10.4.10
 PHP Version:  5.2.4RC1
 New Comment:

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




Previous Comments:


[2007-08-15 08:18:42] gustavs dot cirulis at cervon dot net

Description:

The function strtoupper('č') doesn't make the "č" letter as a
"Č"(uppercase). 

If you replace the č with c it will create it uppercase.

Reproduce code:
---
echo 'strtoupper(č) => ' . strtoupper('č') . ' != Č';

Expected result:

I expect for a the letter "č" to be upper case as "Č".






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


#37209 [Asn]: mssql_execute with non fatal errors

2007-08-15 Thread netvbonline at yahoo dot co dot uk
 ID:   37209
 User updated by:  netvbonline at yahoo dot co dot uk
 Reported By:  netvbonline at yahoo dot co dot uk
 Status:   Assigned
 Bug Type: MSSQL related
 Operating System: Win XP Pro
 PHP Version:  5.1.2
 Assigned To:  fmk
 New Comment:

issvar left the comment

"This is caused by php stopping processing when dbsqlok() returns
FAIL."

Will this change be carried out at source? Seems to me that handling
output parameters in a non fatal sp error should be resolved. Has this
been fixed?

:-) Cheers


Previous Comments:


[2006-09-29 15:59:32] issvar at hotmail dot com

This is caused by php stopping processing when dbsqlok() returns FAIL.

Microsoft db-library for c manual states that even if dbsqlok() returns
FAIL there could be results, so results and return values and output
parameters should be processed.

So in ext/mssql/php_mssql.c there should be changed the following part
in PHP_FUNCTION(mssql_execute):

if (dbrpcexec(mssql_ptr->link)==FAIL ||
dbsqlok(mssql_ptr->link)==FAIL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "stored procedure
execution failed");
dbcancel(mssql_ptr->link);
RETURN_FALSE;
}

this should be changed to:

if (dbrpcexec(mssql_ptr->link)==FAIL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "stored procedure
execution failed");
dbcancel(mssql_ptr->link);
RETURN_FALSE;
}
if (dbsqlok(mssql_ptr->link)==FAIL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "stored procedure
execution failed");
}



[2006-07-27 00:03:22] [EMAIL PROTECTED]

Frank, there's the feedback now. :)



[2006-05-02 08:24:19] netvbonline at yahoo dot co dot uk

*
[Description]
  Procedure handles the process of either fetching or inserting a
forename, this procedure must never update existing name otherwise it
would affect all other person  FK's


*/

CREATE PROCEDURE usp_fetch_or_insert_forename
@Forename [varchar](50),
@ForenameID [int] OUTPUT

AS 
DECLARE @err int -- needed as the global @@ERROR is reset after each
statement, even logical comparison

-- reduce network traffic
SET NOCOUNT ON


-- first do common validation and checks
BEGIN


INSERT INTO [dbtest].[dbo].[Forename]   ( [Forename] ) 
  VALUES ( @Forename )

SET @err=@@ERROR

print 'non fatal error ...'

IF (@err = 2627)
  BEGIN
RAISERROR('myMessage:test', 2, 1) WITH SETERROR
  END


IF (@err=0)
  BEGIN

  -- explicitly retrieve the identity of row just inserted 
from
above statement
  SET @ForenameID=SCOPE_IDENTITY()  
   RETURN(0)
   
   END

 -- Test for key violation before returning error code
 IF (@err=2627 ) 
   BEGIN
   
  print 'Looking up the forename value'
  
 -- I know the name exists, so fetch the PK 
SELECT @ForenameID=ForenameID FROM Forename WHERE
[EMAIL PROTECTED]

print 'still here .. and forenameid is ' + str(@ForenameID)

 RETURN(0) 
   END

 -- There was an error in the insert statement, not
related to unique key violation constraint so return error code
RETURN(@err)

END
GO



Hope this is ok, as you can see it contains various debug messages.



[2006-04-29 03:13:35] [EMAIL PROTECTED]

Please provide a short example of the procedure used to generate this.

The current implementation will handle multiple results from a storred
procedure and it will skip all results without column.



[2006-04-26 14:34:02] netvbonline at yahoo dot co dot uk

SORRY, BIG TYPO

"The mssql_execute method SHOULD NOT fail on execution (but in anycase
should still have populated output parameters)."



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

-- 
Edit this bug report at http://bugs.php.net/?id=37

#42111 [Opn->Csd]: copy() creates file for dir as src

2007-08-15 Thread jani
 ID:   42111
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mahesh dot vemula at in dot ibm dot com
-Status:   Open
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: RHEL4
 PHP Version:  5CVS-2007-07-26 (CVS)
 New Comment:

So we close this.


Previous Comments:


[2007-08-14 11:27:28] mahesh dot vemula at in dot ibm dot com

Yes, its working fine. Thanks.



[2007-08-13 16:54:33] [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





[2007-08-13 11:31:33] mahesh dot vemula at in dot ibm dot com

Fix for bug #42243 can't be a fix for bug #42111. But fix for bug
#42111 would be a fix for #42243.

Bug #42111 needs to be fixed in the following two aspects.
1) copying dir to non-existing destination
 Here, copy() returns FALSE but creates a file & no warning msg. Hence
the fix would be "to generate warning msg when the first arg is a dir
even the second arg is a non-existing destination, as copy() function is
not valid on dirs. And also the destination file should not be created.
2) copying dir to existing file
 This is fixed by the fix provided for bug #42243, which is specific
when the first argument is a dir and the second one is an existing
destination.

I am sorry to raise the redundant bug #42243, which led to confusion.



[2007-08-10 13:08:24] [EMAIL PROTECTED]

Isn't this about the same bug as bug #42243 ?? If so, I think this is
fixed too since we now get an error and it returns before the file is
created..?



[2007-07-26 13:40:50] mahesh dot vemula at in dot ibm dot com

Description:

While trying to create a copy of an existing dir by copy() function, it
creates a file which is not expected but returns FALSE as expected. Even
for an existing file as second argument, PHP doesn’t throw any warning
message. It happens against Linux, and works fine against Windows.

Reproduce code:
---



Expected result:

Creation of file is not expected and a required warning messages are
expected.

Actual result:
--
Warning: copy(copy1): failed to open stream: Is a directory in %s on
line %d
bool(false)

Warning: copy(copy): failed to open stream: Is a directory in %s on
line %d
bool(false)
bool(false)
bool(false)
bool(false)






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


#42304 [NEW]: strtoupper('č') doesn't work

2007-08-15 Thread gustavs dot cirulis at cervon dot net
From: gustavs dot cirulis at cervon dot net
Operating system: Mac OS X 10.4.10
PHP version:  5.2.4RC1
PHP Bug Type: *Unicode Issues
Bug description:  strtoupper('č') doesn't work

Description:

The function strtoupper('č') doesn't make the "č" letter as a
"Č"(uppercase). 

If you replace the č with c it will create it uppercase.

Reproduce code:
---
echo 'strtoupper(č) => ' . strtoupper('č') . ' != Č';

Expected result:

I expect for a the letter "č" to be upper case as "Č".


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


#42271 [Opn->Bgs]: extract EXTR_REFS and/or references

2007-08-15 Thread jani
 ID:   42271
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rodji at tut dot by
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Win32 XP sp2.2600
 PHP Version:  5.2.3
 New Comment:

You extract $a and $b which both reference the same value so if you
change either both change. No bug here -> bogus.


Previous Comments:


[2007-08-11 23:58:51] rodji at tut dot by

Reproduce code:
---
function /*&*/f($val) { //eq&f
$r['a'] = $val; //equal =&
$r['b'] = $val; //equal =&
return $r;
}

//debug_zval_dump(f('old'));

extract(f('old_value'), EXTR_REFS);
//$t =& f('old_value'); extract($t, EXTR_REFS); unset($t);

$a = 'new_value';
debug_zval_dump (&$b);

Expected result:

&string(9) "old_value" refcount(2)

Actual result:
--
&string(9) "new_value" refcount(3)



[2007-08-11 22:32:01] [EMAIL PROTECTED]

Can you provide some simpler example which makes a bit more sense..?



[2007-08-11 09:29:05] rodji at tut dot by

Description:

Tested on:
Apache/1.3.33 (Win32)
PHP/4.4.7 and 5.2.3

trouble with references in functions

Reproduce code:
---
function args_select($args, $args_list, $def_val) {
$r = array();
foreach ($args_list as $key) {
if (array_key_exists($key, $args)){
$r[$key] = $args[$key];
}else{
$r[$key] = $def_val;//equal $r[$key] =& $def_val   
why???
//$r[$key] = (string)$def_val;  //solution#1
}
}
return $r;
}

$argums = array('action'=>'edit', 'id'=>1);
$select = array('action','to_do','back');

//debug_zval_dump(args_select($argums, $select, ''));

extract(args_select($argums, $select, ''), EXTR_OVERWRITE |
EXTR_REFS);
//solution#2   why???
/*$m = args_select($argums, $select, '');
//OR //$m =& args_select($argums, $select, '');
extract($m, EXTR_OVERWRITE | EXTR_REFS);
*/

$to_do = 'new';
debug_zval_dump (&$back);
?>

Expected result:

&string(0) "" refcount(2)

Actual result:
--
&string(3) "new" refcount(3)





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