#39251 [Opn-Fbk]: variable variable class array property is read only

2006-10-25 Thread derick
 ID:   39251
 Updated by:   [EMAIL PROTECTED]
 Reported By:  taskfreak at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: mac os
 PHP Version:  5.1.6
 New Comment:

Please try using this CVS snapshot:

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


Previous Comments:


[2006-10-25 00:34:02] taskfreak at gmail dot com

Description:

Acessing class property (which is an array) using a variable makes it
read only (can not add a new element)
See code if you don't understand what I mean.
$this-$nameOfArray[$key] = $value;

Using PHP4 style, haven't tried it in PHP5 class coding style. 

I'm under mac os, using php 5.1.6, installed by following this:
http://www.entropy.ch/software/macosx/php/


Reproduce code:
---
class test {
  var $arrWhatever;
  function test() {
$this-arrWhatever = array();
  }
  function set($where,$who, $what) {
 $this-$where[$who] = $what;
  }
  function set2($where,$who,$what) {
 $arrTmp = $this-$where;
 $arrTmp[$who] = $what;
  }
}

$obj = new test();

$obj-set('arrWhatever','key','value');
print_r($obj-arrWhatever);

$obj-set2('arrWhatever','key','value');
print_r($obj-arrWhatever);


Expected result:

Array
(
[key] = value
)
Array
(
[key] = value
)

Actual result:
--
Array
(
)
Array
(
[key] = value
)





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


#39250 [Opn-Fbk]: Session problem on PHP using authentication on Windows 2003 IIS 6.0

2006-10-25 Thread tony2001
 ID:   39250
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gutosantos82 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-10-24 23:48:21] gutosantos82 at gmail dot com

Description:

Using PHP 5.1.6 on Windows 2003 / IIS 6.0 through isapi_fcgi and
enabling IIS to use Integrated Windows Authentication without anonymous
access. The PHP server create one session file for each .php file that
is accessed by the Broswer, not allowing the use of sessions. The
Broswe Client is IE and by default is using Kerberos authentication
AUTH_TYPE = Negotiate.

The problem of not complience hostname that create this same problem
was not considerated because the hostname doesn´t contain invalid
charatcers. 

Other problem in this environment is that the PHP sometimes doesen´t
receive from the server some $_SERVER variables like HTTP_USER_AGENT
and ALL_HTTP.






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


#39252 [Opn-Fbk]: PHP crashes on make install on memory allocation, PowerPC

2006-10-25 Thread tony2001
 ID:   39252
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tiosancho at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Mac OS 10.4.8 PowerPC
 PHP Version:  5.1.6
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-10-25 03:05:43] tiosancho at hotmail dot com

Crash log:

**

Host Name:  Fiasco
Date/Time:  2006-10-23 20:29:46.235 -0700
OS Version: 10.4.8 (Build 8L127)
Report Version: 4

Command: php
Path:/Users/gavin/Desktop/PHP/php-5.1.6/sapi/cli/php
Parent:  make [4921]

Version: ??? (???)

PID:4922
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:  KERN_INVALID_ADDRESS (0x0001) at 0x01f0

Thread 0 Crashed:
0   0x8c80 __memcpy + 1248 (cpu_capabilities.h:189)
1   php 0x0004ec9c timelib_parse_tzfile + 588 (parse_tz.c:92)
2   php 0x0002f37c get_timezone_info + 156 (php_date.c:324)
3   php 0x0002f440 php_format_date + 64 (php_date.c:625)
4   php 0x00030164 php_date + 148 (php_date.c:608)
5   php 0x001fe4d4 zend_do_fcall_common_helper_SPEC + 1764
(zend_vm_execute.h:200)
6   php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
7   php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
8   php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
9   php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
10  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
11  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
12  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
13  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
14  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
15  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
16  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
17  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
18  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
19  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
20  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
21  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
22  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
23  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
24  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
25  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
26  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
27  php 0x001fe5bc zend_do_fcall_common_helper_SPEC + 1996
(zend_vm_execute.h:235)
28  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
29  php 0x002054a4 ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER + 788
(zend_vm_execute.h:1976)
30  php 0x001fdd28 execute + 392 (zend_vm_execute.h:92)
31  php 0x001e001c zend_execute_scripts + 380 (zend.c:1110)
32  php 0x0019d0cc php_execute_script + 620 (main.c:1737)
33  php 0x00284b1c main + 3500 (php_cli.c:1094)
34  php 0x1c6c _start + 760
35  php 0x1970 start + 48

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x8c80 srr1: 0x1200d030
   vrsave: 0xfff8
cr: 0x24042420  xer: 0x   lr:
0x0004ec9c  ctr: 0x0007427c
r0: 0x   r1: 0xbfffd9f0   r2:
0xa0002b90   r3: 0x02808000
r4: 0x0203   r5: 0x1800   r6:
0xffef   r7: 0xffdf
r8: 0xffcf   r9: 0x  r10:
0x  r11: 0x00339198
   r12: 0x04511f00  r13: 0xbfffec90  r14:
0x  r15: 0x0194a750
   r16: 0x01c1b720  r17: 0x  r18:
0x0033feb4  r19: 0x00342d60
   r20: 0x01c1dc40  r21: 0x0001  r22:
0x0001  r23: 0xbfffeb40
   r24: 0x  r25: 0x0033de04  r26:
0x01883618  r27: 0xbfffdcd8
   r28: 0x  r29: 0x02808000  r30:
0x01c3a010  r31: 0x0002f2ec

Binary Images Description:
0x1000 -   0x2dcfff php
/Users/gavin/Desktop/PHP/php-5.1.6/sapi/cli/php
  0xd05000 -   0xd34fff libmysqlclient.15.dylib
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
0x8fe0 - 0x8fe51fff dyld 45.3   /usr/lib/dyld
0x9000 - 0x901bcfff libSystem.B.dylib   

#39110 [Com]: conflicting types for 'utf8_mime2text'

2006-10-25 Thread andy dot shelllam at mailnetwork dot co dot uk
 ID:   39110
 Comment by:   andy dot shelllam at mailnetwork dot co dot uk
 Reported By:  sihar at uninet dot net dot id
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Slackware 11.0
 PHP Version:  4.4.4
 New Comment:

I also have this problem with php 5.1.6 and UW IMAP c-client 2006c.
I'm now going to re-try IMAP 2004 as I believe this is the problem.

This is on a FreeBSD 6.1 system - have had PHP 5 compiled on another
FBSD 6.1 system with IMAP 2004 a few weeks ago.


Previous Comments:


[2006-10-20 18:54:35] junkmyself at hotmail dot com

same problem with the stable version you provide.

compile:
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-libxml-dir=/usr/local/lib --with-zlib
--with-zlib-dir=/usr/local/lib/ --with-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap
--enable-sockets --with-png-dir=/usr/local/libpng --with-gd
--enable-gd-native-ttf --with-freetype-dir=/usr/local/freetype
--with-openssl --enable-ftp --enable-memory-limit
--with-imap=/usr/local/imap

make error report:
-g -O2   -c
/backup/mis/montreal.prospectornetwork.com/~mdrolet/blackbox/packages/php4-STABLE-200610201830/ext/imap/php_imap.c
-o ext/imap/php_imap.lo
/backup/mis/montreal.prospectornetwork.com/~mdrolet/blackbox/packages/php4-STABLE-200610201830/ext/imap/php_imap.c:74:
error: conflicting types for 'utf8_mime2text'
/usr/local/mis/imap/include/utf8.h:548: error: previous declaration of
'utf8_mime2text' was here
/backup/mis/montreal.prospectornetwork.com/~mdrolet/blackbox/packages/php4-STABLE-200610201830/ext/imap/php_imap.c:74:
error: conflicting types for 'utf8_mime2text'
/usr/local/mis/imap/include/utf8.h:548: error: previous declaration of
'utf8_mime2text' was here
make: *** [ext/imap/php_imap.lo] Error 1



[2006-10-18 01:00:00] 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-10-10 12:16:42] [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-10-10 12:14:08] sihar at uninet dot net dot id

Description:

Every time I try to compile PHP 4.4.4 with IMAP support under SLES9,
it
fails because of the wrong parameter count of utf8_mime2text() in
php_imap.c:78 compared to utf8.h:538.
I have tried with imap-2006b.tar.Z
Build c-client library first:
cd /usr/local/applications/
tar xzf imap-2006b.tar.Z
mv imap-*/ imap/
make slx all SSLTYPE=none IP=4
md include
md lib
cp src/c-client/*.h include/
cp c-client/c-client.a lib/libc-client.a
cp c-client/osdep.h include/
cp c-client/env_unix.h include/
cp c-client/linkage.h include/


Reproduce code:
---
./configure  --prefix=/usr --disable-static --with-apxs=/usr/sbin/apxs
--enable-discard-path --sysconfdir=/etc --with-config-file-
path=/usr/local/apache/etc --enable-safe-mode --with-openssl
--with-mhash --enable-bcmath --with-bz2 --with-pic --enable-calendar
--
enable-ctype --with-gdbm --with-imap-ssl=/usr/local/lib/c-client
--with-imap=/usr/local/lib/c-client --with-mcrypt --with-mime-magic
 --enable-inline-optimization --enable-ftp --with-iconv --with-dom
--with-exif --enable-exif --with-gd --enable-gd-native-ttf --with
-jpeg-dir=/usr --with-png --with-ttf --with-freetype-dir=/usr
--enable-mbstring=all --with-pcre-regex=/usr --with-mysql=shared,/usr 
--with-gettext=shared,/usr --with-expat-dir=/usr --with-mm=/usr
--enable-trans-sid --enable-shmop --enable-sockets --enable-sysvsem 
--enable-sysvshm --enable-memory-limit --with-tsrm-pthreads
--enable-shared --disable-debug --with-zlib=/usr
--with-apxs=/usr/local/
apache/sbin/apxs

Expected result:

Successful build (not aborted).


Actual result:
--
/tmp/php-4.4.4/ext/imap/php_imap.c:74: error: conflicting types for
'utf8_mime2text'
/usr/local/lib/c-client/include/utf8.h:548: error: previous declaration
of 'utf8_mime2text' was here
/tmp/php-4.4.4/ext/imap/php_imap.c:74: error: conflicting types for
'utf8_mime2text'
/usr/local/lib/c-client/include/utf8.h:548: error: previous declaration
of 'utf8_mime2text' was here
/tmp/php-4.4.4/ext/mbstring/mbstring.c:152: warning: initialization
discards qualifiers from pointer target type
/tmp/php-4.4.4/ext/mbstring/mbstring.c:153: warning: initialization
discards qualifiers from pointer target type
/tmp/php-4.4.4/ext/mbstring/mbstring.c:154: warning: initialization
discards 

#39110 [Com]: conflicting types for 'utf8_mime2text'

2006-10-25 Thread andy dot shellam at mailnetwork dot co dot uk
 ID:   39110
 Comment by:   andy dot shellam at mailnetwork dot co dot uk
 Reported By:  sihar at uninet dot net dot id
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Slackware 11.0
 PHP Version:  4.4.4
 New Comment:

php 5.1.6 compiles successfully with IMAP 2004g on FreeBSD 6.1 (with
OpenSSL) using the following configure command:

./configure --prefix=/usr/local/php --with-pgsql=/usr/local/pgsql
--with-apxs2=/usr/local/apache2/bin/apxs
--with-imap=/usr/local/imap2004g --with-imap-ssl

Looks like it is the 2006 version of the IMAP toolkit.


Previous Comments:


[2006-10-25 09:25:11] andy dot shelllam at mailnetwork dot co dot uk

I also have this problem with php 5.1.6 and UW IMAP c-client 2006c.
I'm now going to re-try IMAP 2004 as I believe this is the problem.

This is on a FreeBSD 6.1 system - have had PHP 5 compiled on another
FBSD 6.1 system with IMAP 2004 a few weeks ago.



[2006-10-20 18:54:35] junkmyself at hotmail dot com

same problem with the stable version you provide.

compile:
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-libxml-dir=/usr/local/lib --with-zlib
--with-zlib-dir=/usr/local/lib/ --with-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap
--enable-sockets --with-png-dir=/usr/local/libpng --with-gd
--enable-gd-native-ttf --with-freetype-dir=/usr/local/freetype
--with-openssl --enable-ftp --enable-memory-limit
--with-imap=/usr/local/imap

make error report:
-g -O2   -c
/backup/mis/montreal.prospectornetwork.com/~mdrolet/blackbox/packages/php4-STABLE-200610201830/ext/imap/php_imap.c
-o ext/imap/php_imap.lo
/backup/mis/montreal.prospectornetwork.com/~mdrolet/blackbox/packages/php4-STABLE-200610201830/ext/imap/php_imap.c:74:
error: conflicting types for 'utf8_mime2text'
/usr/local/mis/imap/include/utf8.h:548: error: previous declaration of
'utf8_mime2text' was here
/backup/mis/montreal.prospectornetwork.com/~mdrolet/blackbox/packages/php4-STABLE-200610201830/ext/imap/php_imap.c:74:
error: conflicting types for 'utf8_mime2text'
/usr/local/mis/imap/include/utf8.h:548: error: previous declaration of
'utf8_mime2text' was here
make: *** [ext/imap/php_imap.lo] Error 1



[2006-10-18 01:00:00] 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-10-10 12:16:42] [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-10-10 12:14:08] sihar at uninet dot net dot id

Description:

Every time I try to compile PHP 4.4.4 with IMAP support under SLES9,
it
fails because of the wrong parameter count of utf8_mime2text() in
php_imap.c:78 compared to utf8.h:538.
I have tried with imap-2006b.tar.Z
Build c-client library first:
cd /usr/local/applications/
tar xzf imap-2006b.tar.Z
mv imap-*/ imap/
make slx all SSLTYPE=none IP=4
md include
md lib
cp src/c-client/*.h include/
cp c-client/c-client.a lib/libc-client.a
cp c-client/osdep.h include/
cp c-client/env_unix.h include/
cp c-client/linkage.h include/


Reproduce code:
---
./configure  --prefix=/usr --disable-static --with-apxs=/usr/sbin/apxs
--enable-discard-path --sysconfdir=/etc --with-config-file-
path=/usr/local/apache/etc --enable-safe-mode --with-openssl
--with-mhash --enable-bcmath --with-bz2 --with-pic --enable-calendar
--
enable-ctype --with-gdbm --with-imap-ssl=/usr/local/lib/c-client
--with-imap=/usr/local/lib/c-client --with-mcrypt --with-mime-magic
 --enable-inline-optimization --enable-ftp --with-iconv --with-dom
--with-exif --enable-exif --with-gd --enable-gd-native-ttf --with
-jpeg-dir=/usr --with-png --with-ttf --with-freetype-dir=/usr
--enable-mbstring=all --with-pcre-regex=/usr --with-mysql=shared,/usr 
--with-gettext=shared,/usr --with-expat-dir=/usr --with-mm=/usr
--enable-trans-sid --enable-shmop --enable-sockets --enable-sysvsem 
--enable-sysvshm --enable-memory-limit --with-tsrm-pthreads
--enable-shared --disable-debug --with-zlib=/usr
--with-apxs=/usr/local/
apache/sbin/apxs

Expected result:

Successful build (not aborted).


Actual result:
--
/tmp/php-4.4.4/ext/imap/php_imap.c:74: error: conflicting types for
'utf8_mime2text'
/usr/local/lib/c-client/include/utf8.h:548: error: previous declaration
of 'utf8_mime2text' was here

#38975 [Fbk-Opn]: date() function causes php crash

2006-10-25 Thread rachmel at avaya dot com
 ID:   38975
 User updated by:  rachmel at avaya dot com
 Reported By:  rachmel at avaya dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: WindRiver Linux
 PHP Version:  5.1.6
 Assigned To:  derick
 New Comment:

Hi,

I think I found the problem. in one of the date extention files:
parse_tz.c , there is a conversion macro called: timelib_conv_int()
that has two modes - depends if WORDS_BIGENDIAN is defined or not.
I located the test that defines it in the php configure file, and it
looks like this:

  echo $ac_n checking whether byte ordering is bigendian... $ac_c
16
echo configure:43563: checking whether byte ordering is bigendian
5
if eval test \`echo '$''{'ac_cv_c_bigendian_php'+set}'`\ = set;
then
  echo $ac_n (cached) $ac_c 16
else

  ac_cv_c_bigendian_php=unknown
  if test $cross_compiling = yes; then
  ac_cv_c_bigendian_php=unknown
else
  cat  conftest.$ac_ext EOF

So, what happens is - i cross compile, and then the bigendian becomes
uknown = the WORDS_BIGENDIAN is not defined = the timezone database
is read in the wrong way = malloc tries to use that information to
allocate memory and fails.

Can you explain why it is that way?


Previous Comments:


[2006-10-18 17:04:44] [EMAIL PROTECTED]

No, I don't think it matters.



[2006-10-18 17:00:03] rachmel at avaya dot com

ok, I will look into it.
Do you think that using the timezonedb upgrade should make any
difference?

Thanks.



[2006-10-18 16:57:38] [EMAIL PROTECTED]

date() is in ext/date/php_date.c
And I don't see any problems on all OSes around, including 5 Linuxes on
different architectures.



[2006-10-18 16:52:41] rachmel at avaya dot com

I am not sure I can do that - in the meantime, it seems that if php has
a default timezone conigured, it ignores the localtime definitions on
the Linux kernel. However, if I change the default timezone to
Pacific/Fiji for example, i can reproduce the crash with a call to
date(1). it is interesting, that a call to phpinfo() doesn't crash,
although it does display the time zone chosen.

Are there any leads you can think about that might cause this problem?
Where in the php code can I find the date function, so I can try and
debug it from there?

Thanks.



[2006-10-16 18:30:35] [EMAIL PROTECTED]

Please provide an account on a WindRiver Linux machine for debugging.



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

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


#39244 [Bgs-Opn]: PHP can't read UTF-8 encoded PHP code

2006-10-25 Thread j dot hakvoort at publiceren dot net
 ID:   39244
 User updated by:  j dot hakvoort at publiceren dot net
 Reported By:  j dot hakvoort at publiceren dot net
-Status:   Bogus
+Status:   Open
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

Ok, I found out that it's due to the folowing BUG in PHP..

UTF-8 encoded documents have 3 characters on top of the document wich
specify the UTF-8, this is called BOM.

These characters might be needed, but to get PHP working it would be
required to remove these characters.

The only solution to remove these characters I've found is by using
special editors. This will take a huge amount of time!

Is there no other solution for this?? Why doesn't PHP read UTF-8
encoded files???

Best Regards,
Jan Jaap Hakvoort


Previous Comments:


[2006-10-24 09:55:58] [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-10-24 08:55:58] j dot hakvoort at publiceren dot net

Description:

Hi!

I've been working on the encoding issue to make a site compatible for
any language, but the problem is that when you print special characters
in PHP it will be malformed.

So the advice I received is to encode the PHP code to UTF-8, but when I
do this however the script will fail because PHP doesn't read UTF-8
encoded PHP code!

Is this a bug? I am using 4.4.4

Best Regards,
Jan Jaap Hakvoort

Reproduce code:
---
?php
$str = 'éúïäç Ä';
$match = preg_match('¡[ ]+¡',$str);
?



Expected result:

$match will be set to true.

Actual result:
--
PHP error, unexpected character [block]...





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


#39244 [Opn-Bgs]: PHP can't read UTF-8 encoded PHP code

2006-10-25 Thread tony2001
 ID:   39244
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j dot hakvoort at publiceren dot net
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

PCRE functions in PHP are just wrappers for PCRElib.
If PCRElib is unable to read Unicode texts with BOM, then it's PCRElib
fault.
But I guess you shouldn't be using Notepad in the first place.


Previous Comments:


[2006-10-25 12:08:07] j dot hakvoort at publiceren dot net

Ok, I found out that it's due to the folowing BUG in PHP..

UTF-8 encoded documents have 3 characters on top of the document wich
specify the UTF-8, this is called BOM.

These characters might be needed, but to get PHP working it would be
required to remove these characters.

The only solution to remove these characters I've found is by using
special editors. This will take a huge amount of time!

Is there no other solution for this?? Why doesn't PHP read UTF-8
encoded files???

Best Regards,
Jan Jaap Hakvoort



[2006-10-24 09:55:58] [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-10-24 08:55:58] j dot hakvoort at publiceren dot net

Description:

Hi!

I've been working on the encoding issue to make a site compatible for
any language, but the problem is that when you print special characters
in PHP it will be malformed.

So the advice I received is to encode the PHP code to UTF-8, but when I
do this however the script will fail because PHP doesn't read UTF-8
encoded PHP code!

Is this a bug? I am using 4.4.4

Best Regards,
Jan Jaap Hakvoort

Reproduce code:
---
?php
$str = 'éúïäç Ä';
$match = preg_match('¡[ ]+¡',$str);
?



Expected result:

$match will be set to true.

Actual result:
--
PHP error, unexpected character [block]...





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


#39244 [Bgs-Opn]: PHP can't read UTF-8 encoded PHP code

2006-10-25 Thread j dot hakvoort at publiceren dot net
 ID:   39244
 User updated by:  j dot hakvoort at publiceren dot net
 Reported By:  j dot hakvoort at publiceren dot net
-Status:   Bogus
+Status:   Open
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

Hi!

I don't know PCRElib, but I am not aspecting that it has anything to do
with the issue as you mention functions reading unicode.

It's not about that, it's about that PHP can't be started when the php
script document is encoded in utf-8 format.

This will cause 3 characters to print so that sending headers isn't
possible anymore

Also, PHP doesn't recognize UTF-8 characters in functions, but this is
not the main issue I am refering to with the BOM of UTF-8 encoded
documents.

Best Regards,
Jan Jaap Hakvoort


Previous Comments:


[2006-10-25 12:11:25] [EMAIL PROTECTED]

PCRE functions in PHP are just wrappers for PCRElib.
If PCRElib is unable to read Unicode texts with BOM, then it's PCRElib
fault.
But I guess you shouldn't be using Notepad in the first place.



[2006-10-25 12:08:07] j dot hakvoort at publiceren dot net

Ok, I found out that it's due to the folowing BUG in PHP..

UTF-8 encoded documents have 3 characters on top of the document wich
specify the UTF-8, this is called BOM.

These characters might be needed, but to get PHP working it would be
required to remove these characters.

The only solution to remove these characters I've found is by using
special editors. This will take a huge amount of time!

Is there no other solution for this?? Why doesn't PHP read UTF-8
encoded files???

Best Regards,
Jan Jaap Hakvoort



[2006-10-24 09:55:58] [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-10-24 08:55:58] j dot hakvoort at publiceren dot net

Description:

Hi!

I've been working on the encoding issue to make a site compatible for
any language, but the problem is that when you print special characters
in PHP it will be malformed.

So the advice I received is to encode the PHP code to UTF-8, but when I
do this however the script will fail because PHP doesn't read UTF-8
encoded PHP code!

Is this a bug? I am using 4.4.4

Best Regards,
Jan Jaap Hakvoort

Reproduce code:
---
?php
$str = 'éúïäç Ä';
$match = preg_match('¡[ ]+¡',$str);
?



Expected result:

$match will be set to true.

Actual result:
--
PHP error, unexpected character [block]...





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


#39244 [Opn-WFx]: PHP can't read UTF-8 encoded PHP code

2006-10-25 Thread tony2001
 ID:   39244
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j dot hakvoort at publiceren dot net
-Status:   Open
+Status:   Wont fix
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

Unicode support is on its way and will appear in PHP6.
I have to wait until then.


Previous Comments:


[2006-10-25 12:26:27] j dot hakvoort at publiceren dot net

Hi!

I don't know PCRElib, but I am not aspecting that it has anything to do
with the issue as you mention functions reading unicode.

It's not about that, it's about that PHP can't be started when the php
script document is encoded in utf-8 format.

This will cause 3 characters to print so that sending headers isn't
possible anymore

Also, PHP doesn't recognize UTF-8 characters in functions, but this is
not the main issue I am refering to with the BOM of UTF-8 encoded
documents.

Best Regards,
Jan Jaap Hakvoort



[2006-10-25 12:11:25] [EMAIL PROTECTED]

PCRE functions in PHP are just wrappers for PCRElib.
If PCRElib is unable to read Unicode texts with BOM, then it's PCRElib
fault.
But I guess you shouldn't be using Notepad in the first place.



[2006-10-25 12:08:07] j dot hakvoort at publiceren dot net

Ok, I found out that it's due to the folowing BUG in PHP..

UTF-8 encoded documents have 3 characters on top of the document wich
specify the UTF-8, this is called BOM.

These characters might be needed, but to get PHP working it would be
required to remove these characters.

The only solution to remove these characters I've found is by using
special editors. This will take a huge amount of time!

Is there no other solution for this?? Why doesn't PHP read UTF-8
encoded files???

Best Regards,
Jan Jaap Hakvoort



[2006-10-24 09:55:58] [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-10-24 08:55:58] j dot hakvoort at publiceren dot net

Description:

Hi!

I've been working on the encoding issue to make a site compatible for
any language, but the problem is that when you print special characters
in PHP it will be malformed.

So the advice I received is to encode the PHP code to UTF-8, but when I
do this however the script will fail because PHP doesn't read UTF-8
encoded PHP code!

Is this a bug? I am using 4.4.4

Best Regards,
Jan Jaap Hakvoort

Reproduce code:
---
?php
$str = 'éúïäç Ä';
$match = preg_match('¡[ ]+¡',$str);
?



Expected result:

$match will be set to true.

Actual result:
--
PHP error, unexpected character [block]...





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


#39253 [NEW]: debug_backtrace() and Zend Optimizer problem

2006-10-25 Thread programmando at gmail dot com
From: programmando at gmail dot com
Operating system: Ubuntu Dapper Drake
PHP version:  5.1.6
PHP Bug Type: Class/Object related
Bug description:  debug_backtrace() and Zend Optimizer problem

Description:

After a debug_backtrace() the result array doesn't have 'object' entry if
Zend Optimizer (3.0.1 in this case) is enabled. 
Turn off Zend Optimizer and 'object' appear.

(I've asked on Zend Optimizer forum also, I don't know if a php related
problem)

Reproduce code:
---
$traces = debug_backtrace();
print_r($traces);

Expected result:

[1] = Array
(
[file] =
/var/www/symfony/lib/controller/sfFrontWebController.class.php
[line] = 48
[function] = forward
[class] = sfController
[type] = -
[args] = Array
(
[0] = story
[1] = index
)

)

Actual result:
--
[1] = Array
(
[file] =
/var/www/symfony/lib/controller/sfFrontWebController.class.php
[line] = 48
[function] = forward
[class] = sfController
[type] = -
[object] = !!!
[args] = Array
(
[0] = story
[1] = index
)

)

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


#39253 [Opn-Bgs]: debug_backtrace() and Zend Optimizer problem

2006-10-25 Thread derick
 ID:   39253
 Updated by:   [EMAIL PROTECTED]
 Reported By:  programmando at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Ubuntu Dapper Drake
 PHP Version:  5.1.6
 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

We don't support Zend's extensions.


Previous Comments:


[2006-10-25 12:50:57] programmando at gmail dot com

Description:

After a debug_backtrace() the result array doesn't have 'object' entry
if Zend Optimizer (3.0.1 in this case) is enabled. 
Turn off Zend Optimizer and 'object' appear.

(I've asked on Zend Optimizer forum also, I don't know if a php related
problem)

Reproduce code:
---
$traces = debug_backtrace();
print_r($traces);

Expected result:

[1] = Array
(
[file] =
/var/www/symfony/lib/controller/sfFrontWebController.class.php
[line] = 48
[function] = forward
[class] = sfController
[type] = -
[args] = Array
(
[0] = story
[1] = index
)

)

Actual result:
--
[1] = Array
(
[file] =
/var/www/symfony/lib/controller/sfFrontWebController.class.php
[line] = 48
[function] = forward
[class] = sfController
[type] = -
[object] = !!!
[args] = Array
(
[0] = story
[1] = index
)

)





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


#39250 [Fbk-Opn]: Session problem on PHP using authentication on Windows 2003 IIS 6.0

2006-10-25 Thread gutosantos82 at gmail dot com
 ID:   39250
 User updated by:  gutosantos82 at gmail dot com
 Reported By:  gutosantos82 at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

In according to Bug #37448 FastCGI Error: Server too busy Server 
it´s not possible to upgrade for newest version using fastcgi on
Windows.


Previous Comments:


[2006-10-25 09:01:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-24 23:48:21] gutosantos82 at gmail dot com

Description:

Using PHP 5.1.6 on Windows 2003 / IIS 6.0 through isapi_fcgi and
enabling IIS to use Integrated Windows Authentication without anonymous
access. The PHP server create one session file for each .php file that
is accessed by the Broswer, not allowing the use of sessions. The
Broswe Client is IE and by default is using Kerberos authentication
AUTH_TYPE = Negotiate.

The problem of not complience hostname that create this same problem
was not considerated because the hostname doesn´t contain invalid
charatcers. 

Other problem in this environment is that the PHP sometimes doesen´t
receive from the server some $_SERVER variables like HTTP_USER_AGENT
and ALL_HTTP.






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


#39250 [Opn-Fbk]: Session problem on PHP using authentication on Windows 2003 IIS 6.0

2006-10-25 Thread tony2001
 ID:   39250
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gutosantos82 at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

Did you really try the snapshot?


Previous Comments:


[2006-10-25 13:11:41] gutosantos82 at gmail dot com

In according to Bug #37448 FastCGI Error: Server too busy Server 
it´s not possible to upgrade for newest version using fastcgi on
Windows.



[2006-10-25 09:01:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-24 23:48:21] gutosantos82 at gmail dot com

Description:

Using PHP 5.1.6 on Windows 2003 / IIS 6.0 through isapi_fcgi and
enabling IIS to use Integrated Windows Authentication without anonymous
access. The PHP server create one session file for each .php file that
is accessed by the Broswer, not allowing the use of sessions. The
Broswe Client is IE and by default is using Kerberos authentication
AUTH_TYPE = Negotiate.

The problem of not complience hostname that create this same problem
was not considerated because the hostname doesn´t contain invalid
charatcers. 

Other problem in this environment is that the PHP sometimes doesen´t
receive from the server some $_SERVER variables like HTTP_USER_AGENT
and ALL_HTTP.






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


#39254 [NEW]: Refcount error with static variables and object references

2006-10-25 Thread benoit dot heinrich at swisscom dot com
From: benoit dot heinrich at swisscom dot com
Operating system: Linux
PHP version:  4.4.4
PHP Bug Type: Class/Object related
Bug description:  Refcount error with static variables and object references

Description:

Hello all,

I've a script that keep an object into a cache to speed up performances.

To access the cached instance, I'm using a static method of the class
MyFactory::getInstance();

In that method I need to have a reference on the instance itself because
the attached params also need to have a reference on their owner.

Case 1 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 2
 $b-code: 1657232709
 $b-params[toto]-parent-code: 1657232709

So the thing here is that the static keyword does not seems to keep a
refcount on the instance when it's created the first time.  So each time
you call the getInstance() it creates a new instance instead of keeping
the first created one.


Case 2 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 576672258
 $b-code: 2
 $b-params[toto]-parent-code: 576672258

Here we have the result we can expect accordingly to the PHP4
documentation, but this not what I need.


Please, can you investigate on that one ?


Cheers,
/Benoit

Reproduce code:
---
?php
error_reporting(E_ALL);

/**
 * This is an example of a param implementation class.
 * The constructor always need a reference on its parent 
 * (here it's not really needed, but in the real code it is)
 */
