#36337 [Asn]: ReflectionProperty fails to return correct visibility

2006-02-10 Thread denis at edistar dot com
 ID:   36337
 User updated by:  denis at edistar dot com
 Reported By:  denis at edistar dot com
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  5.1.2
 Assigned To:  ilia
 New Comment:

The ReflectionProperty class is correctly checking for myEnum->_values
property (not for enum->_values) but it returns the visibilty of
enum->_values instead of myEnum->_values.

get_class($this) in the enum constructor returns correctly myEnum, so
the line "$property = new
ReflectionProperty(get_class($this),'_values');" is equivalent to
writing "$property = new ReflectionProperty('myEnum','_values');".

The problem remains also if i write this code outside the classes
definitions:

$property = new ReflectionProperty('myEnum','_values');
if($property->isProtected()) {
throw new Exception("Property _values must be declared as
protected");
}

Thank you,
Denis


Previous Comments:


[2006-02-09 19:33:56] [EMAIL PROTECTED]

Ilia, the fix is similar to the fix applied to #36308.



[2006-02-09 19:10:10] [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

Parent constructor returns information about the parent class, no bug
here.



[2006-02-09 12:12:27] denis at edistar dot com

Description:

I have a base abstract class that defines a property to be 
protected and that also checks this runtime using the 
reflection api. 
 
My purpose is to enforce the extending class to declare 
that property as protected too. 
 
The reflection api returns me wrong information. It 
returns always that the property is protected (as defined 
in the base class), ignoring the definition of the 
extending class. 

Reproduce code:
---
abstract class enum {
protected $_values;

public function __construct() {
$property = new
ReflectionProperty(get_class($this),'_values');
if(!$property->isProtected()) {
throw new Exception("Property _values must be declared as
protected");
}
}

}

final class myEnum extends enum {
public $_values = array(
   0 => 'No value',
   1 => 'Value n.1',
   2 => 'Value n.2',
   4 => 'Value n.4'
   );
}

$x = new myEnum();


Expected result:

Fatal error: Uncaught exception 'Exception' with message 
'Property _values must be declared as protected' 
  

Actual result:
--
No exception is thrown 





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


#36241 [NoF->Opn]: explode causes segm fault

2006-02-10 Thread steinm
 ID:   36241
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux on PowerPC
-PHP Version:  6CVS-2006-02-01 (CVS)
+PHP Version:  6CVS-2006-02-10 (CVS)
 New Comment:

I just updated my cvs working copy and the error has slightly changed
but is still there.

The following script causes the trouble:

It's not segm fault anymore but that doesn't  make much of a
difference. zend_parse_parameters() just returns bogus.
Here is a gdb session:

[EMAIL PROTECTED]:/tmp$ gdb  /usr/local/php5-cvs/bin/php
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "powerpc-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) break string.c:1099
Breakpoint 1 at 0x101fada4: file
/home/cvs/php/php-src/ext/standard/string.c, line 1099.
(gdb) run -f explode.php
Starting program: /home/local/php5-cvs/bin/php -f explode.php
warning: Lowest section in /usr/lib/libicudata.so.34 is .hash at
0094
[Thread debugging using libthread_db enabled]
[New Thread 805588960 (LWP 20645)]
[Switching to Thread 805588960 (LWP 20645)]

Breakpoint 1, zif_explode (ht=2, return_value=0x1069ca68,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/cvs/php/php-src/ext/standard/string.c:1099
1099if ( zend_parse_parameters(argc TSRMLS_CC, "TT|l",
&delim, &delim_len, &delim_type,
(gdb) next
1104if ( delim_len == 0 ) {
(gdb) print str
$1 = (void *) 0xb7
(gdb) print delim
$2 = (void *) 0x1040345c
(gdb) print str_len
$3 = 16
(gdb) print delim_len
$4 = 0
(gdb) print (char *) delim
$5 = 0x1040345c "/home/cvs/php/php-src/Zend/zend_vm_execute.h"

If continue the program I get a php error message because the delim
string is empty.

  Uwe


Previous Comments:


[2006-02-09 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".



[2006-02-01 11:15:33] [EMAIL PROTECTED]

Can't reproduce on i386 both in Unicode and regular modes.



[2006-02-01 09:23:20] [EMAIL PROTECTED]

Description:

This simple script causes a segm fault




php_explode (delim=0xed82208 "", delim_len=2147450528,
str=0x3c , str_len=249048784,
str_type=0 '\0',
return_value=0x106ce240, limit=-1) at zend_operators.h:215
215 char ne = needle[needle_len-1];
(gdb) bt
#0  php_explode (delim=0xed82208 "", delim_len=2147450528,
str=0x3c , str_len=249048784,
str_type=0 '\0',
return_value=0x106ce240, limit=-1) at zend_operators.h:215
#1  0x1022b380 in zif_explode (ht=2, return_value=0x106ce240,
return_value_ptr=, this_ptr=,
return_value_used=)
at /home/cvs/php/php-src/ext/standard/string.c:1137
#2  0x1030b414 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fff7f80)
at zend_vm_execute.h:201
#3  0x1030a8e4 in execute (op_array=0x106ce0e8) at
zend_vm_execute.h:92
#4  0x102dc0b8 in zend_execute_scripts (type=8, retval=0x1022b380,
file_count=3)
at /home/cvs/php/php-src/Zend/zend.c:1806
#5  0x1027bf7c in php_execute_script (primary_file=0x7fffa4e4)
at /home/cvs/php/php-src/main/main.c:1846
#6  0x103d6348 in main (argc=3, argv=0x7fffaac4)
at /home/cvs/php/php-src/sapi/cli/php_cli.c:1090







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


#36348 [Opn->Bgs]: file created with 0 bytes

2006-02-10 Thread tony2001
 ID:   36348
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gopi at opineum dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Linux Fedora cre 4
 PHP Version:  5.1.2
 New Comment:

Please report bugs in PECL packages to PECL bugsystem:
http://pecl.php.net/bugs/
Thanks.


Previous Comments:


[2006-02-10 08:50:57] gopi at opineum dot com

Description:

when i create file having some text in remote server via ssh2 functions
ssh2_scp_send($connection, '/tmp/ieke.com', '/var/named/ieke.com',
0777); file is created in remote machine with 0 bytes without no data
is here.., But sometimes file is created with actual bytes... when keep
on trying!

Reproduce code:
---
ssh2_scp_send($connection, '/tmp/ieke.com', '/var/named/ieke.com',
0777);

Expected result:

file should trnasferred from local system to remote system suceesfully
without any data errors






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


#36348 [Bgs->Opn]: file created with 0 bytes

2006-02-10 Thread gopi at opineum dot com
 ID:   36348
 User updated by:  gopi at opineum dot com
 Reported By:  gopi at opineum dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Unknown/Other Function
-Operating System: Linux Fedora cre 4
+Operating System: Linux Fedora c0re 4
-PHP Version:  5.1.2
+PHP Version:  5.0.4
 New Comment:

this is not bogus kindly accept and check


Previous Comments:


[2006-02-10 10:06:48] [EMAIL PROTECTED]

Please report bugs in PECL packages to PECL bugsystem:
http://pecl.php.net/bugs/
Thanks.



[2006-02-10 08:50:57] gopi at opineum dot com

Description:

when i create file having some text in remote server via ssh2 functions
ssh2_scp_send($connection, '/tmp/ieke.com', '/var/named/ieke.com',
0777); file is created in remote machine with 0 bytes without no data
is here.., But sometimes file is created with actual bytes... when keep
on trying!

Reproduce code:
---
ssh2_scp_send($connection, '/tmp/ieke.com', '/var/named/ieke.com',
0777);

Expected result:

file should trnasferred from local system to remote system suceesfully
without any data errors






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


#36348 [Opn->Bgs]: file created with 0 bytes

2006-02-10 Thread tony2001
 ID:   36348
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gopi at opineum dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Linux Fedora c0re 4
 PHP Version:  5.0.4
 New Comment:

It's not bogus, but it's reported in the wrong place.
Please re-read what I said.


Previous Comments:


[2006-02-10 10:22:55] gopi at opineum dot com

this is not bogus kindly accept and check



[2006-02-10 10:06:48] [EMAIL PROTECTED]

Please report bugs in PECL packages to PECL bugsystem:
http://pecl.php.net/bugs/
Thanks.



[2006-02-10 08:50:57] gopi at opineum dot com

Description:

when i create file having some text in remote server via ssh2 functions
ssh2_scp_send($connection, '/tmp/ieke.com', '/var/named/ieke.com',
0777); file is created in remote machine with 0 bytes without no data
is here.., But sometimes file is created with actual bytes... when keep
on trying!

Reproduce code:
---
ssh2_scp_send($connection, '/tmp/ieke.com', '/var/named/ieke.com',
0777);

Expected result:

file should trnasferred from local system to remote system suceesfully
without any data errors






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


#36349 [NEW]: Unable to load libraries dynamically using a shell script

2006-02-10 Thread xavier dot bordes at urssaf dot fr
From: xavier dot bordes at urssaf dot fr
Operating system: Unixware 7.1.4
PHP version:  5.1.2
PHP Bug Type: CGI related
Bug description:  Unable to load libraries dynamically using a shell script

Description:

Using  PHP Version 5.0.4 scripts in  a command line under UnixWare we
obtain systematically these messages: 

PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libdbg.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
OnUpdateLong; referenced from: /appl/php/php_rnd/modules/libdbg.so in
Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libbcompiler.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
compiler_globals; referenced from:
/appl/php/php_rnd/modules/libbcompiler.so in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libdocubase.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
executor_globals; referenced from:
/appl/php/php_rnd/modules/libdocubase.so in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libxmlreader.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
empty_string; referenced from: /appl/php/php_rnd/modules/libxmlreader.so
in Unknown on line 0


If we use Apache to execute the same scripts all is  OK ! All libraries
are functional and we can use these quietly.

The LD_LIBRARY_PATH are the same and PHP try to load the libraries at the
right place.

All permissions are 777 for each library.

We are suspecting a compilation flag because our system engineer did a new
compilation recently. He is now in India for a couple of weeks.

Who can give us an Idea ?



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


#36349 [Opn->Bgs]: Unable to load libraries dynamically using a shell script

2006-02-10 Thread tony2001
 ID:   36349
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xavier dot bordes at urssaf dot fr
-Status:   Open
+Status:   Bogus
 Bug Type: CGI related
 Operating System: Unixware 7.1.4
 PHP Version:  5.1.2
 New Comment:

Looks like you forgot to update PHP CLI and it is trying to use
extensions from newer version of PHP.
Anyway, it's not PHP problem and I'd say such questions should be asked
in the list.


Previous Comments:


[2006-02-10 10:37:56] xavier dot bordes at urssaf dot fr

Description:

Using  PHP Version 5.0.4 scripts in  a command line under UnixWare we
obtain systematically these messages: 

PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libdbg.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
OnUpdateLong; referenced from: /appl/php/php_rnd/modules/libdbg.so in
Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libbcompiler.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
compiler_globals; referenced from:
/appl/php/php_rnd/modules/libbcompiler.so in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libdocubase.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
executor_globals; referenced from:
/appl/php/php_rnd/modules/libdocubase.so in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/appl/php/php_rnd/modules/libxmlreader.so' - dynamic linker:
/appl/php/php_rnd/bin/php: relocation error: symbol not found:
empty_string; referenced from:
/appl/php/php_rnd/modules/libxmlreader.so in Unknown on line 0


If we use Apache to execute the same scripts all is  OK ! All libraries
are functional and we can use these quietly.

The LD_LIBRARY_PATH are the same and PHP try to load the libraries at
the right place.

All permissions are 777 for each library.

We are suspecting a compilation flag because our system engineer did a
new compilation recently. He is now in India for a couple of weeks.

Who can give us an Idea ?







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


#36345 [Opn]: Problem loading BLOB over 1MB

2006-02-10 Thread milanm at datax dot biz
 ID:   36345
 User updated by:  milanm at datax dot biz
 Reported By:  milanm at datax dot biz
 Status:   Open
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

I found something strange in ext/pdo_mysql/mysql_statement.c
There is constant defined called PDO_MYSQL_MAX_BUFFER like this:
#define PDO_MYSQL_MAX_BUFFER 1024*1024
I've changed this to:
#define PDO_MYSQL_MAX_BUFFER 1024*1024*10
and recompiled PHP.
Now PDO loads whole 1.5MB from DB.
Hope that helps.


Previous Comments:


[2006-02-09 22:48:44] milanm at datax dot biz

When I run code bellow everithing is OK and data are 1.5 MB big. I've
also tried to downgrade mysql to 4.1 and recompile php but with no
results. Same problem persits with PDO using client library 4.1.14.




[2006-02-09 20:07:54] milanm at datax dot biz

Description:

I got a table and a stored 1.5 MB image in it. But when i try to load
it into variable using PDO it has only 1MB. I'm using pdo_mysql client
library 5.0.18.

Reproduce code:
---
prepare('SELECT data FROM test WHERE id=:id');
  $stmt->bindParam(':id', $blob_id, PDO::PARAM_INT);

  $mysql_pdo->beginTransaction();
  $stmt->execute();
  $mysql_pdo->commit();

  $stmt->bindColumn(1, $blob_fp, PDO::PARAM_LOB);

  $stmt->fetchAll(PDO::FETCH_BOUND);

  header('Content-Type: image/jpeg');
  print $blob_fp;

?>
Table looks like this:

CREATE TABLE test (
  id  INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  nameVARCHAR(10) NOT NULL,
  dataLONGBLOB NOT NULL,
  PRIMARY KEY id (id),
  UNIQUE KEY name (name)
) type=InnoDB;







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


#36350 [NEW]: php 4.4.2 remote fopen php4ts access violation crash

2006-02-10 Thread valexa at nextcode dot org
From: valexa at nextcode dot org
Operating system: Windows NT 2k/xp
PHP version:  4.4.2
PHP Bug Type: Sockets related
Bug description:  php 4.4.2 remote fopen php4ts access violation crash

Description:

How i tested :
tested on win200 and winxp , official binary releases virgin unmodified ,

tested also with no extensions loaded , same behaviour , 
tested also with the 4.4.1 php4ts.dll on 4.4.2 , no crash

Upon running any php script that reads a url/remote file i get a crash in
php 4.4.2

The instruction at "0x100c5fca" referenced memory at "0x0035". The
memory could not be "read".

Unhandled exception in php.exe (PHP4TS.DLL): 0xC005: Access
Violation.

assembly dump folows 

100C5FAB   mov eax,dword ptr [esi+8]
100C5FAE   or  eax,8000h
100C5FB3   mov dword ptr [esi+8],eax
100C5FB6   pop esi
100C5FB7   ret
100C5FB8   mov eax,[10161E18]
100C5FBD   testeax,eax
100C5FBF   je  100C5FC3
100C5FC1   calleax
100C5FC3   mov edx,dword ptr [edi]
100C5FC5   mov eax,[10161D8C]
100C5FCA   mov eax,dword ptr [edx+eax*4-4] -crashes here 
100C5FCE   cmp esi,dword ptr [eax]
100C5FD0   jne 100C5FD8
100C5FD2   mov ecx,dword ptr [esi]
100C5FD4   mov dword ptr [eax],ecx
100C5FD6   jmp 100C5FDF
100C5FD8   mov edx,dword ptr [esi+4]
100C5FDB   mov eax,dword ptr [esi]
100C5FDD   mov dword ptr [edx],eax
100C5FDF   mov eax,dword ptr [esi]
100C5FE1   testeax,eax
100C5FE3   je  100C5FEB


Reproduce code:
---

http://www.php.net/downloads.php');
echo "hadn't crashed";
?>


Expected result:

C:\php-4.4.1-Win32>php bug.php
X-Powered-By: PHP/4.4.1
Content-type: text/html


crash nowhadn't crashed
C:\php-4.4.1-Win32>


Actual result:
--
C:\php-4.4.2-Win32>php bug.php
X-Powered-By: PHP/4.4.2
Content-type: text/html


crash now
C:\php-4.4.2-Win32>

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


#36350 [Opn->Fbk]: php 4.4.2 remote fopen php4ts access violation crash

2006-02-10 Thread tony2001
 ID:   36350
 Updated by:   [EMAIL PROTECTED]
 Reported By:  valexa at nextcode dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows NT 2k/xp
 PHP Version:  4.4.2
 New Comment:

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




Previous Comments:


[2006-02-10 12:54:53] valexa at nextcode dot org

Description:

How i tested :
tested on win200 and winxp , official binary releases virgin unmodified
, 
tested also with no extensions loaded , same behaviour , 
tested also with the 4.4.1 php4ts.dll on 4.4.2 , no crash

Upon running any php script that reads a url/remote file i get a crash
in php 4.4.2

The instruction at "0x100c5fca" referenced memory at "0x0035". The
memory could not be "read".

Unhandled exception in php.exe (PHP4TS.DLL): 0xC005: Access
Violation.

assembly dump folows 

100C5FAB   mov eax,dword ptr [esi+8]
100C5FAE   or  eax,8000h
100C5FB3   mov dword ptr [esi+8],eax
100C5FB6   pop esi
100C5FB7   ret
100C5FB8   mov eax,[10161E18]
100C5FBD   testeax,eax
100C5FBF   je  100C5FC3
100C5FC1   calleax
100C5FC3   mov edx,dword ptr [edi]
100C5FC5   mov eax,[10161D8C]
100C5FCA   mov eax,dword ptr [edx+eax*4-4] -crashes here 
100C5FCE   cmp esi,dword ptr [eax]
100C5FD0   jne 100C5FD8
100C5FD2   mov ecx,dword ptr [esi]
100C5FD4   mov dword ptr [eax],ecx
100C5FD6   jmp 100C5FDF
100C5FD8   mov edx,dword ptr [esi+4]
100C5FDB   mov eax,dword ptr [esi]
100C5FDD   mov dword ptr [edx],eax
100C5FDF   mov eax,dword ptr [esi]
100C5FE1   testeax,eax
100C5FE3   je  100C5FEB


Reproduce code:
---

http://www.php.net/downloads.php');
echo "hadn't crashed";
?>


Expected result:

C:\php-4.4.1-Win32>php bug.php
X-Powered-By: PHP/4.4.1
Content-type: text/html


crash nowhadn't crashed
C:\php-4.4.1-Win32>


Actual result:
--
C:\php-4.4.2-Win32>php bug.php
X-Powered-By: PHP/4.4.2
Content-type: text/html


crash now
C:\php-4.4.2-Win32>





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


#36338 [Bgs]: Integer Timestamps are not enough!

2006-02-10 Thread derick
 ID:   36338
 Updated by:   [EMAIL PROTECTED]
 Reported By:  carsten dot moldenhauer at mailbox dot tu-dresden dot
   d
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

Also the new date/time functionality does support 64 bits... except
that it's not enabled yet


Previous Comments:


[2006-02-09 14:51:25] [EMAIL PROTECTED]

This is OS limitation and PHP has nothing to do with it.



[2006-02-09 12:27:36] carsten dot moldenhauer at mailbox dot tu-dresden
dot d

Description:

Hello PHP Team.

I recently discovered a problem with standard timestamps. They are
stored as integers. Integers have a range up to 2147483647.

date( "Y-m-d H:i:s", 2147483647 ) results in:
2038-01-19 04:14:07

If you got a date after 2038 in text format and want to convert it to
integer, you will get back 2147483647. So you are back in 2038 again.

I would dislike to see all the time related PHP applications break on
the above date.

Is there any possibility to switch timestamps to long?
(btw, the same occurs with dates before 1901-12-13 21:45:52 which is
date( "Y-m-d H:i:s, -2147483648 ))

I am looking forward to your answers.






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


#36351 [NEW]: parse_url does not parse path correctly.

2006-02-10 Thread adam at nojszewski dot com
From: adam at nojszewski dot com
Operating system: 
PHP version:  5.1.2
PHP Bug Type: URL related
Bug description:  parse_url does not parse path correctly.

Description:

parse_url does not parses 'scheme:path' when path consists of numbers
only. 

skype:anojszewski is parsed right.
gg:9130731 is parsed wrong (whole URL is treated as path).


Tested on versions 5.1.2 and 4.4.2.

Adam Nojszewski

Reproduce code:
---
print_r(parse_url("skype:anojszewski"));
print_r(parse_url("gg:9130731"));


Expected result:

Array
(
[scheme] => skype
[path] => anojszewski
)
Array
(
[scheme] => gg
[path] => 9130731
)

Actual result:
--
Array
(
[scheme] => skype
[path] => anojszewski
)
Array
(
[path] => gg:9130731
)

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


#36140 [Ana->Fbk]: mb_encode_mimeheader not working properly

2006-02-10 Thread hirokawa
 ID:   36140
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sugan_b at yahoo dot co dot in
-Status:   Analyzed
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: FC3
 PHP Version:  5.1.2
 Assigned To:  hirokawa
 New Comment:

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

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

Thank you for your interest in PHP.





Previous Comments:


[2006-02-06 15:09:18] [EMAIL PROTECTED]

Could you please check it by the simpler script ?

php.ini:
 mbstring.language = Japanese
 mbstring.internal_encoding = EUC-JP

sample.php:

It works well or  not ?
If the result is a correct MIME encoded string, 
mb_encode_mimeheader() work fine.




[2006-01-25 10:58:04] [EMAIL PROTECTED]

Rui, can you check this out please?



[2006-01-24 12:18:54] sugan_b at yahoo dot co dot in

The actual result obtained is:
【問合】
メールのSubjectが8;z2=$1$7$F$7$^$$$^$9



[2006-01-24 12:15:12] sugan_b at yahoo dot co dot in

Description:

 A small part of my application(using only PHP 5.1.2 and Apache 2.2.0)
incorporates mailing functionality which uses
"mb_encode_mimeheader()".I am using ISO-2202-JP charset but Multibyte
characters written in ISO-2202-JP charset code are not sent to the 
receiver correctly.



Reproduce code:
---
index.php





test   
To¡§
Subject¡§ 
   



send.php:









Mail Sending has Completed.




Actual result:
--
Actual Result:
The value of Subject field :
 問合】
メールのSubjectが8;z2=$1$7$F$7$^$$$^$9


I have configured php using --enable-mbstring=all option.





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


#36352 [NEW]: writing to max sized file "crashes" php/apache

2006-02-10 Thread michael202 at gmx dot de
From: michael202 at gmx dot de
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: Reproducible crash
Bug description:  writing to max sized file "crashes" php/apache

Description:

a log-file has reached its maxmimum file size allowed by the 
operation and file system.

Appending further additional byte to this file ends the php and apache
process without any message. Nothing in error_log and console output.

Script procession simply stops.


Reproduce code:
---
  function append_to_file($aFilename, $aData)
  {
clearstatcache();

  $fh = fopen($aFilename, 'a');
  if ($fh === false) {
return (-1);
  }
  $result = fwrite($fh, $aData);
  fclose($fh);

return ($result);
  }


Expected result:

Error Message or Warning and script continues to execute

tested with
php 5.1.2 and 5.0.5


Actual result:
--
script stopped/ended without any notice


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


#36351 [Opn]: parse_url does not parse path correctly.

2006-02-10 Thread adam at nojszewski dot com
 ID:  36351
 User updated by: adam at nojszewski dot com
 Reported By: adam at nojszewski dot com
 Status:  Open
 Bug Type:URL related
 PHP Version: 5.1.2
 New Comment:

I have found a cause of this behavior

URL like string:number are generaly treated as host:port when nuber is
[0,65535]. 

When number is [65536,9] function wraps it to values [0,34463]. 

When nuber is more than 5 digits long function treats it as part of a
path.

But web browsers treat specific combinations (i.e. 'mailto:555') not as
host:port, but as scheme:path.


Previous Comments:


[2006-02-10 14:09:26] adam at nojszewski dot com

Description:

parse_url does not parses 'scheme:path' when path consists of numbers
only. 

skype:anojszewski is parsed right.
gg:9130731 is parsed wrong (whole URL is treated as path).


Tested on versions 5.1.2 and 4.4.2.

Adam Nojszewski

Reproduce code:
---
print_r(parse_url("skype:anojszewski"));
print_r(parse_url("gg:9130731"));


Expected result:

Array
(
[scheme] => skype
[path] => anojszewski
)
Array
(
[scheme] => gg
[path] => 9130731
)

Actual result:
--
Array
(
[scheme] => skype
[path] => anojszewski
)
Array
(
[path] => gg:9130731
)





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


#36350 [Fbk->Csd]: php 4.4.2 remote fopen php4ts access violation crash

2006-02-10 Thread valexa at nextcode dot org
 ID:   36350
 User updated by:  valexa at nextcode dot org
 Reported By:  valexa at nextcode dot org
-Status:   Feedback
+Status:   Closed
 Bug Type: Sockets related
 Operating System: Windows NT 2k/xp
 PHP Version:  4.4.2
 New Comment:

with latest stable bug can not be replicated
seems like it is fixed but the PHP Quality Assurance Team goofed big
time on php 4.4.2

C:\php4-win32-STABLE-latest>php bug.php
X-Powered-By: PHP/4.4.3-dev
Content-type: text/html


crash nowhadn't crashed
C:\php4-win32-STABLE-latest>


Previous Comments:


[2006-02-10 12:58:19] [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





[2006-02-10 12:54:53] valexa at nextcode dot org

Description:

How i tested :
tested on win200 and winxp , official binary releases virgin unmodified
, 
tested also with no extensions loaded , same behaviour , 
tested also with the 4.4.1 php4ts.dll on 4.4.2 , no crash

Upon running any php script that reads a url/remote file i get a crash
in php 4.4.2

The instruction at "0x100c5fca" referenced memory at "0x0035". The
memory could not be "read".

Unhandled exception in php.exe (PHP4TS.DLL): 0xC005: Access
Violation.

assembly dump folows 

100C5FAB   mov eax,dword ptr [esi+8]
100C5FAE   or  eax,8000h
100C5FB3   mov dword ptr [esi+8],eax
100C5FB6   pop esi
100C5FB7   ret
100C5FB8   mov eax,[10161E18]
100C5FBD   testeax,eax
100C5FBF   je  100C5FC3
100C5FC1   calleax
100C5FC3   mov edx,dword ptr [edi]
100C5FC5   mov eax,[10161D8C]
100C5FCA   mov eax,dword ptr [edx+eax*4-4] -crashes here 
100C5FCE   cmp esi,dword ptr [eax]
100C5FD0   jne 100C5FD8
100C5FD2   mov ecx,dword ptr [esi]
100C5FD4   mov dword ptr [eax],ecx
100C5FD6   jmp 100C5FDF
100C5FD8   mov edx,dword ptr [esi+4]
100C5FDB   mov eax,dword ptr [esi]
100C5FDD   mov dword ptr [edx],eax
100C5FDF   mov eax,dword ptr [esi]
100C5FE1   testeax,eax
100C5FE3   je  100C5FEB


Reproduce code:
---

http://www.php.net/downloads.php');
echo "hadn't crashed";
?>


Expected result:

C:\php-4.4.1-Win32>php bug.php
X-Powered-By: PHP/4.4.1
Content-type: text/html


crash nowhadn't crashed
C:\php-4.4.1-Win32>


Actual result:
--
C:\php-4.4.2-Win32>php bug.php
X-Powered-By: PHP/4.4.2
Content-type: text/html


crash now
C:\php-4.4.2-Win32>





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


#36353 [NEW]: Curl crush

2006-02-10 Thread anton at artpromcompany dot ru
From: anton at artpromcompany dot ru
Operating system: freebsd 4.11 and windows xp sp2
PHP version:  4.4.2
PHP Bug Type: Reproducible crash
Bug description:  Curl crush

Description:

Curl crushes when downloading some urls. 
One of them: 
http://www.surclaro.com/photo2340.html


Reproduce code:
---
$url = 'http://www.surclaro.com/photo2340.html';
$ch = curl_init($url); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,8);
curl_setopt($ch, CURLOPT_TIMEOUT,   30);
curl_exec($ch); 
curl_close($ch);

Expected result:

html page

Actual result:
--
php crush

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


#36353 [Opn->Fbk]: Curl crush

2006-02-10 Thread derick
 ID:   36353
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anton at artpromcompany dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: freebsd 4.11 and windows xp sp2
 PHP Version:  4.4.2
 New Comment:

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

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


Previous Comments:


[2006-02-10 15:05:21] anton at artpromcompany dot ru

Description:

Curl crushes when downloading some urls. 
One of them: 
http://www.surclaro.com/photo2340.html


Reproduce code:
---
$url = 'http://www.surclaro.com/photo2340.html';
$ch = curl_init($url); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,8);
curl_setopt($ch, CURLOPT_TIMEOUT,   30);
curl_exec($ch); 
curl_close($ch);

Expected result:

html page

Actual result:
--
php crush





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


#36353 [Fbk->Bgs]: Curl crush

2006-02-10 Thread tony2001
 ID:   36353
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anton at artpromcompany dot ru
-Status:   Feedback
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: freebsd 4.11 and windows xp sp2
 PHP Version:  4.4.2
 New Comment:

`curl http://www.surclaro.com/photo2340.html` crashes either -> report
it to cURL developers, this is not PHP problem.


Previous Comments:


[2006-02-10 15:11:18] [EMAIL PROTECTED]

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

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



[2006-02-10 15:05:21] anton at artpromcompany dot ru

Description:

Curl crushes when downloading some urls. 
One of them: 
http://www.surclaro.com/photo2340.html


Reproduce code:
---
$url = 'http://www.surclaro.com/photo2340.html';
$ch = curl_init($url); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,8);
curl_setopt($ch, CURLOPT_TIMEOUT,   30);
curl_exec($ch); 
curl_close($ch);

Expected result:

html page

Actual result:
--
php crush





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


#36352 [Opn->Fbk]: writing to max sized file "crashes" php/apache

2006-02-10 Thread tony2001
 ID:   36352
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael202 at gmx dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

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

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




Previous Comments:


[2006-02-10 14:40:17] michael202 at gmx dot de

Description:

a log-file has reached its maxmimum file size allowed by the 
operation and file system.

Appending further additional byte to this file ends the php and apache
process without any message. Nothing in error_log and console output.

Script procession simply stops.


Reproduce code:
---
  function append_to_file($aFilename, $aData)
  {
clearstatcache();

  $fh = fopen($aFilename, 'a');
  if ($fh === false) {
return (-1);
  }
  $result = fwrite($fh, $aData);
  fclose($fh);

return ($result);
  }


Expected result:

Error Message or Warning and script continues to execute

tested with
php 5.1.2 and 5.0.5


Actual result:
--
script stopped/ended without any notice






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


#36345 [Opn->Asn]: Problem loading BLOB over 1MB

2006-02-10 Thread tony2001
 ID:   36345
 Updated by:   [EMAIL PROTECTED]
 Reported By:  milanm at datax dot biz
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: Linux
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  george
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-02-10 11:16:06] milanm at datax dot biz

I found something strange in ext/pdo_mysql/mysql_statement.c
There is constant defined called PDO_MYSQL_MAX_BUFFER like this:
#define PDO_MYSQL_MAX_BUFFER 1024*1024
I've changed this to:
#define PDO_MYSQL_MAX_BUFFER 1024*1024*10
and recompiled PHP.
Now PDO loads whole 1.5MB from DB.
Hope that helps.



[2006-02-09 22:48:44] milanm at datax dot biz

When I run code bellow everithing is OK and data are 1.5 MB big. I've
also tried to downgrade mysql to 4.1 and recompile php but with no
results. Same problem persits with PDO using client library 4.1.14.




[2006-02-09 20:07:54] milanm at datax dot biz

Description:

I got a table and a stored 1.5 MB image in it. But when i try to load
it into variable using PDO it has only 1MB. I'm using pdo_mysql client
library 5.0.18.

Reproduce code:
---
prepare('SELECT data FROM test WHERE id=:id');
  $stmt->bindParam(':id', $blob_id, PDO::PARAM_INT);

  $mysql_pdo->beginTransaction();
  $stmt->execute();
  $mysql_pdo->commit();

  $stmt->bindColumn(1, $blob_fp, PDO::PARAM_LOB);

  $stmt->fetchAll(PDO::FETCH_BOUND);

  header('Content-Type: image/jpeg');
  print $blob_fp;

?>
Table looks like this:

CREATE TABLE test (
  id  INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  nameVARCHAR(10) NOT NULL,
  dataLONGBLOB NOT NULL,
  PRIMARY KEY id (id),
  UNIQUE KEY name (name)
) type=InnoDB;







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


#36347 [Opn->Asn]: PDO::exec() fails if the query returns results

2006-02-10 Thread tony2001
 ID:   36347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  david at acz dot org
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: SuSE Linux 9.3
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  george
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-02-10 02:34:48] david at acz dot org

This bug is similar to #34499.  I can't comment on that, so I'm
commenting here:

"OPTIMIZE TABLE is a query that returns rows.
You should use PDO::query() instead.
I'll see about handling this user error more gracefully."

You actually can't use PDO::query() with OPTIMIZE TABLE:

HY000:2030:This command is not supported in the prepared statement
protocol yet

What is the solution?



[2006-02-10 01:24:25] david at acz dot org

Description:

[Note: I am actually testing this on PHP 5.1.1.  If this bug was fixed
in PHP 5.1.2, please add a note to the manual page for PDO::exec()].

The manual says:

"PDO::exec() does not return results from a SELECT statement. For a
SELECT statement that you only need to issue once during your program,
consider issuing PDO::query()."

Either the manual needs to be changed, or, ideally, PDO::exec() needs
to be fixed to discard results.

This issue has bit me multiple times.  It's easy to forget that a
certain query (such as MySQL's OPTIMIZE TABLE) will return a result. 
Using PDO::exec() in such cases causes an error later that can be
difficult to track down.

Reproduce code:
---
exec("SELECT 1");

 $st = $db->prepare("SELECT NOW()");
 if ($st === false)
 {
 $e = $db->errorInfo();
 echo "$e[0]:$e[1]: $e[2]\n";
 }
?>


Expected result:

[nothing]

Actual result:
--
HY000:2014: Cannot execute queries while other unbuffered queries are
active. Consider using PDOStatement::fetchAll(). Alternatively, if your
code is only ever going to run against mysql, you may enable query
buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. 





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


#36342 [Opn->Asn]: missing values on recordset with a very simple request

2006-02-10 Thread tony2001
 ID:   36342
 Updated by:   [EMAIL PROTECTED]
 Reported By:  teissierb at hotmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: PDO related
 Operating System: WIN32
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer.


Previous Comments:


[2006-02-09 15:27:59] teissierb at hotmail dot com

Description:

On SQL Server 2005 Express (free), using Windows XP, Wamp 1.6.0 (php
5.1.1) and PDO ODBC:

With a simple table PDO doesn't return what I expect him to. Might be
dued to the mix of varchar and (small, tiny)int.

Reproduce code:
---
create table T (
[A] varchar(80) NOT NULL,
[B] tinyint NOT NULL,
[C] varchar(100) NOT NULL,
[D] smallint NOT NULL,
[E] varchar(1024) NOT NULL,
[F] varchar(255) NOT NULL,
[G] varchar(255) NOT NULL,
[H] varchar(1000) NOT NULL,
[I] varchar(100) NOT NULL,
[J] tinyint NOT NULL,
[K] varchar(255) NULL 
)

insert into T values ('A', '1', 'C', '2', 'E', 'F', 'G', 'H', 'I', '3',
'K')
//
try {
$db = new PDO('odbc:Driver={SQL
Server};Server=HOST\INSTANCENAME;Database=;', "user", "pass");
} catch( PDOException $e ){
die( $e->getMessage() );
}

foreach( $db->query("SELECT * FROM T ", PDO::FETCH_NUM) as $row ) {
 echo ""; print_r( $row );echo "";
}

Expected result:

[0] => A
[1] => 1
[2] => C
[3] => 2
[4] => E
[5] => F
[6] => G
[7] => H
[8] => I
[9] => 3
[10] => K

Actual result:
--
[0] => A
[1] => 1
[2] => C
[3] => 2
[4] => 
[5] => F
[6] => G
[7] => 
[8] => I
[9] => 3
[10] => K





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


#36351 [Opn->Asn]: parse_url does not parse path correctly.

2006-02-10 Thread tony2001
 ID:  36351
 Updated by:  [EMAIL PROTECTED]
 Reported By: adam at nojszewski dot com
-Status:  Open
+Status:  Assigned
 Bug Type:URL related
 PHP Version: 5.1.2
-Assigned To: 
+Assigned To: iliaa
 New Comment:

Ilia, please take a look at it.


Previous Comments:


[2006-02-10 14:48:21] adam at nojszewski dot com

I have found a cause of this behavior

URL like string:number are generaly treated as host:port when nuber is
[0,65535]. 

When number is [65536,9] function wraps it to values [0,34463]. 

When nuber is more than 5 digits long function treats it as part of a
path.

But web browsers treat specific combinations (i.e. 'mailto:555') not as
host:port, but as scheme:path.



[2006-02-10 14:09:26] adam at nojszewski dot com

Description:

parse_url does not parses 'scheme:path' when path consists of numbers
only. 

skype:anojszewski is parsed right.
gg:9130731 is parsed wrong (whole URL is treated as path).


Tested on versions 5.1.2 and 4.4.2.

Adam Nojszewski

Reproduce code:
---
print_r(parse_url("skype:anojszewski"));
print_r(parse_url("gg:9130731"));


Expected result:

Array
(
[scheme] => skype
[path] => anojszewski
)
Array
(
[scheme] => gg
[path] => 9130731
)

Actual result:
--
Array
(
[scheme] => skype
[path] => anojszewski
)
Array
(
[path] => gg:9130731
)





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


#36354 [NEW]: Available data isn't fread()

2006-02-10 Thread psychi at freakmail dot de
From: psychi at freakmail dot de
Operating system: Linux 2.6.14.5
PHP version:  5.1.2
PHP Bug Type: Sockets related
Bug description:  Available data isn't fread()

Description:

Hello.

I tried to write a small icq client and connected to the icq server,
received the hello packet (10 bytes, as you can see in the example) and
sent a packet to the icq server (23 bytes) back. The problem is that the
next call of socket_read() returns "unable to read from socket [104]:
Connection reset by peer". This message generally is ok, because icq
closes the connection - but there should be still waiting data for me (see
Commview Log).

Where did "Paket #3" go? I can't read it with PHP, but i don't know why -
but it should by somewhere... in my opinion. Tried this also with PHP
5.0.5 with same result... hope this is enough information.

- Thanks -

Commview Log (produced by given code)

Paket #1
0x   2A 01 B5 D2 00 04 00 00-00 01 *.µÒ..

Paket #2
0x   2A 01 00 02 00 11 00 00-00 01 00 01 00 09 01 01  
*...
0x0010   01 01 01 01 01 01 01  ...

Paket #3
0x   2A 04 B5 D3 00 3A 00 01-00 09 01 01 01 01 01 01  
*.µÓ.:..
0x0010   01 01 01 00 04 00 23 68-74 74 70 3A 2F 2F 77 77  
..#http://ww
0x0020   77 2E 61 6F 6C 2E 63 6F-6D 3F 63 63 6F 64 65 3D  
w.aol.com?ccode=
0x0030   75 73 26 6C 61 6E 67 3D-65 6E 00 08 00 02 00 04  
us&lang=en..

Reproduce code:
---
 ".strlen($socket_data).""; flush();
  socket_write($connection,
"\x2A\x01\x00\x02\x00\x11\x00\x00\x00\x01\x00\x01\x00\x09\x01\x01\x01\x01\x01\x01\x01\x01\x01");
  $socket_data=socket_read($connection, 1, PHP_BINARY_READ);
  echo "-> ".strlen($socket_data).""; flush();

?>

Expected result:

-> 10

-> 1

Actual result:
--
-> 10

Warning: socket_read() [function.socket-read]: unable to read from socket
[104]: Connection reset by peer in /home/html/icq.php5 on line 11
-> 0

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


#36353 [Bgs]: Curl crush

2006-02-10 Thread anton at artpromcompany dot ru
 ID:   36353
 User updated by:  anton at artpromcompany dot ru
 Reported By:  anton at artpromcompany dot ru
 Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: freebsd 4.11 and windows xp sp2
 PHP Version:  4.4.2
 New Comment:

I have just upgraded curl to 7.15.1 and now no crush for this url.

But it's strange why php for win32 uses old version of curl with bugs?


Previous Comments:


[2006-02-10 15:15:11] [EMAIL PROTECTED]

`curl http://www.surclaro.com/photo2340.html` crashes either -> report
it to cURL developers, this is not PHP problem.



[2006-02-10 15:11:18] [EMAIL PROTECTED]

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

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



[2006-02-10 15:05:21] anton at artpromcompany dot ru

Description:

Curl crushes when downloading some urls. 
One of them: 
http://www.surclaro.com/photo2340.html


Reproduce code:
---
$url = 'http://www.surclaro.com/photo2340.html';
$ch = curl_init($url); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,8);
curl_setopt($ch, CURLOPT_TIMEOUT,   30);
curl_exec($ch); 
curl_close($ch);

Expected result:

html page

Actual result:
--
php crush





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


#36355 [NEW]: OCIEnvNlsCreate() failed.

2006-02-10 Thread jnavratil at houston dot rr dot com
From: jnavratil at houston dot rr dot com
Operating system: Fedora Core 4.2
PHP version:  6CVS-2006-02-10 (snap)
PHP Bug Type: OCI8 related
Bug description:  OCIEnvNlsCreate() failed.

Description:

OCIEnvNlsCreate() failed.  Message asks to check that ORACLE_HOME is set
correctly.  I've downloaded the latest snapshot ('php5.1-200602101330')
and patched oci8.c to report getenv("ORACLE_HOME") into the error_log and
verified that it is correct.  CLI version will properly connect,
php5_module through Apache will not.

Configuration script to build php is:

./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--with-xml \
--with-apxs2=/usr/sbin/apxs \
--without-mysql \
--without-odbc \
--disable-dba \
--with-oci8=/opt/app/oracle/product/10.2.0/db_1

Reproduce code:
---
$dbh = OCILogon('my-user', 'my-pwd', 'my-db');


Expected result:

I expect a valid database resource

Actual result:
--
$dbh is boolean false.  Error_log contains:

[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
OCIEnvNlsCreate() failed. There is something wrong with your system -
please check that ORACLE_HOME is set and points to the right directory in
/opt/www/html/listViews.php on line 3
[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
/opt/app/oracle/product/10.2.0/db_1 in /opt/www/html/listViews.php on line
3

Note: '/opt/app/oracle/product/10.2.0/db_1' is my correct ORACLE_HOME and
is reported using getenv("ORACLE_HOME").

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


#36355 [Opn->Fbk]: OCIEnvNlsCreate() failed.

2006-02-10 Thread tony2001
 ID:   36355
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jnavratil at houston dot rr dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

How do you set ORACLE_HOME and did you set any other environment
variables?
Is ORACLE_HOME dir readable by the user httpd uses for its childs?
What do you mean by "patched oci8.c"?


Previous Comments:


[2006-02-10 16:12:48] jnavratil at houston dot rr dot com

Description:

OCIEnvNlsCreate() failed.  Message asks to check that ORACLE_HOME is
set correctly.  I've downloaded the latest snapshot
('php5.1-200602101330') and patched oci8.c to report
getenv("ORACLE_HOME") into the error_log and verified that it is
correct.  CLI version will properly connect, php5_module through Apache
will not.

Configuration script to build php is:

./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--with-xml \
--with-apxs2=/usr/sbin/apxs \
--without-mysql \
--without-odbc \
--disable-dba \
--with-oci8=/opt/app/oracle/product/10.2.0/db_1

Reproduce code:
---
$dbh = OCILogon('my-user', 'my-pwd', 'my-db');


Expected result:

I expect a valid database resource

Actual result:
--
$dbh is boolean false.  Error_log contains:

[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
OCIEnvNlsCreate() failed. There is something wrong with your system -
please check that ORACLE_HOME is set and points to the right directory
in /opt/www/html/listViews.php on line 3
[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
/opt/app/oracle/product/10.2.0/db_1 in /opt/www/html/listViews.php on
line 3

Note: '/opt/app/oracle/product/10.2.0/db_1' is my correct ORACLE_HOME
and is reported using getenv("ORACLE_HOME").





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


#33147 [Asn->Opn]: proc_open(): "pty pseudo terminal not supported on this system"

2006-02-10 Thread sniper
 ID:   33147
 Updated by:   [EMAIL PROTECTED]
 Reported By:  skissane at iips dot mq dot edu dot au
-Status:   Assigned
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS-2005-05-27
 Assigned To:  sniper


Previous Comments:


[2005-07-14 08:57:44] [EMAIL PROTECTED]

I'm still waiting for someone to give me a short and reliable piece of
code (shell or C) to test if the functionality is present on the
system..




[2005-06-20 09:51:30] skissane at iips dot mq dot edu dot au

This is not really a feature/change request -- the feature is already
supported in the code; the configure system just needs to be set up so
the support can be turned on/off.



[2005-05-30 08:20:43] skissane at iips dot mq dot edu dot au

Updated test case: added SKIPIF (requires Michael Spector's
--enable-pty patch).

--TEST--
Bug #33147 (proc_open: basic test of Unix98 PTYs functionality)
--SKIPIF--

--FILE--
 array("pty"),
   1 => array("pty"),
   2 => array("pty")
);
$process = proc_open("echo this is working", $descriptorspec, $pipes);
if (is_resource($process)) {
echo "OK\n";
while (!feof($pipes[1]))
echo fread($pipes[1],1024);
}
?>
--EXPECT--
OK
this is working



[2005-05-30 03:07:59] skissane at iips dot mq dot edu dot au

Wez (or someone else with CVS comitter rights): why not just check
Michael Spector's patch into CVS?
http://www.mail-archive.com/internals@lists.php.net/msg14854.html.

That should close this issue. No more of your time required :)



[2005-05-27 01:29:27] skissane at iips dot mq dot edu dot au

Tested with the patch you supplied. (Patch would not apply, so I had to
apply most of it by hand.) My test case works with the test you
supplied, and --enable-pty supplied as a config option.



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

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


#36356 [NEW]: After form submit system changing value other then entered

2006-02-10 Thread Vlad at valuead dot com
From: Vlad at valuead dot com
Operating system: Gentoo
PHP version:  4.4.2
PHP Bug Type: *Math Functions
Bug description:  After form submit system changing value other then entered

Description:

Form submitting a dollar value $2.30 saved in MYSQL as $2.29, any other
value is fine like 2.40
4 people looked it it - nothing out of ordinary

Reproduce code:
---
http://www.valuead.com/utils/bug.txt

For whatever reason intval(230.0) returns 229


field CPM Cost http://www.valuead.com/utils/bug.txt
if nessesary would be happy to provide access to demo system

Expected result:

system should of store 2.30 in the database insted of 2.29

Actual result:
--
$2.99 in database after form submission insted of 2.30

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


#36356 [Opn->Bgs]: After form submit system changing value other then entered

2006-02-10 Thread tony2001
 ID:   36356
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Vlad at valuead dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Math Functions
 Operating System: Gentoo
 PHP Version:  4.4.2
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2006-02-10 16:34:28] Vlad at valuead dot com

Description:

Form submitting a dollar value $2.30 saved in MYSQL as $2.29, any other
value is fine like 2.40
4 people looked it it - nothing out of ordinary

Reproduce code:
---
http://www.valuead.com/utils/bug.txt

For whatever reason intval(230.0) returns 229


field CPM Cost http://www.valuead.com/utils/bug.txt
if nessesary would be happy to provide access to demo system

Expected result:

system should of store 2.30 in the database insted of 2.29

Actual result:
--
$2.99 in database after form submission insted of 2.30





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


#33850 [Asn->Opn]: [PATCH]: Support LDAP connection timeouts

2006-02-10 Thread sniper
 ID:   33850
 Updated by:   [EMAIL PROTECTED]
 Reported By:  simon dot kissane at mq dot edu dot au
-Status:   Assigned
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-07-27)
 Assigned To:  sniper


Previous Comments:


[2005-10-04 05:10:27] simon dot kissane at mq dot edu dot au

I have written a new version of this patch. This supports, as well of
Netscape's LDAP_X_OPT_CONNECT_TIMEOUT, OpenLDAP's LDAP_OPT_TIMEOUT &
LDAP_OPT_NETWORK_TIMEOUT. Note that these take a struct timeval,
whereas Netscape takes an integer. I have chosen to represent struct
timeval as an object with two properties (tv_sec & tv_usec,
corresponding to the struct timeval fields of the same name.)

New version of patch (against 5.0.5) is available here:
http://www.mq.edu.au/~skissane/ldap-timeout-5.0.5.patch



[2005-07-25 08:55:10] simon dot kissane at mq dot edu dot au

Description:

I have written a patch to support LDAP_X_OPT_CONNECT_TIMEOUT (which is
defined by the Netscape LDAP C SDK). This required also changing
ldap_connect to call ldap_init instead of ldap_open (but only if
LDAP_X_OPT_CONNECT_TIMEOUT is defined), which is necessary if
LDAP_X_OPT_CONNECT_TIMEOUT is to do anything. In any case, ldap_open is
deprecated, so PHP shouldn't be calling it unless necessary.

Reproduce code:
---
http://www.mq.edu.au/~skissane/ldap-nsldap-timeout.patch

Expected result:

N/A

Actual result:
--
N/A





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


#36356 [Bgs]: After form submit system changing value other then entered

2006-02-10 Thread derick
 ID:   36356
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Vlad at valuead dot com
 Status:   Bogus
 Bug Type: *Math Functions
 Operating System: Gentoo
 PHP Version:  4.4.2
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.

.


Previous Comments:


[2006-02-10 16:39:10] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.





[2006-02-10 16:34:28] Vlad at valuead dot com

Description:

Form submitting a dollar value $2.30 saved in MYSQL as $2.29, any other
value is fine like 2.40
4 people looked it it - nothing out of ordinary

Reproduce code:
---
http://www.valuead.com/utils/bug.txt

For whatever reason intval(230.0) returns 229


field CPM Cost http://www.valuead.com/utils/bug.txt
if nessesary would be happy to provide access to demo system

Expected result:

system should of store 2.30 in the database insted of 2.29

Actual result:
--
$2.99 in database after form submission insted of 2.30





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


#36357 [NEW]: $tmp =& $this; is allowed!

2006-02-10 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Any
PHP version:  5.1.2
PHP Bug Type: Class/Object related
Bug description:  $tmp =& $this; is allowed!

Description:

Using =&, it is possible to modify $this with the constructor. 

This shouldn't be allowed, just like for 
$tmp = $this;

Reproduce code:
---



Expected result:

object(A)#1 (0) {
}
object(A)#2 (0) {
}
object(A)#1 (0) {
}

