#33226 [Opn-WFx]: php 5.0.4 no longer detects endianness when cross-compiling

2005-06-03 Thread sniper
 ID:   33226
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jbparsons at ucdavis dot edu
-Status:   Open
+Status:   Wont fix
-Bug Type: *Compile Issues
+Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.0.4
 New Comment:

Yes, life is hard sometimes. If you can provide a reliable way to
detect endianness when cross-compiling, feel free to send a patch. 


Previous Comments:


[2005-06-03 02:32:18] jbparsons at ucdavis dot edu

Description:

php 5.0.3 and earlier used AC_C_BIGENDIAN during configuration to
detect the endianness of the target system.  This autoconf macro is
capable of detecting the endianness of many systems even when
cross-compiling.

php 5.0.4 now uses AC_TRY_RUN instead, which means that it is no longer
able to detect the endianness of a target, and it must instead be
configured manually.

This makes it harder to configure php correctly when building for
embedded systems, such as the Linksys nslu2, where this problem was
noticed.







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


#33227 [Opn-Fbk]: zend_strtod() broken on big-endian arm

2005-06-03 Thread sniper
 ID:   33227
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jbparsons at ucdavis dot edu
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: unslung - www.nslu2-linux.org
 PHP Version:  5.0.4
 New Comment:

See lines 126-133 in zend_strtod.c



Previous Comments:


[2005-06-03 03:44:43] jbparsons at ucdavis dot edu

Description:

On big-endian arm systems, php sometimes crashes (infinite loop) inside
zend_strtod().

The problem seems to be the code at line 261 of zend_strtod.c, which
apparently assumes that every arm system has little-endian integers:

#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm__)
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b,
\
((unsigned short *)a)[0] = (unsigned short)c, a++)
#else
#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b,
\
((unsigned short *)a)[1] = (unsigned short)c, a++)
#endif


Reproduce code:
---
?php
echo start;
if (79e88e6db0c25ca1ee5e2aac35a24d6c
== 79e88e6db0c25ca1ee5e2aac35a24d6c)
{
echo passed;
}
echo end;
?


Expected result:

startend

Actual result:
--
(gdb) run
Starting program: /share/hdd/data/home/jp30/t/php foo.php
start

  [...minutes pass, then Ctrl-C is pressed...]

Program received signal SIGINT, Interrupt.
0x00146528 in zend_strtod ()
(gdb) bt
#0  0x00146528 in zend_strtod ()
Cannot access memory at address 0x4






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


#33228 [NEW]: MySQL Connection problem

2005-06-03 Thread beena at blr dot cmc dot net dot in
From: beena at blr dot cmc dot net dot in
Operating system: Windows 2000 Server
PHP version:  5.0.4
PHP Bug Type: MySQL related
Bug description:  MySQL Connection problem

Description:

i have loaded PHP 5.0.4 on Windows 2000 server, IIS 5  MySQL 4.1. when i
try to run a php script to establish a connection with MySQL, 
   it gives me a 
Fatal error: Call to undefined function mysql_connect() in
c:\Inetpub\wwwroot\estbconn.php on line 2

in the script file. i am able to use MySQL @ command line. i have copied
the file libmysql.dll to c:\winnt\system32 folder and it also exists in
c:\PHP folder. i have also set the path in for C:\PHP.
 pls help me in order to enable me to execute more PHP scripts for MySQL
database

Reproduce code:
---
?php
  $connection=mysql_connect(localhost,root,sql123)
   or die(A connection to server could not be established);
   echo root user login in MySQL server @ localhost successful;
  
?

Expected result:

connectivity to happen

Actual result:
--
Fatal error: Call to undefined function mysql_connect() in
c:\Inetpub\wwwroot\estbconn.php on line 2


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


#33228 [Opn-Bgs]: MySQL Connection problem

2005-06-03 Thread tony2001
 ID:   33228
 Updated by:   [EMAIL PROTECTED]
 Reported By:  beena at blr dot cmc dot net dot in
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Windows 2000 Server
 PHP Version:  5.0.4
 New Comment:

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

Thank you for your interest in PHP.

Read the docs again.


Previous Comments:


[2005-06-03 10:44:23] beena at blr dot cmc dot net dot in

Description:

i have loaded PHP 5.0.4 on Windows 2000 server, IIS 5  MySQL 4.1. when
i try to run a php script to establish a connection with MySQL, 
   it gives me a 
Fatal error: Call to undefined function mysql_connect() in
c:\Inetpub\wwwroot\estbconn.php on line 2

in the script file. i am able to use MySQL @ command line. i have
copied the file libmysql.dll to c:\winnt\system32 folder and it also
exists in c:\PHP folder. i have also set the path in for C:\PHP.
 pls help me in order to enable me to execute more PHP scripts for
MySQL database

Reproduce code:
---
?php
  $connection=mysql_connect(localhost,root,sql123)
   or die(A connection to server could not be established);
   echo root user login in MySQL server @ localhost successful;
  
?

Expected result:

connectivity to happen

Actual result:
--
Fatal error: Call to undefined function mysql_connect() in
c:\Inetpub\wwwroot\estbconn.php on line 2






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


#33229 [NEW]: geting a YearWeek correctly

2005-06-03 Thread fab097 at gmail dot com
From: fab097 at gmail dot com
Operating system: linux
PHP version:  4.3.10
PHP Bug Type: Feature/Change Request
Bug description:  geting a YearWeek correctly

Description:

using date(Y,$date) and date(w,$date) is not clean to get the YEARWEEK
of a date.
in most of case it looks to work, for example :
with date of first or march 2005, it gives 2005 and 9

but on certain cases, it's not possible to get REAL YearWeek of a date.
for example : date of 30th of december 2003 is the FIRST week of year 2004
!

then date(w,$date) gives correct week number : 1
but date(Y,$date) gives year 2003 (which is normal)

a function YEARWEEK is missing.
in mySQL I have such a function :
select YEARWEEK('20031231',1); returns 200401
there are no way in php to get such result with date.

PS : please as mysql add an optional parameters to this function to
support first day of the week. (0=sunday, 1=monday)
thank you.

Reproduce code:
---
$d=mktime(0,0,0,12,30,2003);
echo date(d/m/y,$d).\n;
echo Year :.date(Y,$d).  Week :.date(W,$d);
echo \n expected YEARWEEK() : '200401';



Expected result:

 the required result of YEARWEEK future function is 200401

Actual result:
--
this function does not exist yet, so.. no result.

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


#33061 [Opn-Fbk]: Pass object by value then modify initialized sub-object: passes by reference

2005-06-03 Thread tony2001
 ID:   33061
 Updated by:   [EMAIL PROTECTED]
 Reported By:  online at natweiss dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.3.10
 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:


[2005-05-19 02:39:30] online at natweiss dot com

Description:

See reproduce code.

php.ini is stock / no changes.

Reproduce code:
---
?php
// a class that does nothing
class something{
function nothing(){
}
}
// a pass-by-value function that modifies a member's member
function pass_by_value($value){
$value-member-val = 1;
}
// create a something with a member something
$object = new something;
$object-member = new something;

// call nothing, then call pass_by_value and print results
$object-member-nothing();
echo member-val should be empty!\n;
pass_by_value($object);
print_r($object);
?

Expected result:

$object-member should be empty

Actual result:
--
$object-member-val == 1





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


#32919 [Opn-Fbk]: Curl/Openssl: random crashes with fsockopen(ssl://....) under heavy load

2005-06-03 Thread tony2001
 ID:   32919
 Updated by:   [EMAIL PROTECTED]
 Reported By:  justincouto at msn dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2003 Server
 PHP Version:  5.0.4
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-05-11 03:28:50] justincouto at msn dot com

I have done more work on trying to figure out the source of this bug. 
I realized that it seemed to be happening in in all the places that we
were using the Curl module for Posting to web services.  As a result, I
wrote a php socket class to replace curl.  The new class eliminated the
problem in all places except where it needs to use the OpenSSL module. 
It seems as if both Curl and the Openssl module have issues.  I can
reproduce the problem.  It occurs with using a socket as follows:

$handle = fsockopen($this-host, $this-port, $errno, $errstr, $timeout
= 30);

I have deffinately narrowed the issue to this line of code.  The host
and port are set as follows

$this-host = ssl://somehost.com;
$this-port = 443;

The reason I know it is the ssl part of the connection is becuse I can
use the class to connect to non ssl connection at the same time the
access violation is happening.  

The access violation only occurs on a heavly load (when lots of
requests through a secure fsockopen)

It seems if it could have something to do with the openssl threading. 
I also think this because the CLI or CGI version won't reporduce this
issue.

Please advise.  If you know of any other way to do a secure socket
connection that doesn't use openssl or curl, it would be helpful for me
to get a qucik fix.

Thanks,



[2005-05-03 00:00:58] justincouto at msn dot com

Description:

I am running PHP5 on 3 Windows 2003 servers using IIS 6.0.  All of
these servers randomly get PHP Access Violation errors like this:

PHP has encountered an Access Violation at 7C84E9AF

I am not sure what causes this.  I have seen lots of posts where other
are experiencing the exact same thing, however, there are no answers. 
I have seen several other bugs that report this and they state that it
has been fixed in the latest version.  I have tried several versions
and the latest cvs.  All of them will have this problem.  The poroblem
seem to occur when updating a MySQL database.  After you esperience the
problem, a few moments later it will go away.

I have tried the Zend Win Enabler, however, it is not compatible with
PHP5.  I hope someone can help me.  

Reproduce code:
---
It seems to happen with lots of different code when server gets heavily
loaded






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



#33230 [NEW]: Array() attepts comma before the closing ) and it is not mentioned

2005-06-03 Thread phpbug at munaw dot com
From: phpbug at munaw dot com
Operating system: windows 2000
PHP version:  4.3.11
PHP Bug Type: Arrays related
Bug description:  Array() attepts comma before the closing ) and it is not 
mentioned

Description:

Hello,

As I know, array() should not accept comma after the last element but it
does and var_export generates it the same way. If it accepts this syntax,
it could be mentioned in the documentation.

Reproduce code:
---
echo phpversion().\n;
$array = array(
'1' = 'one',
'2' = 'two',
'3' = 'three', // -comma
);
var_export($array);


Expected result:

Parse error saying unexpected '(' or something like this.

Actual result:
--
4.3.11
array (
  1 = 'one',
  2 = 'two',
  3 = 'three',
)

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


#33230 [Opn-Bgs]: Array() attepts comma before the closing ) and it is not mentioned

2005-06-03 Thread tony2001
 ID:   33230
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbug at munaw dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: windows 2000
 PHP Version:  4.3.11
 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

Having a trailing comma after the last defined array entry, while
unusual, is a valid syntax.
http://www.php.net/manual/en/function.array.php


Previous Comments:


[2005-06-03 13:31:02] phpbug at munaw dot com

Description:

Hello,

As I know, array() should not accept comma after the last element but
it does and var_export generates it the same way. If it accepts this
syntax, it could be mentioned in the documentation.

Reproduce code:
---
echo phpversion().\n;
$array = array(
'1' = 'one',
'2' = 'two',
'3' = 'three', // -comma
);
var_export($array);


Expected result:

Parse error saying unexpected '(' or something like this.

Actual result:
--
4.3.11
array (
  1 = 'one',
  2 = 'two',
  3 = 'three',
)





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


#33230 [Bgs]: Array() attepts comma before the closing ) and it is not mentioned

2005-06-03 Thread phpbug at munaw dot com
 ID:   33230
 User updated by:  phpbug at munaw dot com
 Reported By:  phpbug at munaw dot com
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: windows 2000
 PHP Version:  4.3.11
 New Comment:

In docs it says
 Having a trailing comma after the last defined array entry, while
unusual, is a valid syntax.
Oops...


Previous Comments:


[2005-06-03 13:34:32] [EMAIL PROTECTED]

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

