#30907 [Fbk->Opn]: Apache crashes when inserting a -1 into a Interbase TIMESTAMP field

2005-03-01 Thread sandell at winwap dot com
 ID:   30907
 User updated by:  sandell at winwap dot com
 Reported By:  sandell at winwap dot com
-Status:   Feedback
+Status:   Open
 Bug Type: InterBase related
 Operating System: WinXP Pro (SP2)
 PHP Version:  5.0.2
 New Comment:

The new Snapshot (downloaded 1.3.2005) still causes Apache to crash.

Tested with:
- Interbase Server v7.1 (WI-V7.1.0.192).
- Apache 2.0.50
- PHP 5.1.0-DEV


Previous Comments:


[2005-02-28 21:22:17] [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-02-24 10:20:36] sandell at winwap dot com

Compiling stuff is out of scope for me, sorry. The compiling must be
done by someone else who knows how to do it.



[2005-02-24 10:12:23] [EMAIL PROTECTED]

Please try if the error can be reproduced with a php_interbase.dll
built from source using the ibase.h header file that comes with
Interbase 7.1





[2005-02-24 09:10:57] sandell at slobtrot dot com

The PHP installation was not altered. It's the original PHP 5.0.2
installation (binary only).



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

Did you build php_interbase.dll from source, or did you use the
pre-built one from php.net?



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

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


#32143 [NEW]: ibase_query() causes IB server crash with invalid DB and parameters

2005-03-01 Thread sandell at winwap dot com
From: sandell at winwap dot com
Operating system: Windows XP SP2
PHP version:  5CVS-2005-03-01 (dev)
PHP Bug Type: InterBase related
Bug description:  ibase_query() causes IB server crash with invalid DB and 
parameters

Description:

ibase_query() causes a Interbase Server crash if an invalid DB handle is
used and parameters are passed in the function. There must be an existing
DB connection opened with ibase_connect().

System info (All on same machine):
- Windows XP SP2
- Apache 2.0.50
- PHP 5.1.0-DEV (Downloaded 1.3.2005)
- Interbase Server WI-V7.1.0.192


Reproduce code:
---
// Crash Code
$db = ibase_connect($dbname,'SYSDBA','masterkey','None',0,3);
$sql = "SELECT * FROM aTable WHERE Status = ?";
$sth = ibase_query($db_hand, $sql, 0 ); // <- THIS LINE CRASHES IB SERVER
(Note $db_hand variable)
ibase_close($db);


Expected result:

function should fail with an error reported to the log 

Actual result:
--
Interbase Server crashes

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


#32144 [NEW]: sqlite extension causes crash at PHP startup

2005-03-01 Thread ian at snork dot net
From: ian at snork dot net
Operating system: Debian sarge (i386)
PHP version:  5CVS-2005-03-01 (dev)
PHP Bug Type: Reproducible crash
Bug description:  sqlite extension causes crash at PHP startup

Description:

A PHP build with --with-spl and --with-sqlite will 
segfault at startup in all SAPIs because the SPL extension 
is not initialized at all.  
 
The following patch appears to fix the problem: 
 
--- php5-200503010530.orig/ext/standard/basic_functions.c   
2005-01-18 11:30:05.0 + 
+++ php5-200503010530/ext/standard/basic_functions.c
2005-03-01 08:03:14.578643275 + 
@@ -1094,6 +1094,9 @@ 
PHP_MINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); 
 #endif 
PHP_MINIT(array)(INIT_FUNC_ARGS_PASSTHRU); 
+#ifdef HAVE_SPL 
+   PHP_MINIT(spl)(INIT_FUNC_ARGS_PASSTHRU); 
+#endif 
PHP_MINIT(assert)(INIT_FUNC_ARGS_PASSTHRU); 
PHP_MINIT(url_scanner_ex)
(INIT_FUNC_ARGS_PASSTHRU); 
 #ifdef PHP_CAN_SUPPORT_PROC_OPEN 
 

Expected result:

$ sapi/cli/php /dev/null 
$ 

Actual result:
--
$ sapi/cli/php /dev/null 
Segmentation fault 
$ 

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


#30961 [Fbk->Opn]: Wrong linenumber in ReflectionClass getStartLine()

2005-03-01 Thread michiel at trendserver dot nl
 ID:   30961
 User updated by:  michiel at trendserver dot nl
 Reported By:  michiel at trendserver dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Debian
 PHP Version:  5.0.2
 New Comment:

No change, using either
http://snaps.php.net/win32/php5.0-win32-200503010130.zip or
http://snaps.php.net/win32/php5-win32-200503010730.zip

(can not confirm using a *nix build at this time)


Previous Comments:


[2005-02-28 21:20:15] [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 11:12:24] michiel at trendserver dot nl

Also occurs on http://snaps.php.net/win32/php5-win32-200412090730.zip



[2004-12-02 14:27:21] michiel at trendserver dot nl

Description:

The Reflection API has a (minor) bug regarding the getStartLine()
function in ReflectionClass. When the reflected class is not a subclass
and does not implement any interfaces, the result of getStartLine() is
one line off.

Reproduce code:
---
getStartLine() . "\n";
echo $ref2->getStartLine() . "\n";
?>

Expected result:

2
6

Actual result:
--
3
6





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


#29588 [Opn->Csd]: $errcontext no longer shows object reference

2005-03-01 Thread tony2001
 ID:   29588
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tony at marston-home dot demon dot co dot uk
-Status:   Open
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: WindowsXP
 PHP Version:  5.0.0
 New Comment:

Close it then.


Previous Comments:


[2005-03-01 08:17:53] tony at marston-home dot demon dot co dot uk

Yes, that works now.



[2005-02-28 21:23:52] [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-08-09 17:24:10] tony at marston-home dot demon dot co dot uk

Description:

I have a class called 'mysql' which deals with all MySQL function
calls. It contains the following code:

$result = mysqli_query($link, $query) or trigger_error("SQL",
E_USER_ERROR);

In the event of a fatal error it calls my custom error handler which
accesses all 5 arguments ($errno, $errstr, $errfile, $errline,
$errcontext).

With PHP 4 $errcontext contains the following:
Array
(
[this] => mysql Object
(
... class variables appear here ...  
)

[dbname] => sample
[tablename] => pers_opt_xref
[where] => ...
[result] => 
)

With PHP 5 the same error produces the following:
Array
(
[dbname] => sample
[tablename] => pers_opt_xref
[where] => ...  
[result] => 
)