// current result : 
object(A)#1 (0) {
}
object(B)#2 (0) {
}
object(A)#1 (0) {
}


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


#36355 [Fbk->Opn]: OCIEnvNlsCreate() failed.

2006-02-10 Thread jnavratil at houston dot rr dot com
 ID:   36355
 User updated by:  jnavratil at houston dot rr dot com
 Reported By:  jnavratil at houston dot rr dot com
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

ORACLE_HOME was set in /etc/sysconfig/httpd along with...

ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
TNS_ADMIN=$ORACLE_BASE/product/10.2.0/db_1/network/admin; export
TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

(As an aside, I experimented with these variables and *BELIEVE*
ORACLE_HOME was the only one necessary, but I was running the CLI
version)

ORACLE_HOME permissions are set to 755.

The patch to oci8.c consisted of adding...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, getenv("ORACLE_HOME"));

... just below ...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");

... to report the actual value into the /var/log/httpd/error_log.  I
then remade and installed PHP5.


Previous Comments:


[2006-02-10 16:33:38] [EMAIL PROTECTED]

How do you set ORACLE_HOME and did you set any other environment
variables?
Is ORACLE_HOME dir readable by the user httpd uses for its childs?
What do you mean by "patched oci8.c"?



[2006-02-10 16:12:48] jnavratil at houston dot rr dot com