Having a trailing comma after the last defined array entry, while
unusual, is a valid syntax.
http://www.php.net/manual/en/function.array.php



[2005-06-03 13:31:02] phpbug at munaw dot com

Description:

Hello,

As I know, array() should not accept comma after the last element but
it does and var_export generates it the same way. If it accepts this
syntax, it could be mentioned in the documentation.

Reproduce code:
---
echo phpversion().\n;
$array = array(
'1' = 'one',
'2' = 'two',
'3' = 'three', // -comma
);
var_export($array);


Expected result:

Parse error saying unexpected '(' or something like this.

Actual result:
--
4.3.11
array (
  1 = 'one',
  2 = 'two',
  3 = 'three',
)





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


#33231 [NEW]: Informix support not working

2005-06-03 Thread gquiring at gmail dot com
From: gquiring at gmail dot com
Operating system: Solaris 9 (Sun hardware)
PHP version:  5.0.4
PHP Bug Type: *Compile Issues
Bug description:  Informix support not working

Description:

I have read the older bug reports on this issue.  I have tried all
suggestions and it still produces the same error that everyone else has
reported:

Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd:
fatal: relocation error: file /u/informix/lib/esql/libifsql.so: symbol
ifx_checkAPI: referenced symbol not found

Suggested workaround that does not work:
IFX_LIBDIR=-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql 
IFX_INCDIR=$INFORMIXDIR/incl/esql 
IFX_LIBS=$INFORMIXDIR/lib/esql/libifsql.a \ 
$INFORMIXDIR/lib/libifasf.a \ 
$INFORMIXDIR/lib/esql/libifgen.a \ 
$INFORMIXDIR/lib/esql/libifos.a \ 
$INFORMIXDIR/lib/esql/libifgls.a \ 
-lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \ 
$INFORMIXDIR/lib/esql/libifglx.a 
export IFX_LIBDIR IFX_INCDIR IFX_LIBS 

My configure line:
./configure '--with-informix=/u/informix'
'--with-apxs=/usr/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl' '--enable-soap'
'--with-dom' '--with-gettext' '--with-ncurses' '--with-iconv'
'--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--without-oci8' '--with-kerberos' '--enable-memory-limit'
'--enable-bcmath' '--enable-shmop' '--enable-versioning'
'--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal'




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


#33232 [NEW]: windows-1257 not supported

2005-06-03 Thread support at webstudio dot lv
From: support at webstudio dot lv
Operating system: Linux
PHP version:  4.3.9
PHP Bug Type: mbstring related
Bug description:  windows-1257 not supported

Description:

windows-1257 not supported at this moment


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


#33232 [Opn-Fbk]: windows-1257 not supported

2005-06-03 Thread derick
 ID:   33232
 Updated by:   [EMAIL PROTECTED]
 Reported By:  support at webstudio dot lv
-Status:   Open
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

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

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

Thank you for your interest in PHP.



Previous Comments:


[2005-06-03 15:15:12] support at webstudio dot lv

Description:

windows-1257 not supported at this moment






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


#33232 [Fbk-Opn]: windows-1257 not supported

2005-06-03 Thread support at webstudio dot lv
 ID:   33232
 User updated by:  support at webstudio dot lv
 Reported By:  support at webstudio dot lv
-Status:   Feedback
+Status:   Open
 Bug Type: mbstring related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

Feature request
windows-1257 encoding not supported in mbstring module
mb_convert_encoding report warning


Previous Comments:


[2005-06-03 15:16:15] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.




[2005-06-03 15:15:12] support at webstudio dot lv

Description:

windows-1257 not supported at this moment






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


#33232 [Opn-WFx]: windows-1257 not supported

2005-06-03 Thread derick
 ID:   33232
 Updated by:   [EMAIL PROTECTED]
 Reported By:  support at webstudio dot lv
-Status:   Open
+Status:   Wont fix
 Bug Type: mbstring related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

Use the iconv() extension then.


Previous Comments:


[2005-06-03 15:20:09] support at webstudio dot lv

Feature request
windows-1257 encoding not supported in mbstring module
mb_convert_encoding report warning



[2005-06-03 15:16:15] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.




[2005-06-03 15:15:12] support at webstudio dot lv

Description:

windows-1257 not supported at this moment






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


#32919 [Fbk]: Curl/Openssl: random crashes with fsockopen(ssl://....) under heavy load

2005-06-03 Thread wez
 ID:   32919
 Updated by:   [EMAIL PROTECTED]
 Reported By:  justincouto at msn dot com
 Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2003 Server
 PHP Version:  5.0.4
 New Comment:

This sounds like a threading related crash; we don't have the resources
to debug it, so if the latest snapshots don't solve the problem for you,
you should go with fastcgi.

The fastcgi core of the WinEnabler *is* compatible with PHP 5, and
that's the part you need.  Hopefully the Zend folks will guide you
through setting it up with PHP 5.



Previous Comments:


[2005-06-03 13:09:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-05-11 03:28:50] justincouto at msn dot com

I have done more work on trying to figure out the source of this bug. 
I realized that it seemed to be happening in in all the places that we
were using the Curl module for Posting to web services.  As a result, I
wrote a php socket class to replace curl.  The new class eliminated the
problem in all places except where it needs to use the OpenSSL module. 
It seems as if both Curl and the Openssl module have issues.  I can
reproduce the problem.  It occurs with using a socket as follows:

$handle = fsockopen($this-host, $this-port, $errno, $errstr, $timeout
= 30);

I have deffinately narrowed the issue to this line of code.  The host
and port are set as follows

$this-host = ssl://somehost.com;
$this-port = 443;

The reason I know it is the ssl part of the connection is becuse I can
use the class to connect to non ssl connection at the same time the
access violation is happening.  

The access violation only occurs on a heavly load (when lots of
requests through a secure fsockopen)

It seems if it could have something to do with the openssl threading. 
I also think this because the CLI or CGI version won't reporduce this
issue.

Please advise.  If you know of any other way to do a secure socket
connection that doesn't use openssl or curl, it would be helpful for me
to get a qucik fix.

Thanks,



[2005-05-03 00:00:58] justincouto at msn dot com

Description:

I am running PHP5 on 3 Windows 2003 servers using IIS 6.0.  All of
these servers randomly get PHP Access Violation errors like this:

PHP has encountered an Access Violation at 7C84E9AF

I am not sure what causes this.  I have seen lots of posts where other
are experiencing the exact same thing, however, there are no answers. 
I have seen several other bugs that report this and they state that it
has been fixed in the latest version.  I have tried several versions
and the latest cvs.  All of them will have this problem.  The poroblem
seem to occur when updating a MySQL database.  After you esperience the
problem, a few moments later it will go away.

I have tried the Zend Win Enabler, however, it is not compatible with
PHP5.  I hope someone can help me.  

Reproduce code:
---
It seems to happen with lots of different code when server gets heavily
loaded






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


#27598 [Ver-Csd]: list() array key assignment causes HUGE memory leak

2005-06-03 Thread dmitry
 ID:   27598
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lf at burntmail dot com
-Status:   Verified
+Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5CVS-2005-04-30
 New Comment:

Fixed in CVS HEAD and PHP_5_0


Previous Comments:


[2004-03-15 08:54:58] [EMAIL PROTECTED]

Does not leak at all with PHP_4_3 branch.




[2004-03-14 17:48:20] lf at burntmail dot com

Description:

When using array keys as variables in the list() function  there is a
noticiable memory leak.

It doesn't seem to matter if you assign values to the array key's
before using them in the array.



Reproduce code:
---
//memory leak!
while (1)
{
 $out = array(); 
 $arr = array('a','b','c');
 list($out['a'], $out['b'], $out['c']) = $arr;
}

//NO memory leak!!
while (1)
{
 $out = array(); 
   $a = $out['a'];
   $b = $out['b'];
   $c = $out['c'];

 $arr = array('a','b','c');
 list($a, $b, $c) = $arr;
}

Expected result:

Output every 4000 loops
#  | Memory usage

4000  |  68 KB
8000  |  68 KB
12000  |  68 KB
16000  |  68 KB
2  |  68 KB
24000  |  68 KB
28000  |  68 KB
32000  |  68 KB
36000  |  68 KB
4  |  68 KB
44000  |  68 KB
48000  |  68 KB
52000  |  68 KB
56000  |  68 KB
6  |  68 KB
64000  |  68 KB
68000  |  68 KB
72000  |  68 KB
76000  |  68 KB
8  |  68 KB
84000  |  68 KB
88000  |  68 KB
92000  |  68 KB
96000  |  68 KB
10  |  68 KB
104000  |  68 KB
108000  |  68 KB
112000  |  68 KB




Actual result:
--
Output  every 4000 loops
# | Memory usage

4000  |  349 KB
8000  |  630 KB
12000  |  911 KB
16000  |  1.2 MB
2  |  1.4 MB
24000  |  1.7 MB
28000  |  2.0 MB
32000  |  2.3 MB
36000  |  2.5 MB
4  |  2.8 MB
44000  |  3.1 MB
48000  |  3.4 MB
52000  |  3.6 MB
56000  |  3.9 MB
6  |  4.2 MB
64000  |  4.5 MB
68000  |  4.7 MB
72000  |  5.0 MB
76000  |  5.3 MB
8  |  5.6 MB
84000  |  5.8 MB
88000  |  6.1 MB
92000  |  6.4 MB
96000  |  6.7 MB
10  |  6.9 MB
104000  |  7.2 MB
108000  |  7.5 MB
112000  |  7.8 MB






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


#33233 [NEW]: mysqli_bind_param/simple_xml interaction problem

2005-06-03 Thread blockcipher at yahoo dot com
From: blockcipher at yahoo dot com
Operating system: Windows 2000
PHP version:  5.0.4
PHP Bug Type: Reproducible crash
Bug description:  mysqli_bind_param/simple_xml interaction problem

Description:

It appears that I found an interesting interaction between the simple_xml
library and the mysqli_bind_param function.  The values contained within
an XML tag are returned as simple_xml object, not strings (which is what I
inferred from the Zend tutorial.)  This had an adverse side-effect when
combined with the mysqli_bind_param function.  Please note that this may
affect other functions/libraries as well.

The steps are as follows:

1. Copy the value of an XML element into a variable.
2. Use the element in a prepared mysqli statement, binding it to the
statement as a string.
3. Run the query.
4. Repeat steps 2 and 3, possibly with a different query.

After the bind or perhaps after I was done with the query, the actual data
was changed from a simple_xml object to a very odd looking string.  This
would crash the apache web server approximately 80-90% of the time when
accessed.

Original variable data:
[username]=
object(SimpleXMLElement)#3 (1) {
  [0]=
  string(4) test
}

Modified variable data:
[username]=
string(64) a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  
 

Reproduce code:
---
No code provided since it is being developed for the company I work for.


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


#33233 [Opn-Fbk]: mysqli_bind_param/simple_xml interaction problem

2005-06-03 Thread tony2001
 ID:   33233
 Updated by:   [EMAIL PROTECTED]
 Reported By:  blockcipher at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  5.0.4
 New Comment:

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

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

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




Previous Comments:


[2005-06-03 16:06:01] blockcipher at yahoo dot com

Description:

It appears that I found an interesting interaction between the
simple_xml library and the mysqli_bind_param function.  The values
contained within an XML tag are returned as simple_xml object, not
strings (which is what I inferred from the Zend tutorial.)  This had an
adverse side-effect when combined with the mysqli_bind_param function. 
Please note that this may affect other functions/libraries as well.

The steps are as follows:

1. Copy the value of an XML element into a variable.
2. Use the element in a prepared mysqli statement, binding it to the
statement as a string.
3. Run the query.
4. Repeat steps 2 and 3, possibly with a different query.

After the bind or perhaps after I was done with the query, the actual
data was changed from a simple_xml object to a very odd looking string.
 This would crash the apache web server approximately 80-90% of the time
when accessed.

