#31678 [NoF->Opn]: ODBC Connection fails on Multiprocessor System

2005-03-02 Thread zipf dot mailcom at boewe-systec dot nospam dot de
 ID:   31678
 User updated by:  zipf dot mailcom at boewe-systec dot nospam dot de
 Reported By:  zipf dot mailcom at boewe-systec dot nospam dot de
-Status:   No Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Windows 2000
 PHP Version:  4CVS, 5CVS (2005-02-05)
 New Comment:

I tried to isolate the problem with a single page to narrow down that
error. but unfortunately the bug only happens in real life. I tried to
creat different crash pages wich request the same sql queries that our
real application does but so far i have not been able to reproduce that
error by a single page.
I cannot change all the database code to the pdo classes as this would
take to long, thats why I wanted to create a single page version so i
could test it.


Previous Comments:


[2005-02-27 01:00:04] php-bugs at lists dot php dot net

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



[2005-02-14 20:27:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

You could try the new database stuff in PHP 5.

http://snaps.php.net/win32/PECL_5_0/php_pdo.dll
http://snaps.php.net/win32/PECL_5_0/php_pdo_odbc.dll

Documentation at: http://www.php.net/pdo

PDO is to be bundled with the PHP 5.1 release; it's currently in beta,
and has proven to be quite stable so far.
I'd really appreciate your feedback to see if PDO has the same issues
that you've found with the older ODBC extension.

If you decide to try PDO and run into problems, ask for help on
[EMAIL PROTECTED]; we're currently in aggressive beta/QA mode and
aim to turnaround bug fixes next-day if possible.




[2005-02-04 10:26:54] zipf dot mailcom at boewe-systec dot nospam dot
de

Ok we tested today with this development snapshot. it took a very long
time to get that error but it still occured. 
But this time apache didn´t respond at all after the crash. usually
apache was still serving requests, but this time there was no answer
anymore. We tested with IIS as well and it is the same behavior, so
this isn´t just apache related.

testing a dbcheck php page with commandline still works after the
crash.



[2005-02-03 05:17:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And I ask again:
Does this work on command line? (using PHP CLI binary..)

Using PHP CLI binary means the executably file (is it php.exe or
php-cli.exe in windows?) found in PHP distros..

Get the snapshot first.




[2005-01-28 15:13:52] zipf dot mailcom at boewe-systec dot nospam dot
de

what do you mean with commandline?

you mean after a db-problem check if a commandline connect to the db
still works with php or what?

I will test it next time we get that error. but it needs a couple of
simultanous requests to produce that error so i need a bunch of peple
to test it.



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

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


#27406 [Com]: php_check_syntax executes code

2005-03-02 Thread phpbugs at majiclab dot com
 ID:   27406
 Comment by:   phpbugs at majiclab dot com
 Reported By:  thomas at stauntons dot org
 Status:   Assigned
 Bug Type: Unknown/Other Function
 Operating System: All
 PHP Version:  php5.0-200412100930
 Assigned To:  iliaa
 New Comment:

I would have to agree with most of the other posters, that the
php_check_syntax() function as it stands right now does MORE than its
name implies.  I feel that a true php_check_syntax() function that
STRICTLY checks the syntax of a file or string and returns TRUE/FALSE
and has reference to an error message is the best.  In fact, I would
also like to see the possibility of having an additional reference
variable for the line number of an error.

I am developing a fairly advanced framework that does compile certain
aspects of a web site dynamically.  At first glance, I tried to
implement this function to check the syntax of the file both before
saving it and even before including it in the future.  However, I ran
into some confusing messages about my classes being redefined and I
couldn't understand until I read the docs closer.

The simple fact is that the REAL functionality of this function is the
syntax checking, NOT the including.  Any PHP programmer with more than
5 minutes of experience can probably include an external file.  So
adding that particular aspect of the functionality to
php_check_syntax() seems useless.  The code I have in my system goes a
little like this:



Now, I started getting errors all of a sudden saying that a class in
the file being included is being redeclared.  I thought that odd since
I set $bOnce = TRUE, so it shouldn't ever be included more than once. 
I think ideally I should be able to do this:



Basically, it should:

1. Not include the file at all, just strictly do a lint check.
2. It would be nice to be able to get the line number of the file (for
debugging purposes).

At the lowest level, this function should be able to run like described
by many others:



It should be up to the PHP programmer to include the file...


Previous Comments:


[2005-02-23 17:32:01] de_bruut at hotmail dot com

Couple of points:

1. there are already half a dozen functions that include files or
execute strings
2. there's no other function that allows you to check the validity of a
piece of php code
3. right now, php_check_syntax does more than its name implies (it
includes the file)
4. there are several situations where a 'clean' lint check of php code
is useful (snippet submissions, UNIT TESTS(!), ...)
5. in general, functions should do only one thing, not two only
slightly related things, and one of them badly

I would love to see php_check_syntax implemented as its name implies: a
lint check for a STRING. Not a file (see Wylie's comment), because there
are enough functions to read a file  or stream into a string.

If someone wants to include the file afterwards, they only need to add
a single line of code, or they can write their own two-line function.
This even leaves them the choice between include() and include_once(),
something which php_check_syntax does not do at this point.

Did I mention the potential value of php_check_syntax for >> UNIT TESTS
<< yet? php_check_syntax would allow us to check the syntax of a file
(string) as the first of a group of tests for that file/class, and thus
avoiding a potential fatal error, which could interrupt an entire set of
tests on multiple files. Thus, a syntax check could make quite a number
of very serious PHP developers very happy. Not much point if
php_check_syntax immediately includes the file (string) though...



[2005-02-09 21:42:13] du at bestwaytech dot com

There is one other difference between include and php_check_syntax that
should be noted in the manual. Aside from supressing output buffer, it
only includes functions and classes, it does not set or affect global
variables, the way include() would.

If you have "test.php"
$myvar = 1;
echo $myvar;
function myfunction() {}
class myclass {}

include ("test.php") will set $myvar, print $myvar and set myfunction &
myclass
php_check_syntax("test.php") will ONLY include myfunction & myclass



[2005-01-29 04:35:48] wylie at geekasylum dot org

There seems to be a lot of discussion on whether this is a bug or a
misuse. Here is something else to consider:

de_bruut mentioned above that a syntax check function as described in
the documentation of this function would be useful for development and
testing, and I agree, but it also has other uses.

I am about to write a code repository website where users can submit
snippets (no smaller than complete functions) and it would be great to
be able to check the syntax of the uploaded code on the fly and reject
or accept it right there while the submitte

#32165 [NEW]: update doesn't work after update from 4.3.9

2005-03-02 Thread mhoerenz at ria-btr dot de
From: mhoerenz at ria-btr dot de
Operating system: w2k
PHP version:  4.3.10
PHP Bug Type: MSSQL related
Bug description:  update doesn't work after update from 4.3.9

Description:

Hello,

after an update from 4.3.9 to 4.3.10 this scripte doesn't worked no more.
There is no errormessage.

Regards
M. Hörenz






Reproduce code:
---
$verb=mssql_connect("svpidw101", "sa" , "");
mssql_select_db("database", $verb);

$statement="update MOVEX_CSYCSN set
CKCONO=1,CKCSNO='32063000',CKINYN=1,CKSUPL=''
,CKTX40='Batch ',CKTX15='Batch auf Grund',
CKSPFA=0,CKTXID=0,CKRGDT=20050214,CKRGTM=102130,CKLMDT=20050214,CKCHNO=2,CKCHID=
'USER' where CKCONO=1
 
and CKCSNO='32063000'";

$result = mssql_query($statement) or die ();


Expected result:

The sql-updatestatement should be done. But ist shouldn't under 4.3.10


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


#32160 [Ver->Csd]: Copying a file into itself leads to data loss

2005-03-02 Thread iliaa
 ID:   32160
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chernyshevsky at hotmail dot com
-Status:   Verified
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: *
 PHP Version:  4CVS, 5CVS (2005-03-03)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2005-03-02 03:20:26] chernyshevsky at hotmail dot com

Description:

Copying a file into itself causes the source file to be truncate to 0
bytes.

copy("test", "test"); // test.txt -> 0

You can't avoid this problem just by comparing the filenames, since one
could be a symlink pointing to the other. The following would destroy
test1 if test2 is a link to test1:

copy("test1", "test2");



Reproduce code:
---
copy("test", "test");


Expected result:

Nothing happens or a file open error.

Actual result:
--
Contents in source file is lost.





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


#30073 [Fbk->NoF]: Exception handling not work for selectable procedures

2005-03-02 Thread php-bugs
 ID:   30073
 Updated by:   php-bugs@lists.php.net
 Reported By:  almad at dracidoupe dot cz
-Status:   Feedback
+Status:   No Feedback
 Bug Type: InterBase related
 Operating System: Gentoo Linux
 PHP Version:  5.0.1
 New Comment:

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


Previous Comments:


[2005-02-23 21:31:26] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-09-13 14:31:55] almad at dracidoupe dot cz

Description:

When calling executable procedure, php works good, that means that
ibase_query returns FALSE and IBase_Errmsg() contains code and text of
exception returned by stored procedure. 

However, when calling selectable procedure ("select a, b from
procedure_name"), ibase_query returns TRUE and exception is returned as
unhandlingable php warning when calling ibase_fetch_row/assoc/object. 

Reproduce code:
---
$s = ibase_query ("select var from procedure_name");
If(!$s){
echo "FireBird returned error: ".IBase_Errmsg();
}
Else{
while($d=ibase_fetch_row($s)){
echo $d[0];
}
}

Expected result:

FireBird returned error: Some exception returned by procedure_name

Actual result:
--
Warning: ibase_fetch_assoc() [function.ibase-fetch-assoc]: exception 1
Some exception returned by procedure_name in /var/.../script.php on
line xx





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


#31907 [Fbk->NoF]: Problems with passive mode

2005-03-02 Thread php-bugs
 ID:   31907
 Updated by:   php-bugs@lists.php.net
 Reported By:  wolkove at biz-link dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: FTP related
 Operating System: FreeBSD 4.8
 PHP Version:  4.3.8
 New Comment:

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


Previous Comments:


[2005-02-12 03:22:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-02-09 20:56:44] wolkove at biz-link dot com

Description:

I have a reproducible problem using passive mode with a particular
remote server.

Initially I set passive mode using ftp_pasv($conn, true)

The function call returns false, indicating it could not set passive
mode.

Then I either continue with the transfer or (tried) setting passive
mode to false with ftp_pasv($conn, false) and then continuing the
transfer

The transfer fails in either case. The remote firewall reports the
following error in its logs:

Attack Info: ftp address mismatch: ip_src != command_src
message_info: Illegal port command (port = 0)

Somehow it seems PHP is getting confused by the apparent failure to set
passive mode and trying to use a PORT command to connect using an
illegal port = 0.

The failure to set passive mode is another mystery. When connecting
manually using the FreeBSD ftp client from the same machine or a
Windows client, the program has no trouble setting and using passive
mode.






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


#31854 [Ver]: Segfault if set memory_limit and other goodies

2005-03-02 Thread sniper
 ID:   31854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bertrand at toggg dot com
 Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  4CVS-2005-03-03
 New Comment:

This happens with PHP 5.1-dev (CVS HEAD)

==6533== Conditional jump or move depends on uninitialised value(s)
==6533==at 0x80F2874: compare_function (zend_operators.c:1341)
==6533==by 0x80F396D: is_smaller_function (zend_operators.c:1503)
==6533==by 0x8118E46: ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER
(zend_execute.c:284)
==6533==by 0x8112B88: execute (zend_vm_execute.h:78)



Previous Comments:


[2005-02-16 11:46:29] bertrand at toggg dot com

Hope it's usefull for you:

Core was generated by `./php outmem.php 18 12 100'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  0x00c713d4 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0  0x00c713d4 in _int_free () from /lib/tls/libc.so.6
#1  0x00c7272b in free () from /lib/tls/libc.so.6
#2  0x081041c9 in shutdown_memory_manager (silent=0, clean_cache=0)
at
/home/bertrand/down/php4-STABLE-200502160330/Zend/zend_alloc.c:492
#3  0x080eb490 in php_request_shutdown (dummy=0x0)
at /home/bertrand/down/php4-STABLE-200502160330/main/main.c:1004
#4  0x0811fa1f in main (argc=5, argv=0xbff00a34)
at
/home/bertrand/down/php4-STABLE-200502160330/sapi/cli/php_cli.c:876
(gdb)



[2005-02-06 11:30:08] bertrand at toggg dot com

I downloaded the CVS snapshot from this morning,
php4-STABLE-200502060730 unix version
I build only the executables:
./configure --enable-memory-limit
make

With sapi/cli/php or sapi/cgi/php, unfortunately the results are the
same.
Only one point is now better, it's the case where no memory_limit set
and less call to memory_get_usage:
php outmem.php 18 '' 100
17:2/88792 bytes
16:4/8 bytes
<...snip...>
1:131072/5855880 bytes

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 35 bytes) in /home/bertrand/prog/test/outmem.php on line 19
<<< here it's still hanging a long time >>>
Allowed memory size of 8388608 bytes exhausted (tried to allocate 129
bytes)

But then it's coming back from PHP, no need no more to break. Is it
only due to the fact it's an only CLI PHP ?

Just to be sure, I've also rebuild some php-4.3.9 from 2004/10/09 and
results are identical.



[2005-02-06 06:57:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-02-05 20:31:24] bertrand at toggg dot com

Description:

This script doubles and again an array of long strings.
It accepts 3 parameters:
- nb of times to double the array
- eventuel memory_limit to set (thus default 8 Mo)
- interval of added rows to check memory_get_usage.
By 18 loops the 8Mo are exhausted.

Depending on the memory setting and the interval to check memory usage,
results are somewhat strange.

The segmentation fault occurs the same if running from Apache 2.0
Handler

It could be related to bug #31624

Reproduce code:
---
$loop = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1]+0 : 11;
$setmem = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2]+0 : ''; //
changed if set
$chk = isset($_SERVER['argv'][3]) ? $_SERVER['argv'][3]+0 : 100;
if ($setmem) {
if (ini_set ('memory_limit', $setmem*1048576)) {
echo 'Set memory limit to '.$setmem." Mo\n";
} else {
echo 'FAILED to set memory limit to '.$setmem." Mo\n";
}
}
error_reporting(E_ALL);
$arr = array (str_repeat('X', 65536));
$mem = 0;
while ($loop--) {
for ($i = count($arr); $i; $i--) {
$arr[] = $arr[0];
if ($i%$chk) continue;
if ( ( ($nmem = memory_get_usage()) - $mem) > 100) {
$mem = $nmem;
echo 'Count:'.count($arr)." ($mem bytes)\n";
}
}
echo $loop.':'.count($arr).'/'.memory_get_usage() . " bytes\n"; //
36640
}
echo "\n OK \n";


Expec

#31854 [Opn->Ver]: Segfault if set memory_limit and other goodies

2005-03-02 Thread sniper
 ID:   31854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bertrand at toggg dot com
-Status:   Open
+Status:   Verified
-Bug Type: Reproducible crash
+Bug Type: Scripting Engine problem
-Operating System: FC2 kernel-2.6.10-1.14
+Operating System: *
-PHP Version:  4CVS-2005-02-16
+PHP Version:  4CVS-2005-03-03


Previous Comments:


[2005-02-16 11:46:29] bertrand at toggg dot com

Hope it's usefull for you:

Core was generated by `./php outmem.php 18 12 100'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  0x00c713d4 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0  0x00c713d4 in _int_free () from /lib/tls/libc.so.6
#1  0x00c7272b in free () from /lib/tls/libc.so.6
#2  0x081041c9 in shutdown_memory_manager (silent=0, clean_cache=0)
at
/home/bertrand/down/php4-STABLE-200502160330/Zend/zend_alloc.c:492
#3  0x080eb490 in php_request_shutdown (dummy=0x0)
at /home/bertrand/down/php4-STABLE-200502160330/main/main.c:1004
#4  0x0811fa1f in main (argc=5, argv=0xbff00a34)
at
/home/bertrand/down/php4-STABLE-200502160330/sapi/cli/php_cli.c:876
(gdb)



[2005-02-06 11:30:08] bertrand at toggg dot com

I downloaded the CVS snapshot from this morning,
php4-STABLE-200502060730 unix version
I build only the executables:
./configure --enable-memory-limit
make

With sapi/cli/php or sapi/cgi/php, unfortunately the results are the
same.
Only one point is now better, it's the case where no memory_limit set
and less call to memory_get_usage:
php outmem.php 18 '' 100
17:2/88792 bytes
16:4/8 bytes
<...snip...>
1:131072/5855880 bytes

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 35 bytes) in /home/bertrand/prog/test/outmem.php on line 19
<<< here it's still hanging a long time >>>
Allowed memory size of 8388608 bytes exhausted (tried to allocate 129
bytes)

But then it's coming back from PHP, no need no more to break. Is it
only due to the fact it's an only CLI PHP ?

Just to be sure, I've also rebuild some php-4.3.9 from 2004/10/09 and
results are identical.



[2005-02-06 06:57:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-02-05 20:31:24] bertrand at toggg dot com

Description:

This script doubles and again an array of long strings.
It accepts 3 parameters:
- nb of times to double the array
- eventuel memory_limit to set (thus default 8 Mo)
- interval of added rows to check memory_get_usage.
By 18 loops the 8Mo are exhausted.

Depending on the memory setting and the interval to check memory usage,
results are somewhat strange.

The segmentation fault occurs the same if running from Apache 2.0
Handler

It could be related to bug #31624

Reproduce code:
---
$loop = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1]+0 : 11;
$setmem = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2]+0 : ''; //
changed if set
$chk = isset($_SERVER['argv'][3]) ? $_SERVER['argv'][3]+0 : 100;
if ($setmem) {
if (ini_set ('memory_limit', $setmem*1048576)) {
echo 'Set memory limit to '.$setmem." Mo\n";
} else {
echo 'FAILED to set memory limit to '.$setmem." Mo\n";
}
}
error_reporting(E_ALL);
$arr = array (str_repeat('X', 65536));
$mem = 0;
while ($loop--) {
for ($i = count($arr); $i; $i--) {
$arr[] = $arr[0];
if ($i%$chk) continue;
if ( ( ($nmem = memory_get_usage()) - $mem) > 100) {
$mem = $nmem;
echo 'Count:'.count($arr)." ($mem bytes)\n";
}
}
echo $loop.':'.count($arr).'/'.memory_get_usage() . " bytes\n"; //
36640
}
echo "\n OK \n";