Description:

OCIEnvNlsCreate() failed.  Message asks to check that ORACLE_HOME is
set correctly.  I've downloaded the latest snapshot
('php5.1-200602101330') and patched oci8.c to report
getenv("ORACLE_HOME") into the error_log and verified that it is
correct.  CLI version will properly connect, php5_module through Apache
will not.

Configuration script to build php is:

./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--with-xml \
--with-apxs2=/usr/sbin/apxs \
--without-mysql \
--without-odbc \
--disable-dba \
--with-oci8=/opt/app/oracle/product/10.2.0/db_1

Reproduce code:
---
$dbh = OCILogon('my-user', 'my-pwd', 'my-db');


Expected result:

I expect a valid database resource

Actual result:
--
$dbh is boolean false.  Error_log contains:

[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
OCIEnvNlsCreate() failed. There is something wrong with your system -
please check that ORACLE_HOME is set and points to the right directory
in /opt/www/html/listViews.php on line 3
[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
/opt/app/oracle/product/10.2.0/db_1 in /opt/www/html/listViews.php on
line 3

Note: '/opt/app/oracle/product/10.2.0/db_1' is my correct ORACLE_HOME
and is reported using getenv("ORACLE_HOME").





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


#36355 [Opn->Fbk]: OCIEnvNlsCreate() failed.

2006-02-10 Thread tony2001
 ID:   36355
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jnavratil at houston dot rr dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

Are you sure ORACLE_HOME is set *before you start* Apache?
Does PHP CLI work?


Previous Comments:


[2006-02-10 17:15:34] jnavratil at houston dot rr dot com

ORACLE_HOME was set in /etc/sysconfig/httpd along with...

ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
TNS_ADMIN=$ORACLE_BASE/product/10.2.0/db_1/network/admin; export
TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

(As an aside, I experimented with these variables and *BELIEVE*
ORACLE_HOME was the only one necessary, but I was running the CLI
version)

ORACLE_HOME permissions are set to 755.

The patch to oci8.c consisted of adding...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, getenv("ORACLE_HOME"));

... just below ...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");

... to report the actual value into the /var/log/httpd/error_log.  I
then remade and installed PHP5.



[2006-02-10 16:33:38] [EMAIL PROTECTED]

How do you set ORACLE_HOME and did you set any other environment
variables?
Is ORACLE_HOME dir readable by the user httpd uses for its childs?
What do you mean by "patched oci8.c"?



[2006-02-10 16:12:48] jnavratil at houston dot rr dot com

Description:

OCIEnvNlsCreate() failed.  Message asks to check that ORACLE_HOME is
set correctly.  I've downloaded the latest snapshot
('php5.1-200602101330') and patched oci8.c to report
getenv("ORACLE_HOME") into the error_log and verified that it is
correct.  CLI version will properly connect, php5_module through Apache
will not.

Configuration script to build php is:

./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--with-xml \
--with-apxs2=/usr/sbin/apxs \
--without-mysql \
--without-odbc \
--disable-dba \
--with-oci8=/opt/app/oracle/product/10.2.0/db_1

Reproduce code:
---
$dbh = OCILogon('my-user', 'my-pwd', 'my-db');


Expected result:

I expect a valid database resource

Actual result:
--
$dbh is boolean false.  Error_log contains:

[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
OCIEnvNlsCreate() failed. There is something wrong with your system -
please check that ORACLE_HOME is set and points to the right directory
in /opt/www/html/listViews.php on line 3
[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
/opt/app/oracle/product/10.2.0/db_1 in /opt/www/html/listViews.php on
line 3

Note: '/opt/app/oracle/product/10.2.0/db_1' is my correct ORACLE_HOME
and is reported using getenv("ORACLE_HOME").





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


#36357 [Opn->Asn]: $tmp =& $this; is allowed!

2006-02-10 Thread tony2001
 ID:   36357
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Any
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2006-02-10 17:05:54] [EMAIL PROTECTED]

Description:

Using =&, it is possible to modify $this with the constructor. 

This shouldn't be allowed, just like for 
$tmp = $this;

Reproduce code:
---



Expected result:

object(A)#1 (0) {
}
object(A)#2 (0) {
}
object(A)#1 (0) {
}