You will note that the object references are completely missing. This
is preventing me from determining that the error came from my 'mysql'
object and therefore obtaining the current values for mysql_errno() and
mysql_error().

Expected result:

If the error is triggered from within an object I expect $errcontext to
contain an object reference as stated in the manual at
http://www.php.net/manual/en/function.set-error-handler.php

Actual result:
--
If triggered from within an object $errcontext does not contain any
object references.





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


#31635 [Fbk->Opn]: Unsafe coding practice

2005-03-01 Thread ivar at stvk dot no
 ID:   31635
 User updated by:  ivar at stvk dot no
 Reported By:  ivar at stvk dot no
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Irrelevant (WinXP)
 PHP Version:  5.0.3
 New Comment:

There seems to be no change in the latest (5.1.x) snapshot, compiled 1
march 2005 7:55 GMT.


Previous Comments:


[2005-02-28 20:59:08] [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-01-31 08:49:57] ivar at stvk dot no

The only way I am able to reproduce this behavior is using COM, but the
nature of the bug is not directly linked to the COM libraries itself.
Because of this, I am unable to make a test case that is platform
independent and that does not require external resources.

I will try just once more:
Create a Visual Basic ActiveX DLL project. Name the project
'NullClass', and name the class 'Null'. Add this single function to the
class code:

Public Property Get Value()
Value = Null
End Property

Place the cursor inside the function, Click the menu "Tools",
"Procedure Properties", "Advanced", and select "User Interface
Default". Click "File", "Make NullClass.dll".

Then run this PHP script:



EXPECTED: The script does not output anything, because the object
contains a NULL value.

ACTUAL: The script either outputs garbage or causes an Access Violation
message.



[2005-01-29 20:41:32] [EMAIL PROTECTED]

Could you please provide an example that doesn't require any external
resources (especially those that exist only under a particular OS) ?
Also please post what you expect and what you got when you execute the
reproduce code. 



[2005-01-25 08:53:51] ivar at stvk dot no

To reproduce the bug, use this script. Let 'TestDatabase' be any kind
of database, and let the table field 'Table'.'NullField' be any
database field that contains a NULL value.

Open("DRIVER={SQL
Server};SERVER=SERVER\WEB;DATABASE=TestDatabase");

$RS = new COM("ADODB.Recordset");
$RS->Open("SELECT TEXT FROM Table", $DB);

echo $RS["NullField"];

} catch (Exception $e) {
echo $e->getTraceAsString() . "";
echo $e->getMessage();
}
?>



[2005-01-21 15:15:04] ivar at stvk dot no

Description:

zend_make_printable_zval:

Before returning with *use_copy=1, this function assumes that the
preceding code has successfully converted the value to a sting, and
therefore sets expr_copy->type = IS_STRING.

If the original value IS_OBJECT, this function relies on any 3rd party
cast handler to successfully return a string.
Some libraries have been observed to break this rule, and return a
value only initialized by ZVAL_NULL. This makes the system try to print
a string from a garbage pointer.






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


#31635 [Opn->Fbk]: Unsafe coding practice

2005-03-01 Thread tony2001
 ID:   31635
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ivar at stvk dot no
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Irrelevant (WinXP)
 PHP Version:  5.0.3
 New Comment:

Please provide a patch or at least reproduce code that doesn't require
Windoze. 


Previous Comments:


[2005-03-01 09:55:34] ivar at stvk dot no

There seems to be no change in the latest (5.1.x) snapshot, compiled 1
march 2005 7:55 GMT.



[2005-02-28 20:59:08] [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-01-31 08:49:57] ivar at stvk dot no

The only way I am able to reproduce this behavior is using COM, but the
nature of the bug is not directly linked to the COM libraries itself.
Because of this, I am unable to make a test case that is platform
independent and that does not require external resources.

I will try just once more:
Create a Visual Basic ActiveX DLL project. Name the project
'NullClass', and name the class 'Null'. Add this single function to the
class code:

Public Property Get Value()
Value = Null
End Property

Place the cursor inside the function, Click the menu "Tools",
"Procedure Properties", "Advanced", and select "User Interface
Default". Click "File", "Make NullClass.dll".

Then run this PHP script:



EXPECTED: The script does not output anything, because the object
contains a NULL value.

ACTUAL: The script either outputs garbage or causes an Access Violation
message.



[2005-01-29 20:41:32] [EMAIL PROTECTED]

Could you please provide an example that doesn't require any external
resources (especially those that exist only under a particular OS) ?
Also please post what you expect and what you got when you execute the
reproduce code. 



[2005-01-25 08:53:51] ivar at stvk dot no

To reproduce the bug, use this script. Let 'TestDatabase' be any kind
of database, and let the table field 'Table'.'NullField' be any
database field that contains a NULL value.

Open("DRIVER={SQL
Server};SERVER=SERVER\WEB;DATABASE=TestDatabase");

$RS = new COM("ADODB.Recordset");
$RS->Open("SELECT TEXT FROM Table", $DB);

echo $RS["NullField"];

} catch (Exception $e) {
echo $e->getTraceAsString() . "";
echo $e->getMessage();
}
?>



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

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


#32145 [NEW]: Mersenne Twister seed option required

2005-03-01 Thread hardeman at nmni dot net
From: hardeman at nmni dot net
Operating system: win
PHP version:  4.3.10
PHP Bug Type: Feature/Change Request
Bug description:  Mersenne Twister seed option required

Description:

Unless the PHP documentation is not up-to-date, the only seed option for
the Mersenne Twister RNG is a 32-bit integer. The original (updated) MT
implementation (see
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html),
however, allows for seed arrays of arbitrary length to better exploit the
large period of the RNG. It would be nice if this option were built in in
future versions of PHP so that I myself and probably quite a few other PHP
users won't have to implement the RNG in PHP code itself or create a
private extension in C++. Adding this feature to PHP should not require a
lot of effort as other implementations are readily available.


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


#32146 [NEW]: The php apache2handler module segfaults

2005-03-01 Thread jelly_bean_junky at hotmail dot com
From: jelly_bean_junky at hotmail dot com
Operating system: OpenBSD 3.6 GENERIC#59
PHP version:  5.0.3
PHP Bug Type: Apache2 related
Bug description:  The php apache2handler module segfaults

Description:

Error message produced:
[notice] child pid 8484 exit signal Segmentation fault (11)

I can send the core if requested.