Original variable data:
[username]=
object(SimpleXMLElement)#3 (1) {
  [0]=
  string(4) test
}

Modified variable data:
[username]=
string(64) a94a8fe5ccb19ba61c4c0873d391e987982fbbd3   


Reproduce code:
---
No code provided since it is being developed for the company I work
for.






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


#33231 [Opn-Bgs]: Informix support not working

2005-06-03 Thread sniper
 ID:   33231
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gquiring at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Compile Issues
 Operating System: Solaris 9 (Sun hardware)
 PHP Version:  5.0.4
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2005-06-03 14:23:58] gquiring at gmail dot com

Description:

I have read the older bug reports on this issue.  I have tried all
suggestions and it still produces the same error that everyone else has
reported:

Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd:
fatal: relocation error: file /u/informix/lib/esql/libifsql.so: symbol
ifx_checkAPI: referenced symbol not found

Suggested workaround that does not work:
IFX_LIBDIR=-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql 
IFX_INCDIR=$INFORMIXDIR/incl/esql 
IFX_LIBS=$INFORMIXDIR/lib/esql/libifsql.a \ 
$INFORMIXDIR/lib/libifasf.a \ 
$INFORMIXDIR/lib/esql/libifgen.a \ 
$INFORMIXDIR/lib/esql/libifos.a \ 
$INFORMIXDIR/lib/esql/libifgls.a \ 
-lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \ 
$INFORMIXDIR/lib/esql/libifglx.a 
export IFX_LIBDIR IFX_INCDIR IFX_LIBS 

My configure line:
./configure '--with-informix=/u/informix'
'--with-apxs=/usr/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'








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


#33231 [Bgs]: Informix support not working

2005-06-03 Thread gquiring at gmail dot com
 ID:   33231
 User updated by:  gquiring at gmail dot com
 Reported By:  gquiring at gmail dot com
 Status:   Bogus
 Bug Type: Informix related
 Operating System: Solaris 9 (Sun hardware)
 PHP Version:  5.0.4
 New Comment:

I disagree, the makefile is not correctly linking in the library to
make the Informix calls work.  It is a bug in the compiling process.


Previous Comments:


[2005-06-03 16:27:54] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.





[2005-06-03 14:23:58] gquiring at gmail dot com

Description:

I have read the older bug reports on this issue.  I have tried all
suggestions and it still produces the same error that everyone else has
reported:

Cannot load /usr/apache/libexec/libphp5.so into server: ld.so.1: httpd:
fatal: relocation error: file /u/informix/lib/esql/libifsql.so: symbol
ifx_checkAPI: referenced symbol not found

Suggested workaround that does not work:
IFX_LIBDIR=-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql 
IFX_INCDIR=$INFORMIXDIR/incl/esql 
IFX_LIBS=$INFORMIXDIR/lib/esql/libifsql.a \ 
$INFORMIXDIR/lib/libifasf.a \ 
$INFORMIXDIR/lib/esql/libifgen.a \ 
$INFORMIXDIR/lib/esql/libifos.a \ 
$INFORMIXDIR/lib/esql/libifgls.a \ 
-lgen -lgls -lm -ldl $INFORMIXDIR/lib/esql/checkapi.o \ 
$INFORMIXDIR/lib/esql/libifglx.a 
export IFX_LIBDIR IFX_INCDIR IFX_LIBS 

My configure line:
./configure '--with-informix=/u/informix'
'--with-apxs=/usr/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'








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


#30080 [Ver-Csd]: Passing array or non array of objects

2005-06-03 Thread dmitry
 ID:   30080
 Updated by:   [EMAIL PROTECTED]
 Reported By:  portfolio at gmx dot co dot uk
-Status:   Verified
+Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5CVS-2005-03-09
 New Comment:

Fixed in CVS HEAD and PHP_5_0.


Previous Comments:


[2005-03-09 21:53:46] [EMAIL PROTECTED]

# sapi/cli/php /home/jani/t.php 
UNKNOWN:0
/usr/src/php/php5/Zend/zend_vm_execute.h(370) :  Freeing 0x092FE03C (16
bytes), script=/home/jani/t.php
=== Total 1 memory leaks detected ===





[2005-01-13 19:00:06] [EMAIL PROTECTED]

No crash here, but I still got UNKNOWN:0 as var_dump's output.



[2004-11-28 16:35:55] [EMAIL PROTECTED]

Reproducible only with HEAD  5.0.x.
?php
class A { 
function A($arrayobj) { 
var_dump($arrayobj);
} 
} 

class B { 
} 

new A( new B() ); 
?



[2004-09-14 17:55:33] php30080 at pointbeing dot net

Behaviour is reproducible using 5.00 on Fedora Linux (core 2).

There's an ongoing discussion of the behaviour on the Sitepoint forums
here:
http://www.sitepoint.com/forums/showthread.php?t=195284

By way of a summary, it appears that the problems occur when
constructing a number of new objects without assigning them anywhere,
so:

new A( array( new B(), new C()));  // fails

$a = new A( array( new B(), new C()));  // fine

some_function( array( new B(), new C())); //fine



[2004-09-14 05:44:10] portfolio at gmx dot co dot uk

Description:

When I pass an array of objects without first initializing them with a
variable, I get either a crash or error (Depends on whether if its
array).



Reproduce code:
---
class A { 
function A($arrayobj) { 
while(list($key, $value) = each($arrayobj)) { 
echo $value-spit(); 
} 
} 
} 

class B { 
function spit() { 
return 'This is class B' . \n; 
} 
} 

class C { 
function spit() { 
return 'This is class C' . \n; 
} 
} 

new A( array( new B(), new C())); 

Expected result:

I got this error:

This is class B 
Fatal error: Call to a member function spit() on a non-object in

If I do:

$b = new B; $c = new C; 
new A( array($b, $c)); 

It works but very long winded.

Another bug here causes Apache to crash:

class A 
{ 
function A($value) { 
   echo $value-spit(); 
} 
} 

class B { 
function spit() { 
return 'This is class B' . \n; 
} 
} 

new A( new B());






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


#30394 [Ver-Csd]: Assignment operators yield wrong result with __get/__set

2005-06-03 Thread dmitry
 ID:   30394
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at hartwerk dot com
-Status:   Verified
+Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
 PHP Version:  5CVS-STABLE-03-23
 New Comment:

Fixed in PHP_5_0.
This bug was already fixed in HEAD long time ago with new garbage
collector.


Previous Comments:


[2005-03-23 22:51:34] [EMAIL PROTECTED]

With clean 5.0.x-CVS I get:
2
Fatal error: Unsupported operand types in index.php on line 23 
with the code below.
HEAD works just fine.



[2004-11-04 16:10:03] [EMAIL PROTECTED]

It's 5.0.x specific bug.



[2004-10-15 18:46:51] php at hartwerk dot com

An easier work-around would be $c-a = $c-a + max( 0, 1 ), but
work-arounds do not solve bugs..



[2004-10-15 12:13:47] ante dot dfg at moj dot net

This code works if you return the value from _get via reference
try:

public function __get( $what ) {
return $this-_p[ $what ];
}



[2004-10-11 11:24:19] php at hartwerk dot com

Description:

When there is a function on the right-hand side of an assignment
operator expression, and the variable is to be accessed via
__get/__set, the operation yields wrong results. 

Reproduce code:
---
class Container
{
public function __get( $what )
{
return $this-_p[ $what ];
}

public function __set( $what, $value )
{
$this-_p[ $what ] = $value;
}

private $_p = array();
}

$c = new Container();
$c-a = 1;
$c-a += 1;
print $c-a;// -- 2

print  - ;
$c-a += max( 0, 1 );
print $c-a;// -- 4 (!)

Expected result:

2 - 3

Actual result:
--
2 - 4





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


#33235 [NEW]: stripos doesn't work as expected

2005-06-03 Thread a dot bendilas at zefxis dot gr
From: a dot bendilas at zefxis dot gr
Operating system: Windows XP
PHP version:  5.0.4
PHP Bug Type: Strings related
Bug description:  stripos doesn't work as expected

Description:

For Greek strings stripos doesn't work case insensitively. 

Reproduce code:
---
?php echo
stripos('#931;#954;#973;#955;#959;#962;','#963;#954;#973;#955;#959;#962;');
?

Expected result:

0

Actual result:
--
false

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


#32919 [Fbk-Opn]: Curl/Openssl: random crashes with fsockopen(ssl://....) under heavy load

2005-06-03 Thread justincouto at msn dot com
 ID:   32919
 User updated by:  justincouto at msn dot com
 Reported By:  justincouto at msn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003 Server
 PHP Version:  5.0.4
 New Comment:

I have already been working with the Zend people, and I helped them
discover a bug in the Win Enabler for PHP5.  Consequently, they removed
support for PHP5 in the WinEnabler until they have time to fix the bug,
which apparetly won't be anytime soon.  This problem is deffinately a
threading issue with Curl and OpenSSl.  I came up with a work-around
that allowed me to drop-out the OpenSSL module.  I do this by
connection to a local ASP.NET script and let it hanlde the requests. 
It works perfect now and is stable.  I do use the MySQLi module and it
handles threading just fine.  Those of you running windows and php, you
will not be able to use Curl or Open SSL.


Previous Comments:


[2005-06-03 15:30:06] [EMAIL PROTECTED]

This sounds like a threading related crash; we don't have the resources
to debug it, so if the latest snapshots don't solve the problem for you,
you should go with fastcgi.

The fastcgi core of the WinEnabler *is* compatible with PHP 5, and
that's the part you need.  Hopefully the Zend folks will guide you
through setting it up with PHP 5.




[2005-06-03 13:09:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-05-11 03:28:50] justincouto at msn dot com

I have done more work on trying to figure out the source of this bug. 
I realized that it seemed to be happening in in all the places that we
were using the Curl module for Posting to web services.  As a result, I
wrote a php socket class to replace curl.  The new class eliminated the
problem in all places except where it needs to use the OpenSSL module. 
It seems as if both Curl and the Openssl module have issues.  I can
reproduce the problem.  It occurs with using a socket as follows:

$handle = fsockopen($this-host, $this-port, $errno, $errstr, $timeout
= 30);

I have deffinately narrowed the issue to this line of code.  The host
and port are set as follows

$this-host = ssl://somehost.com;
$this-port = 443;

The reason I know it is the ssl part of the connection is becuse I can
use the class to connect to non ssl connection at the same time the
access violation is happening.  

The access violation only occurs on a heavly load (when lots of
requests through a secure fsockopen)

It seems if it could have something to do with the openssl threading. 
I also think this because the CLI or CGI version won't reporduce this
issue.

Please advise.  If you know of any other way to do a secure socket
connection that doesn't use openssl or curl, it would be helpful for me
to get a qucik fix.

Thanks,



[2005-05-03 00:00:58] justincouto at msn dot com

Description:

I am running PHP5 on 3 Windows 2003 servers using IIS 6.0.  All of
these servers randomly get PHP Access Violation errors like this:

PHP has encountered an Access Violation at 7C84E9AF

I am not sure what causes this.  I have seen lots of posts where other
are experiencing the exact same thing, however, there are no answers. 
I have seen several other bugs that report this and they state that it
has been fixed in the latest version.  I have tried several versions
and the latest cvs.  All of them will have this problem.  The poroblem
seem to occur when updating a MySQL database.  After you esperience the
problem, a few moments later it will go away.

I have tried the Zend Win Enabler, however, it is not compatible with
PHP5.  I hope someone can help me.  

Reproduce code:
---
It seems to happen with lots of different code when server gets heavily
loaded






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


#33235 [Opn]: stripos doesn't work as expected

2005-06-03 Thread a dot bendilas at zefxis dot gr
 ID:   33235
 User updated by:  a dot bendilas at zefxis dot gr
 Reported By:  a dot bendilas at zefxis dot gr
 Status:   Open
 Bug Type: Strings related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