class toto
{
var $parent;
function toto($parent)
{
$this-parent = $parent;
}
}

/**
 * This the factory class used to create instances of params.
 * The factory instance must be unique.
 */
class MyFactory
{
var $code;
var $params = array();

function MyFactory()
{
$this-code = rand();
$this-initParam('toto'); 
}

/**
 * Initialize a parameter
 */
function initParam($param)
{
$this-params[$param] = new $param($this);
}

/**
 * Get the unique instance of the factory
 */
function  getInstance()
{
static $instance;

// Due to the bug $instance is always null
if (is_null($instance))
$instance = new MyFactory();

return $instance;
}
}

$a = MyFactory::getInstance();
$a-code = 2;
print '$a-code: ' . $a-code . \n;
print '$a-params[toto]-parent-code: ' .
$a-params['toto']-parent-code . \n;

$b = MyFactory::getInstance();
print '$b-code: ' . $b-code . \n;
print '$b-params[toto]-parent-code: ' .
$b-params['toto']-parent-code . \n;

?

Expected result:

$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 2
$b-params[toto]-parent-code: 2


Actual result:
--
$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 1657232709
$b-params[toto]-parent-code: 1657232709


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


#39250 [Fbk-Opn]: Session problem on PHP using authentication on Windows 2003 IIS 6.0