Reproduce code:
---
Any sort of php code will randomly produce no page or missing parts

Expected result:

no page or missing images or links

Actual result:
--
(gdb) bt
#0  0x0027c220 in ?? ()
#1  0x086c2941 in zm_info_apache (zend_module=0x7972636e) at
/home/kibble/packages/php-5.0.3/sapi/apache2handler/php_functions.c:405
#2  0x0869136c in zend_hash_clean (ht=0x28603540) at
/home/kibble/packages/php-5.0.3/Zend/zend_hash.c:540
#3  0x086914c0 in zend_hash_apply_deleter (ht=0x28603540, p=0x8419abec) at
/home/kibble/packages/php-5.0.3/Zend/zend_hash.c:589
#4  0x0868a146 in zend_startup (utility_functions=0x285f81d8,
extensions=0x3c029028, start_builtin_functions=-809529992)
at /home/kibble/packages/php-5.0.3/Zend/zend.c:607
#5  0x0865305e in php_module_startup (sf=0x285f81d8,
additional_modules=0x3c061298, num_additional_modules=0) at
/home/kibble/packages/php-5.0.3/main/main.c:1428
#6  0x0865301c in php_module_startup (sf=0x285f5ee0,
additional_modules=0x0, num_additional_modules=3485437428)
at /home/kibble/packages/php-5.0.3/main/main.c:1426
#7  0x086bedf1 in php_apache_sapi_log_message (msg=0x0) at
/home/kibble/packages/php-5.0.3/sapi/apache2handler/sapi_apache2.c:257
#8  0x04b7aa20 in run_cleanups (cref=0x3c029028) at apr_pools.c:1951
#9  0x04b79de9 in apr_pool_destroy (pool=0x3c029018) at apr_pools.c:730
#10 0x04b79dce in apr_pool_destroy (pool=0x3c027018) at apr_pools.c:727
#11 0x1c038648 in destroy_and_exit_process (process=0x3c027098,
process_exit_value=0) at main.c:208
#12 0x1c03948a in main (argc=3, argv=0xcfbf8fa4) at main.c:624
(gdb) frame 1
#1  0x086c2941 in zm_info_apache (zend_module=0x7972636e) at
/home/kibble/packages/php-5.0.3/sapi/apache2handler/php_functions.c:405
405 sprintf(tmp, "Connection: %lld - Keep-Alive: %lld",
(serv->timeout / 100), (serv->keep_alive_timeout / 100));
(gdb) info locals
zend_module = (zend_module_entry *) 0x86c2928
apv = (unsigned char *) 0x72636564 
tmp1 = {c = 0x17 "Ï", len = 3485437024, a = 1852141679}
tmp =
"ssl_private_encrypt\000\025\000\000\000`\214¿Ïopenssl_pkcs7_encrypt\000C(\022\000\000\000`\214¿Ïopenssl_pkcsp¢Ê\fpÓÉ,¬°<(D\212¿Ïp¢Ê\fpÓÉ,ssl_T\212¿Ï1®Ê\føÁÉ,\000¯É,[EMAIL
 
PROTECTED]<\006\000\000\000t\212¿\022ç\000\000\000\034ÃÉ\fL«É\f¤\211¿Ïñ5\230\016\fFÒ\210\000l¶\004®×z\r\006\000\000\000ð\211¿Ï\234\211¿Ï
\211¿Ï"...
n = 1600484449
max_requests = 7630969
p = 0x285c227b "ind the property %s"
serv = (server_rec *) 0x76697270

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


#31898 [Opn]: OCI8: Already reproducable Bug #20006 cannot use 2 database connections

2005-03-01 Thread buhmann at teqneers dot de
 ID:   31898
 User updated by:  buhmann at teqneers dot de
 Reported By:  buhmann at teqneers dot de
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: WIN2k/Win2003/XP
 PHP Version:  4.3.10
 New Comment:

Is anybody in here, which is responsible for this or can make a
conclusion to this???


Previous Comments:


[2005-02-09 15:45:24] buhmann at teqneers dot de

Description:

I have to fight with the same problem up to the current release
(4.9.10). It doesn't seems to be fixed. In my opinion adding more
tnsnames to the oracle client isn't help enough. the oracle user have
to be enough.

I tried it on a win2k and win2003 server edition with oracle clients 8
and 9. always the same problem. opening the first connection works
fine. also doing some selects with this connection. but, after opening
a second connection and don't use it immediately, errors occurred. if i
instead use the second connection immediately (doing a select or
anything), it will also works correct. The errors will occurr (using
the first connection) until i will use the second connection.

Reproduce code:
---
';
selectOne();
echo '
End---


';


// make second connection
$connectionTwo = OCILogon( 'user2', 'pwd2', 'TNS' );


// select again from table test1 (connection 1), this will result in
an error
echo '
Start- Test1 Con1 ---';
selectOne();
// ===> if you will make a selectTwo() instead off a
// ===> selectOne() at this point, now errors occurr!
//selectTwo();
echo '
End---


';





// select from table test1 (connection 1)
echo '
Start- Test1 Con1 ---';
selectOne();
echo '
End---


';


// select from table test2 (connection 2)
echo '
Start- Test2 Con2 ---';
selectTwo();
echo '
End---


';


// select again from table test1 (connection 1), this will work now
echo '
Start- Test1 Con1 ---';
selectOne();
echo '
End---


';
?>






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


#32130 [Asn->Csd]: ArrayIterator::seek() does not throw an Exception on invalid index

2005-03-01 Thread helly
 ID:   32130
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joh at deworks dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: SPL related
 Operating System: *
-PHP Version:  5CVS-2005-02-14
+PHP Version:  5.0.3
 Assigned To:  helly
 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-27 18:12:58] joh at deworks dot net

Description:

ArrayIterator::seek() should (according to the manual:
http://www.php.net/~helly/php/ext/spl/interfaceSeekableIterator.html) 
"throw an exception if it is not possible to seek to the given
position".

ArrayIterator::seek() does not. Instead, it sets the current element to
NULL (as returned by ArrayIterator::current()).

Reproduce code:
---
$o = new ArrayIterator(array(1,2,3));
$o->seek(3);
var_dump($o->current());

Expected result:

Fatal error: Uncaught exception 'Exception' with message 'Could not
seek to position...' ...

Actual result:
--
NULL





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


#31635 [Fbk->Opn]: Unsafe coding practice

2005-03-01 Thread ivar at stvk dot no
 ID:   31635
 User updated by:  ivar at stvk dot no
 Reported By:  ivar at stvk dot no
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Irrelevant (WinXP)
 PHP Version:  5.0.3
 New Comment:

ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int
*use_copy)
{
...
...
case IS_OBJECT:
{
...
...
if (Z_OBJ_HANDLER_P(expr, cast_object)) {
if( (Z_OBJ_HANDLER_P(expr, cast_object)(expr, expr_copy, IS_STRING, 0
TSRMLS_CC) == SUCCESS) &&
   (expr_copy->type == IS_STRING)) {
break;
}
}


Previous Comments:


[2005-03-01 10:12:39] [EMAIL PROTECTED]

Please provide a patch or at least reproduce code that doesn't require
Windoze. 



[2005-03-01 09:55:34] ivar at stvk dot no

There seems to be no change in the latest (5.1.x) snapshot, compiled 1
march 2005 7:55 GMT.



[2005-02-28 20:59:08] [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-01-31 08:49:57] ivar at stvk dot no

The only way I am able to reproduce this behavior is using COM, but the
nature of the bug is not directly linked to the COM libraries itself.
Because of this, I am unable to make a test case that is platform
independent and that does not require external resources.

I will try just once more:
Create a Visual Basic ActiveX DLL project. Name the project
'NullClass', and name the class 'Null'. Add this single function to the
class code:

Public Property Get Value()
Value = Null
End Property

Place the cursor inside the function, Click the menu "Tools",
"Procedure Properties", "Advanced", and select "User Interface
Default". Click "File", "Make NullClass.dll".

Then run this PHP script:



EXPECTED: The script does not output anything, because the object
contains a NULL value.

ACTUAL: The script either outputs garbage or causes an Access Violation
message.



[2005-01-29 20:41:32] [EMAIL PROTECTED]

Could you please provide an example that doesn't require any external
resources (especially those that exist only under a particular OS) ?
Also please post what you expect and what you got when you execute the
reproduce code. 



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

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


#28067 [Opn->Asn]: partially incorrect utf8 to htmlentities mapping

2005-03-01 Thread sniper
 ID:   28067
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ben at csgb dot de
-Status:   Open
+Status:   Assigned
 Bug Type: Strings related
-Operating System: possibly all
+Operating System: *
-PHP Version:  4, 5, who knows
+PHP Version:  4CVS, 5CVS (2005-03-01)
 Assigned To:  derick


Previous Comments:


[2005-03-01 11:25:11] ben at csgb dot de

Code is still uncomplete, will send testfile to sniper and derick



[2005-03-01 01:00:30] 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-21 20:21:22] [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





[2004-04-20 17:50:06] [EMAIL PROTECTED]

received the patch, but it doesn't look 100% correct so I need to so
some investigations.



[2004-04-20 09:10:06] [EMAIL PROTECTED]

Hello,

can you please mail this patch to me, as the bug system garbled it a
bit.

regards,
Derick



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

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


#32137 [Com]: Objects are not being passed by reference

2005-03-01 Thread ericvanblokland at gmail dot com
 ID:   32137
 Comment by:   ericvanblokland at gmail dot com
 Reported By:  tigr at mail15 dot com
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 98
 PHP Version:  5.0.3
 New Comment:

I don't understand your issue, every variable type is passed by value,
unless the function definition explicitly says it has to be passed by
reference.


Previous Comments:


[2005-03-01 13:04:20] tigr at mail15 dot com

Checked on these snaps, no changes.

Well, maybe this is due to incorrect understanding of what object
passing by reference means? Maybe this is a documentation problem?

I've added detailed explanation here:
http://www.php.net/manual/en/language.oop5.basic.php



[2005-02-28 20:42:40] [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-02-28 20:39:29] tigr at mail15 dot com

Description:

I make one object instance. Then, pass it to another object. Then,
change original instance. Now I have two different objects.

Reproduce code:
---
id = $id;
}
}
class classB {
public $reference = null;
public function __construct($ref) {
$this->reference = $ref;
}
}
$a = new classA("object 1");
$test = new classB($a);
$a = new classA("object 2");
echo $a->id, "", $test->reference->id;
?>

Expected result:

object 2
object 2

Actual result:
--
object 2
object 1

However, adding references solves the problem:

class classB {
public $reference = null;
public function __construct(&$ref) {
$this->reference =& $ref;
}
}

This works as expected.

So, the question is are objects being passed by reference or what?





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


#32149 [NEW]: str_replace and decimal separator ','

2005-03-01 Thread alec at alec dot pl
From: alec at alec dot pl
Operating system: 
PHP version:  5.0.2
PHP Bug Type: Strings related
Bug description:  str_replace and decimal separator ','

Description:

in polish locale decimal separator of floats is ',' 
When I wanna to replace some string with some float, it returns string
with '.' separator, but should be ','

Reproduce code:
---
setlocale(LC_NUMERIC,'pl_PL.UTF-8'); 
$value = 11.11;
echo round($value,2)."-";
$str = '?';
echo str_replace('?',round($value,2),$str);


Expected result:

11,11-11,11

Actual result:
--
11,11-11.11

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


#32150 [NEW]: PHP fails to compile with gcc 4.0.0-alpha20050213 snapshot

2005-03-01 Thread amd at store20 dot com
From: amd at store20 dot com
Operating system: Gentoo GNU/Linux
PHP version:  5.0.3
PHP Bug Type: Compile Failure
Bug description:  PHP fails to compile with gcc 4.0.0-alpha20050213 snapshot

Description:

PHP fails to compile with Gcc-4.0.0 snapshot.