Your bug submission system escaped the greek characters. Please view
them unescaped to see what I mean. The first letter of the greek word
is the capital Sigma in the first string, and the small Sigma in the
second string.


Previous Comments:


[2005-06-03 18:00:19] a dot bendilas at zefxis dot gr

Description:

For Greek strings stripos doesn't work case insensitively. 

Reproduce code:
---
?php echo
stripos('#931;#954;#973;#955;#959;#962;','#963;#954;#973;#955;#959;#962;');
?

Expected result:

0

Actual result:
--
false





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


#28496 [Com]: Fatal Error in the make install caused by broken egrep

2005-06-03 Thread kallstrk at prtel dot com
 ID:   28496
 Comment by:   kallstrk at prtel dot com
 Reported By:  rehanann at kfupm dot edu dot sa
 Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Aix 5.2
 PHP Version:  5CVS, 4CVS
 Assigned To:  sniper
 New Comment:

I have the same problems.  However, both php4  php5 compile/install
just fine with apache_1.3.33 using AIX 5.1.  Maybe a problem with
apxs2?


Previous Comments:


[2005-05-30 15:00:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-04-13 13:57:05] zahraoui at netcourrier dot com

i have the same pb with aix 5.1 and both php 4.3.11 and php 5.0.4 on
apache 2.0.53

bash-2.05b# ./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/mysql
--with-config-file-path=/usr/local/apache2/conf --with-ftp --with-zlib
--with-system-regex 
...
Configuring libtool
checking for Cygwin environment... no
checking for mingw32 environment... no
checking build system type... powerpc-ibm-aix5.1.0.0
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /usr/bin/sed
checking how to recognise dependent libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/bin/nm -B output... ok
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... none
checking if gcc static flag -static -Wl,-lC works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries...
yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... aix5.1.0.0 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
...
bash-2.05b# make
... 
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).
bash-2.05b# make install
Installing PHP SAPI module:   apache2handler
/usr/local/apache2/build/instdso.sh
SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la
/usr/local/apache2/modules
rm -f /usr/local/apache2/modules/libphp4.so
/usr/local/apache2/build/libtool --mode=install cp libphp4.la
/usr/local/apache2/modules/
cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish
/usr/sys/inst.images/php-4.3.11/libs'
chmod 755 /usr/local/apache2/modules/libphp4.so
chmod: /usr/local/apache2/modules/libphp4.so: A file or directory in
the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.


Stop.
bash-2.05b# if echo GNU | egrep '(GNU|BFD)' /dev/null; then echo Good
egrep; else echo Bad egrep; fi
Good egrep



[2005-02-21 20:00:19] [EMAIL PROTECTED]

There is no check for broken grep in our configure yet..




[2004-11-27 05:43:30] sjungels at adelphia dot net

I tracked this bug down to a faulty version of GNU grep.  If you are
having problems where no libphp4.so is generated, this may be the cause
in your case also.

If you have this problem you will notice the following symptoms: during
the part of the php configure log that begins performing libtool
configuration... you will see the following (or similar) messages:
  checking if the linker (/usr/powerpc-hardhat-linux/bin/ld) is GNU
ld... no
  checking whether the linker (/usr/powerpc-hardhat-linux/bin/ld)
supports shared libraries... no
  checking if libtool supports shared libraries... no
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes

These messages may be correct, but if you have the problem I am
describing, they are caused by a bad version of grep.  Check for this
by typing
  if echo GNU | egrep '(GNU|BFD)' /dev/null; then echo Good egrep;
else echo Bad egrep; fi 

If you get back Bad egrep you are running a version of egrep which
doesn't really support extended regular expressions, and this is
confusing the php configure script.  You can fix the problem by
installing GNU grep 2.5.

If you have this problem, it 

#32091 [Asn-Csd]: PCRE 5.0 ugprade request

2005-06-03 Thread andrei
 ID:   32091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ceefour at gauldong dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  5.0.3
 Assigned To:  andrei
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2005-02-24 09:20:25] [EMAIL PROTECTED]

Can you have a look at this for PHP 5.1 Andrei?



[2005-02-24 04:53:55] ceefour at gauldong dot net

Description:

PCRE 5.0 is already out and ripe for grabbing.

The most important feature is IMHO the ability to match general
category properties of Unicode/UTF-8 strings, which is *VERY* useful
for internationalized sites.

I hope this will be implemented as soon as possible. Even an updated
extension will be much better if it's not contained in the next release
of PHP.






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


#33235 [Opn-Fbk]: stripos doesn't work as expected

2005-06-03 Thread sniper
 ID:   33235
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot bendilas at zefxis dot gr
-Status:   Open
+Status:   Feedback
 Bug Type: Strings related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

It's more likely your browser sending them like that.
Put them as txt file somewhere in the web or use some other browser
than IE.



Previous Comments:


[2005-06-03 18:02:16] a dot bendilas at zefxis dot gr

Your bug submission system escaped the greek characters. Please view
them unescaped to see what I mean. The first letter of the greek word
is the capital Sigma in the first string, and the small Sigma in the
second string.



[2005-06-03 18:00:19] a dot bendilas at zefxis dot gr

Description:

For Greek strings stripos doesn't work case insensitively. 

Reproduce code:
---
?php echo
stripos('#931;#954;#973;#955;#959;#962;','#963;#954;#973;#955;#959;#962;');
?

Expected result:

0

Actual result:
--
false





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


#33192 [Fbk-Opn]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-03 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

my testing server is 
openssl s_server -accept port -cert sec.pem -Verify 1

and my actual server was first set up to accept only tls, I changed it
during testing to accept all three hoping that the problem was me being
too strict

I have tried tls:// ssl:// and sslv3:// -- they all return the same
error 

sslv2: returns no actual SSL error on the client, just the warnings
about failed to enable crypto and unable to connect
and returns 
12058:error:140710CA:SSL routines:REQUEST_CERTIFICATE:peer error no
certificate:s2_pkt.c:675:
from the server -- same error but for the sslv2 functions

I tried adding -tls1 to the end of my openssl s_server but that didn't
make any difference in what happened.

I'm actually pretty sure that tls uses the sslv3 handshake functions.


Previous Comments:


[2005-06-03 07:12:39] [EMAIL PROTECTED]

Looks to me like you want to be using sslv3:// instead of tls:// there
(just based on your server output).
Use ssl:// for automatic v2 or v3 support.  Only use tls:// when the
server can only speak tls; it's a different dialect of SSL.

The context options for openssl, including tls, are all bundled under
the name ssl.

I think your code should probably look more like this:

$c = stream_context_create(array(
   ssl = array(
   local_cert = sec.pem,
   ... other options ...
   )
);
$s = stream_socket_client(sslv3://., ., $c);





[2005-06-03 02:54:18] justin dot d dot allen at gmail dot com

so I added php_error_docref displays to the certfile and passphrase
GET_VER_OPT sections of php_SSL_new_from_context and recieved no
display from either.

It seems that the variables aren't getting parsed, but truthfuly, I'm
hacking with very broad swings on that one... and, I haven't at all
looked at the inner workings of the GET_VER_OPT macro.



[2005-06-02 20:48:27] justin dot d dot allen at gmail dot com

crap... ignore that... forgot to change SSL_do_handshake() to
SSL_connect() when took out SSL_set_connect_state()... so I can connect
using what seems to be the same connection method in C.



[2005-06-02 20:12:48] justin dot d dot allen at gmail dot com

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked at the methods and if I take out the
SSL_set_connect_state() and switch the method to TSLv1_client_method()
I get the errors out of C... so it looks like it's in my openssl
libraries...
I'm running 0.9.7g, which is the latest stable... I'll try the snapshot
and see if that helps... I'll let you know if it does but after that, if
it doesn't, I'll probably bug openSSL about it cause it seems to be
their deal...


#33235 [Fbk-Opn]: stripos doesn't work as expected

2005-06-03 Thread a dot bendilas at zefxis dot gr
 ID:   33235
 User updated by:  a dot bendilas at zefxis dot gr
 Reported By:  a dot bendilas at zefxis dot gr
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

Hi sniper. First of all I'm using Firefox.

Check the TXT at http://www.zefxis.gr/temp/stripos.txt

Thanks!


Previous Comments:


[2005-06-03 18:52:47] [EMAIL PROTECTED]

It's more likely your browser sending them like that.
Put them as txt file somewhere in the web or use some other browser
than IE.




[2005-06-03 18:02:16] a dot bendilas at zefxis dot gr

Your bug submission system escaped the greek characters. Please view
them unescaped to see what I mean. The first letter of the greek word
is the capital Sigma in the first string, and the small Sigma in the
second string.



[2005-06-03 18:00:19] a dot bendilas at zefxis dot gr

Description:

For Greek strings stripos doesn't work case insensitively. 

Reproduce code:
---
?php echo
stripos('#931;#954;#973;#955;#959;#962;','#963;#954;#973;#955;#959;#962;');
?

Expected result:

0

Actual result:
--
false





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


#33192 [Opn-Bgs]: failure to pass certificate in handshake of openssl related transport sockets

2005-06-03 Thread justin dot d dot allen at gmail dot com
 ID:   33192
 User updated by:  justin dot d dot allen at gmail dot com
 Reported By:  justin dot d dot allen at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: linux(slackware)
 PHP Version:  5.0.4(latest snapshot)
 New Comment:

%$#*@ so I didn't listen to you about the context settings that was
it... I was trying to use the transport name and not ssl... it works
that way for all of them... I must have forgot to change it for m tls
when I tested ssl://

that was it usage error thanks though.


Previous Comments:


[2005-06-03 19:04:18] justin dot d dot allen at gmail dot com

my testing server is 
openssl s_server -accept port -cert sec.pem -Verify 1

and my actual server was first set up to accept only tls, I changed it
during testing to accept all three hoping that the problem was me being
too strict

I have tried tls:// ssl:// and sslv3:// -- they all return the same
error 

sslv2: returns no actual SSL error on the client, just the warnings
about failed to enable crypto and unable to connect
and returns 
12058:error:140710CA:SSL routines:REQUEST_CERTIFICATE:peer error no
certificate:s2_pkt.c:675:
from the server -- same error but for the sslv2 functions

I tried adding -tls1 to the end of my openssl s_server but that didn't
make any difference in what happened.

I'm actually pretty sure that tls uses the sslv3 handshake functions.



[2005-06-03 07:12:39] [EMAIL PROTECTED]

Looks to me like you want to be using sslv3:// instead of tls:// there
(just based on your server output).
Use ssl:// for automatic v2 or v3 support.  Only use tls:// when the
server can only speak tls; it's a different dialect of SSL.

The context options for openssl, including tls, are all bundled under
the name ssl.

I think your code should probably look more like this:

$c = stream_context_create(array(
   ssl = array(
   local_cert = sec.pem,
   ... other options ...
   )
);
$s = stream_socket_client(sslv3://., ., $c);





[2005-06-03 02:54:18] justin dot d dot allen at gmail dot com

so I added php_error_docref displays to the certfile and passphrase
GET_VER_OPT sections of php_SSL_new_from_context and recieved no
display from either.

It seems that the variables aren't getting parsed, but truthfuly, I'm
hacking with very broad swings on that one... and, I haven't at all
looked at the inner workings of the GET_VER_OPT macro.



[2005-06-02 20:48:27] justin dot d dot allen at gmail dot com

crap... ignore that... forgot to change SSL_do_handshake() to
SSL_connect() when took out SSL_set_connect_state()... so I can connect
using what seems to be the same connection method in C.



[2005-06-02 20:12:48] justin dot d dot allen at gmail dot com

am also able to connect with c code
#include iostream
#include string

#include unistd.h
#include sys/socket.h
#include netinet/in.h
#include arpa/inet.h

#include openssl/ssl.h
#include openssl/err.h

#include openssl/x509.h
#include openssl/pem.h
#include openssl/rsa.h

static int password_callback(char* buf, int num, int verify, void*
data) {
   strncpy(buf, (char*)(data),num);
   buf[num -1] = '\0';
   return (strlen(buf));
}

int main() {
   char *certfile = sec.pem;

   SSL_METHOD* meth;
   SSL_CTX* ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth=TLSv1_method();
   ctx=SSL_CTX_new(meth);

   SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
   SSL_CTX_set_cipher_list(ctx, DEFAULT);

   if (SSL_CTX_use_certificate_chain_file(ctx,certfile) != 1)
 perror(error loading cert);

   if (SSL_CTX_use_PrivateKey_file(ctx, certfile,SSL_FILETYPE_PEM) !=
1)
 perror(error loading key);

   SSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)qwerty);
   SSL_CTX_set_default_passwd_cb(ctx, password_callback);

   SSL* ssl = SSL_new(ctx);

   int sd = socket(AF_INET, SOCK_STREAM, 0);
   struct sockaddr_in sa;
   memset(sa, '\0', sizeof(sa));
   sa.sin_family  = AF_INET;
   sa.sin_addr.s_addr = inet_addr(206.127.2.49);
   sa.sin_port= htons(1234);
   connect(sd, (struct sockaddr*) sa, sizeof(sa));
   getpeername(sd,(struct sockaddr*) sa,(socklen_t*)(sizeof(sa)));

   SSL_set_fd(ssl, sd);

   SSL_set_connect_state(ssl);

   int state = SSL_do_handshake(ssl);
   if (state!=1) {
  SSL_get_error(ssl,state);
  ERR_print_errors_fp(stderr);
  return 0;
   }
   sleep(15);
   return 1;
}

which if I'm right in assuming SSL *php_SSL_new_from_context(SSL_CTX
*ctx, php_stream *stream TSRMLS_DC) in /ext/openssl/openssl.c is the
context creator should be logically the same thing.

actually I looked at the 

#33233 [Fbk-Opn]: mysqli_bind_param/simple_xml interaction problem

2005-06-03 Thread blockcipher at yahoo dot com
 ID:   33233
 User updated by:  blockcipher at yahoo dot com
 Reported By:  blockcipher at yahoo dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  5.0.4
 New Comment:

Thank you for your quick reply.  I will try to produce some example
code, however I don't know of any other function except the
mysqli_bind_param function that this error occurs with.  Most likely,
I'll create a short script that can use know mysql tables.


Previous Comments:


[2005-06-03 16:09:23] [EMAIL PROTECTED]

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

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

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





[2005-06-03 16:06:01] blockcipher at yahoo dot com

Description:

It appears that I found an interesting interaction between the
simple_xml library and the mysqli_bind_param function.  The values
contained within an XML tag are returned as simple_xml object, not
strings (which is what I inferred from the Zend tutorial.)  This had an
adverse side-effect when combined with the mysqli_bind_param function. 
Please note that this may affect other functions/libraries as well.

The steps are as follows:

1. Copy the value of an XML element into a variable.
2. Use the element in a prepared mysqli statement, binding it to the
statement as a string.
3. Run the query.
4. Repeat steps 2 and 3, possibly with a different query.

After the bind or perhaps after I was done with the query, the actual
data was changed from a simple_xml object to a very odd looking string.
 This would crash the apache web server approximately 80-90% of the time
when accessed.

Original variable data:
[username]=
object(SimpleXMLElement)#3 (1) {
  [0]=
  string(4) test
}