2006-10-25 Thread gutosantos82 at gmail dot com
 ID:   39250
 User updated by:  gutosantos82 at gmail dot com
 Reported By:  gutosantos82 at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

Yes, but really the fastcgi problem didn´t came up. But the others two
problems: sesssion doesn´t work and HTTP_USER_AGENT at phpinfo()
doesn´t appear. I checked if HTTP_USER_AGENT works in the app and seams
to work. Just need to resolve the session problem.


Previous Comments:


[2006-10-25 13:20:03] [EMAIL PROTECTED]

Did you really try the snapshot?



[2006-10-25 13:11:41] gutosantos82 at gmail dot com

In according to Bug #37448 FastCGI Error: Server too busy Server 
it´s not possible to upgrade for newest version using fastcgi on
Windows.



[2006-10-25 09:01:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-24 23:48:21] gutosantos82 at gmail dot com

Description:

Using PHP 5.1.6 on Windows 2003 / IIS 6.0 through isapi_fcgi and
enabling IIS to use Integrated Windows Authentication without anonymous
access. The PHP server create one session file for each .php file that
is accessed by the Broswer, not allowing the use of sessions. The
Broswe Client is IE and by default is using Kerberos authentication
AUTH_TYPE = Negotiate.

The problem of not complience hostname that create this same problem
was not considerated because the hostname doesn´t contain invalid
charatcers. 

Other problem in this environment is that the PHP sometimes doesen´t
receive from the server some $_SERVER variables like HTTP_USER_AGENT
and ALL_HTTP.






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


#39254 [Opn-Fbk]: Refcount error with static variables and object references

2006-10-25 Thread tony2001
 ID:   39254
 Updated by:   [EMAIL PROTECTED]
 Reported By:  benoit dot heinrich at swisscom dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-10-25 13:54:06] benoit dot heinrich at swisscom dot com

Description:

Hello all,

I've a script that keep an object into a cache to speed up
performances.

To access the cached instance, I'm using a static method of the class
MyFactory::getInstance();

In that method I need to have a reference on the instance itself
because the attached params also need to have a reference on their
owner.

Case 1 -
If I do $instance = new MyFactory(); in the getInstance() method then
I have this:

 $a-code: 2
 $a-params[toto]-parent-code: 2
 $b-code: 1657232709
 $b-params[toto]-parent-code: 1657232709

So the thing here is that the static keyword does not seems to keep a
refcount on the instance when it's created the first time.  So each
time you call the getInstance() it creates a new instance instead of
keeping the first created one.


Case 2 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 576672258
 $b-code: 2
 $b-params[toto]-parent-code: 576672258

Here we have the result we can expect accordingly to the PHP4
documentation, but this not what I need.


Please, can you investigate on that one ?


Cheers,
/Benoit

Reproduce code:
---
?php
error_reporting(E_ALL);

/**
 * This is an example of a param implementation class.
 * The constructor always need a reference on its parent 
 * (here it's not really needed, but in the real code it is)
 */
class toto
{
var $parent;
function toto($parent)
{
$this-parent = $parent;
}
}

/**
 * This the factory class used to create instances of params.
 * The factory instance must be unique.
 */
class MyFactory
{
var $code;
var $params = array();

function MyFactory()
{
$this-code = rand();
$this-initParam('toto'); 
}

/**
 * Initialize a parameter
 */
function initParam($param)
{
$this-params[$param] = new $param($this);
}

/**
 * Get the unique instance of the factory
 */
function  getInstance()
{
static $instance;

// Due to the bug $instance is always null
if (is_null($instance))
$instance = new MyFactory();

return $instance;
}
}

$a = MyFactory::getInstance();
$a-code = 2;
print '$a-code: ' . $a-code . \n;
print '$a-params[toto]-parent-code: ' .
$a-params['toto']-parent-code . \n;

$b = MyFactory::getInstance();
print '$b-code: ' . $b-code . \n;
print '$b-params[toto]-parent-code: ' .
$b-params['toto']-parent-code . \n;

?

Expected result:

$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 2
$b-params[toto]-parent-code: 2


Actual result:
--
$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 1657232709
$b-params[toto]-parent-code: 1657232709






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


#39250 [Opn]: Session problem on PHP using authentication on Windows 2003 IIS 6.0

2006-10-25 Thread gutosantos82 at gmail dot com
 ID:   39250
 User updated by:  gutosantos82 at gmail dot com
 Reported By:  gutosantos82 at gmail dot com
 Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

Just to confirm, the fastcgi problem Server Error, unable to connect
to fastcgi server. still happens.