// current result : 
object(A)#1 (0) {
}
object(B)#2 (0) {
}
object(A)#1 (0) {
}






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


#36358 [NEW]: Function getting all supported time zone names

2006-02-10 Thread tomas_matousek at hotmail dot com
From: tomas_matousek at hotmail dot com
Operating system: WinXP
PHP version:  5.1.2
PHP Bug Type: Feature/Change Request
Bug description:  Function getting all supported time zone names

Description:

A function that would return an array of supported time-zone names could
be useful.

E.g. 

var_dump(date_get_timezones()) would print:

array (
  0 => "Africa/Abidjan",
  1 => "Africa/Accra",
  2 => "Africa/Addis_Ababa",
  ...
)



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


#36359 [NEW]: splFileObject: fwrite does not write

2006-02-10 Thread php-work at yandex dot ru
From: php-work at yandex dot ru
Operating system: Linux (CentOS 4.2)
PHP version:  5CVS-2006-02-10 (snap)
PHP Bug Type: SPL related
Bug description:  splFileObject: fwrite does not write

Description:

splFileObject->fwrite() does not write

Reproduce code:
---
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 0 Feb 10 19:25 foo.txt*

fwrite('text123');
?>

Expected result:

> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 8 Feb 10 19:25 foo.txt*

> cat foo.txt
text123