Reproduce code:
---
/bin/sh /var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/libtool --silent
--preserve-dup-deps --mode=compile gcc  -Iext/openssl/
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/ -DPHP_ATOM_INC
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/include
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/main
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend -I/usr/include/libxml2
-I/usr/include/freetype2 -I/usr/include/imap
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/mbstring/oniguruma
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/mbstring/libmbfl
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/mbstring/libmbfl/mbfl
-I/usr/include/mysql -I/usr/include/pspell 
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/TSRM  -O2 -mtune=pentium3 
-prefer-pic -c
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c -o
ext/openssl/openssl.lo
In file included from
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_API.h:27,
 from
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/main/php.h:39,
 from
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/libxml/libxml.c:29:
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:34:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:35:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:36:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:37:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:38:
error: array type has incomplete element type
make: *** [ext/libxml/libxml.lo] Error 1
make: *** Waiting for unfinished jobs
In file included from
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_API.h:27,
 from
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/main/php.h:39,
 from
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:28:
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:34:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:35:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:36:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:37:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_modules.h:38:
error: array type has incomplete element type
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c: In
function 'add_assoc_name_entry':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:248:
warning: pointer targets in passing argument 4 of 'add_assoc_stringl_ex'
differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:251:
warning: pointer targets in passing argument 4 of 'add_assoc_stringl_ex'
differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c: In
function 'add_assoc_asn1_string':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:259:
warning: pointer targets in passing argument 4 of 'add_assoc_stringl_ex'
differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c: In
function 'asn1_time_to_time_t':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:282:
warning: pointer targets in passing argument 1 of '_estrdup' differ in
signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c: In
function 'zif_openssl_x509_parse':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:917:
warning: pointer targets in assignment differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c: In
function 'php_openssl_make_REQ':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:1236:
warning: pointer targets in passing argument 3 of
'zend_hash_get_current_key_ex' differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:1236:
warning: pointer targets in passing argument 4 of
'zend_hash_get_current_key_ex' differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:1310:
warning: pointer targets in passing argument 3 of
'zend_hash_get_current_key_ex' differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/openssl/openssl.c:1310:
warning: pointer targets in passing argument 4 of
'zend_hash_get_current_key_ex' differ in signedness
/var/tmp

#32151 [NEW]: empty($i++) not work correctly

2005-03-01 Thread konicekmartin at seznam dot cz
From: konicekmartin at seznam dot cz
Operating system: Linux
PHP version:  4.3.9
PHP Bug Type: Variables related
Bug description:  empty($i++) not work correctly

Description:

I expect that $i=0; echo $empty($i++) return true instead of parse error

Reproduce code:
---
$i=0;
while($i<10){
if(empty($i++)){
echo 'firstline';
} else {
echo $i++;
}
}

Expected result:

Do the same as

$i=0;
while($i<10){
if($i++ == 0){
echo 'firstline';
} else {
echo $i++;
}
}