Previous Comments:


[2006-10-25 13:57:32] gutosantos82 at gmail dot com

Yes, but really the fastcgi problem didn´t came up. But the others two
problems: sesssion doesn´t work and HTTP_USER_AGENT at phpinfo()
doesn´t appear. I checked if HTTP_USER_AGENT works in the app and seams
to work. Just need to resolve the session problem.



[2006-10-25 13:20:03] [EMAIL PROTECTED]

Did you really try the snapshot?



[2006-10-25 13:11:41] gutosantos82 at gmail dot com

In according to Bug #37448 FastCGI Error: Server too busy Server 
it´s not possible to upgrade for newest version using fastcgi on
Windows.



[2006-10-25 09:01:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-24 23:48:21] gutosantos82 at gmail dot com

Description:

Using PHP 5.1.6 on Windows 2003 / IIS 6.0 through isapi_fcgi and
enabling IIS to use Integrated Windows Authentication without anonymous
access. The PHP server create one session file for each .php file that
is accessed by the Broswer, not allowing the use of sessions. The
Broswe Client is IE and by default is using Kerberos authentication
AUTH_TYPE = Negotiate.

The problem of not complience hostname that create this same problem
was not considerated because the hostname doesn´t contain invalid
charatcers. 

Other problem in this environment is that the PHP sometimes doesen´t
receive from the server some $_SERVER variables like HTTP_USER_AGENT
and ALL_HTTP.






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


#39254 [Fbk-Opn]: Refcount error with static variables and object references

2006-10-25 Thread benoit dot heinrich at swisscom dot com
 ID:   39254
 User updated by:  benoit dot heinrich at swisscom dot com
 Reported By:  benoit dot heinrich at swisscom dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

I'm sorry but I'm using php 4.4 and I can't use PHP 5 for a lot of
reasons.
Do you have any fix for php 4.4 ?

Cheers,
/Benoit


Previous Comments:


[2006-10-25 14:01:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 13:54:06] benoit dot heinrich at swisscom dot com

Description:

Hello all,

I've a script that keep an object into a cache to speed up
performances.

To access the cached instance, I'm using a static method of the class
MyFactory::getInstance();

In that method I need to have a reference on the instance itself
because the attached params also need to have a reference on their
owner.

Case 1 -
If I do $instance = new MyFactory(); in the getInstance() method then
I have this:

 $a-code: 2
 $a-params[toto]-parent-code: 2
 $b-code: 1657232709
 $b-params[toto]-parent-code: 1657232709

So the thing here is that the static keyword does not seems to keep a
refcount on the instance when it's created the first time.  So each
time you call the getInstance() it creates a new instance instead of
keeping the first created one.


Case 2 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 576672258
 $b-code: 2
 $b-params[toto]-parent-code: 576672258

Here we have the result we can expect accordingly to the PHP4
documentation, but this not what I need.


Please, can you investigate on that one ?


Cheers,
/Benoit

Reproduce code:
---
?php
error_reporting(E_ALL);

/**
 * This is an example of a param implementation class.
 * The constructor always need a reference on its parent 
 * (here it's not really needed, but in the real code it is)
 */
class toto
{
var $parent;
function toto($parent)
{
$this-parent = $parent;
}
}

/**
 * This the factory class used to create instances of params.
 * The factory instance must be unique.
 */
class MyFactory
{
var $code;
var $params = array();

function MyFactory()
{
$this-code = rand();
$this-initParam('toto'); 
}

/**
 * Initialize a parameter
 */
function initParam($param)
{
$this-params[$param] = new $param($this);
}

/**
 * Get the unique instance of the factory
 */
function  getInstance()
{
static $instance;

// Due to the bug $instance is always null
if (is_null($instance))
$instance = new MyFactory();

return $instance;
}
}

$a = MyFactory::getInstance();
$a-code = 2;
print '$a-code: ' . $a-code . \n;
print '$a-params[toto]-parent-code: ' .
$a-params['toto']-parent-code . \n;

$b = MyFactory::getInstance();
print '$b-code: ' . $b-code . \n;
print '$b-params[toto]-parent-code: ' .
$b-params['toto']-parent-code . \n;

?

Expected result:

$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 2
$b-params[toto]-parent-code: 2


Actual result:
--
$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 1657232709
$b-params[toto]-parent-code: 1657232709






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


#39250 [Opn]: Session problem on PHP using authentication on Windows 2003 IIS 6.0

2006-10-25 Thread gutosantos82 at gmail dot com
 ID:   39250
 User updated by:  gutosantos82 at gmail dot com
 Reported By:  gutosantos82 at gmail dot com
 Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  5.1.6
 New Comment:

Using diretly php5_isapi.dll the session and HTTP_USER_AGENT problem
seems to be resolved. But makes the application very unstable.


Previous Comments:


[2006-10-25 14:10:19] gutosantos82 at gmail dot com

Just to confirm, the fastcgi problem Server Error, unable to connect
to fastcgi server. still happens.



[2006-10-25 13:57:32] gutosantos82 at gmail dot com

Yes, but really the fastcgi problem didn´t came up. But the others two
problems: sesssion doesn´t work and HTTP_USER_AGENT at phpinfo()
doesn´t appear. I checked if HTTP_USER_AGENT works in the app and seams
to work. Just need to resolve the session problem.



[2006-10-25 13:20:03] [EMAIL PROTECTED]

Did you really try the snapshot?



[2006-10-25 13:11:41] gutosantos82 at gmail dot com

In according to Bug #37448 FastCGI Error: Server too busy Server 
it´s not possible to upgrade for newest version using fastcgi on
Windows.