Actual result:
--
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 0 Feb 10 19:25 foo.txt*

> cat foo.txt

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


#36214 [Bgs]: __get method works properly only when conditional operator is used

2006-02-10 Thread pexu at lyseo dot edu dot ouka dot fi
 ID:   36214
 User updated by:  pexu at lyseo dot edu dot ouka dot fi
-Summary:  Conditional operator fails to work properly when both
   __set and __get are set
 Reported By:  pexu at lyseo dot edu dot ouka dot fi
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
-PHP Version:  5.1.2
+PHP Version:  5.1.3-dev
 Assigned To:  dmitry
 New Comment:

Sure it doesn't return a reference, but why this example still prints
"5.1.3-dev This shouldn't work, but why are you seeing this text?"?

array[$key] = $value;
  }
  public function __get ($key)
  {
if ($this->cond_oper)
  return true ? $this->array[$key] : null;
else
  return $this->array[$key]; // This one works even though it
shouldn't!
  }
}
$a = new a; $a->a = array();
$a->a[] = "This shouldn't work, but why are you seeing this text?";
$a->cond_oper = true;
$a->a[] = "Nope, this text won't be displayed (which is ok).";
echo phpversion(), "\n", array_pop($a->a);
?>

If I understood your explanations correctly, $a->a should've been an
empty array and I should've seen two error messages telling me that
__get method didn't return a reference etc.

PHP snapshot I used was built on Feb 10, 2006 15:30 GMT.


Previous Comments:


[2006-02-06 10:32:25] [EMAIL PROTECTED]

This is not a bug. Method __get() returns by value and it's result
cannot be passed by reference.



[2006-02-04 00:01:14] pexu at lyseo dot edu dot ouka dot fi

I quickly tried the newest snapshot (20060203, 5.1.3-dev) but  neither
error messages were generated nor results were any different from
5.1.2. (Error_reporting was set to E_ALL | E_STRICT and display_errors
was turned on. I tried both conditional operator and normal if
clause.)

But I guess I can utilize ArrayObject etc. to get the expected result I
wanted.



[2006-02-02 16:04:32] [EMAIL PROTECTED]

That it works in the latter case is just a side affect which falls
under "undefined behaviour".

You should actually see an error telling you that __get() can't return
a reference or that array_push() wants a reference.

IIRC it's fixed in current CVS, could you please try?
Where "fixed" means that an error is generated.

Thanks.



[2006-02-02 14:08:59] pexu at lyseo dot edu dot ouka dot fi

Even overload::$array is defined as public variable, actual result
remains the same. But if I change conditional operator to normal if ..
else clause, problem disappers!

So:
function __get ($key)
{
  if (isset($this->array[$key]))
return $this->array[$key];
  else
return null;
}

works just fine. So the actual problem can't be a private property
which is accessed outside the class, right?



