#26015 [NEW]: imap_thread Apache2 signal Segmentation fault

2003-10-27 Thread tirny at mail dot ru
From: tirny at mail dot ru
Operating system: freeBSD 5.1p10
PHP version:  4.3.4RC2
PHP Bug Type: IMAP related
Bug description:  imap_thread Apache2 signal Segmentation fault

Description:

On RHL7.3 Apache2.0.44 PHP4.3.4 (cclient - do not remember version)- is
work fine.
Changing OS & soft on freeBSD, Apache2.0.47, 4.3.4RC1, cclient-2002d,1 not
work:
script terminated after 30s (in my news group 5 messages)
and in apache error log this:
child pid 21979 exit signal Segmentation fault (11)

Reproduce code:
---
\n" . $headers[$val - 1] . "\n";
}
else if ($tree[1] == "branch") {
  print "\n";
}
  }
  imap_close($nntp);

?>



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


#26006 [Opn->Bgs]: error_reporting() and @ problem

2003-10-27 Thread iliaa
 ID:   26006
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gms08701 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: FreeBSD 4.8-RELEASE-p10
 PHP Version:  4.3.3
 New Comment:

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

When you put an @ infront of a function or a language construct in this
case all of the code performed by the function effectively has an error
level of 0. Meaning that your error_reporting(0) inside y.php is not
necessary as the error reporting is already at 0.


Previous Comments:


[2003-10-27 11:07:49] gms08701 at yahoo dot com

Description:

To my knowledge, when using @ at a function/variable/etc, 
it sets error_reporting to 0 at that instance, and return, 
to its previous state, after that instance.
Unfortunately, after the instance of @, instead of returning
to what it was set at previously, it returns to what is 
set in php.ini

Reproduce code:
---
--y.php--



--z.php--


Expected result:

Its expected that z.php should return 0 from the var_dump(),
where it inherits its error_reporting value from y.php, 
but is currently returning 2047 (E_ALL)
When I remove '@' from require('./y.php'); in z.php,
it then works correctly.







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


#26014 [Opn->Bgs]: System hangs while installing php-4.3.3

2003-10-27 Thread iliaa
 ID:   26014
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tywong at cityu dot edu dot hk
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Redhat Linux 9.1
 PHP Version:  4.3.3
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This does not sound like anything PHP related.


Previous Comments:


[2003-10-27 22:31:50] tywong at cityu dot edu dot hk

Description:

I am using Apache2, Tomcat-4.1.27 with mod_jk2 on Redhat Linux 9.1 and
when I build php-4.3.3, './configure', 'make' were fine. However, when
I use 'make install', the compilaton stops at:
chmod 755 /usr/local/apache2/modules/libphp4.so






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


#25964 [Opn->Fbk]: Compile failure with imap

2003-10-27 Thread iliaa
 ID:   25964
 Updated by:   [EMAIL PROTECTED]
 Reported By:  aleks at m2media dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Linux RH7.3
 PHP Version:  4.3.4RC2
 New Comment:

Try compiling just the imap extension and see if it breaks. If it does
not keep on adding 1 extension at a time until it does. Then report the
extension that conflicts with imap.


Previous Comments:


[2003-10-24 05:07:12] aleks at m2media dot ru

My config file is:

#!/bin/bash

./configure \
--prefix=/usr \
--with-config-file-path=/etc \
--disable-debug \
--enable-pic \
--enable-shared \
--enable-inline-optimization \
--with-apxs=/usr/sbin/apxs \
--with-exec-dir=/usr/bin \
--with-regex=system \
--with-gettext \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-db \
--with-db3 \
--with-cdb \
--with-gdbm \
--enable-dbase \
--enable-debugger \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-track-vars \
--enable-yp \
--enable-ftp \
--enable-wddx \
--with-mysql=/home/mysql \
--without-oracle \
--without-oci8 \
--with-xml \
--with-mod_charset \
--with-mnogosearch=shared \
--with-pgsql=/home/pgsql \
--with-dom \
--with-sablot \
--with-expat-dir=/usr \
--enable-xslt \
--with-xslt-sablot \
--with-sablot-js \
--enable-trans-sid \
--enable-calendar \
--with-openssl=/usr \
--with-imap=shared,/usr/local/imap \
--with-kerberos=/usr/kerberos \
--with-mhash \
--enable-pcntl \
--with-iconv \
--with-swf=/usr \
--with-ttf \
--with-freetype-dir \
--enable-gd-native-ttf \
--enable-mbstring=ru \
--enable-mbstr-enc-trans \
--enable-mbregex \
--with-interbase=/opt/interbase \
--enable-exif \
--with-mssql=/usr/local



[2003-10-23 22:14:59] [EMAIL PROTECTED]

What other extensions do you have enabled?



[2003-10-23 06:25:30] aleks at m2media dot ru

Description:

if compile php with --with-imap=shared,/usr/local/imap when:

/Php/php-4.3.4RC2/ext/imap/php_imap.c -o ext/imap/php_imap.lo
/Php/php-4.3.4RC2/ext/imap/php_imap.c: In function `zm_startup_imap':
/Php/php-4.3.4RC2/ext/imap/php_imap.c:431: `auth_gss' undeclared (first
use in this function)
/Php/php-4.3.4RC2/ext/imap/php_imap.c:431: (Each undeclared identifier
is reported only once
/Php/php-4.3.4RC2/ext/imap/php_imap.c:431: for each function it appears
in.)
make: *** [ext/imap/php_imap.lo] Error 1







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


#26014 [NEW]: System hangs while installing php-4.3.3

2003-10-27 Thread tywong at cityu dot edu dot hk
From: tywong at cityu dot edu dot hk
Operating system: Redhat Linux 9.1
PHP version:  4.3.3
PHP Bug Type: Compile Failure
Bug description:  System hangs while installing php-4.3.3

Description:

I am using Apache2, Tomcat-4.1.27 with mod_jk2 on Redhat Linux 9.1 and
when I build php-4.3.3, './configure', 'make' were fine. However, when I
use 'make install', the compilaton stops at:
chmod 755 /usr/local/apache2/modules/libphp4.so


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


#26008 [Fbk->Csd]: mail() crashes apache with some parameters

2003-10-27 Thread rich at tallman dot org
 ID:   26008
 User updated by:  rich at tallman dot org
 Reported By:  rich at tallman dot org
-Status:   Feedback
+Status:   Closed
 Bug Type: Mail related
 Operating System: Windows XP
 PHP Version:  4.3.3
 New Comment:

I *KISS* YOU! All my base are belong to you.

Fixed.


Previous Comments:


[2003-10-27 17:33:49] [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





[2003-10-27 14:29:29] rich at tallman dot org

More likely cause! -- Emty message parameter may be the cause of the
crash.. the following code does *not* crash apache:

mail("[EMAIL PROTECTED]","test message"," ","From:
[EMAIL PROTECTED] is a test message.");


Please note the space in the message field.



[2003-10-27 14:26:23] rich at tallman dot org

Description:

Any script passing invalid headers will result in a crash of the apache
web server when using the apache module version of php 4.3.3 (from the
binary zip download)

This particular type of invalid header is commonly used to circumvent
other unpredictable strange behaviors with the mail command.

Reproduce code:
---
mail("[EMAIL PROTECTED]","test message","","From:
[EMAIL PROTECTED] is a test message.");

Expected result:

Apache will crash (usually creating a windows XP error window)

Actual result:
--
szAppName : Apache.exe szAppVer : 2.0.47.0 szModName :
php4ts.dll 
szModVer : 4.3.3.3 offset : 0009defe





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


#26003 [Opn->Ver]: fgetcsv() not binary-safe on null bytes

2003-10-27 Thread moriyoshi
 ID:   26003
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mr dot heat at gmx dot de
-Status:   Open
+Status:   Verified
 Bug Type: Filesystem function related
-Operating System: Windows 2000
+Operating System: Irrelevant
-PHP Version:  Irrelevant
+PHP Version:  4CVS-20031028


Previous Comments:


[2003-10-27 09:58:22] mr dot heat at gmx dot de

Description:

If the .csv file contains any 0x00 character, fgetcsv() stops reading
the line and continues on the next one. Assume the folowing .csv file
(with _ as place marker for the 0x00 character).

"a","bb_bb"
"c","d"

fgetcsv() breaks at 0x00 (with slightly different behaviours in 4.x and
5.x), the EOL character is skipped, the '"' in front of 'c' becomes
the closing enclosure, 'c' is skipped, 'd' becomes value [2].

(This bug may be related to http://bugs.php.net/bug.php?id=22382 - see
the last comment.)

Reproduce code:
---


Expected result:

array(3) {
  [0]=> string(5) "a"
  [1]=> string(5) "bb_bb"
}
(_ as a place marker for 0x00.)

Actual result:
--
In 4.3.4RC3-dev:
array(3) {
  [0]=> string(5) "a"
  [1]=> string(2) "bb"
  [2]=> string(5) "d"
}

In 5.0.0b2-dev (_ as a place marker for 0x00):
array(3) {
  [0]=> string(5) "a"
  [1]=> string(7) "bb_bb"
"
  [2]=> string(5) "d"
}





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



#26013 [Opn->Bgs]: Cannot display string in netscape browser only IE

2003-10-27 Thread edink
 ID:   26013
 Updated by:   [EMAIL PROTECTED]
 Reported By:  contact at palmtopreader dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Red hat linux
 PHP Version:  4.3.1
 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. 

Thank you for your interest in PHP.




Previous Comments:


[2003-10-27 17:09:23] contact at palmtopreader dot com

Description:

Please visit www.palmtopreader.com
to see the problem.

Basically the www.palmtopreader.com
will display text using IE but not Netscpae

I can't figure out if it is because
Netscape will not recognize the session varables
that drive the loop or not.

Reproduce code:
---
function writeLine(lines, lineIdx, letterIdx){
   var layer = new LayerObject("writer");
   var line  = lines[lineIdx];
   var line2 = lines[lineIdx+1];
   var tempWord;
   var i = 1;

  var out = ""+ line
+" " ;
  var out2 = ""+ line2 +"
" ;

  if(line == null){
window.location="http://www.palmtopreader.com/pages/endChapter.php/";;

  }

  if(line != null)
  {
if(line2 != null) { out += out2; }
layer.write(out);
setTimeout("writeLine(lines,"+(lineIdx+1)+",0)",);
  }
}


// The lines that the writer will write out!

var lines = new Array();
var i = 3;
var wordHolder;
var first= "$new[";
var second = "];";   
var $count = 3;


//-->




  


  
  

Expected result:

See the text in netscape

Actual result:
--
Can only see the text in IE





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


#26008 [Opn->Fbk]: mail() crashes apache with some parameters

2003-10-27 Thread iliaa
 ID:   26008
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rich at tallman dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Mail related
 Operating System: Windows XP
 PHP Version:  4.3.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-10-27 14:29:29] rich at tallman dot org

More likely cause! -- Emty message parameter may be the cause of the
crash.. the following code does *not* crash apache:

mail("[EMAIL PROTECTED]","test message"," ","From:
[EMAIL PROTECTED] is a test message.");


Please note the space in the message field.



[2003-10-27 14:26:23] rich at tallman dot org

Description:

Any script passing invalid headers will result in a crash of the apache
web server when using the apache module version of php 4.3.3 (from the
binary zip download)

This particular type of invalid header is commonly used to circumvent
other unpredictable strange behaviors with the mail command.

Reproduce code:
---
mail("[EMAIL PROTECTED]","test message","","From:
[EMAIL PROTECTED] is a test message.");

Expected result:

Apache will crash (usually creating a windows XP error window)

Actual result:
--
szAppName : Apache.exe szAppVer : 2.0.47.0 szModName :
php4ts.dll 
szModVer : 4.3.3.3 offset : 0009defe





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


#26011 [Opn->Bgs]: filemtime-problem

2003-10-27 Thread iliaa
 ID:   26011
 Updated by:   [EMAIL PROTECTED]
 Reported By:  final at solnet dot ch
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: SuSE Linux 8.2
 PHP Version:  4.3.3
 New Comment:

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

stat() calls, which filemtime uses internally are cached for
performance reasons. Therefor you should use clearstatcache() before
each filemtime() call to clear the cache.


Previous Comments:


[2003-10-27 16:09:12] final at solnet dot ch

Description:

ok, i've written a "watcher-tool" for my /var/log/mail, which is a
syslog-file (for pop-before-smtp with sendmail, but this doesn't
matter). i have a never ending do-while with a sleep of 4 seconds, and
i use filemtime to see if something changed in /var/log/mail. well, the
problem was, the script never went through even if the file got changed
(i've checked that with ls -l many times...). only if you get filemtime
of another file between two filemtimes of /var/log/mail, php noticed
that the file modification time changed.

well, but if you edit the file by an editor, php does notice it. first
i thought, its a matter of syslog-daemon, but since i tried to use
filemtime on another file between two checks of /var/log/mail, im not
sure anymore...

Reproduce code:
---
#!/usr/local/php/bin/php


Expected result:

Get out of do ... while as soon as
sendmail/postfix/qpopper/ipopd/whatever writes something to your
/var/log/mail

Actual result:
--
you won't get out :p





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


#25996 [Opn->Ver]: Assignment by reference suppress index error

2003-10-27 Thread iliaa
 ID:   25996
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hongnk at hotmail dot com
-Status:   Open
+Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: All
 PHP Version:  Irrelevant


Previous Comments:


[2003-10-26 21:33:23] hongnk at hotmail dot com

Description:

Accessing array with uninitialized index will normally trigger error:

$a=array();
$b=$a['unknown']; => undefined index error

but if I assign by reference:

$b=&$a['unknown'];

then PHP no longer throw error. (The same goes for assigning undefined
property to an object.)

This makes it difficult to debug scripts.






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


#25994 [Opn->Csd]: Won't compile

2003-10-27 Thread iliaa
 ID:   25994
 Updated by:   [EMAIL PROTECTED]
 Reported By:  john at petbrain dot com
-Status:   Open
+Status:   Closed
 Bug Type: Dynamic loading
 Operating System: Mac OS X 10.3
 PHP Version:  4.3.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-10-26 13:35:21] john at petbrain dot com

Description:

I downloaded:
Apache 1.3.28
php 4.3.3, 4.2.2, 5.x beta

Apache: 
./configure --prefix=/www --enable-module=so
make;make install

PHP:
./configure --with-apxs=/www/sbin/apxs --with-mysql
make

This is where the module dies. I did the SIMPLIEST 
install that one can do with a DSO module. I tried to 
compile INTO apache, and had the same problem.

I did a ./configure --help | grep "dns" and there seems 
to be NO DNS aspect to turn off. not like I WOULD want 
to do it, but this is the best I can do. 

Help. I have looked on the internet placing the bottom 
code into the google.com search field, and notice that 
OTHER people are having the same problems. 

Temp solution that I've trying to find out if it works, 
is to compile the source on my OTHER laptop running 
10.2.8 and copy the binary try over and run it on my 
10.3 laptop. 

Otherwise I'm in a bit of a jam. There are NO possible 
solutions for this release. :(



- john

Reproduce code:
---
gcc  -Iext/standard/ -I/opt/apache/php-4.3.3/ext/standard/
-DPHP_ATOM_INC -I/opt/apache/php-4.3.3/include
-I/opt/apache/php-4.3.3/main -I/opt/apache/php-4.3.3
-I/opt/apache/php-4.3.3/Zend -I/opt/apache/php-4.3.3/ext/xml/expat 
-no-cpp-precomp -no-cpp-precomp -I/opt/apache/php-4.3.3/TSRM  -g -O2 
-c /opt/apache/php-4.3.3/ext/standard/dns.c -o ext/standard/dns.o  &&
echo > ext/standard/dns.lo
/opt/apache/php-4.3.3/ext/standard/dns.c: In function
`zif_checkdnsrr':
/opt/apache/php-4.3.3/ext/standard/dns.c:228: error: `T_MX' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:228: error: (Each undeclared
identifier is reported only once
/opt/apache/php-4.3.3/ext/standard/dns.c:228: error: for each function
it appears in.)
/opt/apache/php-4.3.3/ext/standard/dns.c:239: error: `T_A' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:240: error: `T_NS' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:242: error: `T_PTR' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:243: error: `T_ANY' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:244: error: `T_SOA' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:245: error: `T_CNAME'
undeclared (first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:256: error: `C_IN' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c: In function `zif_getmxrr':
/opt/apache/php-4.3.3/ext/standard/dns.c:288: error: `HEADER'
undeclared (first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:288: error: `hp' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:317: error: `C_IN' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:317: error: `T_MX' undeclared
(first use in this function)
/opt/apache/php-4.3.3/ext/standard/dns.c:324: error: parse error before
')' token
make: *** [ext/standard/dns.lo] Error 1

Expected result:

Compile.

Actual result:
--
Didn't compile





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


#25982 [Opn->Bgs]: Operator Precedence screwed up from 4.3.2 to 4.3.3?

2003-10-27 Thread iliaa
 ID:   25982
 Updated by:   [EMAIL PROTECTED]
 Reported By:  adiu at adis dot on dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Linux
 PHP Version:  4.3.3
 New Comment:

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

This is to be expected.


Previous Comments:


[2003-10-25 00:42:39] adiu at adis dot on dot ca

Description:

My hosting service recently changed from php-4.3.2 to php-4.3.3. In the
process a script broke which had been working fine right up until
php-4.3.3.

I have a comparison expression where a variable on the left side is
compared to an expression which alters the same variable on the right
side. See the code details below.

Reproduce code:
---
if ($var == ($var = ereg_replace("^\.", "", $var))) {
$replace = true;
} else {
$replace = false;
}



Expected result:

If $var contains "SOMETHING" the expression should be true and if $var
contains ".SOMETHING" the expression should be false.  

Actual result:
--
The expression is always true, regardless of the content of $var.





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


#26013 [NEW]: Cannot display string in netscape browser only IE

2003-10-27 Thread contact at palmtopreader dot com
From: contact at palmtopreader dot com
Operating system: Red hat linux
PHP version:  4.3.1
PHP Bug Type: Session related
Bug description:  Cannot display string in netscape browser only IE

Description:

Please visit www.palmtopreader.com
to see the problem.

Basically the www.palmtopreader.com
will display text using IE but not Netscpae

I can't figure out if it is because
Netscape will not recognize the session varables
that drive the loop or not.

Reproduce code:
---
function writeLine(lines, lineIdx, letterIdx){
   var layer = new LayerObject("writer");
   var line  = lines[lineIdx];
   var line2 = lines[lineIdx+1];
   var tempWord;
   var i = 1;

  var out = ""+ line +"
" ;
  var out2 = ""+ line2 +"
" ;

  if(line == null){
window.location="http://www.palmtopreader.com/pages/endChapter.php/";;

  }

  if(line != null)
  {
if(line2 != null) { out += out2; }
layer.write(out);
setTimeout("writeLine(lines,"+(lineIdx+1)+",0)",);
  }
}


// The lines that the writer will write out!

var lines = new Array();
var i = 3;
var wordHolder;
var first= "$new[";
var second = "];";   
var $count = 3;


//-->




  


  
  

Expected result:

See the text in netscape

Actual result:
--
Can only see the text in IE

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


#26012 [NEW]: mssql_fetch_array

2003-10-27 Thread boccara at netvision dot net dot il
From: boccara at netvision dot net dot il
Operating system: win2k SBS SP4  & Apache 2.0.47
PHP version:  4.3.4RC2
PHP Bug Type: MSSQL related
Bug description:  mssql_fetch_array

Description:

I have upgraded from 4.3.4 RC1
my program works already about 6 month with the latest version of php.

the probleme is that the fetch of an sql query return additonal non
breaking space as result.

this bug is absolutly new, I search in my code hours, and I returned to
the 4.3.4 RC1 and everything is Ok now.
 


Reproduce code:
---
Function dbFetch ($iResult, &$tabColonne) {

  $iNbCol = 0; 
  $tabColonne = array();
  switch (SGBD) {
case "MSSQL":
$tabColonne = mssql_fetch_array($iResult);
if($tabColonne)
{
$iNbCol = count($tabColonne);
}
 break;
  }
  return $iNbCol;
}







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


#26011 [NEW]: filemtime-problem

2003-10-27 Thread final at solnet dot ch
From: final at solnet dot ch
Operating system: SuSE Linux 8.2
PHP version:  4.3.3
PHP Bug Type: Filesystem function related
Bug description:  filemtime-problem

Description:

ok, i've written a "watcher-tool" for my /var/log/mail, which is a
syslog-file (for pop-before-smtp with sendmail, but this doesn't matter).
i have a never ending do-while with a sleep of 4 seconds, and i use
filemtime to see if something changed in /var/log/mail. well, the problem
was, the script never went through even if the file got changed (i've
checked that with ls -l many times...). only if you get filemtime of
another file between two filemtimes of /var/log/mail, php noticed that the
file modification time changed.

well, but if you edit the file by an editor, php does notice it. first i
thought, its a matter of syslog-daemon, but since i tried to use filemtime
on another file between two checks of /var/log/mail, im not sure
anymore...

Reproduce code:
---
#!/usr/local/php/bin/php


Expected result:

Get out of do ... while as soon as sendmail/postfix/qpopper/ipopd/whatever
writes something to your /var/log/mail

Actual result:
--
you won't get out :p

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


#26010 [NEW]: Bug on get_object_vars() function

2003-10-27 Thread rodrigo at intelligencegroup dot com dot br
From: rodrigo at intelligencegroup dot com dot br
Operating system: Linux (redhat 9)
PHP version:  5CVS-2003-10-27 (dev)
PHP Bug Type: Class/Object related
Bug description:  Bug on get_object_vars() function

Description:

The function get_object_vars() is getting back an array where public
variables is ok, but private variables is being defined  with no key.

Reproduce code:
---
a = "value of a";
$this->b = "value of b";
}
}
$data = new A();
$objVars = get_object_vars($data);
var_dump($objVars);
?>

Expected result:

array(2) { ["a"]=>  string(10) "value of a" ["b"]=>  string(10) "value of
b" }

Actual result:
--
array(2) { [""]=>  string(10) "value of a" ["b"]=>  string(10) "value of
b" }

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


#26009 [NEW]: mktime calc fails on specific dates

2003-10-27 Thread nic at nicskitt dot co dot uk
From: nic at nicskitt dot co dot uk
Operating system: Windows XP Pro SP1, IIS, ISAPI
PHP version:  4.3.3
PHP Bug Type: Date/time related
Bug description:  mktime calc fails on specific dates

Description:

When performing the while loop shown in the code mktime function produces
duplicate results on the following specific dates (2004-03-27) and
(2003-03-29) and (2002-03-30). They all seem to be in the month of march.
This starts afer 2001 and I havent yet checked how far it continues.

Because mktime is suppose to handle illegal days and therefore recalcuate
the whole date I cant see why this would happen.



Reproduce code:
---
$starting = strtotime("2001-01-01");
$ending = strtotime("2005-01-01");
$newdate = $starting;
$day= date("d",$newdate);
$month  = date("m",$newdate);
$year   = date("Y",$newdate);

echo("Starting->".date("Y-m-d",$newdate)."");
echo("Ending->".date("Y-m-d",$ending)."");
$x = 0;
while($newdate<$ending){

$newdate = mktime(0,0,0,$month,($day+$x),$year);
$fulldate = date("Y-m-d",$newdate);
echo($fulldate."");
$x ++;  
}

Expected result:

Relevant Areas...

2002-03-29
2002-03-30 <- just one as you would expect
2002-04-01
2002-04-02
2002-04-03
...skip output...
2003-03-27
2003-03-28
2003-03-29 <- Just one as you would expect
2003-03-31
2003-04-01

and so on...

Actual result:
--
Relevant Areas...

2002-03-28
2002-03-29
2002-03-30 
2002-03-30 <- Duplicate Date
2002-04-01
2002-04-02
...skip output...
2003-03-27
2003-03-28
2003-03-29
2003-03-29 <- Duplicate Date
2003-03-31
2003-04-01

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


#25663 [Opn]: Contains no data - sometimes with Lucene/Java

2003-10-27 Thread huberfelix at web dot de
 ID:   25663
 User updated by:  huberfelix at web dot de
 Reported By:  huberfelix at web dot de
 Status:   Open
 Bug Type: Java related
 Operating System: Linux Suse 8.1
 PHP Version:  4CVS-2003-09-25 (stable)
 New Comment:

Any help with this problem?

Thank you


Previous Comments:


[2003-09-25 17:20:43] huberfelix at web dot de

Description:

I use the Java feature to call a Lucene Proxy,
after a few hundert calls I get segmentation faults.

My php.ini:

java.class.path=/usr/share/php_java.jar:/usr/lib/j2sdk1.4.2_01/lib/tools.jar:/usr/lib/j2sdk1.4.2_01/lib/dt.jar:/u
sr/lib/j2sdk1.4.2_01/jre/lib/rt.jar:/opt/jakarta/lucene/lucene.jar:/opt/mysql-connector-java/mysql-connector-java
-3.0.8-stable-bin.jar:/opt/wddx/Java/wddx.jar
java.home = /usr/lib/j2sdk1.4.2_01 
java.library = /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libjava.so 
java.library.path = /usr/share/extensions/no-debug-non-zts-20020429

Reproduce code:
---
$query = trim(urldecode($_REQUEST["keywords"]));

$index = "/srv/www/lucene/index";

$obj = new Java("org.ew.lucene.SearchEngine")
or die("ARGHHHS");

$result = $obj->search($index,"AND",$query)
or die("ARGHHHS");


$rs = wddx_deserialize($result);
$meta = $rs["meta_data"];
$rows = $rs["rows"];

if (!stristr($rs,"No matches found for") && strlen(trim($rs)) >= 1)
{



Expected result:

A array with the Lucene results (works)

I get 50 segmentation faults on 10.000 searches

Actual result:
--
#0  0x45ceb300 in ?? ()
#1  0x45c8e0f1 in ?? ()
#2  0x45c8ddeb in ?? ()
#3  0x45c8ddeb in ?? ()
#4  0x45c8e0f1 in ?? ()
#5  0x45c8ddeb in ?? ()
#6  0x45c8ddeb in ?? ()
#7  0x45c8e0f1 in ?? ()
#8  0x45c8ddeb in ?? ()
#9  0x45c8ddeb in ?? ()
#10 0x45c8dd14 in ?? ()
#11 0x45c8dd14 in ?? ()
#12 0x45c8e01a in ?? ()
#13 0x45c8dd14 in ?? ()
#14 0x45c8b104 in ?? ()
#15 0x438b73f4 in JavaCalls::call_helper ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#16 0x4399c05d in os::os_exception_wrapper ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#17 0x438b7646 in JavaCalls::call ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#18 0x438bfe47 in jni_invoke_nonstatic ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#19 0x438c55ae in jni_CallVoidMethod ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#20 0x406a0160 in php4_module ()
   from /usr/share/extensions/no-debug-non-zts-20020429/java.so
#21 0x405e1a15 in setenvif_module () from /usr/lib/apache/libphp4.so
---Type  to continue, or q  to quit---




#12 0x45c8e01a in ?? ()
#13 0x45c8dd14 in ?? ()
#14 0x45c8b104 in ?? ()
#15 0x438b73f4 in JavaCalls::call_helper ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#16 0x4399c05d in os::os_exception_wrapper ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#17 0x438b7646 in JavaCalls::call ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#18 0x438bfe47 in jni_invoke_nonstatic ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#19 0x438c55ae in jni_CallVoidMethod ()
   from /usr/lib/j2sdk1.4.2_01/jre/lib/i386/server/libjvm.so
#20 0x406a0160 in php4_module ()
   from /usr/share/extensions/no-debug-non-zts-20020429/java.so
#21 0x405e1a15 in setenvif_module () from /usr/lib/apache/libphp4.so
---Type  to continue, or q  to quit---
#22 0x405e4bec in setenvif_module () from /usr/lib/apache/libphp4.so
#23 0x405d30cb in setenvif_module () from /usr/lib/apache/libphp4.so
#24 0x4059c052 in setenvif_module () from /usr/lib/apache/libphp4.so
#25 0x405e9870 in setenvif_module () from /usr/lib/apache/libphp4.so
#26 0x405ea826 in setenvif_module () from /usr/lib/apache/libphp4.so
#27 0x405ea8ac in setenvif_module () from /usr/lib/apache/libphp4.so
#28 0x08054f7a in ap_invoke_handler ()
#29 0x080692f4 in ap_some_auth_required ()
#30 0x0806957e in ap_process_request ()
#31 0x08061208 in ap_child_terminate ()
#32 0x080614b5 in ap_child_terminate ()
#33 0x0806154d in ap_child_terminate ()
#34 0x080620db in ap_child_terminate ()
#35 0x0806246e in main ()
#36 0x4015d4c2 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) 










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


#26008 [Opn]: mail() crashes apache with some parameters

2003-10-27 Thread rich at tallman dot org
 ID:   26008
 User updated by:  rich at tallman dot org
 Reported By:  rich at tallman dot org
 Status:   Open
 Bug Type: Mail related
 Operating System: Windows XP
 PHP Version:  4.3.3
 New Comment:

More likely cause! -- Emty message parameter may be the cause of the
crash.. the following code does *not* crash apache:

mail("[EMAIL PROTECTED]","test message"," ","From:
[EMAIL PROTECTED] is a test message.");


Please note the space in the message field.


Previous Comments:


[2003-10-27 14:26:23] rich at tallman dot org

Description:

Any script passing invalid headers will result in a crash of the apache
web server when using the apache module version of php 4.3.3 (from the
binary zip download)

This particular type of invalid header is commonly used to circumvent
other unpredictable strange behaviors with the mail command.

Reproduce code:
---
mail("[EMAIL PROTECTED]","test message","","From:
[EMAIL PROTECTED] is a test message.");

Expected result:

Apache will crash (usually creating a windows XP error window)

Actual result:
--
szAppName : Apache.exe szAppVer : 2.0.47.0 szModName :
php4ts.dll 
szModVer : 4.3.3.3 offset : 0009defe





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


#26008 [NEW]: mail() crashes apache with some parameters

2003-10-27 Thread rich at tallman dot org
From: rich at tallman dot org
Operating system: Windows XP
PHP version:  4.3.3
PHP Bug Type: Mail related
Bug description:  mail() crashes apache with some parameters

Description:

Any script passing invalid headers will result in a crash of the apache
web server when using the apache module version of php 4.3.3 (from the
binary zip download)

This particular type of invalid header is commonly used to circumvent
other unpredictable strange behaviors with the mail command.

Reproduce code:
---
mail("[EMAIL PROTECTED]","test message","","From: [EMAIL PROTECTED]
is a test message.");

Expected result:

Apache will crash (usually creating a windows XP error window)

Actual result:
--
szAppName : Apache.exe szAppVer : 2.0.47.0 szModName : php4ts.dll 
   
szModVer : 4.3.3.3 offset : 0009defe

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


#23220 [Com]: fgets() causes warning while reading data via SSL channel (HTTPS)

2003-10-27 Thread derek at openflows dot org
 ID:   23220
 Comment by:   derek at openflows dot org
 Reported By:  storozhilov at mail dot ru
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.8
 PHP Version:  4-STABLE-200307070330
 Assigned To:  wez
 New Comment:

This is a followup to the comment posted by 
[21 Aug 8:18pm EDT] scottm at spamcop dot net, as well as a plea to the
php developers to correct this problem in future versions of php.

After many long hours trying to debug the exact problem described here
(as well as many other places on the net), but finding no concrete
solutions, I eventually tried scottm's patch to network.c, using php
4.3.3.  Thankfully, this fix does work, and i'm hoping that the two
lines indicated get tweaked in upcoming versions.

If you are experiencing this problem with reading an https url with any
of php's filesystem-related functions, definitely try patching and
recompiling your php source as indicated.  I've confirmed this to be a
working solution for my application.


Previous Comments:


[2003-10-26 14:41:20] [EMAIL PROTECTED]

Re-opening at user request.

Users comments that have mysteriously vanished are:
===

See the code below to verify , I'm not able to alter php versions
since
it's hosted with my ISP so please test it with the latest version so
it
can be closed as being fixed or further investigation needed. 



output:

PHP Warning:  fgets(): SSL: fatal protocol error in
/path.to/test_ssl.php on line 18

Please put the bug to 'open'.




[2003-10-08 07:30:39] [EMAIL PROTECTED]

Could you try the next stable snapshot (due in a few minutes)?

I comitted a fix for a different bug that might make a
difference to this one.

If it hasn't fixed it, could you post an https:// URL
that reproduces the problem, so that I can investigate
further?




[2003-08-21 20:18:33] scottm at spamcop dot net

I've not verified this patch will work and I'll hopefully test it
tomorrow.

I believe it is reaching the end of the file and nr_bytes is returning
0 and this is being caught by an if statement which should be looking
for -1.

--- network.c   Thu Aug 21 21:06:43 2003
+++ network.c.patched   Thu Aug 21 21:13:09 2003
@@ -1011,13 +1011,14 @@
do {
nr_bytes = SSL_read(sock->ssl_handle, buf,
count);
 
-   if (nr_bytes <= 0) {
+   if (nr_bytes < 0) {
retry = handle_ssl_error(stream,
nr_bytes TSRMLS_CC);
if (retry == 0 &&
!SSL_pending(sock->ssl_handle)) {
stream->eof = 1;
}
} else {
-   /* we got the data */
+   /* we got the data */
+   stream->eof = 1;
break;
}
} while (retry);



[2003-04-15 01:52:09] storozhilov at mail dot ru


After executing of this script following message appears:
Warning: fgets() [function.fgets]: SSL: fatal protocol error in
/blah/blah/blah/blah.php on line NN

PHP was configured with following arguments:
#!/bin/sh
./configure --with-apache=../apache_1.3.27rusPL30.17 --with-mod_charset
--with-pgsql=/usr/local/pgsql --with-mhash --with-sybase=/usr/local
--with-openssl




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


#25831 [Ver->WFx]: overload/__call breaks method Pass by reference

2003-10-27 Thread moriyoshi
 ID:   25831
 Updated by:   [EMAIL PROTECTED]
 Reported By:  viking at dslnorthwest dot net
-Status:   Verified
+Status:   Wont fix
 Bug Type: Scripting Engine problem
 Operating System: all
 PHP Version:  4.3.4RC2-dev
 New Comment:

The issue was confirmed to have much to do with the current engine's
limitation. So then we're trying to make sure that this problem will be
fixed in php5.



Previous Comments:


[2003-10-26 20:00:08] [EMAIL PROTECTED]

Ignore the last patch - doesnt help..



[2003-10-25 00:09:31] [EMAIL PROTECTED]

OK this seems to be working without segfaults..

Index: overload.c
===
RCS file: /repository/php-src/ext/overload/Attic/overload.c,v
retrieving revision 1.20.2.3
diff -u -r1.20.2.3 overload.c
--- overload.c  15 Apr 2003 04:14:21 -  1.20.2.3
+++ overload.c  25 Oct 2003 04:08:34 -
@@ -507,7 +507,7 @@
 static void overload_call_method(INTERNAL_FUNCTION_PARAMETERS,
zend_property_reference *property_reference)
 {
zval ***args;
-   zval *retval = NULL;
+   
int call_result;
zend_bool use_call_handler = 1;
zval *object = property_reference->object;
@@ -526,13 +526,15 @@
 
args = (zval ***)emalloc(ZEND_NUM_ARGS() * sizeof(zval **));
 
-   if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE)
{
-   efree(args);
-   php_error(E_WARNING, "unable to obtain arguments");
-   return;
-   }
 
if (use_call_handler) {
+   zval *retval = NULL;
+   
+   if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE)
{
+   efree(args);
+   php_error(E_WARNING, "unable to obtain arguments");
+   return;
+   }
zval **handler_args[3];
zval *arg_array;
zval result, *result_ptr = &result;
@@ -588,23 +590,29 @@
}
zval_ptr_dtor(&retval);
} else {
+   zval retval;
+   if (zend_get_parameters_array(ht, ZEND_NUM_ARGS(), (zval **)args) ==
FAILURE) {
+   efree(args);
+   php_error(E_WARNING, "unable to obtain arguments");
+   return;
+   }
+
ZVAL_STRINGL(&call_handler, Z_STRVAL(method->element),
Z_STRLEN(method->element), 0);
-   call_result = call_user_function_ex(NULL,
+   call_result = call_user_function(NULL,
   
 &object,
   
 &call_handler,
-  
 &retval,
-  
 ZEND_NUM_ARGS(), args,
-  
 0, NULL TSRMLS_CC);
+  
 return_value,
+  
 ZEND_NUM_ARGS(),(zval **)args  TSRMLS_CC);
 
-   if (call_result == FAILURE || !retval) {
+   if (call_result == FAILURE || !&return_value) {
efree(args);
php_error(E_WARNING, "unable to call %s::%s() method",
Z_OBJCE_P(object)->name, Z_STRVAL(method->element));
return;
}
 
-   *return_value = *retval;
+
zIndex: overload.c
===
RCS file: /repository/php-src/ext/overload/Attic/overload.c,v
retrieving revision 1.20.2.3
diff -u -r1.20.2.3 overload.c
--- overload.c  15 Apr 2003 04:14:21 -  1.20.2.3
+++ overload.c  25 Oct 2003 04:08:34 -
@@ -507,7 +507,7 @@
 static void overload_call_method(INTERNAL_FUNCTION_PARAMETERS,
zend_property_reference *property_reference)
 {
zval ***args;
-   zval *retval = NULL;
+   
int call_result;
zend_bool use_call_handler = 1;
zval *object = property_reference->object;
@@ -526,13 +526,15 @@
 
args = (zval ***)emalloc(ZEND_NUM_ARGS() * sizeof(zval **));
 
-   if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE)
{
-   efree(args);
-   php_error(E_WARNING, "unable to obtain arguments");
-   return;
-   }
 
if (use_call_handler) {
+   zval *retval = NULL;
+   
+   if (zend_get_parameters_array_ex(ZEND_N

#26007 [NEW]: implode error

2003-10-27 Thread timothy dot wilson at lmco dot com
From: timothy dot wilson at lmco dot com
Operating system: unix
PHP version:  4.3.1
PHP Bug Type: Feature/Change Request
Bug description:  implode error

Description:

My request is to have implode not blow up when not given an array.  This
could be done by setting a standard for the variable order

implode(glue, pieces)

check pieces for is_array()...if so, then do your thing, if not then
return pieces instead of an error.

Reproduce code:
---
$arr="blah";

$new_list = implode ("|", $arr);

echo $new_list;

Expected result:

blah

Actual result:
--
error:

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


#26006 [Com]: error_reporting() and @ problem

2003-10-27 Thread kiril at lycos dot com
 ID:   26006
 Comment by:   kiril at lycos dot com
 Reported By:  gms08701 at yahoo dot com
 Status:   Open
 Bug Type: *General Issues
 Operating System: FreeBSD 4.8-RELEASE-p10
 PHP Version:  4.3.3
 New Comment:

Verified using the following setup:

Win2K SP4
Apache/2.0.47
PHP 4.3.3

php.ini error reporting values:

error_reporting  = E_ALL
display_errors = On
log_errors = On

All other error reporting values set at defaults.


Previous Comments:


[2003-10-27 11:07:49] gms08701 at yahoo dot com

Description:

To my knowledge, when using @ at a function/variable/etc, 
it sets error_reporting to 0 at that instance, and return, 
to its previous state, after that instance.
Unfortunately, after the instance of @, instead of returning
to what it was set at previously, it returns to what is 
set in php.ini

Reproduce code:
---
--y.php--



--z.php--


Expected result:

Its expected that z.php should return 0 from the var_dump(),
where it inherits its error_reporting value from y.php, 
but is currently returning 2047 (E_ALL)
When I remove '@' from require('./y.php'); in z.php,
it then works correctly.







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


#25985 [Opn]: Crash running coWiki

2003-10-27 Thread k . schroeder
 ID:   25985
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Apache related
 Operating System: Linux
 PHP Version:  PHP5b2RC1, 5CVS-2003-10-25 (dev)
 Assigned To:  andi
 New Comment:

(gdb) bt
#0  0x5a5a5a5a in ?? ()
#1  0x40a64138 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#2  0x40a9f3cc in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#3  0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#4  0x40a9d941 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#5  0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#6  0x40a6b773 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#7  0x40a6aafa in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#8  0x40a6bb29 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#9  0x40a6c446 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#10 0x40a9aa05 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#11 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#12 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#13 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#14 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#15 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#16 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#17 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#18 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#19 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#20 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#21 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#22 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#23 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#24 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#25 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#26 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#27 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#28 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#29 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#30 0x40a9b639 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#31 0x40a9bb2b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#32 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#33 0x40a9d941 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#34 0x40a97705 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#35 0x40a7656b in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#36 0x40a34f18 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#37 0x40aa3450 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#38 0x40aa43f1 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#39 0x40aa4477 in XRRExtensionInfo () from
/srv/apache_1.3.28/libexec/libphp5.so
#40 0x08053e8b in ap_invoke_handler (r=0x81c0984) at http_config.c:518
#41 0x08068986 in process_request_internal (r=0x81c0984) at
http_request.c:1324
#42 0x08068dcf in ap_internal_redirect (new_uri=0x81c095c "/index.php",
r=0x81bc254) at http_request.c:1461
---Type  to continue, or q  to quit---
#43 0x402b1dba in handle_dir (r=0x81bc254) at mod_dir.c:174
#44 0x08053e8b in ap_invoke_handler (r=0x81bc254) at http_config.c:518
#45 0x08068986 in process_request_internal (r=0x81bc254) at
http_request.c:1324
#46 0x080689e5 in ap_process_request (r=0x81bc254) at
http_request.c:1340
#47 0x0805fafb in child_main (child_num_arg=0) at http_main.c:4653
#48 0x0805fca3 in make_child (s=0x8093c4c, slot=0, now=1067269185) at
http_main.c:4768
#49 0x0805fe09 in startup_children (number_to_start=5) at
http_main.c:4850
#50 0x080604af in standalone_main (argc=2, argv=0xb624) at
http_main.c:5169
#51 0x08060ccd in main (argc=2, argv=0xb624) at http_main.c:5511
#52 0x4015e8ae in __libc_start_main () from /lib/libc.so.6
(gdb)



Previous Comments:


[2003-10-25 03:00:25] [EMAIL PROTECTED]

Description:

coWiki is a web collaboration tool complete written in/for PHP5, see
http://www.develnet.org for more details.

If I run coWiki with mod_php5, Apache child exit with segfault, using
CGI it works.

Reproduce code:
---
Try to access any coWiki page over http.

Expected result:

The HTML output.

Actual result:
---

#24433 [Com]: Incorrect version-output

2003-10-27 Thread kuraman10 at yahoo dot com
 ID:   24433
 Comment by:   kuraman10 at yahoo dot com
 Reported By:  sandro dot mathys at blappy dot com
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: linux 2.4.20
 PHP Version:  5.0.0b1 (beta1)
 New Comment:

I am not sure this bug belongs in here, But I couldn't find a better
place to get info..

I was originally not able to connect to mysql database from PHP, I kept
getting the error "Call to undefined function mysql_connect()" after
trying to fix the problem for several hours, I really got frustrated
and completely reinstalled everything.

I installed php 5.x (did all the reguler things like ./configure, make
and make install) on Apache 2.x. Everything installed properly and I
thought PHP will be able to connect to mysql DB. but I was wrong, I am
still getting the same error like before..."Call to undefined function
mysql_connect()"

So I did a phpinfo(), it is reporting the wrong version of PHP 4.2.2. I
have tried several things, played around with httpd.conf and bunch of
other files, I am not able to nail down the problem. 

Is it phpinfo() reporting a wrong version? (I don't think so) or Did
the install not work properly? or I just didn't configure 5.0
correctly?

If any of you can help me with this, I would greatly greatly appreciate
it...

Thanks
Kumar.


Previous Comments:


[2003-07-04 04:28:11] [EMAIL PROTECTED]

This is not a bug, but an installation issue. 
I got 6 different installations and all of them works 
fine and no other developer have confirmed this issue 
either. Please leave the status alone. 



[2003-07-04 02:01:48] sandro dot mathys at blappy dot com

sorry, i'm meant not an installer like this...i spoke about make
install. my fault...



[2003-07-04 01:58:07] [EMAIL PROTECTED]

This is really, REALLY bogus since there IS NO installer for PHP 5.




[2003-07-03 16:08:55] sandro dot mathys at blappy dot com

could anyone check this? i think it's no longer a bogus...



[2003-07-02 06:59:36] sandro dot mathys at blappy dot com

i've found the problem...took the snapshot from today (7:30-snapshot).

during installation, the php-installer writes a loadmodule for the
php5module into httpd.conf

but if there exists a loadmodule-command for the old php4module, this
won't be deleted and so the new module won't work.

sorry for my bad english... :( ...i hope, ou understood!



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

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


#26006 [NEW]: error_reporting() and @ problem

2003-10-27 Thread gms08701 at yahoo dot com
From: gms08701 at yahoo dot com
Operating system: FreeBSD 4.8-RELEASE-p10
PHP version:  4.3.3
PHP Bug Type: *General Issues
Bug description:  error_reporting() and @ problem

Description:

To my knowledge, when using @ at a function/variable/etc, 
it sets error_reporting to 0 at that instance, and return, 
to its previous state, after that instance.
Unfortunately, after the instance of @, instead of returning
to what it was set at previously, it returns to what is 
set in php.ini

Reproduce code:
---
--y.php--



--z.php--


Expected result:

Its expected that z.php should return 0 from the var_dump(),
where it inherits its error_reporting value from y.php, 
but is currently returning 2047 (E_ALL)
When I remove '@' from require('./y.php'); in z.php,
it then works correctly.



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


#26001 [Fbk->Opn]: Attempt to serialize causes php crash

2003-10-27 Thread david dot nicholls at camden dot gov dot uk
 ID:   26001
 User updated by:  david dot nicholls at camden dot gov dot uk
 Reported By:  david dot nicholls at camden dot gov dot uk
-Status:   Feedback
+Status:   Open
 Bug Type: COM related
 Operating System: Windows 2000
 PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

The variant code crashes and the work around works :)

Many thanks again


Previous Comments:


[2003-10-27 10:50:20] [EMAIL PROTECTED]

I probably won't be able to take a look at this for a couple of days,
but could you try the following code and
see if it crashes too?

$v = new variant('02/11/2003 15:17:01', VT_DATE);
$s = serialize($v);

As a possible workaround, cast that property to a string
before assigning it to whatever you are serializing:

$data['expires'] = (string)$com->PasswordExpirationDate;
serialize($data);



[2003-10-27 07:42:10] david dot nicholls at camden dot gov dot uk

Description:

Get a Dr Watson crash when I attempt to serialize the data in the
PasswordExpirationDate property from a WinNT:// call.

Visually the data is '02/11/2003 15:17:01'
the above text string does not cause a crash when serialized

Other returned properties can be serialized and code runs fine when the
PasswordExpirationDate property is not serialized

Reproduce code:
---
Requires an NT 4 domain controller to test against (con provide code if
required)

Actual result:
--
Dr Waston crashdump report available on request (not a small file)
however following line seem pertinant

*> Stack Back Trace <*

FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0012FA9C 000E 004E 0010 000F 0001 !zend_stack_base


FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0145FF40 100C1A95 0145FF64   
user32!GetMenuItemRect 
0145FFB4 7C57B382 01136C88   01136C88 !zend_timeout 
0145FFEC  78008532 01136C88  2B4D4F43
kernel32!lstrcmpiW 





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


#22382 [Com]: fgetcsv does not allow escaped quotes

2003-10-27 Thread mr dot heat at gmx dot de
 ID:   22382
 Comment by:   mr dot heat at gmx dot de
 Reported By:  Stevenv at operamail dot com
 Status:   Closed
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.7
 PHP Version:  4.3.2-dev
 New Comment:

Don't you think making fgetcsv() in 4.3.2+ incompatible to fgetcsv() in
previous versions is critical?

(Re-post because comment was deleted due to unknown reasons.)

Example prior432.csv:
"Write "" as \"" to escape quotes."

Example prior432.php:


Example since432.csv:
"Write \" as \\\" to escape quotes."

Example since432.php:


This makes fgetcsv() a entirely different function. Don't you think
it's a bad idea to break any script written before 4.3.2 that uses
fgetcsv()?

Suggestion #1: Introduce a new function fgetdsv() and restore the
behaviour fgetcsv() worked before.

Suggestion #2: Introduce a fifth parameter
fgetcsv(resource handle, int length [, string delimiter [, string
enclosure [, bool unix_escape_style]]])
which is false for Windows style (default; values are surrounded by
enclosure characters; enclosure characters are escaped by another
enclosure character)
or true for Unix style (enclosure may be empty; any critical character
is escaped by a backslash; values are returned without the backslashes;
double enclosure characters are not stripped).


Previous Comments:


[2003-02-23 21:17:39] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-02-22 19:45:00] Stevenv at operamail dot com

As the summary says, fgetcsv does not allow escaped quotes. When csv
fields come from user input, it is often the case that addslashes() is
run on them then enclosed in quotes. However, fgetcsv() removes
anything after the escaped quote.

Code:



Outputs:
array(3) {
  [0]=>
  string(9) "This is \"
  [1]=>
  string(9) "field two"
  [2]=>
  string(11) "field three"
}

The behavior I expected would have been for the first field to read:
"This is \"Field One\""

Much like the functionality described on
.

Thanks




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


#26005 [NEW]: Random "cannot change the session's ini settings" errors

2003-10-27 Thread parsnip11 at hotmail dot com
From: parsnip11 at hotmail dot com
Operating system: windows 2000 iis 5
PHP version:  4.3.3
PHP Bug Type: Session related
Bug description:  Random "cannot change the session's ini settings" errors

Description:

I am recently upgraded to php 4.3.3 from 4.2.9 and am using the
php4isapi.dll on iis. My application has been working w/o any problems for
quite awhile and after the upgrade, without rhyme or reason I am getting
the following error every few days:

PHP Warning:  Unknown(): A session is active. You cannot change the
session module's ini settings at this time. in Unknown on line 0

I have no ini_set statement in my application and have even set my php.ini
to read only in the event that it was somehow being modified. My
application is EXTREMELY simple... it's basically just consists of a few
html forms submitting to a sql db. Authentication happens via IIS and I'm
using $AUTH_USER to get the user id. 

Since this error is extremely intermittent and only happens 2 or 3 times a
week, I cant seem to figure out what line seems or even what function is
causing this error. I know that bugs cannot be solved w/o a code example
that generates the error but I canAll I know is that the version of PHP is
all that's changed so I'm inclined to think it's a bug.

Php.ini is set up as follows:

session.save_handler = files
session.save_path = C:\PHP\sessiondata; argument passed to
save_handler
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 50400
session.referer_check =
session.entropy_length = 
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = 
;session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1


Reproduce code:
---
As stated above, I'm really not sure WHAT is causing this error. No
filename is mentioned in the error. My login.php included in every page is
pretty simple:

session_start(); 

if(!isset($logged_in) || $logged_in != "!authenticated!") {
header("Location: http://myurl.com";);
exit;  
} else {
$user_id= str_replace("windows_domain", "", strtolower($AUTH_USER));
}


Actual result:
--
Generic 500 error page in IE for the user... On one occasion when this
happened I had to restart IIS before PHP would work again

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


#26004 [Opn->Fbk]: $_POST variables not set when using enctype="multipart/form-data"

2003-10-27 Thread moriyoshi
 ID:   26004
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jacknorton101 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: RedHat Linux 9
 PHP Version:  4.3.3
 New Comment:

Check your httpd.conf (probably in /etc/httpd/conf) if there's some
directive that limits the maximum length of incoming data.

See bug #22138 for detail


Previous Comments:


[2003-10-27 10:47:18] jacknorton101 at hotmail dot com

Description:

The following code works in my local development environment (Win ME,
Apache 1.3.2, PHP 4.3.2) but not on my host (RedHat 9, Apache 2.0.4,
PHP 4.3.3).
None of the form inputs defined after the  line are set in $_POST (all of those appearing before
are). Therefore $_POST['submitimage'] does not get set.
If I take out enctype="multipart/form-data", or replace it with
"multipart/mixed" the $_POST variables are set, but the file is not
available.
The following php.ini directives are identical in both the local and
host environments:
File_Uploads = On
Upload_Max_Filesize = 2M
Upload_Tmp_Dir = (default)
Post_Max_Size = 8M
In my local environment Register_Globals is Off, and the host
environment has them on.

I have searched previous bug reports, and though I have seen similar
problems, they all seem to be closed and rectified some time (over a
year) ago, but my host is on release 4.3.3 - i.e. later than my dev
environment.

Thanks in anticipation, Jack.

Reproduce code:
---

if(!isset($_POST['submitimage']))
  {
 


 





 get set. The ones below,
including $_POST['submitimage'] do not get set.





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


#25962 [Opn->Fbk]: php connect informix database caused memory leak

2003-10-27 Thread sniper
 ID:   25962
 Updated by:   [EMAIL PROTECTED]
 Reported By:  liu-shan at mediaring dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Informix related
 Operating System: sun
 PHP Version:  4.3.2
 New Comment:

Provide a SHORT and COMPLETE example script.
Anything over 20 lines is not accepted.



Previous Comments:


[2003-10-23 04:40:54] liu-shan at mediaring dot com

Description:

I'm PHP programer, I write web application using PHP connect to
informix database, informix CSDK version 2.7.1, no matter I SELECT,
INSERT OR UPDATE data to database, once program exit, but memory still
that, cannot release. it cause os memory leak, I have to reboot server
frequently.
How can I resolve this problem






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


#26001 [Opn->Fbk]: Attempt to serialize causes php crash

2003-10-27 Thread wez
 ID:   26001
 Updated by:   [EMAIL PROTECTED]
 Reported By:  david dot nicholls at camden dot gov dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: COM related
 Operating System: Windows 2000
 PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

I probably won't be able to take a look at this for a couple of days,
but could you try the following code and
see if it crashes too?

$v = new variant('02/11/2003 15:17:01', VT_DATE);
$s = serialize($v);

As a possible workaround, cast that property to a string
before assigning it to whatever you are serializing:

$data['expires'] = (string)$com->PasswordExpirationDate;
serialize($data);


Previous Comments:


[2003-10-27 07:42:10] david dot nicholls at camden dot gov dot uk

Description:

Get a Dr Watson crash when I attempt to serialize the data in the
PasswordExpirationDate property from a WinNT:// call.

Visually the data is '02/11/2003 15:17:01'
the above text string does not cause a crash when serialized

Other returned properties can be serialized and code runs fine when the
PasswordExpirationDate property is not serialized

Reproduce code:
---
Requires an NT 4 domain controller to test against (con provide code if
required)

Actual result:
--
Dr Waston crashdump report available on request (not a small file)
however following line seem pertinant

*> Stack Back Trace <*

FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0012FA9C 000E 004E 0010 000F 0001 !zend_stack_base


FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0145FF40 100C1A95 0145FF64   
user32!GetMenuItemRect 
0145FFB4 7C57B382 01136C88   01136C88 !zend_timeout 
0145FFEC  78008532 01136C88  2B4D4F43
kernel32!lstrcmpiW 





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


#22382 [Com]: fgetcsv does not allow escaped quotes

2003-10-27 Thread mr dot heat at gmx dot de
 ID:   22382
 Comment by:   mr dot heat at gmx dot de
 Reported By:  Stevenv at operamail dot com
 Status:   Closed
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.7
 PHP Version:  4.3.2-dev
 New Comment:

Don't you think making fgetcsv() in 4.3.2+ incompatible to fgetcsv() in
previous versions is critical?

(Re-post because comment was deleted due to unknown reasons.)

Example prior432.csv:
"Write "" as \"" to escape quotes."

Example prior432.php:


Example since432.csv:
"Write \" as \\\" to escape quotes."

Example since432.php:


This makes fgetcsv() a entirely different function. Don't you think
it's a bad idea to break any script written before 4.3.2 that uses
fgetcsv()?

Suggestion #1: Introduce a new function fgetdsv() and restore the
behaviour fgetcsv() worked before.

Suggestion #2: Introduce a fifth parameter
fgetcsv(resource handle, int length [, string delimiter [, string
enclosure [, bool unix_escape_style]]])
which is false for Windows style (default; values are surrounded by
enclosure characters; enclosure characters are escaped  by another
enclosure character)
or true for Unix style (enclosure may be empty; any critical character
is escaped by a backslash; values are returned  without the
backslashes; double enclosure characters are not stripped).


Previous Comments:


[2003-02-23 21:17:39] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-02-22 19:45:00] Stevenv at operamail dot com

As the summary says, fgetcsv does not allow escaped quotes. When csv
fields come from user input, it is often the case that addslashes() is
run on them then enclosed in quotes. However, fgetcsv() removes
anything after the escaped quote.

Code:



Outputs:
array(3) {
  [0]=>
  string(9) "This is \"
  [1]=>
  string(9) "field two"
  [2]=>
  string(11) "field three"
}

The behavior I expected would have been for the first field to read:
"This is \"Field One\""

Much like the functionality described on
.

Thanks




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


#26004 [NEW]: $_POST variables not set when using enctype="multipart/form-data"

2003-10-27 Thread jacknorton101 at hotmail dot com
From: jacknorton101 at hotmail dot com
Operating system: RedHat Linux 9
PHP version:  4.3.3
PHP Bug Type: *General Issues
Bug description:  $_POST variables not set when using enctype="multipart/form-data"

Description:

The following code works in my local development environment (Win ME,
Apache 1.3.2, PHP 4.3.2) but not on my host (RedHat 9, Apache 2.0.4, PHP
4.3.3).
None of the form inputs defined after the  line are set in $_POST (all of those appearing before
are). Therefore $_POST['submitimage'] does not get set.
If I take out enctype="multipart/form-data", or replace it with
"multipart/mixed" the $_POST variables are set, but the file is not
available.
The following php.ini directives are identical in both the local and host
environments:
File_Uploads = On
Upload_Max_Filesize = 2M
Upload_Tmp_Dir = (default)
Post_Max_Size = 8M
In my local environment Register_Globals is Off, and the host environment
has them on.

I have searched previous bug reports, and though I have seen similar
problems, they all seem to be closed and rectified some time (over a year)
ago, but my host is on release 4.3.3 - i.e. later than my dev
environment.

Thanks in anticipation, Jack.

Reproduce code:
---

if(!isset($_POST['submitimage']))
  {
 


 





 get set. The ones below,
including $_POST['submitimage'] do not get set.

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


#26000 [Fbk->Bgs]: much memory leaks

2003-10-27 Thread sniper
 ID:   26000
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Bogus
 Bug Type: Apache related
 Operating System: Linux
 PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

See bug #25985 [NEW]: Crash running coWiki




Previous Comments:


[2003-10-27 05:55:52] [EMAIL PROTECTED]

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

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

Don't report bugs with thrid party tools enabled. Turck MM is build to
leak like hell. 



[2003-10-27 05:52:52] [EMAIL PROTECTED]

Description:

I've configured latest CVS with --enable-debug and this is the output
in Apache's error log:

[Mon Oct 27 11:35:15 2003] [notice] Apache/1.3.27 (Linux/SuSE)
PHP/5.0.0b2-dev configured -- resuming normal operations
[Mon Oct 27 11:35:15 2003] [notice] Accept mutex: sysvsem (Default:
sysvsem)
/devage/php-src/Zend/zend_operators.c(1106) :  Freeing 0x46D04A68 (73
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 8 times
/root/turck-mmcache-2.4.2/mmcache.c(2436) :  Freeing 0x46D488E0 (71
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 59 times
/devage/php-src/Zend/zend_compile.c(44) :  Freeing 0x46D20BAC (7
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 174 times
/root/turck-mmcache-2.4.2/mmcache.c(2067) :  Freeing 0x46D45628 (9
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 194 times
/devage/php-src/Zend/zend_hash.c(236) :  Freeing 0x46D51540 (43 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 690 times
/devage/php-src/Zend/zend_hash.c(411) :  Freeing 0x46D514CC (64 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 15 times
/devage/php-src/Zend/zend_execute.c(2819) :  Freeing 0x46D51444 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 311 times
/devage/php-src/Zend/zend_API.c(809) :  Freeing 0x46D5110C (1 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 100 times
/devage/php-src/Zend/zend_API.c(808) :  Freeing 0x46D510C8 (16 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 100 times
/devage/php-src/Zend/zend_execute.c(872) :  Freeing 0x46D5033C (44
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(148) : Actual location (location
was relayed)
Last leak repeated 43 times
/devage/php-src/Zend/zend_execute.c(2822) :  Freeing 0x46D4B218 (5
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(137) : Actual location (location
was relayed)
Last leak repeated 6 times
/devage/php-src/Zend/zend_execute.c(3098) :  Freeing 0x46D5019C (44
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_API.c(713) : Actual location (location was
relayed)
Last leak repeated 41 times
/devage/php-src/Zend/zend_execute.c(879) :  Freeing 0x46D4DFBC (35
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(377) : Actual location (location was
relayed)
Last leak repeated 15 times
/devage/php-src/Zend/zend_execute.c(2532) :  Freeing 0x46D4B744 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 16 times
/devage/php-src/Zend/zend_execute.c(3097) :  Freeing 0x46D4AF6C (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 41 times
/devage/php-src/Zend/zend_API.c(714) :  Freeing 0x46D392B8 (32 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 39 times
/devage/php-src/Zend/zend_objects.c(106) :  Freeing 0x46D38FD8 (12
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 41 times
/devage/php-src/Zend/zend_execute.c(410) :  Freeing 0x46D38628 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 20 times
/devage/php-src/ext/standard/string.c(2875) :  Freeing 0x46CFB39C (2
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/Zend/zend_execute.c(3218) :  Freeing 0x46D02974 (32
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 31 times
/devage/php-src/ext/standard/html.c(1034) :  Freeing 0x46CE9C24 (128
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 2 times
/devage/php-src/Zend/zend_execute.c(2843) :  Freeing 0x46CE6080 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/ext/standard/da

#25997 [Opn]: Embedded null characters in strings breaks documented behavior of functions.

2003-10-27 Thread xodfull at starmen dot net
 ID:   25997
 User updated by:  xodfull at starmen dot net
 Reported By:  xodfull at starmen dot net
 Status:   Open
 Bug Type: *General Issues
 Operating System: Linux, Apache.
 PHP Version:  4.3.3
 New Comment:

"Magic quotes" needs to be disabled for this particular example to
work.

Anyway, I'm using RedHat's build of Linux 2.4.20, with Apache 1.3.28.


Previous Comments:


[2003-10-27 02:03:03] [EMAIL PROTECTED]

I've tested your code with 4.3.3, 4.3.4-CVS, 5-CVS and can't reproduce
reasult you get (ip2long returns -1, as expected).
Please, give more info about your OS & Apache.



[2003-10-26 22:32:27] xodfull at starmen dot net

Description:

ip2long() is supposed to return -1 on an invalid ip address.  Because
of PHP's method of storing strings, and a careless calling of standard
C library functions that use null-terminated strings, it will not
return -1 on invalid ip addresses that contain embedded null characters
in appropriate places.

" The function ip2long() generates an IPv4 Internet network address
from its Internet standard format (dotted string) representation. If
ip_address is invalid than -1 is returned. Note that -1  does not
evaluate as FALSE in PHP."

Reproduce code:
---
if(ip2long($_GET[ip]) != -1)
 echo($_GET[ip]);

http://something.net/somescript.php?ip=127.0.0.1%00foo

Expected result:

Arbitrary HTML insertion.  Worse effects may be possible depending on
the application.






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


#26003 [NEW]: fgetcsv() not binary-safe on null bytes

2003-10-27 Thread mr dot heat at gmx dot de
From: mr dot heat at gmx dot de
Operating system: Windows 2000
PHP version:  Irrelevant
PHP Bug Type: Filesystem function related
Bug description:  fgetcsv() not binary-safe on null bytes

Description:

If the .csv file contains any 0x00 character, fgetcsv() stops reading the
line and continues on the next one. Assume the folowing .csv file (with _
as place marker for the 0x00 character).

"a","bb_bb"
"c","d"

fgetcsv() breaks at 0x00 (with slightly different behaviours in 4.x and
5.x), the EOL character is skipped, the '"' in front of 'c' becomes
the closing enclosure, 'c' is skipped, 'd' becomes value [2].

(This bug may be related to http://bugs.php.net/bug.php?id=22382 - see the
last comment.)

Reproduce code:
---


Expected result:

array(3) {
  [0]=> string(5) "a"
  [1]=> string(5) "bb_bb"
}
(_ as a place marker for 0x00.)

Actual result:
--
In 4.3.4RC3-dev:
array(3) {
  [0]=> string(5) "a"
  [1]=> string(2) "bb"
  [2]=> string(5) "d"
}

In 5.0.0b2-dev (_ as a place marker for 0x00):
array(3) {
  [0]=> string(5) "a"
  [1]=> string(7) "bb_bb"
"
  [2]=> string(5) "d"
}

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


#22108 [Com]: php doesn't ignore the utf-8 BOM

2003-10-27 Thread kamor at worldonline dot fr
 ID:   22108
 Comment by:   kamor at worldonline dot fr
 Reported By:  bugzilla at jellycan dot com
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  All (as of the current implementation)
 Assigned To:  moriyoshi
 New Comment:

New and better solution in order to include some UTF-8 files without
including BOM chars. In fact previous solution works well with IE and
Mozilla but XHTML validation fails.

Well, the following solution is not the best but with some restrictions
in the code organisation gives good results:

Solution:
Insert 'ob_start()' before include() commands and 'ob_end_clean()'
after. This will clear all direct outputs produced by inclusions.

example:


This works well for pure function/class libraries.

Other solutions may be explored with other output buffer functions
(ob_*).


Previous Comments:


[2003-10-25 09:28:22] kamor at worldonline dot fr

Lazy solution for doctype detection under IE:
put the doctype declaration on the first line of the main script
(before all include() )

And let's hope that the following buggy chars will not interfer with my
beautiful pages ;)



[2003-07-29 01:15:23] yyasarr at hotmail dot com

php really doesn't ignore the utf-8 BOM
This is A BUG !

but can be solved easily



SOLVE METHOD:
1. Open any simple text editor. Such as NC (Norton Commander).
2. F4 for editing.
3. Delete first 3 (three) or 2 (two) bytes, characters [depends on file
type ] 

   file types:
   ---
   UTF-8: EF BB BF  // 3(three) bytes
   Unicode big endian : FE FF   // 2 (two) bytes
   Unicode: FF FE   // 2 (two) bytes
4. Check the result.

i am using this method. if u know better one, write it.

__
Yashar Alekberzade



[2003-07-19 09:01:50] ipa at assis dot lt

Simple Example:
I have multilanguage system where my text strings ar written as huge
array in one file. It has been saved in UTF-8 with simple Notepad,
which allows to save this format.

when i include() this file to access text strings, it outputs that
three bytes, so IE have displayed visible breakline with that HTML.

Result: cannot write multilanguage PHP scripts even with notepad. Have
to use iconv() what i dificult, because not every hoster have compiled
PHP with it.



[2003-07-03 15:05:35] jaanus at heeringson dot com

One thing i forgot to mention in my previous post is that multiple
BOM's also inhibit Internet Explorer 6 from rendering pages in
standards-compliance mode, which is a big issue when developing by w3c
standards.



[2003-07-03 14:59:44] jaanus at heeringson dot com

There are some consequenses that are not mentioned in the above
comments. More than one BOM renders a perfectly valid XHTM file
non-valid. Apparently the XHTML specification allows BOM characters,
but only ONE, not multiple which is what you get if you include other
utf-8 files (include, require). This in turn results in the possibility
that the xml declaration in not read since it is not found. This is the
case with the w3c validator.



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

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


#22382 [Com]: fgetcsv does not allow escaped quotes

2003-10-27 Thread mr dot heat at gmx dot de
 ID:   22382
 Comment by:   mr dot heat at gmx dot de
 Reported By:  Stevenv at operamail dot com
 Status:   Closed
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.7
 PHP Version:  4.3.2-dev
 New Comment:

This never was a bug. Instead, now 4.3.3's fGetCSV() is
inconsistent/contradictory.

In short: In 4.3.3 fGetCSV() mixes both "Microsoft standard CSV" and
"Unix delimiter separated values". The first uses "" to escape double
quotes, the second uses addslashes(). (See
http://www.catb.org/~esr/writings/taoup/html/ch05s02.html for detailed
explanation.) Two examples:

prior433.csv:
"In PHP, write "" as \"" to escape quotes."

prior433.php:


since433.csv:
"In PHP, write "" as \\"" to escape quotes."

since433.php:


This makes fGetCSV() a entirely different function in 4.3.3. I don't
think it's a good idea to break any script written before 4.3.3 that
uses fGetCSV(). Furthermore, there was nothing wrong in 4.3.2. The old
Windows/Excel quotation style was binary-safe already (nearly
binary-safe, see below).

Suggestion #1: Introduce a new function fGetDSV() and restore the
behaviour fGetCSV() worked before.

Suggestion #2: Introduce a fifth parameter
fGetCSV(resource handle, int length [, string delimiter [, string
enclosure [, bool unix_escape_style]]])
which is false for Windows style (default; values are surrounded by
enclosure characters; enclosure characters are escaped by another
enclosure character)
or true for Unix style (enclosure may be empty; any critical character
is escaped by a backslash; values are returned without the backslashes;
double enclosure characters are not stripped).

Additional bug: fGetCSV() breaks if there is a \x00 character anywhere.
This means, it's not binary-safe (concerns any version).


Previous Comments:


[2003-02-23 21:17:39] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-02-22 21:59:44] [EMAIL PROTECTED]

I take that back, it isn't fixed in that snapshot,
so don't bother testing.

Verified within 4.3.2-dev.





[2003-02-22 21:18:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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


AFAIK, this is already fixed. 




[2003-02-22 19:45:00] Stevenv at operamail dot com

As the summary says, fgetcsv does not allow escaped quotes. When csv
fields come from user input, it is often the case that addslashes() is
run on them then enclosed in quotes. However, fgetcsv() removes
anything after the escaped quote.

Code:



Outputs:
array(3) {
  [0]=>
  string(9) "This is \"
  [1]=>
  string(9) "field two"
  [2]=>
  string(11) "field three"
}

The behavior I expected would have been for the first field to read:
"This is \"Field One\""

Much like the functionality described on
.

Thanks




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


#26001 [NEW]: Attempt to serialize causes php crash

2003-10-27 Thread david dot nicholls at camden dot gov dot uk
From: david dot nicholls at camden dot gov dot uk
Operating system: Windows 2000
PHP version:  5CVS-2003-10-27 (dev)
PHP Bug Type: COM related
Bug description:  Attempt to serialize causes php crash

Description:

Get a Dr Watson crash when I attempt to serialize the data in the
PasswordExpirationDate property from a WinNT:// call.

Visually the data is '02/11/2003 15:17:01'
the above text string does not cause a crash when serialized

Other returned properties can be serialized and code runs fine when the
PasswordExpirationDate property is not serialized

Reproduce code:
---
Requires an NT 4 domain controller to test against (con provide code if
required)

Actual result:
--
Dr Waston crashdump report available on request (not a small file) however
following line seem pertinant

*> Stack Back Trace <*

FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0012FA9C 000E 004E 0010 000F 0001 !zend_stack_base 

FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0145FF40 100C1A95 0145FF64   
user32!GetMenuItemRect 
0145FFB4 7C57B382 01136C88   01136C88 !zend_timeout 
0145FFEC  78008532 01136C88  2B4D4F43 kernel32!lstrcmpiW 

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


#25976 [Opn]: $array[] = $otherarray does not work as expected

2003-10-27 Thread tony2001
 ID:   25976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

Sorry, I get "Connection refused" by this URL all time.


Previous Comments:


[2003-10-27 06:00:19] [EMAIL PROTECTED]

Hi Antony,

see http://kai.cowiki.org/_info.php for details.



[2003-10-27 01:20:28] [EMAIL PROTECTED]

Please, provide more info about your config and OS.
What version of apache do you use?
Have you try this examples with PHP-CLI ?



[2003-10-24 14:55:07] [EMAIL PROTECTED]

I've updated my PHP version from CVS and rebuild, but same problem. See
http://kai.cowiki.org/tests/test.array.php and
http://kai.cowiki.org/tests/test.array2.php.



[2003-10-24 11:34:16] tony2001 at phpclub dot net

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.



[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
';
var_dump($aTestOuter);
echo '';
?>

example 2:
';
var_dump($aTestOuter);
echo '';
?>

Expected result:

example 1:
array(3) {
  [0]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [1]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
}

example 2:
array(3) {
  [0]=>
  array(2) {
["foo"]=>
string(32) "0: content of $aTestInner['foo']"
["bar"]=>
string(32) "0: content of $aTestInner['bar']"
  }
  [1]=>
  array(2) {
["foo"]=>
string(32) "1: content of $aTestInner['foo']"
["bar"]=>
string(32) "1: content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(32) "2: content of $aTestInner['foo']"
["bar"]=>
string(32) "2: content of $aTestInner['bar']"
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=>
  array(0) {
  }
  [1]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
}

example 2:
array(3) {
  [0]=>
  array(0) {
  }
  [1]=>
  array(0) {
  }
  [2]=>
  array(0) {
  }
}





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


#25998 [Opn->Bgs]: mysql_fetch_array display nothing over 530 records

2003-10-27 Thread georg
 ID:   25998
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hsutanto78 at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: WinXP
 PHP Version:  4.3.3
 New Comment:

cnaged status -> Bogus 


Previous Comments:


[2003-10-27 05:35:57] hsutanto78 at hotmail dot com

I just found it.   When I viewed the source, I found that all of the
data were correctly retrieved already.  It just doesn't displayed
correctly in the browser.  might caused by lack of memory.  

It's not PHP bug. ^^



[2003-10-27 04:16:14] hsutanto78 at hotmail dot com

Description:

There was nothing wrong when I executed this script at first.  But
after I added the data more than 500 records, it only display nothing. 
I tried to retrieve the data through shell command, and no problem.  is
it PHP bug?? Thanks in advance.

Reproduce code:
---
$strQuery = "SELECT * FROM cust_data";
$result = mysql_query($strQuery) or Die("QUERY FAILED");

while($line=mysql_fetch_array($result,MYSQL_ASSOC)){
$array[]=$line;
print_r($array);
}


Expected result:

Array([0]Array([id]=1, [name]=John.
Array([1]Array([id]=2, [name]=

Actual result:
--
1
1
1






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


#25976 [Opn]: $array[] = $otherarray does not work as expected

2003-10-27 Thread k . schroeder
 ID:   25976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
-Operating System: unknown
+Operating System: Linux
-PHP Version:  5CVS-2003-10-24 (dev)
+PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

Hi Antony,

see http://kai.cowiki.org/_info.php for details.


Previous Comments:


[2003-10-27 01:20:28] [EMAIL PROTECTED]

Please, provide more info about your config and OS.
What version of apache do you use?
Have you try this examples with PHP-CLI ?



[2003-10-24 14:55:07] [EMAIL PROTECTED]

I've updated my PHP version from CVS and rebuild, but same problem. See
http://kai.cowiki.org/tests/test.array.php and
http://kai.cowiki.org/tests/test.array2.php.



[2003-10-24 11:34:16] tony2001 at phpclub dot net

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.



[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
';
var_dump($aTestOuter);
echo '';
?>

example 2:
';
var_dump($aTestOuter);
echo '';
?>

Expected result:

example 1:
array(3) {
  [0]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [1]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
}

example 2:
array(3) {
  [0]=>
  array(2) {
["foo"]=>
string(32) "0: content of $aTestInner['foo']"
["bar"]=>
string(32) "0: content of $aTestInner['bar']"
  }
  [1]=>
  array(2) {
["foo"]=>
string(32) "1: content of $aTestInner['foo']"
["bar"]=>
string(32) "1: content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(32) "2: content of $aTestInner['foo']"
["bar"]=>
string(32) "2: content of $aTestInner['bar']"
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=>
  array(0) {
  }
  [1]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
}

example 2:
array(3) {
  [0]=>
  array(0) {
  }
  [1]=>
  array(0) {
  }
  [2]=>
  array(0) {
  }
}





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


#26000 [Opn->Fbk]: much memory leaks

2003-10-27 Thread derick
 ID:   26000
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Linux
 PHP Version:  5CVS-2003-10-27 (dev)
 New Comment:

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

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

Don't report bugs with thrid party tools enabled. Turck MM is build to
leak like hell. 


Previous Comments:


[2003-10-27 05:52:52] [EMAIL PROTECTED]

Description:

I've configured latest CVS with --enable-debug and this is the output
in Apache's error log:

[Mon Oct 27 11:35:15 2003] [notice] Apache/1.3.27 (Linux/SuSE)
PHP/5.0.0b2-dev configured -- resuming normal operations
[Mon Oct 27 11:35:15 2003] [notice] Accept mutex: sysvsem (Default:
sysvsem)
/devage/php-src/Zend/zend_operators.c(1106) :  Freeing 0x46D04A68 (73
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 8 times
/root/turck-mmcache-2.4.2/mmcache.c(2436) :  Freeing 0x46D488E0 (71
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 59 times
/devage/php-src/Zend/zend_compile.c(44) :  Freeing 0x46D20BAC (7
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 174 times
/root/turck-mmcache-2.4.2/mmcache.c(2067) :  Freeing 0x46D45628 (9
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 194 times
/devage/php-src/Zend/zend_hash.c(236) :  Freeing 0x46D51540 (43 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 690 times
/devage/php-src/Zend/zend_hash.c(411) :  Freeing 0x46D514CC (64 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 15 times
/devage/php-src/Zend/zend_execute.c(2819) :  Freeing 0x46D51444 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 311 times
/devage/php-src/Zend/zend_API.c(809) :  Freeing 0x46D5110C (1 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 100 times
/devage/php-src/Zend/zend_API.c(808) :  Freeing 0x46D510C8 (16 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 100 times
/devage/php-src/Zend/zend_execute.c(872) :  Freeing 0x46D5033C (44
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(148) : Actual location (location
was relayed)
Last leak repeated 43 times
/devage/php-src/Zend/zend_execute.c(2822) :  Freeing 0x46D4B218 (5
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(137) : Actual location (location
was relayed)
Last leak repeated 6 times
/devage/php-src/Zend/zend_execute.c(3098) :  Freeing 0x46D5019C (44
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_API.c(713) : Actual location (location was
relayed)
Last leak repeated 41 times
/devage/php-src/Zend/zend_execute.c(879) :  Freeing 0x46D4DFBC (35
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(377) : Actual location (location was
relayed)
Last leak repeated 15 times
/devage/php-src/Zend/zend_execute.c(2532) :  Freeing 0x46D4B744 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 16 times
/devage/php-src/Zend/zend_execute.c(3097) :  Freeing 0x46D4AF6C (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 41 times
/devage/php-src/Zend/zend_API.c(714) :  Freeing 0x46D392B8 (32 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 39 times
/devage/php-src/Zend/zend_objects.c(106) :  Freeing 0x46D38FD8 (12
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 41 times
/devage/php-src/Zend/zend_execute.c(410) :  Freeing 0x46D38628 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 20 times
/devage/php-src/ext/standard/string.c(2875) :  Freeing 0x46CFB39C (2
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/Zend/zend_execute.c(3218) :  Freeing 0x46D02974 (32
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 31 times
/devage/php-src/ext/standard/html.c(1034) :  Freeing 0x46CE9C24 (128
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 2 times
/devage/php-src/Zend/zend_execute.c(2843) :  Freeing 0x46CE6080 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/ext/standard/datetime.c(988) :  Freeing 0x46C9A268 (17
bytes), script=/srv/cowiki/htdocs/index.php
/root/turck-mmcache-2.4.2/mmcache.c(2057) :  Freeing 0x46CAFCA4 (16
bytes), sc

#26000 [NEW]: much memory leaks

2003-10-27 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  5CVS-2003-10-27 (dev)
PHP Bug Type: Apache related
Bug description:  much memory leaks

Description:

I've configured latest CVS with --enable-debug and this is the output in
Apache's error log:

[Mon Oct 27 11:35:15 2003] [notice] Apache/1.3.27 (Linux/SuSE)
PHP/5.0.0b2-dev configured -- resuming normal operations
[Mon Oct 27 11:35:15 2003] [notice] Accept mutex: sysvsem (Default:
sysvsem)
/devage/php-src/Zend/zend_operators.c(1106) :  Freeing 0x46D04A68 (73
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 8 times
/root/turck-mmcache-2.4.2/mmcache.c(2436) :  Freeing 0x46D488E0 (71
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 59 times
/devage/php-src/Zend/zend_compile.c(44) :  Freeing 0x46D20BAC (7 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 174 times
/root/turck-mmcache-2.4.2/mmcache.c(2067) :  Freeing 0x46D45628 (9 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 194 times
/devage/php-src/Zend/zend_hash.c(236) :  Freeing 0x46D51540 (43 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 690 times
/devage/php-src/Zend/zend_hash.c(411) :  Freeing 0x46D514CC (64 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 15 times
/devage/php-src/Zend/zend_execute.c(2819) :  Freeing 0x46D51444 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 311 times
/devage/php-src/Zend/zend_API.c(809) :  Freeing 0x46D5110C (1 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 100 times
/devage/php-src/Zend/zend_API.c(808) :  Freeing 0x46D510C8 (16 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 100 times
/devage/php-src/Zend/zend_execute.c(872) :  Freeing 0x46D5033C (44 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(148) : Actual location (location was
relayed)
Last leak repeated 43 times
/devage/php-src/Zend/zend_execute.c(2822) :  Freeing 0x46D4B218 (5 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(137) : Actual location (location was
relayed)
Last leak repeated 6 times
/devage/php-src/Zend/zend_execute.c(3098) :  Freeing 0x46D5019C (44
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_API.c(713) : Actual location (location was
relayed)
Last leak repeated 41 times
/devage/php-src/Zend/zend_execute.c(879) :  Freeing 0x46D4DFBC (35 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(377) : Actual location (location was
relayed)
Last leak repeated 15 times
/devage/php-src/Zend/zend_execute.c(2532) :  Freeing 0x46D4B744 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 16 times
/devage/php-src/Zend/zend_execute.c(3097) :  Freeing 0x46D4AF6C (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 41 times
/devage/php-src/Zend/zend_API.c(714) :  Freeing 0x46D392B8 (32 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 39 times
/devage/php-src/Zend/zend_objects.c(106) :  Freeing 0x46D38FD8 (12 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 41 times
/devage/php-src/Zend/zend_execute.c(410) :  Freeing 0x46D38628 (16 bytes),
script=/srv/cowiki/htdocs/index.php
Last leak repeated 20 times
/devage/php-src/ext/standard/string.c(2875) :  Freeing 0x46CFB39C (2
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/Zend/zend_execute.c(3218) :  Freeing 0x46D02974 (32
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_hash.c(157) : Actual location (location was
relayed)
Last leak repeated 31 times
/devage/php-src/ext/standard/html.c(1034) :  Freeing 0x46CE9C24 (128
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 2 times
/devage/php-src/Zend/zend_execute.c(2843) :  Freeing 0x46CE6080 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/ext/standard/datetime.c(988) :  Freeing 0x46C9A268 (17
bytes), script=/srv/cowiki/htdocs/index.php
/root/turck-mmcache-2.4.2/mmcache.c(2057) :  Freeing 0x46CAFCA4 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 13 times
/devage/php-src/Zend/zend_execute.c(2739) :  Freeing 0x46C9E2B8 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 5 times
/devage/php-src/Zend/zend_execute_API.c(393) :  Freeing 0x46CAE1B4 (16
bytes), script=/srv/cowiki/htdocs/index.php
Last leak repeated 1 time
/devage/php-src/ext/standard/string.c(1126) :  Freeing 0x080F75D4 (10
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/ext/standard/dns.c(136) :  Freeing 0x46CAE068 (27 bytes),
script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_variables.c(149) :  Freeing 0x46CAD994 (32
bytes), script=/srv/cowiki/htdocs/index.php
/devage/php-src/Zend/zend_ha

#25998 [Opn]: mysql_fetch_array display nothing over 530 records

2003-10-27 Thread hsutanto78 at hotmail dot com
 ID:   25998
 User updated by:  hsutanto78 at hotmail dot com
 Reported By:  hsutanto78 at hotmail dot com
 Status:   Open
 Bug Type: MySQL related
 Operating System: WinXP
 PHP Version:  4.3.3
 New Comment:

I just found it.   When I viewed the source, I found that all of the
data were correctly retrieved already.  It just doesn't displayed
correctly in the browser.  might caused by lack of memory.  

It's not PHP bug. ^^


Previous Comments:


[2003-10-27 04:16:14] hsutanto78 at hotmail dot com

Description:

There was nothing wrong when I executed this script at first.  But
after I added the data more than 500 records, it only display nothing. 
I tried to retrieve the data through shell command, and no problem.  is
it PHP bug?? Thanks in advance.

Reproduce code:
---
$strQuery = "SELECT * FROM cust_data";
$result = mysql_query($strQuery) or Die("QUERY FAILED");

while($line=mysql_fetch_array($result,MYSQL_ASSOC)){
$array[]=$line;
print_r($array);
}


Expected result:

Array([0]Array([id]=1, [name]=John.
Array([1]Array([id]=2, [name]=

Actual result:
--
1
1
1






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


#25999 [Opn->Bgs]: I can convert the following code from asp to php

2003-10-27 Thread alan_k
 ID:   25999
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yunlan at mail dot eestart dot com
-Status:   Open
+Status:   Bogus
 Bug Type: COM related
 Operating System: Microsoft window server 2003
 PHP Version:  4.3.4RC2
 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. 

Thank you for your interest in PHP.

I suspect you want to call methods of the com object.
eg.
$com->FETCHNEXT();

likes like a great example of dumb syntax in ASP :)




Previous Comments:


[2003-10-27 04:51:36] yunlan at mail dot eestart dot com

Description:

ASP code:

<%
Set RS = Server.CreateObject("visualphd.data")
RS.HOSTNAME="APP22"
RS.TAGS.ADD "TIC1101.PV"
RS.SAMPLEFREQUENCY = 60
RS.SAMPLEMETHOD="SNAPSHOT"
RS.STARTTIME="NOW"
RS.ENDTIME="NOW"
RS.FETCH
response.write(rs.tags("TIC1101.PV").VALUE)
response.write("")
response.write(rs.tags("TIC1101.PV").timestamp)
response.write("")
response.write(rs.tags("TIC1101.PV").CONFIDENCE)
%>

Reproduce code:
---
I had Converted to php code:
HOSTNAME="APP22";
$obj->TAGS->ADD("TIC1101.PV");
$obj->SAMPLEFREQUENCY = 60;
$obj->SAMPLEMETHOD="SNAPSHOT";
$obj->STARTTIME="NOW";
$obj->ENDTIME="NOW";
$obj->MoveFirst;
$obj->FETCH;
print_r($obj->TAGS["TIC1101.PV"]->VALUE);
print_r("");
print_r($obj->TAGS["TIC1101.PV"]->timestamp);
print_r("");
print_r($obj->TAGS["TIC1101.PV"]->CONFIDENCE);
$obj=null;
?>
I don't know it is right that from "RS.TAGS.ADD \"TIC1101.PV\"" to
"$obj->TAGS->ADD("TIC1101.PV");"?

Expected result:

Expected result is so such:

10.0
2003-10-27 17:40:50
100%

Actual result:
--
Actual result:

0
0
0

I hope you to help me.

[EMAIL PROTECTED]





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


#25993 [Bgs]: Lack of functions functionality

2003-10-27 Thread ausvald at tut dot by
 ID:   25993
 User updated by:  ausvald at tut dot by
 Reported By:  ausvald at tut dot by
 Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  *
 New Comment:

Ok, i thought it's rather easy to understand.

#1:

$test=test1(); //$test="test1";
echo $test();  // echo "test1";

So why there is no way just to write test()(), which means run variable
function that is returned by another function?

#2:

array($var=>$var) construction means i'm creating an array with 1
element which has key $var and value $var.

$test=test2('test'); $test=array('test'=>'test');
echo $test['test']; echo 'test';

So why there is no way just to write echo test2('test')['test'], which
means to get an element of array that is returned by a function?

Thanks.


Previous Comments:


[2003-10-26 12:40:34] [EMAIL PROTECTED]

We don't have $var=>$var, use $var->var.

Besides that noone reading your code will know what you want. For
example what is 'test1()();' supposed to do in your oppinion?



[2003-10-26 10:28:13] ausvald at tut dot by

Description:

$var);
}
echo test2('test')['test'];


?>

Why these things are not implemented in PHP5? And when are they going
to be?


Reproduce code:
---
$var);
}
echo test2('test')['test'];


?>

Why these things are not implemented in PHP5? And when are they going
to be?


Expected result:

$var);
}
echo test2('test')['test'];


?>

Why these things are not implemented in PHP5? And when are they going
to be?


Actual result:
--
Error





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


#25999 [NEW]: I can convert the following code from asp to php

2003-10-27 Thread yunlan at mail dot eestart dot com
From: yunlan at mail dot eestart dot com
Operating system: Microsoft window server 2003
PHP version:  4.3.4RC2
PHP Bug Type: COM related
Bug description:  I can convert the following code from asp to php

Description:

ASP code:

<%
Set RS = Server.CreateObject("visualphd.data")
RS.HOSTNAME="APP22"
RS.TAGS.ADD "TIC1101.PV"
RS.SAMPLEFREQUENCY = 60
RS.SAMPLEMETHOD="SNAPSHOT"
RS.STARTTIME="NOW"
RS.ENDTIME="NOW"
RS.FETCH
response.write(rs.tags("TIC1101.PV").VALUE)
response.write("")
response.write(rs.tags("TIC1101.PV").timestamp)
response.write("")
response.write(rs.tags("TIC1101.PV").CONFIDENCE)
%>

Reproduce code:
---
I had Converted to php code:
HOSTNAME="APP22";
$obj->TAGS->ADD("TIC1101.PV");
$obj->SAMPLEFREQUENCY = 60;
$obj->SAMPLEMETHOD="SNAPSHOT";
$obj->STARTTIME="NOW";
$obj->ENDTIME="NOW";
$obj->MoveFirst;
$obj->FETCH;
print_r($obj->TAGS["TIC1101.PV"]->VALUE);
print_r("");
print_r($obj->TAGS["TIC1101.PV"]->timestamp);
print_r("");
print_r($obj->TAGS["TIC1101.PV"]->CONFIDENCE);
$obj=null;
?>
I don't know it is right that from "RS.TAGS.ADD \"TIC1101.PV\"" to
"$obj->TAGS->ADD("TIC1101.PV");"?

Expected result:

Expected result is so such:

10.0
2003-10-27 17:40:50
100%

Actual result:
--
Actual result:

0
0
0

I hope you to help me.

[EMAIL PROTECTED]

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


#25998 [NEW]: mysql_fetch_array display nothing over 530 records

2003-10-27 Thread hsutanto78 at hotmail dot com
From: hsutanto78 at hotmail dot com
Operating system: WinXP
PHP version:  4.3.3
PHP Bug Type: MySQL related
Bug description:  mysql_fetch_array display nothing over 530 records

Description:

There was nothing wrong when I executed this script at first.  But after I
added the data more than 500 records, it only display nothing.  I tried to
retrieve the data through shell command, and no problem.  is it PHP bug??
Thanks in advance.

Reproduce code:
---
$strQuery = "SELECT * FROM cust_data";
$result = mysql_query($strQuery) or Die("QUERY FAILED");

while($line=mysql_fetch_array($result,MYSQL_ASSOC)){
$array[]=$line;
print_r($array);
}


Expected result:

Array([0]Array([id]=1, [name]=John.
Array([1]Array([id]=2, [name]=

Actual result:
--
1
1
1


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


#25917 [Fbk->Opn]: odbc_error() sometimes returns a bad string

2003-10-27 Thread thorsten at rinne dot info
 ID:   25917
 User updated by:  thorsten at rinne dot info
 Reported By:  thorsten at rinne dot info
-Status:   Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Windows2000
 PHP Version:  4CVS, 5CVS
 New Comment:

Here's my log:

SQLQuery: SELECT * FROM TABLE
ErrorNum: 4ÃïÏ
ErrorMsg: ï

Here's the odbc log:

[ Process: 924, Thread: 1084 ]
[ Date & Time:  27/10/2003 08.23.23.15 ]
[ Product:  QDB2/NT DB2 v8.1.3.132 ]
[ Level Identifier: 02040106 ]
[ CLI Driver Version:   08.01. ]
[ Informational Tokens: "DB2 v8.1.3.132","s030728","WR21324","Fixpack
3" ]

[000924 001084] [27/10/2003 08.23.36.934791] SQLExecDirectW(
hStmt=1:1, pszSqlStr="SELECT * FROM TABLE" -
X"530045004C004500430054002000490044005F004D00410049004C0052004F004F004D002C0020004400450053004300520049005000540049004F004E002C0020005300450052005600450052004E0041004D0045002000460052004F004D0020004D00410049004C0052004F004F004D00",
cbSqlStr=-3 )
[000924 001084] [27/10/2003 08.23.36.935123]

[000924 001084] [27/10/2003 08.23.36.935863] SQLExecDirectW( )
[000924 001084] [27/10/2003 08.23.36.935972] <---
SQL_SUCCESS


Previous Comments:


[2003-10-22 19:49:26] [EMAIL PROTECTED]

can you please turn on the logging option in your client, and post the
relavent portions to this bug?  Under windows it's in the ODBC
Administrator.



[2003-10-22 08:32:47] thorsten at rinne dot info

This bug can also reproduced with PHP 4.3.4RC1 and 4.3.4RC2. This
happens with INSERTS, UPDATEs and DELETEs, too.



[2003-10-20 03:49:22] thorsten at rinne dot info

Description:

We use IBM DB2 databases on our Windows2000 systems. The bug occured
then writing a database class.

The odbc_error() function returns sometimes bad strings with special
characters. If a real error occurs, the function returns the correct
six-digit ODBC state. After that, the error code will not be removed
from memory and the error code will be returned on every query although
it is correct.

Note:
var_dump(odbc_error()) returns sometimes bad strings with special
characters, sometimes nothing.


Reproduce code:
---
function myquery($query) {
$result = odbc_exec($conn, $query);
if (odbc_error($conn)) {
print "SQLQuery: ".$query;
print "ErrorNum: ".odbc_error($conn));
print "ErrorMsg: ".odbc_errormsg($conn));
}
return $result;
}

Expected result:

The expected result should be empty when no error occured and the
six-digit ODBC state when an error occured. After every correct new
query, the result should be empty.

Actual result:
--
Here are some results, the queries are correct:

SQLQuery: SELECT * FROM SYSTEM
ErrorNum: 8¸ÌP·
ErrorMsg: Ìx¹Ì

or

SQLQuery: SELECT * FROM SYSTEM2
ErrorNum: àWPW
ErrorMsg: 

or 

SQLQuery: SELECT * FROM SYSTEM
ErrorNum: 
ErrorMsg: 







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


#25997 [Opn]: Embedded null characters in strings breaks documented behavior of functions.

2003-10-27 Thread tony2001
 ID:   25997
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xodfull at starmen dot net
 Status:   Open
 Bug Type: *General Issues
 Operating System: Linux, Apache.
 PHP Version:  4.3.3
 New Comment:

I've tested your code with 4.3.3, 4.3.4-CVS, 5-CVS and can't reproduce
reasult you get (ip2long returns -1, as expected).
Please, give more info about your OS & Apache.


Previous Comments:


[2003-10-26 22:32:27] xodfull at starmen dot net

Description:

ip2long() is supposed to return -1 on an invalid ip address.  Because
of PHP's method of storing strings, and a careless calling of standard
C library functions that use null-terminated strings, it will not
return -1 on invalid ip addresses that contain embedded null characters
in appropriate places.

" The function ip2long() generates an IPv4 Internet network address
from its Internet standard format (dotted string) representation. If
ip_address is invalid than -1 is returned. Note that -1  does not
evaluate as FALSE in PHP."

Reproduce code:
---
if(ip2long($_GET[ip]) != -1)
 echo($_GET[ip]);

http://something.net/somescript.php?ip=127.0.0.1%00foo

Expected result:

Arbitrary HTML insertion.  Worse effects may be possible depending on
the application.






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