[2006-10-25 09:01:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#39254 [Opn]: Refcount error with static variables and object references

2006-10-25 Thread benoit dot heinrich at swisscom dot com
 ID:   39254
 User updated by:  benoit dot heinrich at swisscom dot com
 Reported By:  benoit dot heinrich at swisscom dot com
 Status:   Open
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

I tried to find a workaround, and when I tried to use the 'global'
keyword instead of the 'static' then it gives exactly the same
problem.

I'm still searching for a workaround but for now I have nothing.


Cheers,
/Benoit


Previous Comments:


[2006-10-25 14:11:12] benoit dot heinrich at swisscom dot com

I'm sorry but I'm using php 4.4 and I can't use PHP 5 for a lot of
reasons.
Do you have any fix for php 4.4 ?

Cheers,
/Benoit



[2006-10-25 14:01:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 13:54:06] benoit dot heinrich at swisscom dot com

Description:

Hello all,

I've a script that keep an object into a cache to speed up
performances.

To access the cached instance, I'm using a static method of the class
MyFactory::getInstance();

In that method I need to have a reference on the instance itself
because the attached params also need to have a reference on their
owner.

Case 1 -
If I do $instance = new MyFactory(); in the getInstance() method then
I have this:

 $a-code: 2
 $a-params[toto]-parent-code: 2
 $b-code: 1657232709
 $b-params[toto]-parent-code: 1657232709

So the thing here is that the static keyword does not seems to keep a
refcount on the instance when it's created the first time.  So each
time you call the getInstance() it creates a new instance instead of
keeping the first created one.


Case 2 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 576672258
 $b-code: 2
 $b-params[toto]-parent-code: 576672258

Here we have the result we can expect accordingly to the PHP4
documentation, but this not what I need.


Please, can you investigate on that one ?


Cheers,
/Benoit

Reproduce code:
---
?php
error_reporting(E_ALL);

/**
 * This is an example of a param implementation class.
 * The constructor always need a reference on its parent 
 * (here it's not really needed, but in the real code it is)
 */
class toto
{
var $parent;
function toto($parent)
{
$this-parent = $parent;
}
}

/**
 * This the factory class used to create instances of params.
 * The factory instance must be unique.
 */
class MyFactory
{
var $code;
var $params = array();

function MyFactory()
{
$this-code = rand();
$this-initParam('toto'); 
}

/**
 * Initialize a parameter
 */
function initParam($param)
{
$this-params[$param] = new $param($this);
}

/**
 * Get the unique instance of the factory
 */
function  getInstance()
{
static $instance;

// Due to the bug $instance is always null
if (is_null($instance))
$instance = new MyFactory();

return $instance;
}
}

$a = MyFactory::getInstance();
$a-code = 2;
print '$a-code: ' . $a-code . \n;
print '$a-params[toto]-parent-code: ' .
$a-params['toto']-parent-code . \n;

$b = MyFactory::getInstance();
print '$b-code: ' . $b-code . \n;
print '$b-params[toto]-parent-code: ' .
$b-params['toto']-parent-code . \n;

?

Expected result:

$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 2
$b-params[toto]-parent-code: 2


Actual result:
--
$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 1657232709
$b-params[toto]-parent-code: 1657232709






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


#39255 [NEW]: foreach only shows last item

2006-10-25 Thread PK at KoffieHosting dot com
From: PK at KoffieHosting dot com
Operating system: ISS 6.0
PHP version:  5.1.6
PHP Bug Type: Scripting Engine problem
Bug description:  foreach only shows last item

Description:

FastCGI (PHP5) on ISS 6.0: the foreach only shows the last item.

Reproduce code:
---
foreach ($_POST['Boxes'] as $Key = $Value);
{
echo '['.$Key.'] = '.$Value;
}

Note that this does work 100%:

while (list($What, $Amount) = each($_POST['Boxes']))
{
echo '['.$Key.'] = '.$Value;
}

Expected result:

 [4] = 0 
 [2] = 0 
 [3] = 1
 [6] = 0
 [1] = 0
 [5] = 0

Actual result:
--
 [5] = 0

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


#39254 [Opn]: Refcount error with static variables and object references

2006-10-25 Thread tony2001
 ID:   39254
 Updated by:   [EMAIL PROTECTED]
 Reported By:  benoit dot heinrich at swisscom dot com
 Status:   Open
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

I really doubt there will be any active development in 4.x branch, for
we're mostly working on 5.x and 6.x at the moment.


Previous Comments:


[2006-10-25 14:42:31] benoit dot heinrich at swisscom dot com

I tried to find a workaround, and when I tried to use the 'global'
keyword instead of the 'static' then it gives exactly the same
problem.

I'm still searching for a workaround but for now I have nothing.


Cheers,
/Benoit



[2006-10-25 14:11:12] benoit dot heinrich at swisscom dot com

I'm sorry but I'm using php 4.4 and I can't use PHP 5 for a lot of
reasons.
Do you have any fix for php 4.4 ?

Cheers,
/Benoit



[2006-10-25 14:01:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 13:54:06] benoit dot heinrich at swisscom dot com

Description:

Hello all,

I've a script that keep an object into a cache to speed up
performances.

To access the cached instance, I'm using a static method of the class
MyFactory::getInstance();

In that method I need to have a reference on the instance itself
because the attached params also need to have a reference on their
owner.

Case 1 -
If I do $instance = new MyFactory(); in the getInstance() method then
I have this:

 $a-code: 2
 $a-params[toto]-parent-code: 2
 $b-code: 1657232709
 $b-params[toto]-parent-code: 1657232709

So the thing here is that the static keyword does not seems to keep a
refcount on the instance when it's created the first time.  So each
time you call the getInstance() it creates a new instance instead of
keeping the first created one.


Case 2 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 576672258
 $b-code: 2
 $b-params[toto]-parent-code: 576672258

Here we have the result we can expect accordingly to the PHP4
documentation, but this not what I need.


Please, can you investigate on that one ?


Cheers,
/Benoit

Reproduce code:
---
?php
error_reporting(E_ALL);

/**
 * This is an example of a param implementation class.
 * The constructor always need a reference on its parent 
 * (here it's not really needed, but in the real code it is)
 */
class toto
{
var $parent;
function toto($parent)
{
$this-parent = $parent;
}
}

/**
 * This the factory class used to create instances of params.
 * The factory instance must be unique.
 */
class MyFactory
{
var $code;
var $params = array();

function MyFactory()
{
$this-code = rand();
$this-initParam('toto'); 
}

/**
 * Initialize a parameter
 */
function initParam($param)
{
$this-params[$param] = new $param($this);
}

/**
 * Get the unique instance of the factory
 */
function  getInstance()
{
static $instance;

// Due to the bug $instance is always null
if (is_null($instance))
$instance = new MyFactory();

return $instance;
}
}

$a = MyFactory::getInstance();
$a-code = 2;
print '$a-code: ' . $a-code . \n;
print '$a-params[toto]-parent-code: ' .
$a-params['toto']-parent-code . \n;

$b = MyFactory::getInstance();
print '$b-code: ' . $b-code . \n;
print '$b-params[toto]-parent-code: ' .
$b-params['toto']-parent-code . \n;

?

Expected result:

$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 2
$b-params[toto]-parent-code: 2


Actual result:
--
$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 1657232709
$b-params[toto]-parent-code: 1657232709






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


#39256 [NEW]: rename() destroys images

2006-10-25 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: MacOS X
PHP version:  5.1.6
PHP Bug Type: Filesystem function related
Bug description:  rename() destroys images

Description:

Before I begin: I'm using MacOS X 10.4.8 with PHP Version 5.1.6
www.entropy.ch Release 1 (Universal Binary) perhaps it's related only to
this release?!

When I use rename() to move an image file from $src to $dest the Finder
(Explorer on Windows) tells me that the file is corrupt. If I use copy() +
unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm
not sure with this ...

Reproduce code:
---
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);


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


#39255 [Opn-Fbk]: foreach only shows last item

2006-10-25 Thread tony2001
 ID:   39255
 Updated by:   [EMAIL PROTECTED]
 Reported By:  PK at KoffieHosting dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: ISS 6.0
 PHP Version:  5.1.6
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-10-25 14:47:59] PK at KoffieHosting dot com

Description:

FastCGI (PHP5) on ISS 6.0: the foreach only shows the last item.

Reproduce code:
---
foreach ($_POST['Boxes'] as $Key = $Value);
{
echo '['.$Key.'] = '.$Value;
}

Note that this does work 100%:

while (list($What, $Amount) = each($_POST['Boxes']))
{
echo '['.$Key.'] = '.$Value;
}

Expected result:

 [4] = 0 
 [2] = 0 
 [3] = 1
 [6] = 0
 [1] = 0
 [5] = 0

Actual result:
--
 [5] = 0





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


#39255 [Fbk-Opn]: foreach only shows last item

2006-10-25 Thread PK at KoffieHosting dot com
 ID:   39255
 User updated by:  PK at KoffieHosting dot com
 Reported By:  PK at KoffieHosting dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: ISS 6.0
 PHP Version:  5.1.6
 New Comment:

Unfortunately I can not upgrade that server.


Previous Comments:


[2006-10-25 14:49:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 14:47:59] PK at KoffieHosting dot com

Description:

FastCGI (PHP5) on ISS 6.0: the foreach only shows the last item.

Reproduce code:
---
foreach ($_POST['Boxes'] as $Key = $Value);
{
echo '['.$Key.'] = '.$Value;
}

Note that this does work 100%:

while (list($What, $Amount) = each($_POST['Boxes']))
{
echo '['.$Key.'] = '.$Value;
}

Expected result:

 [4] = 0 
 [2] = 0 
 [3] = 1
 [6] = 0
 [1] = 0
 [5] = 0

Actual result:
--
 [5] = 0





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


#39256 [Opn-Bgs]: rename() destroys images

2006-10-25 Thread tony2001
 ID:   39256
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: MacOS X
 PHP Version:  5.1.6
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2006-10-25 14:49:47] [EMAIL PROTECTED]

Description:

Before I begin: I'm using MacOS X 10.4.8 with PHP Version 5.1.6
www.entropy.ch Release 1 (Universal Binary) perhaps it's related only
to this release?!

When I use rename() to move an image file from $src to $dest the Finder
(Explorer on Windows) tells me that the file is corrupt. If I use copy()
+ unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm
not sure with this ...

Reproduce code:
---
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);






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


#39255 [Opn-Fbk]: foreach only shows last item

2006-10-25 Thread tony2001
 ID:   39255
 Updated by:   [EMAIL PROTECTED]
 Reported By:  PK at KoffieHosting dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: ISS 6.0
 PHP Version:  5.1.6
 New Comment:

No need to upgrade the server, just put it in some other directory and
try it.


Previous Comments:


[2006-10-25 14:53:06] PK at KoffieHosting dot com

Unfortunately I can not upgrade that server.



[2006-10-25 14:49:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 14:47:59] PK at KoffieHosting dot com

Description:

FastCGI (PHP5) on ISS 6.0: the foreach only shows the last item.

Reproduce code:
---
foreach ($_POST['Boxes'] as $Key = $Value);
{
echo '['.$Key.'] = '.$Value;
}

Note that this does work 100%:

while (list($What, $Amount) = each($_POST['Boxes']))
{
echo '['.$Key.'] = '.$Value;
}

Expected result:

 [4] = 0 
 [2] = 0 
 [3] = 1
 [6] = 0
 [1] = 0
 [5] = 0

Actual result:
--
 [5] = 0





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


#39255 [Fbk-Opn]: foreach only shows last item

2006-10-25 Thread PK at KoffieHosting dot com
 ID:   39255
 User updated by:  PK at KoffieHosting dot com
 Reported By:  PK at KoffieHosting dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: ISS 6.0
 PHP Version:  5.1.6
 New Comment:

I don't have enough rights on that machine (as it is not hosted with
us) to try that.


Previous Comments:


[2006-10-25 15:02:00] [EMAIL PROTECTED]

No need to upgrade the server, just put it in some other directory and
try it.



[2006-10-25 14:53:06] PK at KoffieHosting dot com

Unfortunately I can not upgrade that server.



[2006-10-25 14:49:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 14:47:59] PK at KoffieHosting dot com

Description:

FastCGI (PHP5) on ISS 6.0: the foreach only shows the last item.

Reproduce code:
---
foreach ($_POST['Boxes'] as $Key = $Value);
{
echo '['.$Key.'] = '.$Value;
}

Note that this does work 100%:

while (list($What, $Amount) = each($_POST['Boxes']))
{
echo '['.$Key.'] = '.$Value;
}

Expected result:

 [4] = 0 
 [2] = 0 
 [3] = 1
 [6] = 0
 [1] = 0
 [5] = 0

Actual result:
--
 [5] = 0





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


#39256 [Bgs-Opn]: rename() destroys images

2006-10-25 Thread [EMAIL PROTECTED]
 ID:   39256
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: MacOS X
 PHP Version:  5.1.6
 New Comment:

Sorry, but haven't you read the stuff in the second paragraph?!!
If the rename() function doesn't do the same as copy() + unlink() than
it seems obvious that there is a bug in PHP - even it's only on the
Mac, right?!
If you don't agree with me than just give me a hint why not.
Regards
Bjoern


Previous Comments:


[2006-10-25 15:01:07] [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-10-25 14:49:47] [EMAIL PROTECTED]