Modified variable data:
[username]=
string(64) a94a8fe5ccb19ba61c4c0873d391e987982fbbd3   


Reproduce code:
---
No code provided since it is being developed for the company I work
for.






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


#33233 [Opn]: mysqli_bind_param/simple_xml interaction problem

2005-06-03 Thread blockcipher at yahoo dot com
 ID:   33233
 User updated by:  blockcipher at yahoo dot com
 Reported By:  blockcipher at yahoo dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  5.0.4
 New Comment:

Here's a quick test case based on the problem.  It demonstrates the
changing of the data type from an object to a string, but not the
crash.

?php
$xmltext = ?xml version='1.0'?bodyusertest/user/body;
$xmlObj = simplexml_load_string($xmltext);
$tempArray['username'] = $xmlObj-user;
$dbh = new mysqli('localhost','username','password','mysql');
$stmt = $dbh-prepare('select host from user where user = ? LIMIT 1');
print Before: ;
var_dump($tempArray);
print br/br/Result: ;
$stmt-bind_param('s', $tempArray['username']);
$stmt-execute();
$stmt-bind_result($temp);
$stmt-fetch();
$stmt-close;
print $tempbr/br/After: ;
var_dump($tempArray);
$dbh-close;
?


Previous Comments:


[2005-06-03 19:53:15] blockcipher at yahoo dot com

Thank you for your quick reply.  I will try to produce some example
code, however I don't know of any other function except the
mysqli_bind_param function that this error occurs with.  Most likely,
I'll create a short script that can use know mysql tables.



[2005-06-03 16:09:23] [EMAIL PROTECTED]

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

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

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





[2005-06-03 16:06:01] blockcipher at yahoo dot com

Description:

It appears that I found an interesting interaction between the
simple_xml library and the mysqli_bind_param function.  The values
contained within an XML tag are returned as simple_xml object, not
strings (which is what I inferred from the Zend tutorial.)  This had an
adverse side-effect when combined with the mysqli_bind_param function. 
Please note that this may affect other functions/libraries as well.

The steps are as follows:

1. Copy the value of an XML element into a variable.
2. Use the element in a prepared mysqli statement, binding it to the
statement as a string.
3. Run the query.
4. Repeat steps 2 and 3, possibly with a different query.

After the bind or perhaps after I was done with the query, the actual
data was changed from a simple_xml object to a very odd looking string.
 This would crash the apache web server approximately 80-90% of the time
when accessed.

Original variable data:
[username]=
object(SimpleXMLElement)#3 (1) {
  [0]=
  string(4) test
}

Modified variable data:
[username]=
string(64) a94a8fe5ccb19ba61c4c0873d391e987982fbbd3   


Reproduce code:
---
No code provided since it is being developed for the company I work
for.






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


#33172 [Opn-Fbk]: changing array during foreach iteration

2005-06-03 Thread sniper
 ID:   33172
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: WinXP
 PHP Version:  5.0.4
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-05-28 16:30:17] tomas_matousek at hotmail dot com

Well, I've swapped the expected and the actual results.
I would expect all values of the array to be modified.



[2005-05-28 16:24:41] tomas_matousek at hotmail dot com

Description:

The behavior of foreach statment with reference value is not imho right
if the array gets modified during iteration.

See the code I've pasted here. If the array is written to (either by
unset or by a write operation) during iteration, the effect of  is
canceled, i.e. the values are not modified since the write operation.

This seems to me as bug because it is inconsistent with the
definition of foreach which should say that

foreach($a as $k = $v) {}

is (more or less) equivalent to 

$copy_of_a = $a;
while(next($copy_of_a))
{
  $k = key($copy_of_a);
  $v = $copy_of_a[$k];
}

With the , one can deduce the following definition:

foreach($a as $k = $v)  { }

is equivalent to 

$copy_of_a = $a;
while(next($copy_of_a))
{
  $k = key($copy_of_a);
  $v = $a[$k];
}

Using = operator, a new value should be added if it has been unset in
the original array.

Reproduce code:
---
$a = array(0,1,2,3,4,5,6,7,8);
$i = 0;
foreach ($a as $k = $v)
{
  $v+=100;

  if ($i++==2)
  {
unset($a[5]);
  }
}
var_dump($a);

Expected result:

array(8) {
  [0]=
  int(100)
  [1]=
  int(101)
  [2]=
  int(102)
  [3]=
  int(3)  // modification of values stops here
  [4]=
  int(4)
  [6]=
  int(6)
  [7]=
  int(7)
  [8]=
  int(8)
}



Actual result:
--
array(8) {
  [0]=
  int(100)
  [1]=
  int(101)
  [2]=
  int(102)
  [3]=
  int(103)
  [4]=
  int(104)
  [6]=
  int(106)
  [7]=
  int(107)
  [8]=
  int(108)
  [5]=// note: the new value should be added here
  int(100)
}







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


#33233 [Opn-Fbk]: mysqli_bind_param/simple_xml interaction problem

2005-06-03 Thread sniper
 ID:   33233
 Updated by:   [EMAIL PROTECTED]
 Reported By:  blockcipher at yahoo dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Reproducible crash
+Bug Type: SimpleXML related
 Operating System: Windows 2000
 PHP Version:  5.0.4
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-06-03 20:14:41] blockcipher at yahoo dot com

Here's a quick test case based on the problem.  It demonstrates the
changing of the data type from an object to a string, but not the
crash.

?php
$xmltext = ?xml version='1.0'?bodyusertest/user/body;
$xmlObj = simplexml_load_string($xmltext);
$tempArray['username'] = $xmlObj-user;
$dbh = new mysqli('localhost','username','password','mysql');
$stmt = $dbh-prepare('select host from user where user = ? LIMIT 1');
print Before: ;
var_dump($tempArray);
print br/br/Result: ;
$stmt-bind_param('s', $tempArray['username']);
$stmt-execute();
$stmt-bind_result($temp);
$stmt-fetch();
$stmt-close;
print $tempbr/br/After: ;
var_dump($tempArray);
$dbh-close;
?



[2005-06-03 16:06:01] blockcipher at yahoo dot com

Description:

It appears that I found an interesting interaction between the
simple_xml library and the mysqli_bind_param function.  The values
contained within an XML tag are returned as simple_xml object, not
strings (which is what I inferred from the Zend tutorial.)  This had an
adverse side-effect when combined with the mysqli_bind_param function. 
Please note that this may affect other functions/libraries as well.

The steps are as follows:

1. Copy the value of an XML element into a variable.
2. Use the element in a prepared mysqli statement, binding it to the
statement as a string.
3. Run the query.
4. Repeat steps 2 and 3, possibly with a different query.

After the bind or perhaps after I was done with the query, the actual
data was changed from a simple_xml object to a very odd looking string.
 This would crash the apache web server approximately 80-90% of the time
when accessed.

Original variable data:
[username]=
object(SimpleXMLElement)#3 (1) {
  [0]=
  string(4) test
}

Modified variable data:
[username]=
string(64) a94a8fe5ccb19ba61c4c0873d391e987982fbbd3   


Reproduce code:
---
No code provided since it is being developed for the company I work
for.






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


#33235 [Opn-Bgs]: stripos doesn't work as expected with greek chars

2005-06-03 Thread sniper
 ID:   33235
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot bendilas at zefxis dot gr
-Status:   Open
+Status:   Bogus
 Bug Type: Strings related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

Where does it say that this function supports UTF-8 ?



Previous Comments:


[2005-06-03 19:09:58] a dot bendilas at zefxis dot gr

Hi sniper. First of all I'm using Firefox.

Check the TXT at http://www.zefxis.gr/temp/stripos.txt

Thanks!



[2005-06-03 18:52:47] [EMAIL PROTECTED]

It's more likely your browser sending them like that.
Put them as txt file somewhere in the web or use some other browser
than IE.




[2005-06-03 18:02:16] a dot bendilas at zefxis dot gr

Your bug submission system escaped the greek characters. Please view
them unescaped to see what I mean. The first letter of the greek word
is the capital Sigma in the first string, and the small Sigma in the
second string.



[2005-06-03 18:00:19] a dot bendilas at zefxis dot gr

Description:

For Greek strings stripos doesn't work case insensitively. 

Reproduce code:
---
?php echo
stripos('#931;#954;#973;#955;#959;#962;','#963;#954;#973;#955;#959;#962;');
?

Expected result:

0

Actual result:
--
false





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


#33226 [WFx]: php 5.0.4 no longer detects endianness when cross-compiling