[2006-01-30 19:43:18] [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

You're trying to acces a private property (arr) from 
outside the class. 



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

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


#36352 [Com]: writing to max sized file "crashes" php/apache

2006-02-10 Thread michael202 at gmx dot net
 ID:   36352
 Comment by:   michael202 at gmx dot net
 Reported By:  michael202 at gmx dot de
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

File in question is exactly 2147483647 Byte large
1 Byte below 2^31.


Previous Comments:


[2006-02-10 15:15:30] [EMAIL PROTECTED]

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

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





[2006-02-10 14:40:17] michael202 at gmx dot de

Description:

a log-file has reached its maxmimum file size allowed by the 
operation and file system.

Appending further additional byte to this file ends the php and apache
process without any message. Nothing in error_log and console output.

Script procession simply stops.


Reproduce code:
---
  function append_to_file($aFilename, $aData)
  {
clearstatcache();

  $fh = fopen($aFilename, 'a');
  if ($fh === false) {
return (-1);
  }
  $result = fwrite($fh, $aData);
  fclose($fh);

return ($result);
  }


Expected result:

Error Message or Warning and script continues to execute

tested with
php 5.1.2 and 5.0.5


Actual result:
--
script stopped/ended without any notice






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


#36359 [Opn->Csd]: splFileObject: fwrite does not write

2006-02-10 Thread tony2001
 ID:   36359
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php-work at yandex dot ru
-Status:   Open
+Status:   Closed
 Bug Type: SPL related
 Operating System: Linux (CentOS 4.2)
 PHP Version:  5CVS-2006-02-10 (snap)
 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:


[2006-02-10 17:42:22] php-work at yandex dot ru

Description:

splFileObject->fwrite() does not write

Reproduce code:
---
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 0 Feb 10 19:25 foo.txt*

fwrite('text123');
?>

Expected result:

> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 8 Feb 10 19:25 foo.txt*

> cat foo.txt
text123

Actual result:
--
> ls -l foo.txt
-rwxrwxrwx 1 nobody nobody 0 Feb 10 19:25 foo.txt*

> cat foo.txt





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


#36360 [NEW]: PHP crashes when accessing an object that was just create by parent object

2006-02-10 Thread karsten dot hohmeier at bbz-fulda dot de
From: karsten dot hohmeier at bbz-fulda dot de
Operating system: Windows Server 2003 SP1
PHP version:  5CVS-2006-02-10 (snap)
PHP Bug Type: COM related
Bug description:  PHP crashes when accessing an object that was just create by 
parent object

Description:

I'm trying to automate MS ISA Server 2000 destination-set and filter-rule
generation by using its COM Objects. The creation and modification
processes perfectly works in VBS. When trying to implement those
mechanisms with PHP the Script crashes whenever i try to modify newly
created objects. The creation and modification is carried out and the
rules are visible in ISA Managment afterwards, but the PHP Script does not
cleanly exit. There are application errors (see below) logged in the system
log when running from commandline and as apache module (apache crashes
too).
If i do not try to modify any new objects the script terminates as
expected.

I tried any available 5.x Version of PHP below
php5.1-win32-200602101130.zip but no change in behavior.

Reproduce code:
---
$FilterRuleName = "TestRule";

$objFPC = new COM("FPC.Root") or die("Unable to create FPC Objekt");
$MyFPCRuleSets =
$objFPC->Arrays->GetContainingArray->ArrayPolicy->SiteAndContentRules;
$MyFPCRuleSets->Add($FilterRuleName);
$MyFPCRuleSets->Save();

unset($objFPC, $MyFPCRuleSets);
$objFPC = NULL;
$MyFPCRuleSets = NULL;

$objFPC = new COM("FPC.Root") or die("Unable to create FPC Objekt");
$MyFPCRule =
$objFPC->Arrays->GetContainingArray->ArrayPolicy->SiteAndContentRules->Item($FilterRuleName);

echo $MyFPCRule->Name."\r\n";

$MyFPCRule->Description = "TestDesc"; <--- Crash on modification
$MyFPCRule->Save();

unset($objFPC, $MyFPCRule);
$objFPC = NULL;
$MyFPCRule = NULL;

Expected result:

Clean exit of Script

Actual result:
--
PHP Crashes (commandline as well as Apache Module) and Logs 1 Event in the
Applicationlog

Application Failure  php.exe 5.1.3.3 in php5ts.dll 5.1.3.3 at offset
8fea

or

Application Failure  php.exe 5.1.3.3 in php5ts.dll 5.1.3.3 at offset
93a9

or

Application Failure  php.exe 5.1.3.3 in php5ts.dll 5.1.3.3 at offset
9b9aa

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


#36355 [Fbk->Opn]: OCIEnvNlsCreate() failed.

2006-02-10 Thread jnavratil at houston dot rr dot com
 ID:   36355
 User updated by:  jnavratil at houston dot rr dot com
 Reported By:  jnavratil at houston dot rr dot com
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

ORACLE_HOME is definitely being set before httpd is started.  The
/etc/sysconfig/httpd script is sourced at the start of the httpd init
script (I also echoed $ORACLE_HOME to make sure).

PHP CLI does connect successfully and now I believe I know why...

The issue appears to be related to permissions and I am quickly getting
out of my depth.  When I run the PHP CLI test, I am running as 'oracle'
or in my developer account which, for convenience, is a member of the
'oinstall' group.  I added the 'oinstall' group to the 'apache' user (
usermod -Goinstall apache ) and was able to connect using the
php5_module under apache.  Obviously, giving apache this level of
access to the oracle installation is dangerous and shouldn't be
necessary.  It suggests that the development of the oci8 extension may
have been done with either a less secure Oracle installation or with an
account having more Oracle privilege than it should.

Would it be appropriate for the oci8 extension developers to look into
this security issue?


Previous Comments:


[2006-02-10 17:26:32] [EMAIL PROTECTED]

Are you sure ORACLE_HOME is set *before you start* Apache?
Does PHP CLI work?



[2006-02-10 17:15:34] jnavratil at houston dot rr dot com

ORACLE_HOME was set in /etc/sysconfig/httpd along with...

ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
TNS_ADMIN=$ORACLE_BASE/product/10.2.0/db_1/network/admin; export
TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

(As an aside, I experimented with these variables and *BELIEVE*
ORACLE_HOME was the only one necessary, but I was running the CLI
version)

ORACLE_HOME permissions are set to 755.

The patch to oci8.c consisted of adding...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, getenv("ORACLE_HOME"));

... just below ...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");

... to report the actual value into the /var/log/httpd/error_log.  I
then remade and installed PHP5.



[2006-02-10 16:33:38] [EMAIL PROTECTED]

How do you set ORACLE_HOME and did you set any other environment
variables?
Is ORACLE_HOME dir readable by the user httpd uses for its childs?
What do you mean by "patched oci8.c"?



[2006-02-10 16:12:48] jnavratil at houston dot rr dot com

Description:

OCIEnvNlsCreate() failed.  Message asks to check that ORACLE_HOME is
set correctly.  I've downloaded the latest snapshot
('php5.1-200602101330') and patched oci8.c to report
getenv("ORACLE_HOME") into the error_log and verified that it is
correct.  CLI version will properly connect, php5_module through Apache
will not.

Configuration script to build php is:

./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--with-xml \
--with-apxs2=/usr/sbin/apxs \
--without-mysql \
--without-odbc \
--disable-dba \
--with-oci8=/opt/app/oracle/product/10.2.0/db_1

Reproduce code:
---
$dbh = OCILogon('my-user', 'my-pwd', 'my-db');


Expected result:

I expect a valid database resource

Actual result:
--
$dbh is boolean false.  Error_log contains:

[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning: 
ocilogon() [function.ocilogon]:
OCIEnvNlsCreate() failed. There is something wrong with your system -
please check that ORACLE_HOME is set and points to the right directory
in /opt/www/html/listViews.php on line 3
[

#36355 [Opn->Bgs]: OCIEnvNlsCreate() failed.

2006-02-10 Thread tony2001
 ID:   36355
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jnavratil at houston dot rr dot com
-Status:   Open
+Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

OCI8 extension itself doesn't require any variables, access privileges
etc. Those requirements are set by oracle client libraries, so there is
nothing we can do about it.
And personally I don't consider giving read permissions to apache user
as dangerous.

But you can use Oracle Instant Client that doesn't require nor
ORACLE_HOME (or any other variables) to be set, neither read privileges
for any oracle directories.
See details here:
http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

No PHP bug -> bogus.


Previous Comments:


[2006-02-10 18:14:46] jnavratil at houston dot rr dot com

ORACLE_HOME is definitely being set before httpd is started.  The
/etc/sysconfig/httpd script is sourced at the start of the httpd init
script (I also echoed $ORACLE_HOME to make sure).

PHP CLI does connect successfully and now I believe I know why...

The issue appears to be related to permissions and I am quickly getting
out of my depth.  When I run the PHP CLI test, I am running as 'oracle'
or in my developer account which, for convenience, is a member of the
'oinstall' group.  I added the 'oinstall' group to the 'apache' user (
usermod -Goinstall apache ) and was able to connect using the
php5_module under apache.  Obviously, giving apache this level of
access to the oracle installation is dangerous and shouldn't be
necessary.  It suggests that the development of the oci8 extension may
have been done with either a less secure Oracle installation or with an
account having more Oracle privilege than it should.

Would it be appropriate for the oci8 extension developers to look into
this security issue?



[2006-02-10 17:26:32] [EMAIL PROTECTED]

Are you sure ORACLE_HOME is set *before you start* Apache?
Does PHP CLI work?



[2006-02-10 17:15:34] jnavratil at houston dot rr dot com

ORACLE_HOME was set in /etc/sysconfig/httpd along with...

ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
TNS_ADMIN=$ORACLE_BASE/product/10.2.0/db_1/network/admin; export
TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

(As an aside, I experimented with these variables and *BELIEVE*
ORACLE_HOME was the only one necessary, but I was running the CLI
version)

ORACLE_HOME permissions are set to 755.

The patch to oci8.c consisted of adding...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, getenv("ORACLE_HOME"));

... just below ...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");

... to report the actual value into the /var/log/httpd/error_log.  I
then remade and installed PHP5.



[2006-02-10 16:33:38] [EMAIL PROTECTED]

How do you set ORACLE_HOME and did you set any other environment
variables?
Is ORACLE_HOME dir readable by the user httpd uses for its childs?
What do you mean by "patched oci8.c"?



[2006-02-10 16:12:48] jnavratil at houston dot rr dot com

Description:

OCIEnvNlsCreate() failed.  Message asks to check that ORACLE_HOME is
set correctly.  I've downloaded the latest snapshot
('php5.1-200602101330') and patched oci8.c to report
getenv("ORACLE_HOME") into the error_log and verified that it is
correct.  CLI version will properly connect, php5_module through Apache
will not.

Configuration script to build php is:

./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--wi

#36358 [Opn->Bgs]: Function getting all supported time zone names

2006-02-10 Thread derick
 ID:   36358
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: WinXP
 PHP Version:  5.1.2
 New Comment:

It's already there, but not yet enabled


Previous Comments:


[2006-02-10 17:37:55] tomas_matousek at hotmail dot com

Description:

A function that would return an array of supported time-zone names
could be useful.

E.g. 

var_dump(date_get_timezones()) would print:

array (
  0 => "Africa/Abidjan",
  1 => "Africa/Accra",
  2 => "Africa/Addis_Ababa",
  ...
)







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


#36355 [Bgs]: OCIEnvNlsCreate() failed.

2006-02-10 Thread jnavratil at houston dot rr dot com
 ID:   36355
 User updated by:  jnavratil at houston dot rr dot com
 Reported By:  jnavratil at houston dot rr dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

Do you really think that apache should be a member of the oracle group
to run php5_module with OCI8?  A friend, who has been a consultant with
Oracle for the last 10 years doesn't consider it kosher.  My client for
whom I am developing a PHP/Oracle application doesn't particularly like
the idea of a PHP script being able execute any Oracle binary it likes.

Instant client is designed for accessing remote database servers.  It
may be the only way to provide the security needed.  I don't know but
now will have to learn it to find out.  Clearly OCI8 as currently
written is pretty useless for a production environment, at least if
Oracle and Apache are on the same server.


Previous Comments:


[2006-02-10 18:21:13] [EMAIL PROTECTED]

OCI8 extension itself doesn't require any variables, access privileges
etc. Those requirements are set by oracle client libraries, so there is
nothing we can do about it.
And personally I don't consider giving read permissions to apache user
as dangerous.

But you can use Oracle Instant Client that doesn't require nor
ORACLE_HOME (or any other variables) to be set, neither read privileges
for any oracle directories.
See details here:
http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

No PHP bug -> bogus.



[2006-02-10 18:14:46] jnavratil at houston dot rr dot com

ORACLE_HOME is definitely being set before httpd is started.  The
/etc/sysconfig/httpd script is sourced at the start of the httpd init
script (I also echoed $ORACLE_HOME to make sure).

PHP CLI does connect successfully and now I believe I know why...

The issue appears to be related to permissions and I am quickly getting
out of my depth.  When I run the PHP CLI test, I am running as 'oracle'
or in my developer account which, for convenience, is a member of the
'oinstall' group.  I added the 'oinstall' group to the 'apache' user (
usermod -Goinstall apache ) and was able to connect using the
php5_module under apache.  Obviously, giving apache this level of
access to the oracle installation is dangerous and shouldn't be
necessary.  It suggests that the development of the oci8 extension may
have been done with either a less secure Oracle installation or with an
account having more Oracle privilege than it should.

Would it be appropriate for the oci8 extension developers to look into
this security issue?



[2006-02-10 17:26:32] [EMAIL PROTECTED]

Are you sure ORACLE_HOME is set *before you start* Apache?
Does PHP CLI work?



[2006-02-10 17:15:34] jnavratil at houston dot rr dot com

ORACLE_HOME was set in /etc/sysconfig/httpd along with...

ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
TNS_ADMIN=$ORACLE_BASE/product/10.2.0/db_1/network/admin; export
TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

(As an aside, I experimented with these variables and *BELIEVE*
ORACLE_HOME was the only one necessary, but I was running the CLI
version)

ORACLE_HOME permissions are set to 755.

The patch to oci8.c consisted of adding...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, getenv("ORACLE_HOME"));