Actual result:
--
Parse error: parse error, expecting `')'' 

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


#32152 [Opn]: Navigation improvement for bugs.php.net

2005-03-01 Thread amd at store20 dot com
 ID:  32152
 User updated by: amd at store20 dot com
 Reported By: amd at store20 dot com
 Status:  Open
 Bug Type:Feature/Change Request
 PHP Version: Irrelevant
 New Comment:

Duh.. typo in previous patch.

--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:13:43 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/">Bug #

   
   


Previous Comments:


[2005-03-01 16:12:56] amd at store20 dot com

Description:

This patch improves navigation in bugs.php.net page.

Reproduce code:
---
? quick_access_to_bug.diff
Index: bug.php
===
RCS file: /repository/php-bugs-web/bug.php,v
retrieving revision 1.69
diff -u -r1.69 bug.php
--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:10:41 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/?";>Bug #

   
   







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


#31820 [Fbk->Csd]: configuration file not read

2005-03-01 Thread info at netzpilot dot ch
 ID:   31820
 User updated by:  info at netzpilot dot ch
 Reported By:  info at netzpilot dot ch
-Status:   Feedback
+Status:   Closed
 Bug Type: PHP options/info functions
 Operating System: darwin
 PHP Version:  5.0.3
 New Comment:

I tried php5-latest.tar.gz. It works.


Previous Comments:


[2005-02-28 20:53:01] [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-02-02 19:49:17] info at netzpilot dot ch

Description:

The configuration file is not read.
I compiled PHP --with-config-file-path=/etc/httpd and without it. 
I have put a php.ini at /etc/httpd and /usr/local/lib and many more
places.
Always did a restart of apache.
I also gave all rights to php.ini.

Reproduce code:
---
echo "get_cfg_var('cfg_file_path') = " . get_cfg_var('cfg_file_path');


/* and this to check little changes in php.ini */
phpinfo();

Expected result:

the path to php.ini

Actual result:
--
compiled without '--with-config-file-path=/etc/httpd' my phpinfo says 
Configuration File (php.ini) Path: /usr/local/lib

But changes in php.ini there have no effect.





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


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

2005-03-01 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:

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.


Previous Comments:


[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?



[2005-02-05 03:40:03] [EMAIL PROTECTED]

DO NOT email anything to me!! Put any details needed to reproduce this
bug here, via this url:

http://bugs.php.net/bug.php?id=28556&edit=2





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


#32155 [NEW]: Add Object cast support

2005-03-01 Thread anferr at mecon dot gov dot ar
From: anferr at mecon dot gov dot ar
Operating system: Any
PHP version:  Irrelevant
PHP Bug Type: Feature/Change Request
Bug description:  Add Object cast support

Description:

It'll be very useful to add the ability to cast an object to a parent
class.
A simple example could be security: having a base class with attributes,
is extended by another that can do CRUD operations on DB. When passing to
VIEW layer (according to MVC), just do a cast to base object, and CRUD
actions will be disabled.

Reproduce code:
---
class Person {
  protected $age;
  function getAge() { return $this->age; }
  function setAge($age) {$this->age = $age; }
}

class PersonDB extends person {
  function load($id) {
// SQL execution
$this->setAge($resultSet->age);
  }
}

in Model layer:
$objPersonDB = new PersonDB();
$objPersonDB->load($id);

in Controller layer, sends $person to View layer:
$person = (Person)$objPersonDB;

Expected result:

if I call, in View layer:
$person->load(5);
must raise an error

Actual result:
--
cast do nothing, method is invoked.

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


#31792 [Ver->Csd]: getrusage() does not give ru_nswap

2005-03-01 Thread iliaa
 ID:   31792
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bertrand at toggg dot com
-Status:   Verified
+Status:   Closed
 Bug Type: *General Issues
 Operating System: *nix
 PHP Version:  4CVS, 5CVS (2005-02-21)
 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-21 22:34:19] [EMAIL PROTECTED]

This indeed is missing.




[2005-02-14 00:19:10] bertrand at toggg dot com

Thanks vrana !
You're right, it's ru_nswap resource usage number of swap.
(as stated in title). So, back from bogus.
Do you have some answer about why it's not reported ?
à+



[2005-02-13 21:43:20] [EMAIL PROTECTED]

It's not ru_nwsap but ru_nswap (typo).



[2005-02-01 12:37:25] bertrand at toggg dot com

Description:

Although this resource usage is documented in PHP manual getrusage(),
ru_nwsap (number of swap) is not reported.
checking ext/standard/microtime.c, it's obviously not copied in the
returned array.
Does exist a technical reason for that ?
Thanks
bertrand






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


#32152 [Opn->Fbk]: Navigation improvement for bugs.php.net

2005-03-01 Thread pollita
 ID:  32152
 Updated by:  [EMAIL PROTECTED]
 Reported By: amd at store20 dot com
-Status:  Open
+Status:  Feedback
 Bug Type:Feature/Change Request
 PHP Version: Irrelevant
 New Comment:

Since this section only appears *while* the bug in question is being
display, what purpose does providing a link (back to itself) serve?




Previous Comments:


[2005-03-01 16:16:16] amd at store20 dot com

Duh.. typo in previous patch.

--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:13:43 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/">Bug #

   
   



[2005-03-01 16:12:56] amd at store20 dot com

Description:

This patch improves navigation in bugs.php.net page.

Reproduce code:
---
? quick_access_to_bug.diff
Index: bug.php
===
RCS file: /repository/php-bugs-web/bug.php,v
retrieving revision 1.69
diff -u -r1.69 bug.php
--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:10:41 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/?";>Bug #

   
   







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


#32157 [NEW]: mcrypt_create_iv returns same value each time called

2005-03-01 Thread murray at planetthoughtful dot org
From: murray at planetthoughtful dot org
Operating system: WindowsXP
PHP version:  5.0.3
PHP Bug Type: mcrypt related
Bug description:  mcrypt_create_iv returns same value each time called

Description:

For some reason, using mcrypt_create_iv on my system (WinXP, Apache
1.3.28, PHP 5.0.3, mcrypt 2.5.7) usually returns the same value
(specifically, when base64_encoded, the value
"qSqamZGHYAIBHnH8KiVcFwNNgrXbLL7R5Fl6lc4xjwA=") each time called, with
some exceptions.

Exceptions: if the code I have included is executed on my machine again
before approx 15 seconds has elapsed, another number, also fitting into an
expected value, is returned.

To explain:

If I execute the code below once, then wait 15 or 16 seconds, it will
return the same value both times, ie
"qSqamZGHYAIBHnH8KiVcFwNNgrXbLL7R5Fl6lc4xjwA=". If I execute the code,
then a second later I execute the code again, then a second later I
execute the code a third time, THEN I wait 15 seconds and repeat the
execution 3 times, I will get the following base64_encoded values:

qSqamZGHYAIBHnH8KiVcFwNNgrXbLL7R5Fl6lc4xjwA=
DqwXXwbWS0Nkm/7+18Y12zx1JIns87nfTITMx5oOWXI=
pytYv/yDzGw5JlyRm7timBu98nR3vTR7udWwlUVG6gI=
qSqamZGHYAIBHnH8KiVcFwNNgrXbLL7R5Fl6lc4xjwA=
DqwXXwbWS0Nkm/7+18Y12zx1JIns87nfTITMx5oOWXI=
pytYv/yDzGw5JlyRm7timBu98nR3vTR7udWwlUVG6gI=

Obviously I have no idea why waiting approx 15 seconds restarts the cycle,
but the net effect of this is that I generally end up with an $iv value of
"qSqamZGHYAIBHnH8KiVcFwNNgrXbLL7R5Fl6lc4xjwA=", since there is usually a
much longer period between requests to create an initialization vector
value than 15 seconds (at least, it's usually much longer between in the
site I have designed).

I hope this makes sense -- if not, please email me and I will try to
provide what information I can.

Note: I also tried "srand((double) microtime() * 100);" instead of
just "srand();" in case srand() was not being initialized properly for
MCRYPT_RAND, but this made no difference.

Reproduce code:
---
$td = mcrypt_module_open('rijndael-256','','cbc','');
srand();
$iv = mcrypt_create_iv(mcrypt_get_iv_size('rijndael-256','cbc'),
MCRYPT_RAND);
echo base64_encode($iv)."";


Expected result:

I expect $iv to be a different (ie random) value each time the code is
run.

Actual result:
--
If run approx 15 seconds apart, $iv will always be the same. if run more
frequently than 15 seconds apart, the value will follow an expected
progression, rather than being truly random.

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


#32152 [Fbk->Opn]: Navigation improvement for bugs.php.net

2005-03-01 Thread amd at store20 dot com
 ID:  32152
 User updated by: amd at store20 dot com
 Reported By: amd at store20 dot com
-Status:  Feedback
+Status:  Open
 Bug Type:Feature/Change Request
 PHP Version: Irrelevant
 New Comment:

It makes easier to view/refresh the bug information after you have
posted something to the bug and the POSTDATA is present.

For example, bugzilla has this kind of navigation support.


Previous Comments:


[2005-03-01 22:38:15] [EMAIL PROTECTED]

Since this section only appears *while* the bug in question is being
display, what purpose does providing a link (back to itself) serve?





[2005-03-01 16:16:16] amd at store20 dot com

Duh.. typo in previous patch.

--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:13:43 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/">Bug #

   
   



[2005-03-01 16:12:56] amd at store20 dot com

Description:

This patch improves navigation in bugs.php.net page.

Reproduce code:
---
? quick_access_to_bug.diff
Index: bug.php
===
RCS file: /repository/php-bugs-web/bug.php,v
retrieving revision 1.69
diff -u -r1.69 bug.php
--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:10:41 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/?";>Bug #

   
   







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


#32152 [Opn->Csd]: Navigation improvement for bugs.php.net

2005-03-01 Thread pollita
 ID:  32152
 Updated by:  [EMAIL PROTECTED]
 Reported By: amd at store20 dot com
-Status:  Open
+Status:  Closed
 Bug Type:Feature/Change Request
 PHP Version: Irrelevant
 New Comment:

Okay... harmless enough anyway...


Previous Comments:


[2005-03-01 23:03:51] amd at store20 dot com

It makes easier to view/refresh the bug information after you have
posted something to the bug and the POSTDATA is present.

For example, bugzilla has this kind of navigation support.



[2005-03-01 22:38:15] [EMAIL PROTECTED]

Since this section only appears *while* the bug in question is being
display, what purpose does providing a link (back to itself) serve?





[2005-03-01 16:16:16] amd at store20 dot com

Duh.. typo in previous patch.

--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:13:43 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/">Bug #

   
   



[2005-03-01 16:12:56] amd at store20 dot com

Description:

This patch improves navigation in bugs.php.net page.

Reproduce code:
---
? quick_access_to_bug.diff
Index: bug.php
===
RCS file: /repository/php-bugs-web/bug.php,v
retrieving revision 1.69
diff -u -r1.69 bug.php
--- bug.php 27 Oct 2004 07:30:51 -  1.69
+++ bug.php 1 Mar 2005 15:10:41 -
@@ -220,7 +220,7 @@
 
  
   
-   Bug #
+   http://bugs.php.net/?";>Bug #

   
   







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


#31792 [Csd]: getrusage() does not give ru_nswap

2005-03-01 Thread bertrand at toggg dot com
 ID:   31792
 User updated by:  bertrand at toggg dot com
 Reported By:  bertrand at toggg dot com
 Status:   Closed
 Bug Type: *General Issues
 Operating System: *nix
 PHP Version:  4CVS, 5CVS (2005-02-21)
 New Comment:

Thank YOU guys DOING PHP better.
Longing to get the change :)
à+


Previous Comments:


[2005-03-01 22:34:33] [EMAIL PROTECTED]

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.





[2005-02-21 22:34:19] [EMAIL PROTECTED]

This indeed is missing.




[2005-02-14 00:19:10] bertrand at toggg dot com

Thanks vrana !
You're right, it's ru_nswap resource usage number of swap.
(as stated in title). So, back from bogus.
Do you have some answer about why it's not reported ?
à+



[2005-02-13 21:43:20] [EMAIL PROTECTED]

It's not ru_nwsap but ru_nswap (typo).



[2005-02-01 12:37:25] bertrand at toggg dot com

Description:

Although this resource usage is documented in PHP manual getrusage(),
ru_nwsap (number of swap) is not reported.
checking ext/standard/microtime.c, it's obviously not copied in the
returned array.
Does exist a technical reason for that ?
Thanks
bertrand






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


#32158 [NEW]: imap_headerinfo() function can crash

2005-03-01 Thread matti dot aarnio at kv9 dot net
From: matti dot aarnio at kv9 dot net
Operating system: Solaris 8
PHP version:  5.0.3
PHP Bug Type: Reproducible crash
Bug description:  imap_headerinfo() function can crash

Description:

We have php-4.3.10  and  php-5.0.3 crashing in identical manner.  That
isn't surprising given that relevant code inside PHPs is identical.

C-Client -library is from UW-IMAP 2004c1, and oldish IMP script is asking
for headers of following message:
(addresses obfuscated, but structure left intact)


>From [EMAIL PROTECTED] Tue Oct 12 17:18:14 2004
Received: from mx4.uuu.fi ([193.167.224.118]:48474 "EHLO mx4.uuu.fi"
TLS-CIPHER: ) by mail.dnainternet.net with ESMTP
id S199057AbUJLOSO (ORCPT
);
Tue, 12 Oct 2004 17:18:14 +0300
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx4.uuu.fi (8.12.10/8.12.10) with ESMTP id i9CEIC9I018154
for <[EMAIL PROTECTED]>; Tue, 12 Oct 2004 17:18:12
+0300
From:   "Oooo Nnnn" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" 
 =?ISO-8859-1?Q?=20?=
Date:   Tue, 12 Oct 2004 17:18:08 +0300
MIME-Version: 1.0
Subject:
=?ISO-8859-1?Q?kfjsdkfjksdjfksdjfk_dsfsdfds=E4sfsdfsdf_28.10._sfsdfdsfsdf=E4
_sdfsdfsd_sdfsdf_sdfsdfs?=
CC: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: Quoted-printable
Content-description: Mail message body


A debug session gave functional libphp, when I preallocated excessively
large string spaces in the php_imap.c::_php_imap_parse_address() 
function.
Throwing in an extra kilobyte safety buffer for malloc()s just in case
does not match my idea of sensible code, however.  (Nor does it feel
_safe_.)

Used C-Client API is an abomination in itself, its caller must have
sufficient buffer space, but there is no way to ask it to tell of how much
must be allocated, and while PHP tries do figure that out, under some
conditions with abnormal input it fails miserably, and the 
rfc822_write_address()  will scribble over the end of malloc()ed buffer
space, along with all merryment that such things cause...


The least harm that happens is heap corruption, and Apache/PHP instance
crashing.
Can it lead to execution of arbitrary code in apache, that I won't
speculate about.


Reproduce code:
---
Oldish IMP installation calling   imap_headerinfo().
Any PHP-webmail setup should do with IMAP access to message store.



Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0xff1c158c in _malloc_unlocked () from /usr/lib/libc.so.1
(gdb) where
#0  0xff1c158c in _malloc_unlocked () from /usr/lib/libc.so.1
#1  0xff1c1414 in malloc () from /usr/lib/libc.so.1
#2  0xfefdc060 in _emalloc (size=44) at
/home/mea/src/php-4.3.10/Zend/zend_alloc.c:164
#3  0xfeff140c in zend_hash_add_or_update (ht=0x4d8458, arKey=0xff0af130
"personal", 
nKeyLength=9, pData=0xffbe3d1c, nDataSize=4, pDest=0x0, flag=1)
at /home/mea/src/php-4.3.10/Zend/zend_hash.c:275
#4  0xfefefd74 in add_property_string_ex (arg=0x4cf8d0, key=0xff0af130
"personal", 
key_len=9, 
str=0x4bacf0 "[EMAIL PROTECTED] 
=?ISO-8859-1?Q?=20", duplicate=1) at
/home/mea/src/php-4.3.10/Zend/zend_API.c:980
#5  0xfef1105c in _php_imap_parse_address (addresslist=0xffbe3d94,
fulladdress=0x290, 
paddress=0x4cf8f8) at
/home/mea/src/php-4.3.10/ext/imap/php_imap.c:3701
#6  0xfef112f4 in _php_make_header_object (myzvalue=0x4d02a0,
en=0x4bac90)
at /home/mea/src/php-4.3.10/ext/imap/php_imap.c:3733
#7  0xfef07f78 in zif_imap_headerinfo (ht=4957520, return_value=0x4d02a0,
this_ptr=0x0, 
return_value_used=1) at
/home/mea/src/php-4.3.10/ext/imap/php_imap.c:1506
#8  0xfefffba8 in execute (op_array=0x373880)
at /home/mea/src/php-4.3.10/Zend/zend_execute.c:1642
#9  0xfefed900 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/mea/src/php-4.3.10/Zend/zend.c:900
#10 0xfefbeb98 in php_execute_script (primary_file=0xffbef620)
at /home/mea/src/php-4.3.10/main/main.c:1736
#11 0xff0061f4 in apache_php_module_main (r=0x1cc7b8,
display_source_mode=0)
at /home/mea/src/php-4.3.10/sapi/apache/sapi_apache.c:54
#12 0xff00726c in send_php (r=0x1cc7b8, display_source_mode=0,
filename=0x0)
at /home/mea/src/php-4.3.10/sapi/apache/mod_php4.c:621
#13 0xff007310 in send_parsed_php (r=0x1cc7b8)
at /home/mea/src/php-4.3.10/sapi/apache/mod_php4.c:636
#14 0x843c0 in ap_invoke_handler ()
#15 0xa26dc in process_request_internal ()


-- 
Edit bug report at http://bugs.php.net/?id=32158&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32158&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32158&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32158&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=32158&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=32158&r=alreadyfixed
Need backtrace:   

#31900 [Fbk->NoF]: Location redirects don't work, HTTP 200 instead HTTP 302

2005-03-01 Thread php-bugs
 ID:   31900
 Updated by:   php-bugs@lists.php.net
 Reported By:  rogeliotg2004 at yahoo dot es
-Status:   Feedback
+Status:   No Feedback
 Bug Type: HTTP related
 Operating System: Linux Mandrake 10.1
 PHP Version:  4.3.10
 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-10 14:31:11] [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 16:36:04] rogeliotg2004 at yahoo dot es

Description:

I have apache 2.0.50 on linux mandrake 10.1. I had php 4.3.8, now I've
installed 4.3.10 by  urpmi.
Then I got the mentioned problem, when I use header("location: ...),
the header is sended in the response, but the HTTP 302 sended in 4.3.8
is now a HTTP 200.
Try whatever script that you want, with a location like a full or
relative URL.
Best Regards,

Reproduce code:
---


Expected result:

HTTP/1.x 302 found
Location: www.google.com
...more headers



Actual result:
--
HTTP/1.x 200 OK

Location: www.google.com
...more headers







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


#32160 [NEW]: Copying a file into itself leads to data loss

2005-03-01 Thread chernyshevsky at hotmail dot com
From: chernyshevsky at hotmail dot com
Operating system: Win32/Linux 
PHP version:  4.3.10
PHP Bug Type: Filesystem function related
Bug description:  Copying a file into itself leads to data loss

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


#32161 [NEW]: com_exception message filed string reformat

2005-03-01 Thread baoshi dot zhu at gmail dot com
From: baoshi dot zhu at gmail dot com
Operating system: Windows XP/2000
PHP version:  5.0.3
PHP Bug Type: COM related
Bug description:  com_exception message filed string reformat

Description:

When a COM exception occurs, the error message produced by COM application
can be obtained from 'message' in com_exception object. However the string
is truncated with some characters wrapping to the front.

Reproduce code:
---
 try {
$word = new COM("word.application"); 
$doc = $word->Documents->Open($docfile);
$doc->Activate();
$doc->PrintOut();
$doc->Close();
   $word->Quit();
} catch (com_exception $e) {
if ($doc) $doc->Close();
if ($word) $word->Quit();
print "Error occured at " . $e->getFile() . "(" . $e->getLine() .
")\n";
print $e->getMessage() . "\n";
}

Expected result:

If $docfile does not exists, VBA will return

Error: This file could not be found.
Try one or more of the following:
*Check the spelling of the name of the document.
*Try a different file name. (c:\test1.doc)



Actual result:
--
Description: This file could not be found.
Try one or more of the following:
* Check the spelling of the name of the document.
 (C:\test1.doc)nt file name.
 ^^

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


#32128 [Fbk->Opn]: Memory leak

2005-03-01 Thread i at downfire dot com
 ID:   32128
 User updated by:  i at downfire dot com
 Reported By:  i at downfire dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Performance problem
 Operating System: linux RH 8.0 Kernel 2.4.x
 PHP Version:  4.3.10
 New Comment:

well, i don't realy know what couses the overflow in the script. I get
no error about it in de logs anyware. 

The only thing i can say is that the script is avalible at
www.subdreamer.com (light version) witch couses the problem. Any other
script does not couse a overflow.


Previous Comments:


[2005-03-01 13:21:54] [EMAIL PROTECTED]

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

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-02-28 23:09:18] i at downfire dot com

I can't find the apxs anywhere tho, the only one the find command found
is the apxs in the apache bin directory.

[EMAIL PROTECTED] /]# find / -name 'apxs'
/root/system_setup/httpd-2.0.45/support/apxs
/root/system_setup/httpd-2.0.53/support/apxs
/root/system_setup/apache_1.3.33/src/support/apxs
/usr/local/apache2/bin/apxs
/usr/local/apache/bin/apxs
/opt/casp/components/apache-bundle/INSTALL/templates/apxs

And when is exec on the apache 2.0.53 apxs i get:
[EMAIL PROTECTED] bin]# ./apxs -q MPM_NAME
prefork

This the standard for apache i think since i never changed it.

Btw, the 1.3.33 version of apache with php 4.3.9 works great. But the
upgrade to 4.3.10 on apache 1.3.33 does also suck my memory when i exec
the script so i realy think this has to do with the php then the apache
server since i never had this with 4.3.9 on Apache2.

I find it verry strange.



[2005-02-28 20:32:04] [EMAIL PROTECTED]

What does this output:

# apxs -q MPM_NAME

(find the path to apxs if it's not in your PATH already)




[2005-02-28 14:03:15] i at downfire dot com

The bundeld MPM that's in the apache2 tar?

I never installed any other so it sould be standard.



[2005-02-28 13:28:19] [EMAIL PROTECTED]

What MPM are you using with Apache2 ?




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

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


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

2005-03-01 Thread paul at wavebreaks dot com
From: paul at wavebreaks dot com
Operating system: Windows XP SP2
PHP version:  5.0.3
PHP Bug Type: Directory function related
Bug description:  dirname returning \ for root entries

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


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

2005-03-01 Thread sniper
 ID:   32099
 Updated by:   [EMAIL PROTECTED]
 Reported By:  terryoh at wins21 dot com
-Status:   Open
+Status:   Feedback
 Bug Type: COM related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.8
 New Comment:

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.



Previous Comments:


[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