Expected result:

1) no memory_limit set
PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried
to allocate 35 bytes) in /home/bertrand/prog/test/outmem.php on line 19
+ break

2) with memory_limit set.
If not enough: same as 1)
Enough mem

#28556 [Fbk->Opn]: PHP as CGI becomes a zombie when loaded too often

2005-03-02 Thread floeff at arcor dot de
 ID:   28556
 User updated by:  floeff at arcor dot de
 Reported By:  floeff at arcor dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Linux 2.4
 PHP Version:  4.3.6
 New Comment:

It was the Debian 3.0 package, version 1.1.3-6.3


Previous Comments:


[2005-03-02 23:21:28] [EMAIL PROTECTED]

What libmm version do you have installed?
(I can't reproduce this with latest stable CVS and libmm-1.3.1)





[2005-03-01 19:23:06] floeff at arcor dot de

I already tried without binfmt_misc, same problem. Regarding the
snapshot: Unfortunately, I have no testing machine at the moment, and
after removing that mm stuff, it works fine. I will get back to you if
I have a testing machine again someday, but feel free to test it out
yourself and ask whatever question you have.



[2005-03-01 01:59:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And please try without using this binfmt_misc module to rule out THAT
possible cause of this bug.






[2005-02-06 14:27:36] floeff at arcor dot de

Okay, here we go:

./configure --enable-safe-mode --with-mysql --enable-discard-path
--with-exec-dir --enable-memory-limit --with-mm && make && make
install

cp php.ini-dist /usr/local/lib/php.ini

echo ':PHP:E::php::/usr/local/bin/php:' >
/proc/sys/fs/binfmt_misc/register
echo ':PHP3:E::php3::/usr/local/bin/php:' >
/proc/sys/fs/binfmt_misc/register
echo ':PHP4:E::php4::/usr/local/bin/php:' >
/proc/sys/fs/binfmt_misc/register

Changes in php.ini:
expose_php = Off
disable_functions = phpinfo
allow_url_fopen = Off

In httpd.conf of Apache2:

AddHandler cgi-script .cgi .pl .php .php3 .php4



[2005-02-06 06:57:15] [EMAIL PROTECTED]

Come up with configuration that isn't "security threat" to you and put
it here..




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

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


#28556 [Opn->Fbk]: PHP as CGI becomes a zombie when loaded too often

2005-03-02 Thread sniper
 ID:   28556
 Updated by:   [EMAIL PROTECTED]
 Reported By:  floeff at arcor dot de
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Linux 2.4
 PHP Version:  4.3.6
 New Comment:

What libmm version do you have installed?
(I can't reproduce this with latest stable CVS and libmm-1.3.1)




Previous Comments:


[2005-03-01 19:23:06] floeff at arcor dot de

I already tried without binfmt_misc, same problem. Regarding the
snapshot: Unfortunately, I have no testing machine at the moment, and
after removing that mm stuff, it works fine. I will get back to you if
I have a testing machine again someday, but feel free to test it out
yourself and ask whatever question you have.



[2005-03-01 01:59:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And please try without using this binfmt_misc module to rule out THAT
possible cause of this bug.






[2005-02-06 14:27:36] floeff at arcor dot de

Okay, here we go:

./configure --enable-safe-mode --with-mysql --enable-discard-path
--with-exec-dir --enable-memory-limit --with-mm && make && make
install

cp php.ini-dist /usr/local/lib/php.ini

echo ':PHP:E::php::/usr/local/bin/php:' >
/proc/sys/fs/binfmt_misc/register
echo ':PHP3:E::php3::/usr/local/bin/php:' >
/proc/sys/fs/binfmt_misc/register
echo ':PHP4:E::php4::/usr/local/bin/php:' >
/proc/sys/fs/binfmt_misc/register

Changes in php.ini:
expose_php = Off
disable_functions = phpinfo
allow_url_fopen = Off

In httpd.conf of Apache2:

AddHandler cgi-script .cgi .pl .php .php3 .php4



[2005-02-06 06:57:15] [EMAIL PROTECTED]

Come up with configuration that isn't "security threat" to you and put
it here..




[2005-02-05 19:07:17] floeff at arcor dot de

I don't post my (maybe security-related) configuration to the public,
sorry. Any e-mail address I could mail it to?



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

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


#32163 [Opn->Bgs]: New Fragment has Empty Content

2005-03-02 Thread rrichards
 ID:   32163
 Updated by:   [EMAIL PROTECTED]
 Reported By:  clynx at succont dot de
-Status:   Open
+Status:   Bogus
 Bug Type: DOM XML related
 Operating System: FreeBSD 4.11
 PHP Version:  5CVS-2005-03-02 (dev)
 New Comment:

And the children (not the fragment) are inserted into the document.
This means that the children now have a new parent node which is no
longer the fragment. In this case we cant have two different nodes
pointing to the same child, so the fragment must loose its children.
Contact me outside the bug system if you have questions on this as this
behavior is not a bug.


Previous Comments:


[2005-03-02 22:27:51] clynx at succont dot de

Just read inside the W3 Recommendation, because the Manual tells that
is Extension follows the Standard as most as possible.
Now I think that this behaviour is not correct after the Standard.
It exactly says 'When a DocumentFragment is inserted into a Document
... the children of the DocumentFragment and not the DocumentFragment
itself are inserted into the Node.'. Currently this is not the case in
PHP.

I've read your comment about XSL problems, and I think you are talking
about a bug which was submitted by me, too. 
IMHO it's no solution to switch the Feature of to Fix a Bug.

Maybe I'm completly wrong. If so, please forgive me. Please give me
some Information how this should be done in the right way. The Support
in this Extension is a little bit rare out there ;o)

Regards



[2005-03-02 17:27:09] clynx at succont dot de

Sorry for answering here, but what is the sense of these Fragments
then? Appending an Empty Fragments throws an Error that "Document
Fragment is empty".
When Inserting the Fragment removes the Childs, these Object is not
really usable, or am I wring here?

Just a second thing which comes in my mind. Why does $dom2->saveXML()
shows the complete Structure like it should be?

Thanks for your time



[2005-03-02 15:56:13] [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

Appending fragment removes the nodes from the fragment. Otherwise it
breaks xsl, xpath and unexpected tree navigation results.



[2005-03-02 15:31:01] clynx at succont dot de

Description:

When creating a new DocumentFragment, and appending some Child Nodes,
the Fragment is still Empty. The Content is inside the DomDocument, but
cannot be accessed through the Fragment Node.

Reproduce code:
---


content

XMLDATA;

$dom = new DomDocument;
$dom->loadXML( $xmlData );

$dom2 = new DomDocument;
$fragment = $dom2->createDocumentFragment();
foreach( $dom->childNodes AS $node ) {
$newNode = $dom2->importNode( $node, true );
$fragment->appendChild( $newNode );
}
$dom2->appendChild( $fragment );

echo $dom2->saveXML( $fragment );
?>

Expected result:


content


Actual result:
--
no output (empty String is returned)





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


#32104 [Fbk->Opn]: foreach on $dom->documentElement->childNode causes strange error

2005-03-02 Thread ppetermann at vivaplus dot tv
 ID:   32104
 User updated by:  ppetermann at vivaplus dot tv
 Reported By:  ppetermann at vivaplus dot tv
-Status:   Feedback
+Status:   Open
 Bug Type: DOM XML related
 Operating System: tested on Linux and Solaris
 PHP Version:  5CVS-2005-02-25 (dev)
 New Comment:

Those where fresh builds of php5, anyways tried it with rebuilding, as
expected: didnt change anything.

cant give you a link to the phpinfo since our developement environment
aint reachable from the net, but you may use the copy ive put at
http://disasta.devedge.info/stuff/phpinfo.htm

best regards,
Peter


Previous Comments:


[2005-02-25 20:39:56] [EMAIL PROTECTED]

still cannot reproduce and this time on a fresh linux box.
can you try rebuilding your php (making sure to clean it first) and if
still doesnt work post a link to you phpinfo.



[2005-02-25 15:08:16] ppetermann at vivaplus dot tv

hi,

php5-STABLE-200502250930 is the snapshot i used,
well, the missing s was an error in my report, in my code its with the
s (as i said its working on php 5.0.3 (in production)



[2005-02-25 15:01:57] [EMAIL PROTECTED]

sure you are using the latest snapshot?

using your code I get (both with latest 5_0 and HEAD):
Warning: Invalid argument supplied for foreach() in N:\CVS
Projects\php5_0\Debug_TS\bug32104.php on line 4

using ->childNodes (which is correct) works fine



[2005-02-25 11:44:15] ppetermann at vivaplus dot tv

Description:

doing a foreach loop on:
$dom->documentElement->childNode
causes an Fatal Error:

Fatal error: Cannot access undefined property for object with
overloaded property access in FILE on line LINENUMBEROFFOREACH

this didnt happen in PHP5 <= 5.0.3

Reproduce code:
---
load("xmlfile.xml);
foreach($dom->documentElement->childNode as $node)
{ 
echo "foo\n";
}
?>

Expected result:

a foo\n for each childnode of the document element

Actual result:
--
Fatal error: Cannot access undefined property for object with
overloaded property access in /foo/bar/myfile.php on line 4





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


#31033 [Fbk->Csd]: RegisterPhpFunctions: php:function(string, nodeset) with xsl:key crush PHP

2005-03-02 Thread rrichards
 ID:   31033
 Updated by:   [EMAIL PROTECTED]
 Reported By:  4mirror at mail dot ru
-Status:   Feedback
+Status:   Closed
 Bug Type: XSLT related
 Operating System: Windows 2000 sp4
 PHP Version:  5.0.2
 New Comment:

This bug has been fixed in CVS.

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

Fixed for 5.1


Previous Comments:


[2005-02-28 21:18:24] [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





[2004-12-09 06:21:41] 4mirror at mail dot ru

Description:

If we have 

anywere in stylesheet, any call of 
php:function('anyFunction',some/node)
crush php.

In result, Apache return 500 (and Windows say: "Unhandled exception at
0x10189120 in php-cgi.exe: 0xC005: 
Access violation reading location 0x31223d72"), or never return
anything, or PHP return many false errors.

PHP - release 5.0.2, win32 binary distribution.
Configure Command (from PHPinfo): cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Server API: CGI/FastCGI

Apache - 1.3.27 (Win32)
libxml2 - 2.6.11, libxslt - 1.1.7, libexslt - 0.8.5


P.S. We can see "Expected result" after we delete string  with mark
 in "Reproduce code"...

Reproduce code:
---
nodeName; }
$txtxsl=<
  
 
   
 

XSL;
$domxml=DomDocument::loadXML('baz
');
$domxsl=DomDocument::loadXML($txtxsl);
$xsl=new xsltProcessor();
$xsl->registerPhpFunctions();
$xsl->importStylesheet($domxsl);
echo $xsl->transformtoXML($domxml);
?>

Expected result:

test

Actual result:
--
server no response, php going to infinite cycle...






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


#32001 [Asn->Csd]: xml_parse_into_struct() function exceeds maximum execution time (object)

2005-03-02 Thread rrichards
 ID:   32001
 Updated by:   [EMAIL PROTECTED]
 Reported By:  geroxp at web dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: XML related
 Operating System: Linux (FC3)
 PHP Version:  5CVS-2005-02-17
 Assigned To:  jorton
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2005-02-17 12:31:21] [EMAIL PROTECTED]

The test case is triggering an infinite loop in libxml2; I've proposed
this patch: http://www.apache.org/~jorton/php_xmlenc.diff



[2005-02-16 18:08:30] geroxp at web dot de

Description:

When using xml_parse_into_struct() function with an object the
following error occurs:
Fatal error: Maximum execution time of 30 seconds exceeded in
/var/www/html/test.php on line 9


Version-Release number:
php-5.0.3-2

How reproducible:
Always

Reproduce code:
---
myparser = xml_parser_create('');
$simple = "simple note";
xml_parse_into_struct($this->myparser, $simple, $myvals, $mytags);
print_r($myvals);
}

}

$myobject =& new myclass;
$myobject->mytest();

?>



Expected result:

Output of the xml-structure given as an array.

Actual result:
--
Fatal error: Maximum execution time of 30 seconds exceeded in
/var/www/html/test.php on line 9





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


#32163 [Bgs]: New Fragment has Empty Content

2005-03-02 Thread clynx at succont dot de
 ID:   32163
 User updated by:  clynx at succont dot de
 Reported By:  clynx at succont dot de
 Status:   Bogus
 Bug Type: DOM XML related
 Operating System: FreeBSD 4.11
 PHP Version:  5CVS-2005-03-02 (dev)
 New Comment:

Sorry for answering here, but what is the sense of these Fragments
then? Appending an Empty Fragments throws an Error that "Document
Fragment is empty".
When Inserting the Fragment removes the Childs, these Object is not
really usable, or am I wring here?

Just a second thing which comes in my mind. Why does $dom2->saveXML()
shows the complete Structure like it should be?

Thanks for your time


Previous Comments:


[2005-03-02 15:56:13] [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

Appending fragment removes the nodes from the fragment. Otherwise it
breaks xsl, xpath and unexpected tree navigation results.



[2005-03-02 15:31:01] clynx at succont dot de

Description:

When creating a new DocumentFragment, and appending some Child Nodes,
the Fragment is still Empty. The Content is inside the DomDocument, but
cannot be accessed through the Fragment Node.

Reproduce code:
---


content

XMLDATA;

$dom = new DomDocument;
$dom->loadXML( $xmlData );

$dom2 = new DomDocument;
$fragment = $dom2->createDocumentFragment();
foreach( $dom->childNodes AS $node ) {
$newNode = $dom2->importNode( $node, true );
$fragment->appendChild( $newNode );
}
$dom2->appendChild( $fragment );

echo $dom2->saveXML( $fragment );
?>

Expected result:


content


Actual result:
--
no output (empty String is returned)





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


#27887 [Com]: func_get_args() can't be used as 2nd parameter for functions

2005-03-02 Thread hkh at netnords dot dk
 ID:   27887
 Comment by:   hkh at netnords dot dk
 Reported By:  [EMAIL PROTECTED]
 Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  4CVS, 5CVS (2004-04-06)
 New Comment:

Reproduce code:

function a()
{
print func_num_args().'';
}

function b()
{
$dd = 123;
a(func_get_args());
a(func_get_args(), $dd);
a($dd, func_get_args());
}

b('Hello World');

--
Expected result:

1
2
2

--
Actual result:

1
2

Fatal error: func_get_args(): Can't be used as a function parameter in
.


--
Comment:

I tested the code with same result on 4.3.10-1.dotdeb.0 and
5.0.3-1.dotdeb.0.

I think all the lines should fails on none of them.

Can't see anything in the documentation about this.


Previous Comments:


[2004-04-06 10:41:55] [EMAIL PROTECTED]

Description:

when passing func_get_args() as second parameter of a 
function, it complains.

foo('foo', func_get_args());
Fatal error: func_get_args(): Can't be used as a 
function parameter in /Users/iboom/Desktop/Journaux/
2004.04/fonctions/arg_defaut.php on line 23


foo(func_get_args(), 'foo');
is OK tough.

So, it won't work with
print join(',',func_get_args());
array_map('foo',func_get_args());






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


#32163 [Opn->Bgs]: New Fragment has Empty Content

2005-03-02 Thread rrichards
 ID:   32163
 Updated by:   [EMAIL PROTECTED]
 Reported By:  clynx at succont dot de
-Status:   Open
+Status:   Bogus
 Bug Type: DOM XML related
 Operating System: FreeBSD 4.11
 PHP Version:  5CVS-2005-03-02 (dev)
 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

Appending fragment removes the nodes from the fragment. Otherwise it
breaks xsl, xpath and unexpected tree navigation results.


Previous Comments:


[2005-03-02 15:31:01] clynx at succont dot de

Description:

When creating a new DocumentFragment, and appending some Child Nodes,
the Fragment is still Empty. The Content is inside the DomDocument, but
cannot be accessed through the Fragment Node.

Reproduce code:
---


content

XMLDATA;

$dom = new DomDocument;
$dom->loadXML( $xmlData );

$dom2 = new DomDocument;
$fragment = $dom2->createDocumentFragment();
foreach( $dom->childNodes AS $node ) {
$newNode = $dom2->importNode( $node, true );
$fragment->appendChild( $newNode );
}
$dom2->appendChild( $fragment );

echo $dom2->saveXML( $fragment );
?>

Expected result:


content


Actual result:
--
no output (empty String is returned)





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


#32163 [NEW]: New Fragment has Empty Content

2005-03-02 Thread clynx at succont dot de
From: clynx at succont dot de
Operating system: FreeBSD 4.11
PHP version:  5CVS-2005-03-02 (dev)
PHP Bug Type: DOM XML related
Bug description:  New Fragment has Empty Content

Description:

When creating a new DocumentFragment, and appending some Child Nodes, the
Fragment is still Empty. The Content is inside the DomDocument, but cannot
be accessed through the Fragment Node.

Reproduce code:
---


content

XMLDATA;

$dom = new DomDocument;
$dom->loadXML( $xmlData );

$dom2 = new DomDocument;
$fragment = $dom2->createDocumentFragment();
foreach( $dom->childNodes AS $node ) {
$newNode = $dom2->importNode( $node, true );
$fragment->appendChild( $newNode );
}
$dom2->appendChild( $fragment );

echo $dom2->saveXML( $fragment );
?>

Expected result:


content


Actual result:
--
no output (empty String is returned)

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


#32099 [Fbk->Opn]: After opening ADO connection and closing it repeatedly, Apache stops service

2005-03-02 Thread terryoh at wins21 dot com
 ID:   32099
 User updated by:  terryoh at wins21 dot com
 Reported By:  terryoh at wins21 dot com
-Status:   Feedback
+Status:   Open
 Bug Type: COM related
 Operating System: win32
 PHP Version:  4CVS-2005-02-28
 New Comment:

In my test, PHP 5 has same problem.

I really want to know the solution, please..


Previous Comments:


[2005-03-02 08:23:50] [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

This is PHP 5 snapshot which has better COM support.




[2005-02-28 02:43:18] terryoh at wins21 dot com

I downloaded the latest php.
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

After upgrading the php module, I tried the same test. But the result
was same. Memory and the count of the handles were increased. After the
session.gc_maxlifetime(php.ini), the result was same.

[Presumption]
I read something about zend engine on a webpage(I can't remeber the web
address exactly), it is that the zend engine doesn't release database
connection to reuse exceptionally. It might be this process causes
trouble between ADO and Zend engine.



[2005-02-25 14:20:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-02-25 01:52:36] terryoh at wins21 dot com

Description:

Today, my apache server stopped service. So I tested whether the apache
daemon was ok or not. It worked, because the telnet 80 connection(like
C:/telnet.exe 127.0.0.1 80) was successful. But I could not open any
php pages on the internet explorer.

I checked the memory with windows task manager and I found something
strange. The allocated memory for apache was almost 1GB(998MB) and the
count of the handles was almost 4(39890). 

Finally I found that it was ADO-PHP problem. I could see memory and the
count of handles increased when opening database and closing it
repeatedly(1 try/1 second for an hour). Especially the handles were
never decreased.

[Steps]
1) Register any ODBC DSN(driver=SQL Server)in the control panel.
2) In PHP.INI, set the key name(odbc.default_db) with the DSN;user
ID;password.
3) Start an apache service.
4) Open a test page(in the reproduce code section)in your web browser.
5) Refresh the test page repeatedly once a second.
6) Open windows task manager. If you can not see handle column on the
process tab, add it(Menu->View->Column Selection->Handle).
7) After 1 minute or later, you can see the count of apache handle
increase like 400->401->402->403 Also you can see the memory
increase.