... just below ...

 php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");

... to report the actual value into the /var/log/httpd/error_log.  I
then remade and installed PHP5.



[2006-02-10 16:33:38] [EMAIL PROTECTED]

How do you set ORACLE_HOME and did you set any other environment
variables?
Is ORACLE_HOME dir readable by the user httpd uses for its childs?
What do you mean by "patched oci8.c"?



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

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


#36355 [Bgs]: OCIEnvNlsCreate() failed.

2006-02-10 Thread tony2001
 ID:   36355
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jnavratil at houston dot rr dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

>Do you really think that apache should be a member of 
>the oracle group to run php5_module with OCI8?  
It doesn't matter what I think about it, this is *required* by oracle
client libraries.

>A friend, who has been a consultant with Oracle for the
> last 10 years doesn't consider it kosher. 
Why do you tell me this?
If you know how to avoid it (and still provide a way for OCI to read
tnsnames.ora and other files) - tell it to Oracle people.

> My client for whom I am developing a PHP/Oracle 
> application doesn't particularly like the idea of a PHP 
> script being able execute any Oracle binary it likes.
Tell your client about open_basedir directive.
Also I think it would be worth to read about unix privileges. You don't
have to grant to the user both execute and read privileges in the same
time.

>Instant client is designed for accessing remote database servers.  
Wrong. It doesn't matter whether the server is local or not.

>I don't know but now will have to learn it to find out.  
Yes, do it please.

>Clearly OCI8 as currently written is pretty useless for a
>production environment, at least if Oracle and Apache are
>on the same server.
Please direct your complaints to Oracle, it has nothing to do with PHP
or ext/oci8.


Previous Comments:


[2006-02-10 19:46:44] jnavratil at houston dot rr dot com

Do you really think that apache should be a member of the oracle group
to run php5_module with OCI8?  A friend, who has been a consultant with
Oracle for the last 10 years doesn't consider it kosher.  My client for
whom I am developing a PHP/Oracle application doesn't particularly like
the idea of a PHP script being able execute any Oracle binary it likes.

Instant client is designed for accessing remote database servers.  It
may be the only way to provide the security needed.  I don't know but
now will have to learn it to find out.  Clearly OCI8 as currently
written is pretty useless for a production environment, at least if
Oracle and Apache are on the same server.



[2006-02-10 18:21:13] [EMAIL PROTECTED]

OCI8 extension itself doesn't require any variables, access privileges
etc. Those requirements are set by oracle client libraries, so there is
nothing we can do about it.
And personally I don't consider giving read permissions to apache user
as dangerous.

But you can use Oracle Instant Client that doesn't require nor
ORACLE_HOME (or any other variables) to be set, neither read privileges
for any oracle directories.
See details here:
http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

No PHP bug -> bogus.



[2006-02-10 18:14:46] jnavratil at houston dot rr dot com

ORACLE_HOME is definitely being set before httpd is started.  The
/etc/sysconfig/httpd script is sourced at the start of the httpd init
script (I also echoed $ORACLE_HOME to make sure).

PHP CLI does connect successfully and now I believe I know why...

The issue appears to be related to permissions and I am quickly getting
out of my depth.  When I run the PHP CLI test, I am running as 'oracle'
or in my developer account which, for convenience, is a member of the
'oinstall' group.  I added the 'oinstall' group to the 'apache' user (
usermod -Goinstall apache ) and was able to connect using the
php5_module under apache.  Obviously, giving apache this level of
access to the oracle installation is dangerous and shouldn't be
necessary.  It suggests that the development of the oci8 extension may
have been done with either a less secure Oracle installation or with an
account having more Oracle privilege than it should.

Would it be appropriate for the oci8 extension developers to look into
this security issue?



[2006-02-10 17:26:32] [EMAIL PROTECTED]

Are you sure ORACLE_HOME is set *before you start* Apache?
Does PHP CLI work?



[2006-02-10 17:15:34] jnavratil at houston dot rr dot com

ORACLE_HOME was set in /etc/sysconfig/httpd along with...

ORACLE_BASE=/opt/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
TNS_ADMIN=$ORACLE_BASE/product/10.2.0/db_1/network/admin; export
TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