2005-06-03 Thread jbparsons at ucdavis dot edu
 ID:   33226
 User updated by:  jbparsons at ucdavis dot edu
 Reported By:  jbparsons at ucdavis dot edu
 Status:   Wont fix
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.0.4
 New Comment:

what's wrong with AC_C_BIGENDIAN?


Previous Comments:


[2005-06-03 08:02:31] [EMAIL PROTECTED]

Yes, life is hard sometimes. If you can provide a reliable way to
detect endianness when cross-compiling, feel free to send a patch. 



[2005-06-03 02:32:18] jbparsons at ucdavis dot edu

Description:

php 5.0.3 and earlier used AC_C_BIGENDIAN during configuration to
detect the endianness of the target system.  This autoconf macro is
capable of detecting the endianness of many systems even when
cross-compiling.

php 5.0.4 now uses AC_TRY_RUN instead, which means that it is no longer
able to detect the endianness of a target, and it must instead be
configured manually.

This makes it harder to configure php correctly when building for
embedded systems, such as the Linksys nslu2, where this problem was
noticed.







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


#33238 [NEW]: Bug select odbc_fetch_row

2005-06-03 Thread olivier at pipas dot org
From: olivier at pipas dot org
Operating system: Windows XP
PHP version:  5.0.4
PHP Bug Type: ODBC related
Bug description:  Bug select odbc_fetch_row

Description:

I do a select in a db access (odbc), it return good number of rows but
cannot show it

Reproduce code:
---
if(!$conn=odbc_connect(mydbodbc,user,pass))
exit(Error connect DB);
$sql=SELECT numcountry, namecountry FROM countries;;
if(!$res=odbc_exec($conn,$sql))
exit(Error syntax : $sql);
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo $restab[0] $restab[1]br\n;
$i++;
}
echo $i;

Expected result:

Array1 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3

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


#33238 [Opn]: Bug select odbc_fetch_row

2005-06-03 Thread olivier at pipas dot org
 ID:   33238
 User updated by:  olivier at pipas dot org
 Reported By:  olivier at pipas dot org
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

I use apache 2 and php as an Apache module


Previous Comments:


[2005-06-03 22:05:31] olivier at pipas dot org

Description:

I do a select in a db access (odbc), it return good number of rows but
cannot show it

Reproduce code:
---
if(!$conn=odbc_connect(mydbodbc,user,pass))
exit(Error connect DB);
$sql=SELECT numcountry, namecountry FROM countries;;
if(!$res=odbc_exec($conn,$sql))
exit(Error syntax : $sql);
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo $restab[0] $restab[1]br\n;
$i++;
}
echo $i;

Expected result:

Array1 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





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


#33238 [Opn]: Bug select odbc_fetch_row

2005-06-03 Thread olivier at pipas dot org
 ID:   33238
 User updated by:  olivier at pipas dot org
 Reported By:  olivier at pipas dot org
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

I have tested with odbc_fetch_object, and it's working ! 

So : it's a bug in function odbc_fetch_row


Previous Comments:


[2005-06-03 22:09:55] olivier at pipas dot org

I use apache 2 and php as an Apache module



[2005-06-03 22:05:31] olivier at pipas dot org

Description:

I do a select in a db access (odbc), it return good number of rows but
cannot show it

Reproduce code:
---
if(!$conn=odbc_connect(mydbodbc,user,pass))
exit(Error connect DB);
$sql=SELECT numcountry, namecountry FROM countries;;
if(!$res=odbc_exec($conn,$sql))
exit(Error syntax : $sql);
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo $restab[0] $restab[1]br\n;
$i++;
}
echo $i;

Expected result:

Array1 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





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


#33240 [NEW]: XML_OPTION_SKIP_WHITE skips important spaces

2005-06-03 Thread jacob at jacobweber dot com
From: jacob at jacobweber dot com
Operating system: Fedora Core 3
PHP version:  5.0.4
PHP Bug Type: XML related
Bug description:  XML_OPTION_SKIP_WHITE skips important spaces

Description:

Turning on XML_OPTION_SKIP_WHITE causes the space in the following XML to
be skipped:
aapos; amp;/a

I believe this is incorrect. It doesn't skip the space in:
aamp; apos;/a

Jacob

Reproduce code:
---
$xmlStr = aapos; amp;/a;
$xmlParser = xml_parser_create();
xml_parser_set_option($xmlParser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($xmlParser, $xmlStr, $xmlArr);
xml_parser_free($xmlParser);
print_r($xmlArr);

Expected result:

Array
(
[0] = Array
(
[tag] = A
[type] = complete
[level] = 1
[value] = ' 
)

)

Actual result:
--
Array
(
[0] = Array
(
[tag] = A
[type] = complete
[level] = 1
[value] = '
)

)

(note the missing space after the apostrophe

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


#33238 [Opn-Fbk]: Bug select odbc_fetch_row

2005-06-03 Thread sniper
 ID:   33238
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olivier at pipas dot org
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-06-03 22:15:51] olivier at pipas dot org

I have tested with odbc_fetch_object, and it's working ! 

So : it's a bug in function odbc_fetch_row



[2005-06-03 22:09:55] olivier at pipas dot org

I use apache 2 and php as an Apache module



[2005-06-03 22:05:31] olivier at pipas dot org

Description:

I do a select in a db access (odbc), it return good number of rows but
cannot show it

Reproduce code:
---
if(!$conn=odbc_connect(mydbodbc,user,pass))
exit(Error connect DB);
$sql=SELECT numcountry, namecountry FROM countries;;
if(!$res=odbc_exec($conn,$sql))
exit(Error syntax : $sql);
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo $restab[0] $restab[1]br\n;
$i++;
}
echo $i;

Expected result:

Array1 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





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


#31646 [Asn-Csd]: imap_mail_compose() don't work when body[][charset] has been set

2005-06-03 Thread sniper
 ID:   31646
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at alikuvkoutek dot cz
-Status:   Assigned
+Status:   Closed
 Bug Type: IMAP related
 Operating System: Linux
 PHP Version:  5CVS-2005-05-05 (dev)
 Assigned To:  sniper
 New Comment:

Can not reproduce with latest CVS.



Previous Comments:


[2005-06-01 02:18:50] martin at fronek dot slansko dot net

supplement:

Just the function imap_mail_compose work, not charset!

Unfortunately..



[2005-06-01 02:11:41] martin at fronek dot slansko dot net

The Function imap_mail_compose work, but only if  the parameter
charset is typping UPPERCASE!
doesn't working example: $body[1][charset]='windows-1250'; 
working example: $body[1][CHARSET]='windows-1250'; 

The bug is in souce code of PHP, in file 'php_imap.c' on lines 2912 and
3019.

Martin Fronek.



[2005-05-08 21:48:05] gandie at rootshell dot cz

BACKTRACE:

#0  0xb79007d4 in free () from /lib/libc.so.6
#1  0x082e51ee in fs_give ()
#2  0x08351b47 in _IO_stdin_used ()
#3  0x in ?? ()
#4  0x in ?? ()
#5  0x0851d1a0 in ?? ()
#6  0x0882e528 in ?? ()
#7  0x0882e588 in ?? ()
#8  0x0882e520 in ?? ()
#9  0x082fe788 in mail_free_body_parameter ()
#10 0x0882e578 in ?? ()
#11 0x0851d1a0 in ?? ()
#12 0x0882e528 in ?? ()
#13 0x082fe5a2 in mail_free_body_data ()
#14 0xbfffacc4 in ?? ()
#15 0x0882e598 in ?? ()
#16 0xbfffacc0 in ?? ()
#17 0x082fe548 in mail_free_body ()
#18 0x0882e520 in ?? ()
#19 0x0882e694 in ?? ()
#20 0x0882bcbc in ?? ()
#21 0x0810cfc0 in zif_imap_mail_compose ()
#22 0x in ?? ()
(gdb) frame 21
#21 0x0810cfc0 in zif_imap_mail_compose ()
(gdb) frame 22
#22 0x in ?? ()



[2005-01-21 20:58:43] webmaster at alikuvkoutek dot cz

?
  $envelope[from]= '[EMAIL PROTECTED]'; 
  $envelope[return_path]= '[EMAIL PROTECTED]'; 
  $envelope[custom_headers][] = X-Priority: 3; 

  $body[1][type]=TYPETEXT; 
  $body[1][subtype]=plain; 
  $body[1][encoding]=ENCQUOTEDPRINTABLE ; 
  $body[1][charset]='windows-1250';  // when removed, all is ok
  $body[1][contents.data]='text'; 

  $envelope = unserialize(serialize($envelope)); 
  $body = unserialize(serialize($body)); 
  echo nl2br( imap_mail_compose($envelope, $body) );
?
hr /



[2005-01-21 19:27:01] webmaster at alikuvkoutek dot cz

Description:

When set $body[][charset], the imap_mail_compose() don't work. The
script is terminated on that line and no output is generated.

The source code and information from phpinfo() is available over the
URL (links are on the top of the page).

Reproduce code:
---
http://www.alikuvkoutek.cz/t.php






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


#33238 [Fbk-Opn]: Bug select odbc_fetch_row

2005-06-03 Thread olivier at pipas dot org
 ID:   33238
 User updated by:  olivier at pipas dot org
 Reported By:  olivier at pipas dot org
-Status:   Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Windows XP
 PHP Version:  5.0.4
 New Comment:

I have tried this version (5.0.5-dev) but the bug is always present.

This bug is also present in 5.0.0 and 4.3.11


Previous Comments:


[2005-06-03 22:59:21] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-06-03 22:15:51] olivier at pipas dot org

I have tested with odbc_fetch_object, and it's working ! 

So : it's a bug in function odbc_fetch_row



[2005-06-03 22:09:55] olivier at pipas dot org

I use apache 2 and php as an Apache module



[2005-06-03 22:05:31] olivier at pipas dot org

Description:

I do a select in a db access (odbc), it return good number of rows but
cannot show it

Reproduce code:
---
if(!$conn=odbc_connect(mydbodbc,user,pass))
exit(Error connect DB);
$sql=SELECT numcountry, namecountry FROM countries;;
if(!$res=odbc_exec($conn,$sql))
exit(Error syntax : $sql);
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo $restab[0] $restab[1]br\n;
$i++;
}
echo $i;

Expected result:

Array1 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





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


#33172 [Fbk-Opn]: changing array during foreach iteration

2005-06-03 Thread tomas_matousek at hotmail dot com
 ID:   33172
 User updated by:  tomas_matousek at hotmail dot com
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: WinXP
 PHP Version:  5.0.4
 New Comment:

Doesn't work either.


Previous Comments:


[2005-06-03 21:22:11] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-05-28 16:30:17] tomas_matousek at hotmail dot com

Well, I've swapped the expected and the actual results.
I would expect all values of the array to be modified.



[2005-05-28 16:24:41] tomas_matousek at hotmail dot com

Description:

The behavior of foreach statment with reference value is not imho right
if the array gets modified during iteration.

See the code I've pasted here. If the array is written to (either by
unset or by a write operation) during iteration, the effect of  is
canceled, i.e. the values are not modified since the write operation.

This seems to me as bug because it is inconsistent with the
definition of foreach which should say that

foreach($a as $k = $v) {}

is (more or less) equivalent to 

$copy_of_a = $a;
while(next($copy_of_a))
{
  $k = key($copy_of_a);
  $v = $copy_of_a[$k];
}

With the , one can deduce the following definition:

foreach($a as $k = $v)  { }

is equivalent to 

$copy_of_a = $a;
while(next($copy_of_a))
{
  $k = key($copy_of_a);
  $v = $a[$k];
}

Using = operator, a new value should be added if it has been unset in
the original array.

Reproduce code:
---
$a = array(0,1,2,3,4,5,6,7,8);
$i = 0;
foreach ($a as $k = $v)
{
  $v+=100;

  if ($i++==2)
  {
unset($a[5]);
  }
}
var_dump($a);

Expected result:

array(8) {
  [0]=
  int(100)
  [1]=
  int(101)
  [2]=
  int(102)
  [3]=
  int(3)  // modification of values stops here
  [4]=
  int(4)
  [6]=
  int(6)
  [7]=
  int(7)
  [8]=
  int(8)
}



Actual result:
--
array(8) {
  [0]=
  int(100)
  [1]=
  int(101)
  [2]=
  int(102)
  [3]=
  int(103)
  [4]=
  int(104)
  [6]=
  int(106)
  [7]=
  int(107)
  [8]=
  int(108)
  [5]=// note: the new value should be added here
  int(100)
}







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


#32330 [Asn-Opn]: session_destroy, Failed to initialize storage module, custom session handler

2005-06-03 Thread sniper
 ID:   32330
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Open
 Bug Type: Session related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-03-17)
 Assigned To:  sniper
 New Comment:

PS(mod_data) gets set to NULL with these:

session_write_close(),
session_module_name('foo'),
session_destroy()






Previous Comments:


[2005-05-31 09:44:11] fteodoro at teatrodetabuas dot com dot br

Is this discussion opened yet?
I think I got a tip in this bug - not the more elegant, but it's
working now.

I was facing the random failed to initialize storage module bug. The
bug seems to be related to the physical recording of session data. No
worries on my test server (linux + php 4.2.2 + mysql 3.23.54), but all
the worries on the web server (php 4.3.11 + mysql 4.0.22).

Since I have no access to the commercial server unless ftp, I achieved
the trick with a simple .access file, with a simple couple of
handlers:

php_value session.save_handler files
php_value session.save_path /home/domain/htdocs/temp

and I haven't received error messages for some days.

Too dummy? Hope it works...



[2005-05-21 19:19:42] [EMAIL PROTECTED]

I think you are on the right track mfischer.  It looks like PS(mod) and
PS(mod_data) can get out of synch which would cause this.  And I think
all the others with seemingly unrelated issues are actually related. 
If PS(mod_data) leaks out of the per-request sandbox and infects
subsequent requests all it takes is one application on a server to use
its own session handler and it could affect other seemingly trivial
standalone session apps on that server.



[2005-05-19 14:09:55] lekhoi at lekhoi dot com dot au

I use
Window XP -- running Apache
SQLite version 2.8.14
PHP version 5.0.4
and am experiencing the same problem of PHP reporting error when
calling session_start()

I have never have this problem before.

However, I am using SQLiteManager ver 1.0.6 and during the development
stage I came across this problem. This problem occurs quite randomly
specially when I try to modify the database structure or have troubled
sql statement. It feels and sounds like a memory leak problem with
SQLite functions. I have to stress that I come across this only when
using SQLiteManager.

I have used and configured session using SQLite as the database for
sessions storing and never have a problem.

To fix this, I restart Apache, and it works everytime.



[2005-05-17 21:01:39] semorales at segob dot gob dot mx

Any notice about this bug? I'm thinking about using the handler but I'm
afraid it will crash my server. Please let me know.



[2005-04-30 11:31:53] dmih at in-solve dot ru

I've added several notes as this bug (marked as bogus):

http://bugs.php.net/bug.php?id=32897

Please consider them, as it seems that it is about this bug really.
Thanks.



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

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


#33197 [Opn-Fbk]: sapi_module.treat_data not getting initialized (apache2)

2005-06-03 Thread sniper
 ID:   33197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alan at akbkhome dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: debian / linux
 PHP Version:  5.* (2005-05-31)
 New Comment:

Can you check if it's some php.ini setting ? (simply make sure none is
loaded, and nothing is set in httpd.conf)



Previous Comments:


[2005-05-31 15:32:58] [EMAIL PROTECTED]

Workaround : main/php_variables.c

add this to php_hash_enviroment()
if (!sapi_module.treat_data) {
   php_startup_sapi_content_types();
}

If no-one else can reproduce this, then it's probably best to suspend
it. (eg. leave open for a few days..)

Reference information:
gcc version 3.3.5 (Debian 1:3.3.5-12)
ii  apache2-common 2.0.54-4   
ii  apache2-mpm-prefork 2.0.54-4 
ii  apache2-prefork-dev  2.0.54-4 
ii  libtool1.5.6-6 
ii  autoconf   2.59a-3 








[2005-05-31 07:41:33] [EMAIL PROTECTED]

Try this:
# ./configure --disable-all --with-apxs2 

And if above crashes:
# ./configure --disable-all --with-apxs2 --enable-debug 




[2005-05-31 07:34:59] alan at akbkhome dot com

Server version: Apache/2.0.54
it's the debain apache2-mpm-prefork



[2005-05-31 07:29:33] [EMAIL PROTECTED]