Reproduce code:
---
Open($ConnectionString);

  $AdoConn->Close();
  unset($AdoConn);
?>

* Web Server  : Apache 1.3.28
* PHP : 4.3.8
* OS  : Windows 2000 Server
* DBMS: MSSQL2000 Enterprise Edition
* OTHERS  : MDAC 2.8


Expected result:

Windows Task Manager(Process Tab)
Image name  Memory   Handle
Apache.exe  10,840KB 200 11:00 AM
Apache.exe  10,857KB 201 11:02 AM
Apache.exe  10,867KB 202 11:04 AM
Apache.exe  10,867KB 202 11:06 AM
Apache.exe  10,867KB 202 11:08 AM
Apache.exe  10,867KB 202 11:10 AM
Apache.exe  10,867KB 202 11:12 AM


Actual result:
--
Windows Task Manager(Process Tab)
Image name  Memory   Handle
Apache.exe  10,840KB 200 11:00 AM
Apache.exe  10,857KB 201 11:02 AM
Apache.exe  10,867KB 202 11:04 AM
Apache.exe  10,877KB 203 11:06 AM
Apache.exe  10,886KB 204 11:08 AM
Apache.exe  10,899KB 205 11:10 AM
Apache.exe  10,910KB 206 11:12 AM

Apache.exe  998MB39890





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