(As an aside, I experimented with these variables and *BELIEVE*
ORACLE_HOME w

#35106 [Com]: nested foreach fails when array variable has a reference

2006-02-10 Thread brion at wikimedia dot org
 ID:   35106
 Comment by:   brion at wikimedia dot org
 Reported By:  olympnn at nm dot ru
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS-2005-11-05 (cvs)
 Assigned To:  dmitry
 New Comment:

Note that the same happens with global variables accessed 
from a function with the 'global' statement. Since globals 
work via references, this seems to be the same issue.

This was closed as "won't fix" in 2003:
http://bugs.php.net/bug.php?id=26396

I sincerely hope the opinion has changed in the intervening 
time, as it's pretty clearly poor behavior.


Previous Comments:


[2005-11-05 16:37:20] [EMAIL PROTECTED]

Verified. Dmitry, check this out.



[2005-11-04 16:57:11] olympnn at nm dot ru

Description:

When I execute the code, it seems that the outer foreach is executed
only once. When I comment any of lines marked *, the (outer) foreach
executes twice.

This bug seems to be very like to bug # 21702, but here the situation
is much more strange: I do not use $b in foreaches at all! So it's very
strange that the foreach behavior differs when the array was referenced
sometime or not.

Thanks.

Reproduce code:
---


Expected result:

12

Actual result:
--
1





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


#36355 [Bgs]: OCIEnvNlsCreate() failed.

2006-02-10 Thread jnavratil at houston dot rr dot com
 ID:   36355
 User updated by:  jnavratil at houston dot rr dot com
 Reported By:  jnavratil at houston dot rr dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

> It doesn't matter what I think about it, this
> is *required* by oracle client libraries.

Funny.  It didn't seem to be necessary with PHP5.0.4 and 10g Release 2.
 But what do I know?

> Why do you tell me this?

Just to piss you off!  Maybe a couple of deep breaths next time.

> If you know how to avoid it (and still provide a way
> for OCI to read tnsnames.ora and other files) -
> tell it to Oracle people.

But wait!  You said that "OCI8 extension itself doesn't require any
variables, access privileges
etc.".  Are you telling me that you need access to tsnames.ora or other
resources?  If so, please elaborate and perhaps a more limited
relaxation of security can be arranged.  Something that doesn't permit
the execution of dbshut, for example.

> Also I think it would be worth to read about unix
> privileges. You don't have to grant to the user both
> execute and read privileges in the same time.

Really?  I wonder why I didn't know that :P  However, I still need to
know what I need to provide access to for the "world", don't I?

>Wrong. It doesn't matter whether the server is local or not.

Of course!  But if you have Oracle Client installed you really don't
need instant client, do you?  Except for security reasons.

>>I don't know but now will have to learn it to find out.  
>Yes, do it please.
And when you know everything we will all sing your praises,
Hallelujah!

>Please direct your complaints to Oracle, it has nothing
>to do with PHP or ext/oci8.

Nothing, indeed!  But I believe I have beat my head against this enough
for the time being.


Previous Comments:


[2006-02-10 20:05:45] [EMAIL PROTECTED]

>Do you really think that apache should be a member of 
>the oracle group to run php5_module with OCI8?  
It doesn't matter what I think about it, this is *required* by oracle
client libraries.

>A friend, who has been a consultant with Oracle for the
> last 10 years doesn't consider it kosher. 
Why do you tell me this?
If you know how to avoid it (and still provide a way for OCI to read
tnsnames.ora and other files) - tell it to Oracle people.

> My client for whom I am developing a PHP/Oracle 
> application doesn't particularly like the idea of a PHP 
> script being able execute any Oracle binary it likes.
Tell your client about open_basedir directive.
Also I think it would be worth to read about unix privileges. You don't
have to grant to the user both execute and read privileges in the same
time.

>Instant client is designed for accessing remote database servers.  
Wrong. It doesn't matter whether the server is local or not.

>I don't know but now will have to learn it to find out.  
Yes, do it please.

>Clearly OCI8 as currently written is pretty useless for a
>production environment, at least if Oracle and Apache are
>on the same server.
Please direct your complaints to Oracle, it has nothing to do with PHP
or ext/oci8.



[2006-02-10 19:46:44] jnavratil at houston dot rr dot com

Do you really think that apache should be a member of the oracle group
to run php5_module with OCI8?  A friend, who has been a consultant with
Oracle for the last 10 years doesn't consider it kosher.  My client for
whom I am developing a PHP/Oracle application doesn't particularly like
the idea of a PHP script being able execute any Oracle binary it likes.

Instant client is designed for accessing remote database servers.  It
may be the only way to provide the security needed.  I don't know but
now will have to learn it to find out.  Clearly OCI8 as currently
written is pretty useless for a production environment, at least if
Oracle and Apache are on the same server.



[2006-02-10 18:21:13] [EMAIL PROTECTED]

OCI8 extension itself doesn't require any variables, access privileges
etc. Those requirements are set by oracle client libraries, so there is
nothing we can do about it.
And personally I don't consider giving read permissions to apache user
as dangerous.

But you can use Oracle Instant Client that doesn't require nor
ORACLE_HOME (or any other variables) to be set, neither read privileges
for any oracle directories.
See details here:
http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

No PHP bug -> bogus.



[2006-02-10 18:14:46] jnavratil at houston dot rr dot com

ORACLE_HOME is definitely being set before httpd is started.  The
/etc/sysconfig/httpd script is sourced at the start of the httpd init
script (I also echoed $ORACLE_

#36361 [NEW]: Parse error: parse error, unexpected '(', expecting ')'

2006-02-10 Thread polo at netadmin dot ws
From: polo at netadmin dot ws
Operating system: winxp
PHP version:  4.4.2
PHP Bug Type: Compile Failure
Bug description:  Parse error: parse error, unexpected '(', expecting ')'

Description:

With this construction:
elseif(empty($var) AND !empty($class->get('somevar')))

I get:

Parse error: parse error, unexpected '(', expecting ')' in
/path/to/script.php on line NUMBER


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


#36361 [Opn->Bgs]: Parse error: parse error, unexpected '(', expecting ')'

2006-02-10 Thread tony2001
 ID:   36361
 Updated by:   [EMAIL PROTECTED]
 Reported By:  polo at netadmin dot ws
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: winxp
 PHP Version:  4.4.2
 New Comment:

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

Thank you for your interest in PHP.

http://php.net/empty


Previous Comments:


[2006-02-10 21:00:11] polo at netadmin dot ws

Description:

With this construction:
elseif(empty($var) AND !empty($class->get('somevar')))

I get:

Parse error: parse error, unexpected '(', expecting ')' in
/path/to/script.php on line NUMBER






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


#36355 [Bgs]: OCIEnvNlsCreate() failed.

2006-02-10 Thread tony2001
 ID:   36355
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jnavratil at houston dot rr dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Fedora Core 4.2
 PHP Version:  6CVS-2006-02-10 (snap)
 New Comment:

>It didn't seem to be necessary with PHP5.0.4 and 10g Release 2. 
Yes, it's funny and everybody is laughing. Because _it is_ necessary
for all versions of OCI libraries, except for the Instant Client.

>You said that "OCI8 extension itself doesn't require any 
>variables, access privileges etc.".  

ext/oci8 - PHP extension.
OCI - Oracle Call Interface libraries.
See the difference?

>Something that doesn't permit
>the execution of dbshut, for example.

JFYI: to run dbshut you need to do `su - oracle` first.

>I need to provide access to for the "world", don't I?
No?
And even if you would need it, what secrets are you trying to hide in
your tnsnames.ora, huh?

>But if you have Oracle Client installed you really don't
> need instant client, do you?  Except for security reasons.
Well, _now_ it's funny. I thought you were so worried exactly because
of security reasons.
And now you're saying you don't need it.
But why do I care?


Previous Comments:


[2006-02-10 20:58:14] jnavratil at houston dot rr dot com

> It doesn't matter what I think about it, this
> is *required* by oracle client libraries.

Funny.  It didn't seem to be necessary with PHP5.0.4 and 10g Release 2.
 But what do I know?

> Why do you tell me this?

Just to piss you off!  Maybe a couple of deep breaths next time.

> If you know how to avoid it (and still provide a way
> for OCI to read tnsnames.ora and other files) -
> tell it to Oracle people.

But wait!  You said that "OCI8 extension itself doesn't require any
variables, access privileges
etc.".  Are you telling me that you need access to tsnames.ora or other
resources?  If so, please elaborate and perhaps a more limited
relaxation of security can be arranged.  Something that doesn't permit
the execution of dbshut, for example.

> Also I think it would be worth to read about unix
> privileges. You don't have to grant to the user both
> execute and read privileges in the same time.

Really?  I wonder why I didn't know that :P  However, I still need to
know what I need to provide access to for the "world", don't I?

>Wrong. It doesn't matter whether the server is local or not.

Of course!  But if you have Oracle Client installed you really don't
need instant client, do you?  Except for security reasons.

>>I don't know but now will have to learn it to find out.  
>Yes, do it please.
And when you know everything we will all sing your praises,
Hallelujah!

>Please direct your complaints to Oracle, it has nothing
>to do with PHP or ext/oci8.

Nothing, indeed!  But I believe I have beat my head against this enough
for the time being.



[2006-02-10 20:05:45] [EMAIL PROTECTED]

>Do you really think that apache should be a member of 
>the oracle group to run php5_module with OCI8?  
It doesn't matter what I think about it, this is *required* by oracle
client libraries.

>A friend, who has been a consultant with Oracle for the
> last 10 years doesn't consider it kosher. 
Why do you tell me this?
If you know how to avoid it (and still provide a way for OCI to read
tnsnames.ora and other files) - tell it to Oracle people.

> My client for whom I am developing a PHP/Oracle 
> application doesn't particularly like the idea of a PHP 
> script being able execute any Oracle binary it likes.
Tell your client about open_basedir directive.
Also I think it would be worth to read about unix privileges. You don't
have to grant to the user both execute and read privileges in the same
time.

>Instant client is designed for accessing remote database servers.  
Wrong. It doesn't matter whether the server is local or not.

>I don't know but now will have to learn it to find out.  
Yes, do it please.

>Clearly OCI8 as currently written is pretty useless for a
>production environment, at least if Oracle and Apache are
>on the same server.
Please direct your complaints to Oracle, it has nothing to do with PHP
or ext/oci8.



[2006-02-10 19:46:44] jnavratil at houston dot rr dot com

Do you really think that apache should be a member of the oracle group
to run php5_module with OCI8?  A friend, who has been a consultant with
Oracle for the last 10 years doesn't consider it kosher.  My client for
whom I am developing a PHP/Oracle application doesn't particularly like
the idea of a PHP script being able execute any Oracle binary it likes.

Instant client is designed for accessing remote database servers.  It
may be the only way to provide the security needed.  I don't know but
now will have to learn it to find out.  Clearly OCI8 as currently
writte

#36363 [NEW]: php gets segv in _php_stream_read/memcpy

2006-02-10 Thread holgerk44 at freenet dot de
From: holgerk44 at freenet dot de
Operating system: RHEL 4
PHP version:  5.1.2
PHP Bug Type: Reproducible crash
Bug description:  php gets segv in _php_stream_read/memcpy

Description:

trying to read large database objects (>64K) via PDO from an informix
database via a stream causes a crash of the php executable 


Reproduce code:
---
$query=$dbh->query("select * from large ");
$row=$query->fetch(PDO::FETCH_ASSOC);
while ( $row ) {
$file = fopen ("/tmp/large.photo.$count","w");
$test=fread($row["PHOTO"],2);
while($test) {
fwrite ( $file, $test) ;
$test=fread($row["PHOTO"],2);
}
fclose ( $file);
}



Expected result:

an error in case of misprogramming.

Actual result:
--
#0  0x007933dc in memcpy () from /lib/tls/libc.so.6
#1  0x081db395 in _php_stream_read (stream=0x97a4ffd, buf=0x9794d3d "",
size=3219790640)
at /home/php/main/streams/streams.c:618
#2  0x08180fa3 in zif_fread (ht=2, return_value=0x9760b6c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/php/ext/standard/file.c:1811
#3  0x082192ec in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfeaa650)
at /home/php/Zend/zend_vm_execute.h:192


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


#36364 [NEW]: Setting a class variable as a reference to a session variable breaks

2006-02-10 Thread andrew at andrewshell dot org
From: andrew at andrewshell dot org
Operating system: Windows and Linux
PHP version:  4CVS-2006-02-11 (snap)
PHP Bug Type: Session related
Bug description:  Setting a class variable as a reference to a session variable 
breaks

Description:

I'm trying to use a session variable in a class as a singleton.  If the
session var doesn't exist I create it as an empty array.  Once it exists I
assign it by reference to a class variable.  The functions of the class
reference the class variable.  Since the class variable is a reference to
the session variable the class variable should exist between page
refreshes.  This works sometimes.  On some server/php configurations it
always works on others it always breaks.  If the session variable key is
named the same as the class name it breaks.  If it's a random string it
works.

Might be related to Bug #28144 but that was fixed in 4.3.6 and this is
broken seemingly with 4.4.0 and later.

Here are configurations that work and ones that break:

Breaks on:
Microsoft-IIS/6.0 as ASAPI with PHP 4.4.0
Microsoft-IIS/5.1 as CGI/FastCGI with PHP 4.4.1 and 4.4.2
Apache/1.3.33 as CGI with PHP 4.4.2
Microsoft-IIS/5.1 as CGI/FastCGI with 4.4.x-dev snapshot 2/10/2006

Works correctly on
Microsoft-IIS/6.0 as CGI/FastCGI with PHP 4.3.6
Apache/1.3.34 as Module with PHP 4.4.2

Reproduce code:
---
http://andrewshell.org/test.php <-- Shows the error
http://andrewshell.org/test.phps <-- source code

First time you hit the page it works with 1 value set to each instance of
the code.  If you hit refresh the first two break and the third one works.

Expected result:

All three instances should behave in the same way with results after
several refreshes looking like:

Array
(
[0.20239000 1139615291] => 5
[0.46027100 1139615292] => 7
[0.50540700 1139616583] => 0
[0.31605700 1139616584] => 2
[0.59282400 1139616649] => 6
)

Actual result:
--
The first two instances (blah and blah2) return with:

Warning: Cannot use a scalar value as an array in
/home/.untouchables/shellab/andrewshell.org/test.php on line x

blah Object
(
[data] => blah Object
(
[data] =>  *RECURSION*
)

)

after the first refresh.



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


#36364 [Opn->Bgs]: Setting a class variable as a reference to a session variable breaks

2006-02-10 Thread andrew at andrewshell dot org
 ID:   36364
 User updated by:  andrew at andrewshell dot org
 Reported By:  andrew at andrewshell dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Windows and Linux
 PHP Version:  4CVS-2006-02-11 (snap)
 New Comment:

Seems the servers it breaks on are with register_globals on it works
with register_globals off.  So it makes sense now.


Previous Comments:


[2006-02-11 01:26:33] andrew at andrewshell dot org

Description:

I'm trying to use a session variable in a class as a singleton.  If the
session var doesn't exist I create it as an empty array.  Once it exists
I assign it by reference to a class variable.  The functions of the
class reference the class variable.  Since the class variable is a
reference to the session variable the class variable should exist
between page refreshes.  This works sometimes.  On some server/php
configurations it always works on others it always breaks.  If the
session variable key is named the same as the class name it breaks.  If
it's a random string it works.

Might be related to Bug #28144 but that was fixed in 4.3.6 and this is
broken seemingly with 4.4.0 and later.

Here are configurations that work and ones that break:

Breaks on:
Microsoft-IIS/6.0 as ASAPI with PHP 4.4.0
Microsoft-IIS/5.1 as CGI/FastCGI with PHP 4.4.1 and 4.4.2
Apache/1.3.33 as CGI with PHP 4.4.2
Microsoft-IIS/5.1 as CGI/FastCGI with 4.4.x-dev snapshot 2/10/2006

Works correctly on
Microsoft-IIS/6.0 as CGI/FastCGI with PHP 4.3.6
Apache/1.3.34 as Module with PHP 4.4.2

Reproduce code:
---
http://andrewshell.org/test.php <-- Shows the error
http://andrewshell.org/test.phps <-- source code

First time you hit the page it works with 1 value set to each instance
of the code.  If you hit refresh the first two break and the third one
works.

Expected result:

All three instances should behave in the same way with results after
several refreshes looking like:

Array
(
[0.20239000 1139615291] => 5
[0.46027100 1139615292] => 7
[0.50540700 1139616583] => 0
[0.31605700 1139616584] => 2
[0.59282400 1139616649] => 6
)

Actual result:
--
The first two instances (blah and blah2) return with:

Warning: Cannot use a scalar value as an array in
/home/.untouchables/shellab/andrewshell.org/test.php on line x

blah Object
(
[data] => blah Object
(
[data] =>  *RECURSION*
)

)

after the first refresh.







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


#36363 [Opn]: php gets segv in _php_stream_read/memcpy

2006-02-10 Thread pajoye
 ID:   36363
 Updated by:   [EMAIL PROTECTED]
 Reported By:  holgerk44 at freenet dot de
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: RHEL 4
 PHP Version:  5.1.2
 New Comment:

It should not segfault but I think you misuse fread. I suppose your
"photo" field is a binary object containing images? Then simply use
file_put_contents to store them back to the filesystem.

As a sidenote, use error_reporting(E_ALL) in you script.




Previous Comments:


[2006-02-11 00:25:09] holgerk44 at freenet dot de

Description:

trying to read large database objects (>64K) via PDO from an informix
database via a stream causes a crash of the php executable 


Reproduce code:
---
$query=$dbh->query("select * from large ");
$row=$query->fetch(PDO::FETCH_ASSOC);
while ( $row ) {
$file = fopen ("/tmp/large.photo.$count","w");
$test=fread($row["PHOTO"],2);
while($test) {
fwrite ( $file, $test) ;
$test=fread($row["PHOTO"],2);
}
fclose ( $file);
}



Expected result:

an error in case of misprogramming.

Actual result:
--
#0  0x007933dc in memcpy () from /lib/tls/libc.so.6
#1  0x081db395 in _php_stream_read (stream=0x97a4ffd, buf=0x9794d3d
"",
size=3219790640)
at /home/php/main/streams/streams.c:618
#2  0x08180fa3 in zif_fread (ht=2, return_value=0x9760b6c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/php/ext/standard/file.c:1811
#3  0x082192ec in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfeaa650)
at /home/php/Zend/zend_vm_execute.h:192






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


#36365 [NEW]: scandir duplicates file name at every 65535th file

2006-02-10 Thread pilhoon at gmail dot com
From: pilhoon at gmail dot com
Operating system: windows
PHP version:  5.1.2
PHP Bug Type: Directory function related
Bug description:  scandir duplicates file name at every 65535th file

Description:

scandir duplicates file name at every 65535th file

Reproduce code:
---
I made over 26 files in a folder.
Their names are 'f11' ... 'f264001'.

$file_names = scandir('files/');

$base_names= array();
for($i=11; $i<=263064; $i++)
{
$base_names["f".$i] = 0;
}

foreach($file_names as $a_name)
{
if(1 == $base_names[$a_name])
echo $a_name."\n";
else
$base_names[$a_name] = 1;
}

Expected result:

They must be showed only once.

Actual result:
--
scandir(THAT_FOLDER) returns large array but
f165534 and f231069 are duplicated.



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