Not enough info to reproduce (works fine for me..).
What MPM is used for Apache2? (please tell it's worker? :)
What startup? Request or apachectl start ?




[2005-05-31 06:01:23] alan at akbkhome dot com

Description:

tried HEAD  php-5.0.4

getting segfault at startup with apache2
#1  0x4086a123 in php_hash_environment ()
at /usr/src/php-5.0.4/main/php_variables.c:625
p = 0x81ecc39 GPCS
_gpc_flags = \000\000\000\001
dummy_track_vars_array = (zval *) 0x0
initialized_dummy_track_vars_array = 0 '\0'
jit_initialization = 0 '\0'
auto_global_records = {{name = 0x40a0c39b _POST, name_len =
6,
long_name = 0x40a236b2 HTTP_POST_VARS, long_name_len = 15,
jit_initialization = 0 '\0'}, {name = 0x40a0c3a1 _GET, name_len =
5,
long_name = 0x40a236c1 HTTP_GET_VARS, long_name_len = 14,
jit_initialization = 0 '\0'}, {name = 0x40a0c393 _COOKIE,
name_len = 8,
long_name = 0x40a236cf HTTP_COOKIE_VARS, long_name_len = 17,
jit_initialization = 0 '\0'}, {name = 0x408c12ab _SERVER,
name_len = 8,
long_name = 0x40a236e0 HTTP_SERVER_VARS, long_name_len = 17,
jit_initialization = 1 '\001'}, {name = 0x40a1683e _ENV, name_len
= 5,
long_name = 0x40a236f1 HTTP_ENV_VARS, long_name_len = 14,
jit_initialization = 1 '\001'}, {name = 0x40a23708 _FILES,
name_len = 7,
long_name = 0x40a236ff HTTP_POST_FILES, long_name_len = 16,
jit_initialization = 0 '\0'}}
i = 6
#2  0x4085edc4 in php_request_startup () at
/usr/src/php-5.0.4/main/main.c:1060
orig_bailout = {{__jmpbuf = {135586232, 1084715676,
-1073743140,
  -1073743112, -1073743568, 1082911454}, __mask_was_saved = 0,
__saved_mask = {__val = {0 repeats 32 times
orig_bailout_set = 1 '\001'
retval = 0
#3  0x408bedfb in php_handler (r=0x8221948)
at /usr/src/php-5.0.4/sapi/apache2handler/sapi_apache2.c:527
orig_bailout = {{__jmpbuf = {0, 0, 0, 0, 0, 0},
__mask_was_saved = 0,
__saved_mask = {__val = {0 repeats 32 times
ctx = (php_struct *) 0x8223240
conf = (void *) 0x0
brigade = (apr_bucket_brigade *) 0x82232b8
bucket = (apr_bucket *) 0x0
rv = 0
parent_req = (request_rec *) 0x0
#4  0x080783d5 in ap_run_handler ()
No symbol table info available.
(gdb) up
#1  0x4086a123 in php_hash_environment ()
at /usr/src/php-5.0.4/main/php_variables.c:625
625
sapi_module.treat_data(PARSE_GET, NULL, NULL TSRMLS_CC);/* GET
Data */
(gdb)  print sapi_module.treat_data
$2 = (void (*)(int, char *, zval *)) 0


build:
 './configure' 
'--prefix=/usr'
 '--with-regex=php'
 '--disable-cgi' 

'--with-config-file-path=/etc/php5/cli' 
'--disable-rpath'
 '--enable-memory-limit' 
'--with-layout=GNU'
 '--with-pear=/usr/share/php'
 '--enable-track-vars'
 '--enable-trans-sid' 
'--enable-bcmath'
 '--with-bz2' 
'--enable-ctype' '
--with-db4' 
'--with-iconv' 
'--enable-exif'
 '--enable-ftp' 
'--with-gettext' 
'--enable-mbstring'
 '--with-pcre-regex=/usr'
 '--enable-shmop'
 '--enable-sockets'
 '--enable-wddx'
 '--disable-xml'
 '--with-expat-dir=/usr'
 '--with-xmlrpc' 
'--enable-yp' 
'--with-zlib' 
'--without-pgsql'
 '--with-kerberos=/usr' 
'--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php5/libexec' 

#33215 [Opn-Fbk]: open_basedir leaks between vhosts

2005-06-03 Thread sniper
 ID:   33215
 Updated by:   [EMAIL PROTECTED]
 Reported By:  soenke at city-map dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: FC2/3
 PHP Version:  4CVS-2005-06-01 (stable)
 New Comment:

Have you tried by using the Fedora provided Apache2 (the binary rpm)??
As I can NOT reproduce this with it.




Previous Comments:


[2005-06-01 23:01:20] soenke at city-map dot de

Description:

I discovered the strange behaviour of PHP4 that the open_basedir
settings of several vhosts are leaking between each other.

PHP configure line:

'./configure' \
'--with-apxs2=/usr/sbin/apxs' \
'--prefix=/usr' \
'--with-mysql=/usr' \
'--enable-safe-mode' \
'--enable-trans-sid' \
'--with-jpeg-dir=/usr' \
'--with-gd' \
'--with-zlib-dir=/usr' \
'--with-freetype-dir=/usr' \

Apache line:

./configure \
--enable-layout=RedHat \
--enable-mods-shared=most \
--enable-module=ssl \
--enable-ssl \
--with-ssl=/usr \
--enable-so \



It's a mass-hosting Apache 2.0.54 server with many vhosts running the
confixx tool. Here an example of 2 vhosts (generated by confixx):

VirtualHost xxx:80
  ServerName xxx.de
  ServerAlias 

  DocumentRoot /usr/local/httpd/htdocs/web405/html
  SuexecUserGroup web405 web405
  php_admin_value open_basedir
/usr/local/httpd/htdocs/web405/html/:/usr/local/httpd/htdocs/web405/phptmp/:/usr/local/httpd/htdocs/web405/files/:/usr/local/httpd/htdocs/web405/atd/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir
/usr/local/httpd/htdocs/web405/phptmp/
/VirtualHost

VirtualHost xxx:80
  ServerName xxx
  ServerAlias xxx

  DocumentRoot /usr/local/httpd/htdocs/web309/html
  SuexecUserGroup web309 web309
  php_admin_value open_basedir
/usr/local/httpd/htdocs/web309/html/:/usr/local/httpd/htdocs/web309/phptmp/:/usr/local/httpd/htdocs/web309/files/:/usr/local/httpd/htdocs/web309/atd/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir
/usr/local/httpd/htdocs/web309/phptmp/
Directory /usr/local/httpd/htdocs/web309/html/rsh
Options FollowSymLinks SymLinksIfOwnerMatch
/Directory
/VirtualHost


The /usr/local/httpd/htdocs path is a real directory, no symlinks.

Now I open one of these virtual hosts via web-browser. That works. But
if I try to open the second vhost:


Warning: Unknown(): open_basedir restriction in effect.
File(/usr/local/httpd/htdocs/web405/html/index.php) is not within the
allowed path(s):
(/usr/local/httpd/htdocs/web309/html/:/usr/local/httpd/htdocs/web309/phptmp/:/usr/local/httpd/htdocs/web309/files/:/usr/local/httpd/htdocs/web309/atd/)
in Unknown on line 0

Warning: Unknown(/usr/local/httpd/htdocs/web405/html/index.php): failed
to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening
'/usr/local/httpd/htdocs/web405/html/index.php' for inclusion
(include_path='.') in Unknown on line 0

The second vhost uses the open_basedir settings from the first one.
That's really strange.

I tested this with PHP4.3.10/11 and the latest CVS snapshot. I upgraded
the Fedora distribution and recompiled Apache+PHP. No success. Now I
really didn't know what to do any more and so opened this bug report.

If you need more information or debugging it's no problem since it's no
production system yet.






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


#33238 [Opn-Fbk]: Bug select odbc_fetch_row

2005-06-03 Thread sniper
 ID:   33238
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olivier at pipas dot org
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Windows XP
 PHP Version:  5.*, 4.* (2005-06-04)
 New Comment:

And how can we reproduce this? (we need the db..)



Previous Comments:


[2005-06-03 23:26:55] olivier at pipas dot org

I have tried this version (5.0.5-dev) but the bug is always present.

This bug is also present in 5.0.0 and 4.3.11



[2005-06-03 22:59:21] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-06-03 22:15:51] olivier at pipas dot org

I have tested with odbc_fetch_object, and it's working ! 

So : it's a bug in function odbc_fetch_row



[2005-06-03 22:09:55] olivier at pipas dot org

I use apache 2 and php as an Apache module



[2005-06-03 22:05:31] olivier at pipas dot org

Description:

I do a select in a db access (odbc), it return good number of rows but
cannot show it

Reproduce code:
---
if(!$conn=odbc_connect(mydbodbc,user,pass))
exit(Error connect DB);
$sql=SELECT numcountry, namecountry FROM countries;;
if(!$res=odbc_exec($conn,$sql))
exit(Error syntax : $sql);
$i=0;
while($restab=odbc_fetch_row($res))
{
echo $restab;
echo $restab[0] $restab[1]br\n;
$i++;
}
echo $i;

Expected result:

Array1 Belgiumbr
Array2 Francebr
Array3 Spainbr
3

Actual result:
--
1 br
1 br
1 br
3





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


#33209 [Opn-Fbk]: PHP crashes creating SWF with Ming

2005-06-03 Thread sniper
 ID:   33209
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jcruff at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Ming related
 Operating System: Mac OS X 10.4.1 (Darwin 8.1.0)
 PHP Version:  5.0.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2005-06-01 07:32:22] jcruff at gmail dot com

Description:

PHP will crash if run as a DSO module or from CLI against the 
simple script below that uses the Ming library to create an SWF 
file.

Reproduce code:
---
?php

// create new SWFMovie object
$myMovie = new SWFMovie();

// set size  background color attributes of movie object
$myMovie-setDimension(400,400);
$myMovie-setBackground(255,0,0);

$myMovie-save(mysquare.swf);

?

Expected result:

When run under Apache the apache error log will say, child pid 
# exit signal Bus error (10).  When from from CLI it just 
gives bus error.  In either case a MAC OS X crash report is 
generated (shown below)

Actual result:
--
(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done
Reading symbols for shared libraries ... done


Program received signal EXC_BAD_ACCESS, Could not access 
memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0026
zend_hash_apply_with_argument (ht=0x12837d4, apply_func=0, 
argument=0x57b460) at /Users/fullstack/dlweskx/php-5.0.3/
Zend/zend_hash.c:680
680 /Users/fullstack/dlweskx/php-5.0.3/Zend/zend_hash.c: 
No such file or directory.
in /Users/fullstack/dlweskx/php-5.0.3/Zend/
zend_hash.c
(gdb) 
(gdb) bt
#0  zend_hash_apply_with_argument (ht=0x12837d4, 
apply_func=0, argument=0x57b460) at /Users/fullstack/
dlweskx/php-5.0.3/Zend/zend_hash.c:680
#1  0x01123854 in _object_and_properties_init (arg=0x57b460, 
class_type=0x2ae2c0, properties=0x0) at /Users/fullstack/
dlweskx/php-5.0.3/Zend/zend_API.c:706
#2  0x0024e5fc in zif_swfmovie_init ()
#3  0x01146034 in zend_do_fcall_common_helper 
(execute_data=0xbfffddc0, opline=0x18bff40, 
op_array=0x57b500) at /Users/fullstack/dlweskx/php-5.0.3/
Zend/zend_execute.c:2711
#4  0x01142b90 in execute (op_array=0x57b500) at /Users/
fullstack/dlweskx/php-5.0.3/Zend/zend_execute.c:1400
#5  0x01121f50 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /Users/fullstack/dlweskx/php-5.0.3/Zend/
zend.c:1069
#6  0x010e8fa8 in php_execute_script 
(primary_file=0xbfffeb20) at /Users/fullstack/dlweskx/
php-5.0.3/main/main.c:1628
#7  0x0114e324 in php_handler (r=0x18b9c50) at /Users/
fullstack/dlweskx/php-5.0.3/sapi/apache2handler/
sapi_apache2.c:537
#8  0x00035f50 in ap_run_handler (r=0x18b9c50) at config.c:
152
#9  0x000366e0 in ap_invoke_handler (r=0x18b9c50) at 
config.c:363
#10 0x00011244 in ap_process_request (r=0x18b9c50) at 
http_request.c:246
#11 0xbf70 in ap_process_http_connection (c=0x18b5d28) 
at http_core.c:250
#12 0x0003cc88 in ap_run_process_connection (c=0x18b5d28) at 
connection.c:42
#13 0x00022860 in child_main (child_num_arg=0) at prefork.c:
609
#14 0x00022944 in make_child (s=0x180ab40, slot=0) at 
prefork.c:649
#15 0x00022a90 in startup_children (number_to_start=2) at 
prefork.c:721
#16 0x00022ee0 in ap_mpm_run (_pconf=0x0, plog=0x11161ec, 
s=0x180ab40) at prefork.c:940
#17 0x00024830 in main (argc=2, argv=0xb474) at main.c:
617
(gdb)





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


#33179 [Bgs-Opn]: backslash is not an escape character in correct CSV

2005-06-03 Thread fsb at thefsb dot org
 ID:   33179
 User updated by:  fsb at thefsb dot org
 Reported By:  fsb at thefsb dot org
-Status:   Bogus
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: os x 10.3 and freebsd 5.3
 PHP Version:  4.3.10
 New Comment:

iliaa, please see my update from 6/1. i omitted to 
change the status to open when i submitted it.


Previous Comments:


[2005-06-01 02:25:24] fsb at thefsb dot org

if backslash were an escape character to PHP then it 
would not appear in the parsed values from the following 
csv file:

abc,123,abc,123,abc,123
abc,\ 123,abc,123,abc,123
abc,123\ ,abc,123,abc,123
abc,123,abc\,123,abc,123
abc,123,\abc,123,abc,123
abc,123,a\bc,123,abc,123
abc,123,a\bc,123,abc,123
abc,123,abc\ ,123,abc,123

in every case above, the backslash preceeds a special 
caracter in the csv file format. if backshalsh were 
generally an escape character then in these positions it 
should be removed by the csv parser leaving the 
following character as literal.



[2005-05-31 01:18:39] [EMAIL PROTECTED]

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

As far as PHP is concerned backslash is an escape characte, which makes
the demonstrated behaviour expected.



[2005-05-30 02:22:52] fsb at thefsb dot org

Description:

why can i have a \ at the end of a field but not
if i wrap it in  field delimiters? e.g.

  abc,123\,abc   works fine but

  abc,123\,abc   produces only two columns

this question has been asked before (#29278, #30476,
etc.) and [EMAIL PROTECTED] rejects the bug as bogus. i 
don't agree. 

if this is not a bug then this unusual use of \ to 
escape only closing field delimiting double quotes 
but not escape any other instances of double qotes or 
(it would appear) any other character SHOULD be 
documented. it is not.

moreover this undocumented feature is not consistent 
with the specification of the CSV file format found 
here: http://www.creativyst.com/Doc/Articles/CSV/
CSV01.htm

this csv spec suggests that backslash has no special 
meaning in the CSV format at all. indeed, in all my 
tests, fgetcsv appears to accord it no special meaning 
_except_ in this one particular case.

such a surprising behaviour that deviates from common 
CSV file format conventions SHOULD be documented (or 
corrected).






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


#33070 [Ver-Asn]: bzdecompress inefficient

2005-06-03 Thread iliaa
 ID:   33070
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lindsay at bitleap dot com
-Status:   Verified
+Status:   Assigned
 Bug Type: Performance problem
 Operating System: Linux 2.6.10 kernel
 PHP Version:  5.*, 4.*
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2005-05-30 15:26:34] [EMAIL PROTECTED]

I stand corrected, it's dead slow. :)




[2005-05-27 17:20:01] lindsay at bitleap dot com

sniper at php dot net:
I'll suggest a faster cpu is not the solution.  On the same machine,
the bunzip2 binary decodes the same 4MB bzip'd file in under 2
seconds.

time bunzip2 4M.bz2 
real0m1.198s
user0m1.162s
sys 0m0.034s

And bzdecompress did it in:
476 seconds or 7 minutes and 56 seconds.

Almost 8 minutes versus 2 seconds on the same machine with the same
data sample would suggest a problem with bzdecompress.



[2005-05-27 09:11:43] [EMAIL PROTECTED]

Get faster machine or use some other compression method than bz2.. (try
your test using the bunzip2 binary and you'll see it's equally slow..) 



[2005-05-23 21:19:02] lindsay at bitleap dot com

I noticed the new code was crashing.  You can reliably reproduce the
results by creating a file which compresses well.  I created my data
sample with the following commands:

dd if=/dev/zero bs=1024 count=65536 of=large
bzip2 large

When I run the script on this, I get the following crash:

file length 256K ran in: 0 seconds
file length 512K ran in: 1 seconds
file length 1M ran in: 1 seconds
file length 2M ran in: 2 seconds
file length 3M ran in: 2 seconds
file length 4M ran in: 3 seconds
file length large ran in: *** glibc detected *** double free or
corruption (!prev): 0x0853f418 ***



[2005-05-23 20:09:43] lindsay at bitleap dot com

I applied the patch suggested by jeff at vertexdev dot com.  I also
added another test for 64M data chunks.  Just to be sure, I verified
php's bzdecompress w/ the patch produces data creating the same md5sum
as bzunzip.

file length 256K ran in: 0 seconds
file length 512K ran in: 0 seconds
file length 1M ran in: 2 seconds
file length 2M ran in: 1 seconds
file length 3M ran in: 3 seconds
file length 4M ran in: 3 seconds
file length 64M ran in: 38 seconds



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

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


#33061 [Fbk-Opn]: Pass object by value then modify initialized sub-object: passes by reference

2005-06-03 Thread online at natweiss dot com
 ID:   33061
 User updated by:  online at natweiss dot com
 Reported By:  online at natweiss dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: Linux
 PHP Version:  4.3.10
 New Comment:

Tried latest snapshot. Still get the bug. Here is output of php -v and
also the output of the reproduce code:

php -v
--

PHP 4.3.12-dev (cli) (built: Jun  3 2005 22:16:42)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St.
Petersburg, by Dmitry Stogov


output of reproduce code


member-val should be empty!
something Object
(
[member] = something Object
(
[val] = 1
)

)


Previous Comments:


[2005-06-03 13:08:00] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-05-19 02:39:30] online at natweiss dot com

Description:

See reproduce code.

php.ini is stock / no changes.

Reproduce code:
---
?php
// a class that does nothing
class something{
function nothing(){
}
}
// a pass-by-value function that modifies a member's member
function pass_by_value($value){
$value-member-val = 1;
}
// create a something with a member something
$object = new something;
$object-member = new something;

// call nothing, then call pass_by_value and print results
$object-member-nothing();
echo member-val should be empty!\n;
pass_by_value($object);
print_r($object);
?

Expected result:

$object-member should be empty

Actual result:
--
$object-member-val == 1





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