Description:

Before I begin: I'm using MacOS X 10.4.8 with PHP Version 5.1.6
www.entropy.ch Release 1 (Universal Binary) perhaps it's related only
to this release?!

When I use rename() to move an image file from $src to $dest the Finder
(Explorer on Windows) tells me that the file is corrupt. If I use copy()
+ unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm
not sure with this ...

Reproduce code:
---
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);






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


#39256 [Opn-Fbk]: rename() destroys images

2006-10-25 Thread tony2001
 ID:   39256
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: MacOS X
 PHP Version:  5.1.6
 New Comment:

It's quite easy - if you didn't try the snapshot, didn't explain what
means corrupted to you, didn't provide a reproduce case, then most
likely the whole problem is bogus.



Previous Comments:


[2006-10-25 15:35:43] [EMAIL PROTECTED]

Sorry, but haven't you read the stuff in the second paragraph?!!
If the rename() function doesn't do the same as copy() + unlink() than
it seems obvious that there is a bug in PHP - even it's only on the
Mac, right?!
If you don't agree with me than just give me a hint why not.
Regards
Bjoern



[2006-10-25 15:01:07] [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-10-25 14:49:47] [EMAIL PROTECTED]

Description:

Before I begin: I'm using MacOS X 10.4.8 with PHP Version 5.1.6
www.entropy.ch Release 1 (Universal Binary) perhaps it's related only
to this release?!

When I use rename() to move an image file from $src to $dest the Finder
(Explorer on Windows) tells me that the file is corrupt. If I use copy()
+ unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm
not sure with this ...

Reproduce code:
---
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);






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


#39256 [Fbk-Opn]: rename() destroys images

2006-10-25 Thread [EMAIL PROTECTED]
 ID:   39256
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: MacOS X
 PHP Version:  5.1.6
 New Comment:

OK, I see. Just because I don't want to destroy my own developement
environment with a snapshot and I'm not that freaky to see where PHP
has a problem with simply renaming images the hole thing is bogus,
eh?!
That's realy a cool way to fix bugs or negate them! If the user hasn't
enough skills we don't have to fix anything. Keep on buddy, that's
realy the way we make PHP better! :(


Previous Comments:


[2006-10-25 15:46:28] [EMAIL PROTECTED]

It's quite easy - if you didn't try the snapshot, didn't explain what
means corrupted to you, didn't provide a reproduce case, then most
likely the whole problem is bogus.




[2006-10-25 15:35:43] [EMAIL PROTECTED]

Sorry, but haven't you read the stuff in the second paragraph?!!
If the rename() function doesn't do the same as copy() + unlink() than
it seems obvious that there is a bug in PHP - even it's only on the
Mac, right?!
If you don't agree with me than just give me a hint why not.
Regards
Bjoern



[2006-10-25 15:01:07] [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-10-25 14:49:47] [EMAIL PROTECTED]

Description:

Before I begin: I'm using MacOS X 10.4.8 with PHP Version 5.1.6
www.entropy.ch Release 1 (Universal Binary) perhaps it's related only
to this release?!

When I use rename() to move an image file from $src to $dest the Finder
(Explorer on Windows) tells me that the file is corrupt. If I use copy()
+ unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm
not sure with this ...

Reproduce code:
---
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);






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


#39256 [Opn-Bgs]: rename() destroys images

2006-10-25 Thread tony2001
 ID:   39256
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: MacOS X
 PHP Version:  5.1.6
 New Comment:

No useful info - bogus.


Previous Comments:


[2006-10-25 16:07:47] [EMAIL PROTECTED]

OK, I see. Just because I don't want to destroy my own developement
environment with a snapshot and I'm not that freaky to see where PHP
has a problem with simply renaming images the hole thing is bogus,
eh?!
That's realy a cool way to fix bugs or negate them! If the user hasn't
enough skills we don't have to fix anything. Keep on buddy, that's
realy the way we make PHP better! :(



[2006-10-25 15:46:28] [EMAIL PROTECTED]

It's quite easy - if you didn't try the snapshot, didn't explain what
means corrupted to you, didn't provide a reproduce case, then most
likely the whole problem is bogus.




[2006-10-25 15:35:43] [EMAIL PROTECTED]

Sorry, but haven't you read the stuff in the second paragraph?!!
If the rename() function doesn't do the same as copy() + unlink() than
it seems obvious that there is a bug in PHP - even it's only on the
Mac, right?!
If you don't agree with me than just give me a hint why not.
Regards
Bjoern



[2006-10-25 15:01:07] [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-10-25 14:49:47] [EMAIL PROTECTED]

Description:

Before I begin: I'm using MacOS X 10.4.8 with PHP Version 5.1.6
www.entropy.ch Release 1 (Universal Binary) perhaps it's related only
to this release?!

When I use rename() to move an image file from $src to $dest the Finder
(Explorer on Windows) tells me that the file is corrupt. If I use copy()
+ unlink() instead everything works fine.
I think this is a only Mac related problem with the file header but I'm
not sure with this ...

Reproduce code:
---
rename($src, $dest);

vs.

copy($src, $dest);
unlink($src);






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


#39233 [Csd-Opn]: Windows MSI installer cannot configure Apache 2.2

2006-10-25 Thread matt at genesi-usa dot com
 ID:   39233
 User updated by:  matt at genesi-usa dot com
 Reported By:  matt at genesi-usa dot com
-Status:   Closed
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP Home SP2
 PHP Version:  5.2.0RC5
 Assigned To:  jmertic
 New Comment:

the (!copy(httpd.conf, httpd.conf.bak)) check still fails here for some
reason (permission denied?)


Previous Comments:


[2006-10-24 12:10:20] [EMAIL PROTECTED]

Added removal of ';' in $foldername, and tweaked check for file ( using
is_file() instead of file() ) now in CVS.



[2006-10-23 09:49:38] matt at genesi-usa dot com

Description:

The apacheconfig.php script bundled with the new MSI installer breaks;
when selecting a directory from the installer, a semicolon is appended
to the path. When it is passed to the script, the script builds
configuration filenames as:

C:\Program Files\Apache Software Foundation\Apache2.2\conf\;httpd.conf

Fixing that error, it fails to backup the httpd.conf and mime.types
files before editing.

Reproduce code:
---
Select Apache 2.2 module from the list, pick a directory.

I fixed it by changing:

$foldername = str_replace(array('', ';\\'), array('','\\'),
$argv[2]);

Also even though I run as Administrator for the purposes of installing,
the two backup checks fail for some reason. I didn't look into this so I
just commented that entire elseif statement out for both files (I don't
need a backup it was a fresh Apache 2.2 install with the default
configuration file)








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


#39257 [NEW]: preg_replace_callback swallows exceptions

2006-10-25 Thread php at theos dot me dot uk
From: php at theos dot me dot uk
Operating system: Debian Sid
PHP version:  5.1.6
PHP Bug Type: PCRE related
Bug description:  preg_replace_callback swallows exceptions

Description:

If a function called by preg_replace_callback throws an 
exception this exception is not propagated up to the 
function which called preg_replace_callback. Instead a PHP 
error is produced. This error contains no information about 
what the problem was or where it occurred.

Reproduce code:
---
?php

function thrower() {
  throw new Exception(Hello);
}

try {
  $b = preg_replace_callback('/./', 'thrower', 'a');
} catch ( Exception $e ) {
  echo 'Yay, exception!';
}

?

Expected result:

code to output

Yay, exception!

Actual result:
--
Warning: preg_replace_callback(): Unable to call custom 
replacement function on line 13


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


#39257 [Opn-Fbk]: preg_replace_callback swallows exceptions

2006-10-25 Thread tony2001
 ID:   39257
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at theos dot me dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: PCRE related
 Operating System: Debian Sid
 PHP Version:  5.1.6
 New Comment:

Please try using this CVS snapshot:

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

Cannot reproduce.


Previous Comments:


[2006-10-25 17:52:27] php at theos dot me dot uk

Description:

If a function called by preg_replace_callback throws an 
exception this exception is not propagated up to the 
function which called preg_replace_callback. Instead a PHP 
error is produced. This error contains no information about 
what the problem was or where it occurred.

Reproduce code:
---
?php

function thrower() {
  throw new Exception(Hello);
}

try {
  $b = preg_replace_callback('/./', 'thrower', 'a');
} catch ( Exception $e ) {
  echo 'Yay, exception!';
}

?

Expected result:

code to output

Yay, exception!

Actual result:
--
Warning: preg_replace_callback(): Unable to call custom 
replacement function on line 13






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


#39254 [Com]: Refcount error with static variables and object references

2006-10-25 Thread judas dot iscariote at gmail dot com
 ID:   39254
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  benoit dot heinrich at swisscom dot com
 Status:   Open
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.4.4
 New Comment:

benoit: is very likely you are on your own now, PHP5 is out since years
and certainly solve your problem, PHP4 active development has ceased
permanently, it is only open to security fixes or severe regresions
that affects large part of the user base.


Previous Comments:


[2006-10-25 14:49:05] [EMAIL PROTECTED]

I really doubt there will be any active development in 4.x branch, for
we're mostly working on 5.x and 6.x at the moment.



[2006-10-25 14:42:31] benoit dot heinrich at swisscom dot com

I tried to find a workaround, and when I tried to use the 'global'
keyword instead of the 'static' then it gives exactly the same
problem.

I'm still searching for a workaround but for now I have nothing.


Cheers,
/Benoit



[2006-10-25 14:11:12] benoit dot heinrich at swisscom dot com

I'm sorry but I'm using php 4.4 and I can't use PHP 5 for a lot of
reasons.
Do you have any fix for php 4.4 ?

Cheers,
/Benoit



[2006-10-25 14:01:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-25 13:54:06] benoit dot heinrich at swisscom dot com

Description:

Hello all,

I've a script that keep an object into a cache to speed up
performances.

To access the cached instance, I'm using a static method of the class
MyFactory::getInstance();

In that method I need to have a reference on the instance itself
because the attached params also need to have a reference on their
owner.

Case 1 -
If I do $instance = new MyFactory(); in the getInstance() method then
I have this:

 $a-code: 2
 $a-params[toto]-parent-code: 2
 $b-code: 1657232709
 $b-params[toto]-parent-code: 1657232709

So the thing here is that the static keyword does not seems to keep a
refcount on the instance when it's created the first time.  So each
time you call the getInstance() it creates a new instance instead of
keeping the first created one.


Case 2 -
If I do $instance = new MyFactory(); in the getInstance() method then I
have this:

 $a-code: 2
 $a-params[toto]-parent-code: 576672258
 $b-code: 2
 $b-params[toto]-parent-code: 576672258

Here we have the result we can expect accordingly to the PHP4
documentation, but this not what I need.


Please, can you investigate on that one ?


Cheers,
/Benoit

Reproduce code:
---
?php
error_reporting(E_ALL);

/**
 * This is an example of a param implementation class.
 * The constructor always need a reference on its parent 
 * (here it's not really needed, but in the real code it is)
 */
class toto
{
var $parent;
function toto($parent)
{
$this-parent = $parent;
}
}

/**
 * This the factory class used to create instances of params.
 * The factory instance must be unique.
 */
class MyFactory
{
var $code;
var $params = array();

function MyFactory()
{
$this-code = rand();
$this-initParam('toto'); 
}

/**
 * Initialize a parameter
 */
function initParam($param)
{
$this-params[$param] = new $param($this);
}

/**
 * Get the unique instance of the factory
 */
function  getInstance()
{
static $instance;

// Due to the bug $instance is always null
if (is_null($instance))
$instance = new MyFactory();

return $instance;
}
}

$a = MyFactory::getInstance();
$a-code = 2;
print '$a-code: ' . $a-code . \n;
print '$a-params[toto]-parent-code: ' .
$a-params['toto']-parent-code . \n;

$b = MyFactory::getInstance();
print '$b-code: ' . $b-code . \n;
print '$b-params[toto]-parent-code: ' .
$b-params['toto']-parent-code . \n;

?

Expected result:

$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 2
$b-params[toto]-parent-code: 2


Actual result:
--
$a-code: 2
$a-params[toto]-parent-code: 2
$b-code: 1657232709
$b-params[toto]-parent-code: 1657232709






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


#39259 [NEW]: imap_delete argument is not a valid imap resource

2006-10-25 Thread mark at runryder dot com
From: mark at runryder dot com
Operating system: Linux 2.6.11.4-21.14-bigsmp
PHP version:  5CVS-2006-10-25 (snap)
PHP Bug Type: IMAP related
Bug description:  imap_delete argument is not a valid imap resource

Description:

I have over a man week invested trouble shooting this with no luck. Now
using the latest of everything. 

Works:
$mBox=imap_open('{localhost:143}INBOX','username','password',CL_EXPUNGE);
Works: $check=imap_check($mBox);
Works: $header=imap_fetchheader($mBox,1);
Error: imap_delete($mbox,1);
Error: imap_close($mbox);

Error: [25-Oct-2006 16:27:04] PHP Warning:  imap_delete(): supplied
argument is not a valid imap resource in /rr1/lib/readMail.dat on line 6
Error: [25-Oct-2006 16:27:04] PHP Warning:  imap_close(): supplied
argument is not a valid imap resource in /rr1/lib/readMail.dat on line 7

wget http://snaps.php.net/php5.2-200610251830.tar.bz2

Configure Command  './configure'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysqli=/usr/local/mysql/bin/mysql_config' '--without-sqlite'
'--enable-mbstring' '--without-pear' '--with-zlib' '--with-gd'
'--with-jpeg-dir=/usr/lib/' '--with-png-dir=/usr/lib/'
'--with-freetype-dir=/usr/lib/' '--enable-gd-native-ttf'
'--with-imap=/usr/local/imap-2006c/' '--with-imap-ssl'


Reproduce code:
---
%
$mBox=imap_open('{localhost:143}INBOX','username','password',CL_EXPUNGE);
$check=imap_check($mBox);
$header=imap_fetchheader($mBox,1);
$delete=imap_delete($mbox,1);
$close=imap_close($mbox);
%


Expected result:

Message 1 deleted

Actual result:
--
Nothing except the error:

Error: [25-Oct-2006 16:27:04] PHP Warning:  imap_delete(): supplied
argument is not a valid imap resource in /rr1/lib/readMail.dat on line 6


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


#39260 [NEW]: A misleading bit in the Zend API

2006-10-25 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: irrelevant
PHP version:  5.2.0RC5
PHP Bug Type: Scripting Engine problem
Bug description:  A misleading bit in the Zend API

Description:

Not the biggest bug in the world, more a mosquito...

In zend_compile.h:

ZEND_API int zend_unmangle_property_name(char *mangled_property, int
mangled_property_len, char **prop_name, char **class_name);


In zend_compile.c:

ZEND_API int zend_unmangle_property_name(char *mangled_property, int len,
char **class_name, char **prop_name)

Someone's obviously noticed this a long time ago - on SUCCESS we have:

*class_name = mangled_property+1;
*prop_name = (*class_name)+class_name_len;

and nobody writing for PECL seems to have made the obvious mistake (yet).
But somebody, somewhere, will.

The declaration in the header file obviously needs changing to match the
source file, and as for the implementation - well, it might just be nice
to make it read more sanely :) If I trusted myself to do that without
somehow messing it up along the way and breaking practically every
extension out there, there'd be a patch with this report. I'm afraid I
don't, sorry.


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


#39261 [NEW]: strftime chops characters with utf-8

2006-10-25 Thread mehmetyucel at gmail dot com
From: mehmetyucel at gmail dot com
Operating system: MS Windows 2003 ES/Fedora Core 5
PHP version:  5.1.6
PHP Bug Type: Output Control
Bug description:  strftime chops characters with utf-8

Description:

If the localization that is set by setlocale has non ISO-8859-1 characters
strftime destroys these.
Reproducable on both Fedora Core 5 and Windows 2003 Enterprise Server
tested for 2 languages (Spanish / Turkish)

Reproduce code:
---
header('Content-Type: text/html; charset=utf-8');

setlocale(LC_TIME,spanish);
echo strftime(%d %B %Y %A,strtotime(2006-10-28)).br;
setlocale(LC_TIME,turkish);
echo strftime(%d %B %Y %A,strtotime(2006-10-26)).br;
echo strftime(%d %B %Y %A,strtotime(2006-10-25)).br;


Expected result:

28 octubre 2006 sábado
26 Ekim 2006 Per#351;embe
25 Ekim 2006 Çar#351;amba

Actual result:
--
28 octubre 2006 s#6305;do
26 Ekim 2006 Per?r25 Ekim 2006 #481;r?r

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


#39249 [WFx]: DST Issue

2006-10-25 Thread julianoa at webcorensp dot org dot br
 ID:   39249
 User updated by:  julianoa at webcorensp dot org dot br
 Reported By:  julianoa at webcorensp dot org dot br
 Status:   Wont fix
 Bug Type: Date/time related
 Operating System: Linux - FreeBSD
 PHP Version:  5*
 New Comment:

It worked on my linux box! I still need to compile it in my BSD. But
I´d like to inform that timezonedb is poorly documented. If you use a
debian box, it´s necessary to have php-dev pack installed and also
create a symlink from /usr/include/php5 to /usr/include/php, otherwise
it won´t compile. As soon as I install it on my BSD I give some more
feedback, and then close de case.


Previous Comments:


[2006-10-24 21:13:11] [EMAIL PROTECTED]

Install http://pecl.php.net/timezonedb which has all the latest
definitions.



[2006-10-24 19:40:27] julianoa at webcorensp dot org dot br

Description:

Every year my DST settings change, and I need to reconfigure my zone
file DST start and ending times in all my servers (BSD, Linux and
Windows).
I make the changes correctly to turn DST on in Nov 5 (default was Oct
15), every linux system accepted that change (including Apache), but
php date command returns my time with DST on.
This problem doesn´t occur in a Windows Server, in this machine PHP
returns time correctly.

Reproduce code:
---
echo date(l, d  F  Y,  H:i - T - I)

returns DST turned on. (after Oct 15 and before Nov 5)

zdump zone file (Brazil/East)

Brazil/East  Sun Nov  5 02:59:59 2006 UTC = Sat Nov  4 23:59:59 2006
BRT isdst=0 gmtoff=-10800
Brazil/East  Sun Nov  5 03:00:00 2006 UTC = Sun Nov  5 01:00:00 2006
BRT isdst=1 gmtoff=-7200
Brazil/East  Sun Feb 25 01:59:59 2007 UTC = Sat Feb 24 23:59:59 2007
BRT isdst=1 gmtoff=-7200
Brazil/East  Sun Feb 25 02:00:00 2007 UTC = Sat Feb 24 23:00:00 2007
BRT isdst=0 gmtoff=-10800






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