#28740 [Com]: PHP has encountered an Access Violation

2004-06-21 Thread sekmun at mypostbox dot com
 ID:   28740
 Comment by:   sekmun at mypostbox dot com
 Reported By:  colorprint at mail dot ru
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  4.3.7
 New Comment:

upgraded from 4.3.6 to 4.3.7,

platform: win2k server/IIS (ISAPI)/Mysql

Seeing this PHP Access Violation error now intermittently. Didn't use
to get his problem. Might go back to 4.3.6 for the time being.


Previous Comments:


[2004-06-20 09:21:59] webmaster at yes-hosting dot com

I get the same problem.
I'm using win2k3/iis6
upgrade from php 4.3.4 to 4.3.7
error show at the end of php pages.



[2004-06-16 15:44:51] jmertic at ncscredit dot com

We have the same problem with our IIS 5/Win2k/MySQL. This is a 4.3.7
regression that needs to be addressed. I'm moving us back to 4.3.6.



[2004-06-14 11:02:08] orangeasklessapple at cherrygmx dot net

We just upgraded from php 4.3.4 to 4.3.7 and are having the same
problem under Windows 2000, IIS 5.0, MS SQL Server 2000.

A reset of the iis solves the problem just temporarliy.



[2004-06-11 09:10:59] [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. 

Thank you for your interest in PHP.

.



[2004-06-11 08:37:17] colorprint at mail dot ru

Description:

I get error at the end of all php-pages very often:
PHP has encountered an Access Violation.
This error is only when PHP 4.3.7 or 5.0 RC3 installed.
With PHP 4.3.6 or 5.0 RC2 all right.
Any idea how to fix it?







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


#28788 [Opn]: Bogus form data when forms contains a single input field

2004-06-21 Thread lsjoberg at aland dot net
 ID:   28788
 User updated by:  lsjoberg at aland dot net
 Reported By:  lsjoberg at aland dot net
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Redhat Enterprise Linux
 PHP Version:  5.0.0RC3
 New Comment:

I created a simple test page (http://www.vallnet.se/test.htm) which
posts forms to both a PHP script which executes print_r($_POST); and a
CGI script which prints its stdin.

When run on a webserver with PHP as a CGI everything executes as
expected. The CGI-script prints 'foo=5' and 'foo=5bar=5' and the
PHP-script '[foo] = 5' and '[foo] = 5'/'[bar] = 5'.

The CGI output from the Apache server is the same, but for the form
with a single element the PHP output is
Array
(
[foo] = 5foo=5
)

The PHP output for the 2-field form is however correct, hence it seems
to be some part of the apache/php interface that is failing...

The same browser(s) and exactly the same scripts were used during
testing.


Previous Comments:


[2004-06-19 11:56:19] lsjoberg at aland dot net

The original code was fully W3C compliant, the testcase below was
stripped down before submitted.

Browsers used was Mozilla and Opera under FreeBSD and Internet Explorer
in some Windows flavour.

It feels like a browser bug but since it occured when upgrading from
PHP4 to PHP5 without code changes it seems suspicious.

I will do some more testing during next week to see if I can isolate
the problem further.



[2004-06-18 20:33:52] imprestavel at gameguru dot com dot br

It looks more like a browser issue.
Have you tryed writing conformant html?

I tested with Mozilla/rv1.6 and IE/6.0 on Apache/2.0.49, PHP/5.0.0RC3
(register_globals=On and Off), under Windows2000 and didn't have that
problem (with the same no- html).

What browser are you using?



[2004-06-15 11:31:36] lsjoberg at aland dot net

Description:

When a HTML form contains a single input field (this could be plain
INPUT, HIDDEN, SELECT or just about any time) with an associated value
the value is not passed correctly to the receiving PHP script.

This only happends when the form contains exactly one field and when
PHP is run as an Apache2 module. (Could not reproduce with PHP running
as CGI under caudium).

Reproduce code:
---
test.htm:
htmlbody
form method=POST action=test.php
input name=id value=5
input type=submit
/form/body/html

test.php:
?
echo $id;
?

Expected result:

The expected result is that the php script should print a 5 and nothing
else. (We are using register_globals=On).

Actual result:
--
The output of the php-script is '5id=5' instead of '5'.

If a input type=hidden name=foo is added to the html form the correct
output of 5 is displayed.





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


#28863 [Opn]: Weird Bug with imagepng (including special chars)

2004-06-21 Thread jsgoupil at lookstrike dot com
 ID:   28863
 User updated by:  jsgoupil at lookstrike dot com
 Reported By:  jsgoupil at lookstrike dot com
 Status:   Open
 Bug Type: GD related
 Operating System: WinXP
 PHP Version:  5.0.0RC3
 New Comment:

the reproduce code... supposed to be the same test file... so Open
test1.php... and include(test1.php);

:)


Previous Comments:


[2004-06-21 08:53:01] jsgoupil at lookstrike dot com

Description:

You will say that i'm really weird to do that, but i don't know how
that happen :

I check into one file, i found the following chars :
chr(239) + chr(187) + chr(191)
Keep the order ! it's important !
(I found that in one of my file, but dont ask me why !)

If you try to include this kind of file before doing a PNG image, you
will get a WRONG png format. (Starting with ?PNG...)

The chars above can't be read under Notepad, neither under IE (perhaps
because i'm under WinXP). It can't be deleted from NotePad (if you
clear the file completly, the file will still have 3bytes undeletable)
but you can delete it with wordpad...

I search really a lot of time to found that problem... because I was
including a file that had that kind of chars...

Reproduce code:
---
VBScript to put chr into file

Open test1.php For Output As #1
Print #1, Chr(239) + Chr(187) + Chr(191)
Close #1


PHP Script :
?php
include(test3.php);
$im = imagecreate(1024, 1024)
or die(Can't Initialize the GD Libraty);
imagecolorallocate($im,255,255,255);
imagepng($im);
?

Expected result:

Supposed return some chars in IE and after the PNG format like : ‰PNG
.

Because normally, if you do a
echo a;
imagepng($im);
You will receive the a and after the PNG format in text.

Actual result:
--
Under WinXP I receive directly the wrong PNG format... like : ?PNG 
IHDRE#1273;?PLTE?#283;#512;?IDATx?#53313;?
[EMAIL PROTECTED]#61828;?!#1190;IEND?B`?

(Without )





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


#28864 [NEW]: function to check if POST data is complete

2004-06-21 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: all
PHP version:  4.3.7
PHP Bug Type: Feature/Change Request
Bug description:  function to check if POST data is complete

Description:

due to network issue, or stopped by user
the content submitted by user maybe incomplete;
there should be a way to check it.
it's serious if the admins submit a incomplete post data. that will do
unrecoverable damage.

i'd like if there's a function:
int content_is_complete()
which
  return strlen(content) == Content-Length;


yes, we can do 'input type=hidden value=1 name=complete/form', and do
isset($_POST['complete'])
but this is not easy for those html-designers to add it each form by
hand

'input type=submit name=submit', and do isset($_POST['submit']), but not
all submit is the last element of form


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


#28865 [NEW]: Functions ftp_*list

2004-06-21 Thread 336764 at 163 dot com
From: 336764 at 163 dot com
Operating system: MandRake 10
PHP version:  5.0.0RC3
PHP Bug Type: FTP related
Bug description:  Functions ftp_*list 

Description:

Warning: ftp_nlist() [function.ftp-nlist]: Unable to create temporary
file. Check permissions in temporary files directory. in
/web/browse.inc.php on line 181


Warning: ftp_rawlist() [function.ftp-nlist]: Unable to create temporary
file. Check permissions in temporary files directory. in
/web/browse.inc.php on line 181



/tmp is chmod 777 and other temporary directory is 777 too.

Reproduce code:
---
$rawlist = ftp_rawlist($conn_id, -a);
$rawlist = ftp_rawlist($conn_id, );

$rawlist = ftp_nlist($conn_id, -a);
$rawlist = ftp_nlist($conn_id, );

Expected result:

Warning: ftp_nlist() [function.ftp-nlist]: Unable to create temporary
file. Check permissions in temporary files directory. /web/browse.inc.php
on line 181



Actual result:
--
list all files to array.

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


#28435 [Com]: array_count_values() problem

2004-06-21 Thread vladb at pseudo-infinity dot ro
 ID:   28435
 Comment by:   vladb at pseudo-infinity dot ro
 Reported By:  ofirin at yahoo dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Any
 PHP Version:  4CVS-2004-05-18 (stable)
 New Comment:

The php5 result seems more accurate than the php4 one. You got strings
in the $books array, no?

Changing this in php4 may break some code out there so maybe it'd be
best to just mention it as a 4-5 inconsistency.


Previous Comments:


[2004-06-18 14:24:41] programmer at bardware dot de

I noticed this problem with PHP5 RC2 on a Win2k box as an
Apache2-module. I have some HMTL-Checkboxes and on the server side want
to check the selected values. My checkboxes are equally named
name=choice2[] what lets PHP generate an array
$_POST[choice2][0]
$_POST[choice2][1]
$_POST[choice2][2] etc. according to the selected values.
Each checkbox has it's unique value attribute.

To test for a certain value I reverse this array with
$arrTmp=array_count_values($_POST[choice2]);

I now want to access $arrTmp[1] to check if the checkbox with the
attribute value=1 was selected. The respective value was - if
selected - 1, otherwise it's not existent in the
$_POST[choice2]-Array. This did not work. $arrTmp[1] didn't work
either. It was no way possible to access a member of the array.

The other poster mentioned the indexes are generated as strings, I want
to point they cannot be accessed at all.

It worked best on PHP 4.3.6

Best,
Bernhard



[2004-05-18 19:04:43] ofirin at yahoo dot com

Description:

I don't know if this is a php5 or php4 bug, but I'm sure something's
wrong here.
Whenever  in php5 I do an array_count_values() on an array that
contains numeric values as strings the result array uses string keys
instead of the numeric values as indexes. This doesn't happen in php4.
I don't know what behaivor is correct.
I'm using the latest cvs versions of both php4 and php5 btw.

Reproduce code:
---
?php
$books = Array('10', '3', '6', '10');
$quantities = array_count_values($books);
var_dump($books);
var_dump($quantities);
?

Expected result:

This is what happens in php4:

array(4) {
  [0]=
  string(2) 10
  [1]=
  string(1) 3
  [2]=
  string(1) 6
  [3]=
  string(2) 10
}
array(3) {
  [10]=
  int(2)
  [3]=
  int(1)
  [6]=
  int(1)
}

Actual result:
--
This is what happens if php5:

array(4) {
  [0]=
  string(2) 10
  [1]=
  string(1) 3
  [2]=
  string(1) 6
  [3]=
  string(2) 10
}
array(3) {
  [10]=
  int(2)
  [3]=
  int(1)
  [6]=
  int(1)
}





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


#28113 [Com]: Memory is not freed with apache2handler SAPI

2004-06-21 Thread alex dot pagnoni at solarix dot it
 ID:   28113
 Comment by:   alex dot pagnoni at solarix dot it
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5CVS-2004-04-23 (dev)
 New Comment:

I'm experiencing huge memory leaks on Apache1 too.


Previous Comments:


[2004-04-23 00:33:00] [EMAIL PROTECTED]

Description:

PHP does not free the memory it's using during and after a request when
using apache2handler SAPI. apache2filter SAPI works fine.

The memory it's using is however reused, but if I would send 500MB data
and only have 256MB RAM, the OOM killer would start killing processes
and apache when there are no more processes to kill (depending on OOM
killer used).

Reproduce code:
---
?php
$string = '';
for ($i = 0; $i  1024; $i++)
   $string .= 'A';

for ($i = 0; $i  (1024 * 200); $i++) {
   echo $string;
   flush();
}
?

Expected result:

Low memory usage

Actual result:
--
  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 8434 nobody25   0  284m 238m  52m S  0.0 31.6   0:25.14 httpd






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


#28335 [Com]: wddx_serialize_value returns empty string

2004-06-21 Thread clemens at gutweiler dot net
 ID:   28335
 Comment by:   clemens at gutweiler dot net
 Reported By:  antonr at game dot permonline dot ru
 Status:   Open
 Bug Type: WDDX related
 Operating System: Win32
 PHP Version:  5CVS-2004-05-09 (dev)
 New Comment:

This example segfaults with PHP-5-RC3.
It contains recursive objects and should be solved like the 'r:123'-way
in serialize().


Previous Comments:


[2004-05-09 09:16:16] antonr at game dot permonline dot ru

Description:

In some cases wddx_serialize_value returns empty string.

Reproduce code:
---
?php
  class MyClass1
{ public $myclass2;
}

  class MyClass2
{ public $myclass1;
}

  $a = new MyClass1;
  $a-number = 1;
  $a-myclass2 = new MyClass2;
  $a-myclass2-myclass1 = $a;

  echo wddx_serialize_value($a);
?


Actual result:
--
empty string





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


#20110 [Com]: input in flex scanner failed in directory :)

2004-06-21 Thread bugme at gmx dot net
 ID:   20110
 Comment by:   bugme at gmx dot net
 Reported By:  jeroen at unfix dot org
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux, Net|Free|OpenBSD, others?
 PHP Version:  4.2.3
 Assigned To:  derick
 New Comment:

I recived the bug when i did an include after a db-query. After that i
begann whit the query and then the include which would work.

I'dont know why but maybe this helps to find the bug.


Previous Comments:


[2003-11-26 23:27:33] alan at bullmarket dot com dot au

Hi,

I have received that type of error (2 actually).

Please go to http://www.bullmarket.com.au/affiliates/user/signup.php

I am very new to PHP and I am having trouble isolating the issue. Any
help you can offer would be great.

Cheers,

Alan



[2003-08-06 09:02:36] rsemmens at names dot co dot uk

We get the problem intermittently.  We run our websites from NFS and if
the file read fails it comes up with this message.  Only when doing
includes though.

I agree with the better error message comment :)

Btw, we are using PHP 4.3.2 so it's still a current problem.

Drop me an e-mail if you want any further details.



[2003-03-20 16:59:41] bostjan dot skufca at domenca dot com

you can view the bug at:

http://www.avtomobilizem.com/dev/modules/gallery2

this project is using Smarty template engine and 
bug only occurs when i set 

$smarty-force_compile = false;

email me to provide you relevant source files



[2002-12-24 20:27:44] gunnar at start dot no

This error also appears with other functions. More specifically I've
experienced it with the parse_ini_file() function. I do not have access
to test it with PHP CVS version, do I don't know wether it has been
fixed for just the include function, or all functions affected by this
problem.



[2002-10-27 18:28:18] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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

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





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

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


#28866 [NEW]: array of objs filling slowness

2004-06-21 Thread dmirand at abelia-decors dot com
From: dmirand at abelia-decors dot com
Operating system: Linux 2.4 / glibc 2.3
PHP version:  5.0.0RC3
PHP Bug Type: Performance problem
Bug description:  array of objs filling slowness

Description:

When running a portion of script which fills an array with 
objects, it is easy to notice a significant slowness depending 
on what has already run before in the script., even if that 
pre-processing is totally independant . The more load that 
runs before, the slower the filling will be... 
 
Under 4.3.6 almost no differences between : 
- a just filling script 
- a big load followed by a filling part 
 
Both 4.3.6 and 5.0.0 RC3 compiled from source. 
 

Reproduce code:
---
$big_load = new BigLoad ;
$big_load-go() ;
unset( $big_load ) ;

/*  Filling start */

$arr_obj_orders = array() ;
foreach( $arr_no_order as $no_order )
{
   $obj_order = new Order ;
   $obj_order-load( $no_order ) ;

   // to show filling avancement
   echo $no_order ;

   $arr_obj_orders[$no_order] = $obj_order ;
}

/* Filling end */

Expected result:

The expected behavior is of course no slowness with the 
filling part of the script, ie the same behavior as if there was 
no big load before the filling part. 
 


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


#28767 [Com]: mysqli doesn't compile (link fails)

2004-06-21 Thread francois at nor-web dot ca
 ID:   28767
 Comment by:   francois at nor-web dot ca
 Reported By:  Franck at e-Dot dot nl
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Linux 2.4.19C13V (Sun Cobalt)
 PHP Version:  5.0.0RC3
 New Comment:

I cannot compile PHP5 RC3 either.
I compiled PHP5Rc1, PHP5Rc2 without problem.

Config:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd
--with-zlib --enable-sockets --enable-soap --enable-shmop
--with-mysqli

MySQL version:
MySQL-server-4.1.1-1
MySQL-shared-4.1.1-0
MySQL-client-4.1.1-0
MySQL-devel-4.1.1-0

Linux version:
Mandrake Linux 10.0 official kernel 2.6.3-7mdksmp

In file included from /opt/php-5.0.0RC3/ext/mysqli/mysqli.c:31:
/opt/php-5.0.0RC3/ext/mysqli/php_mysqli.h:86: error:
`LOCAL_INFILE_ERROR_LEN' undeclared here (not in a function)
/opt/php-5.0.0RC3/ext/mysqli/mysqli.c: In function
`php_local_infile_init':
/opt/php-5.0.0RC3/ext/mysqli/mysqli.c:744: error:
`LOCAL_INFILE_ERROR_LEN' undeclared (first use in this function)
/opt/php-5.0.0RC3/ext/mysqli/mysqli.c:744: error: (Each undeclared
identifier is reported only once
/opt/php-5.0.0RC3/ext/mysqli/mysqli.c:744: error: for each function it
appears in.)
/opt/php-5.0.0RC3/ext/mysqli/mysqli.c: In function
`php_local_infile_read':
/opt/php-5.0.0RC3/ext/mysqli/mysqli.c:825: error:
`LOCAL_INFILE_ERROR_LEN' undeclared (first use in this function)
make: *** [ext/mysqli/mysqli.lo] Error 1


Previous Comments:


[2004-06-14 11:31:58] Franck at e-Dot dot nl

Ow forgot to say:

Without the --with-mysqli line in the configuration, everything works
like a charm!



[2004-06-14 08:37:31] Franck at e-Dot dot nl

Description:

Hi, I'm trying to build php5 with MySQLi support. But I was not able to
do so.

Tried PHP5.0.0RC2, PHP5.0.0RC3 and PHP5-200406140430 with MySQL
4.1.1alpha  4.1.2alpha.

All give me the same error's.

MySQL install:
I've build my own rpm's from the source rpm.
and installed client, devel, server and shared packages.

PHP Configuration:
./configure \
--prefix=/usr \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/etc/httpd \
--with-zlib \
--enable-magic-quotes \
--with-regex=system \
--enable-track-vars \
--with-iconv \
--enable-xml \
--disable-debug \
--with-gd \
--enable-mbstring \
--enable-mbstr-enc-trans \
--with-interbase=shared \
--with-mysql=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-ldap \
--with-openssl=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--enable-calender \
--with-curl \
--enable-bcmath \
--with-dom \
--with-dom-xslt \
--enable-exit \
--enable-ftp \
--with-gettext \
--enable-mbregex \
--with-mcrypt \
--with-pear \
--enable-sockets \
--with-freetype-dir \
--enable-soap \
--enable-simplexml \
--with-inifile \
--enable-wddx \
--enable-pcntl


This all goes fine, then it all stops on the 'make'.
It seems that compiling is not the problem, only when linking the whole
stuff it goes wrong.

Error message:
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): multiple
definition of `net_buffer_length'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple
definition of `max_allowed_packet'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): multiple
definition of `net_read_timeout'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0xc): multiple
definition of `net_write_timeout'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0xc): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_server_init':
libmysql.o(.text+0x0): multiple definition of `mysql_server_init'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x0): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_debug':
libmysql.o(.text+0x1d0): multiple definition of `mysql_debug'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x1d0): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_server_end':
libmysql.o(.text+0xf0): multiple definition of `mysql_server_end'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0xf0): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_thread_end':
libmysql.o(.text+0x150): multiple definition of `mysql_thread_end'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x150): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_get_parameters':
libmysql.o(.text+0x130): multiple definition of `mysql_get_parameters'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x130): first defined
here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_thread_init':
libmysql.o(.text+0x140): multiple 

#28740 [Com]: PHP has encountered an Access Violation

2004-06-21 Thread magnus2 at nova dot nu
 ID:   28740
 Comment by:   magnus2 at nova dot nu
 Reported By:  colorprint at mail dot ru
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  4.3.7
 New Comment:

Same here. I've always gotten this error (PHP has encountered an Access
Violation at xxx) when running PHP 4.3.x (any version and for both
CGI and ISAPI) on Windows 2000 or Windows 2003 that connects to MySQL.
I have other sites on same machines connecting to MSSQL that works
fine. In Windows 2003 I've isolated the servers in different
applications pools (to be able to restart them seperately) and it's
only sites using MySQL where this error occur. It can be a few hours
between but sometimes it's days.

For example on same machine I've set up two phpbb
(http://www.phpbb.com) forums, one using a MySQL 4.0.16 database and
the other a MSSQL 2000 SP3 database. Both sites in different
application pools. Rest of the config is identical (Win 2003, PHP
4.3.5, ISAPI) and it's only the forum site using MySQL that will get
this error every couple of days.

I've read on other posts that it could be related to pconnect() or that
PHP gets unloaded but I don't know what that is supposed to mean.

Seems to be an issue when you combine IIS,PHP,MySQL on Windows. I've
never seen a final soultion for this.


Previous Comments:


[2004-06-21 08:03:09] sekmun at mypostbox dot com

upgraded from 4.3.6 to 4.3.7,

platform: win2k server/IIS (ISAPI)/Mysql

Seeing this PHP Access Violation error now intermittently. Didn't use
to get his problem. Might go back to 4.3.6 for the time being.



[2004-06-20 09:21:59] webmaster at yes-hosting dot com

I get the same problem.
I'm using win2k3/iis6
upgrade from php 4.3.4 to 4.3.7
error show at the end of php pages.



[2004-06-16 15:44:51] jmertic at ncscredit dot com

We have the same problem with our IIS 5/Win2k/MySQL. This is a 4.3.7
regression that needs to be addressed. I'm moving us back to 4.3.6.



[2004-06-14 11:02:08] orangeasklessapple at cherrygmx dot net

We just upgraded from php 4.3.4 to 4.3.7 and are having the same
problem under Windows 2000, IIS 5.0, MS SQL Server 2000.

A reset of the iis solves the problem just temporarliy.



[2004-06-11 09:10:59] [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. 

Thank you for your interest in PHP.

.



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

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


#28780 [Opn]: Web Server crashes connecting upon OCILogon

2004-06-21 Thread reinhard dot e dot voglmaier at gsk dot com
 ID:   28780
 User updated by:  reinhard dot e dot voglmaier at gsk dot com
 Reported By:  reinhard dot e dot voglmaier at gsk dot com
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Sun Solaris 9
 PHP Version:  4.3.7
 Assigned To:  tony2001
 New Comment:

Finally I have the trace: 
Starting program: /opt/apache/itweb/sbin/httpd_php/httpd 
-X 
 
Program received signal SIGSEGV, Segmentation fault. 
0xff0b347c in strlen () from /usr/lib/libc.so.1 
(gdb) bt 
#0  0xff0b347c in strlen () from /usr/lib/libc.so.1 
#1  0xfe79f8f8 in snauca_check_adapter () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#2  0xfe79d8f0 in nau_viat () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#3  0xfe7944f4 in nau_gettab () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#4  0xfe7922b8 in nau_ini () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#5  0xfe783f8c in nainit () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#6  0xfe734c3c in nsnainit () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#7  0xfe7271dc in nsopen () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#8  0xfe70d188 in nscall1 () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#9  0xfe70c7a8 in nscall () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#10 0xfe7b8df0 in niotns () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#11 0xfe7b2954 in nigcall () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#12 0xfe744de0 in osncon () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#13 0xfe55f190 in kpuadef () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#14 0xfe55108c in upiini () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#15 0xfe55108c in upiini () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
Previous frame identical to this frame (corrupt stack?) 
(gdb)


Previous Comments:


[2004-06-16 11:30:35] reinhard dot e dot voglmaier at gsk dot com

Maybe there are problems with the 64 bit Environment ? Is PHP + Oracle
64bit safe ? ( Pointer casted into int or unsigned int ? conversions
between int ? adress arithmetic used ? )  I am using 64bit Oracle.



[2004-06-15 12:42:06] reinhard dot e dot voglmaier at gsk dot com

I'm using Oracle 9.2.0 same product as I am connecting to. 
Oracle is 64 bit ( -m64 switch for gcc ). I started it 
under truss, here the last few lines: 
 
 
lstat(/opt/apache/itweb/htdocs, 0x7FFF80F0) = 0 
getuid()= 60001 
[60001] 
door_info(4, 0x7FFF5D68)= 0 
door_call(4, 0x7FFF5D38)= 0 
sigprocmask(SIG_SETMASK, 0x7C91D500, 
0x7FFF7C90) = 0 
sigprocmask(SIG_SETMASK, 0x7FFF7C7C, 0x) = 
0 
sigaction(SIGINT, 0x7FFF7AF0, 0x7FFF7CE8) 
= 0 
sigprocmask(SIG_SETMASK, 0x7C91D500, 
0x7FFF7C90) = 0 
sigprocmask(SIG_SETMASK, 0x7FFF7C7C, 0x) = 
0 
brk(0x1004C6210)= 0 
brk(0x1004CA210)= 0 
brk(0x1004CA210)= 0 
brk(0x1004CE210)= 0 
brk(0x1004CE210)= 0 
brk(0x1004D2210)= 0 
door_info(4, 0x7FFF4538)= 0 
door_call(4, 0x7FFF4508)= 0 
brk(0x1004D2210)= 0 
brk(0x1004D6210)= 0 
so_socket(PF_INET, SOCK_STREAM, IPPROTO_IP, , 1) = 7 
connect(7, 0x7FFF67F4, 16, 1)   = 0 
getsockname(7, 0x7FFF67F4, 0x7FFF6804, 1) 
= 0 
setsockopt(7, tcp, TCP_NODELAY, 0x7FFF6964, 4, 1) 
= 0 
fcntl(7, F_SETFD, 0x0001)   = 0 
brk(0x1004D6210)= 0 
brk(0x1004DA210)= 0 
brk(0x1004DA210)= 0 
brk(0x1004DE210)= 0 
brk(0x1004DE210)= 0 
brk(0x1004FE210)= 0 
Incurred fault #6, FLTBOUNDS  %pc = 0x7D63C1AC 
  siginfo: SIGSEGV SEGV_MAPERR addr=0x 
Received signal #11, SIGSEGV [default] 
  siginfo: SIGSEGV SEGV_MAPERR addr=0x



[2004-06-15 12:31:26] [EMAIL PROTECTED]

Seems to be a Solaris-specific GDB bug.
Have a look at these messages: 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00818.html
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00452.html

Btw, what Oracle client version do you use and does it correspond to
Oracle server version?



[2004-06-15 11:59:21] reinhard dot e dot 

#28848 [Opn-Bgs]: PHP 5 RC3 probs with mysql

2004-06-21 Thread edink
 ID:   28848
 Updated by:   [EMAIL PROTECTED]
 Reported By:  PatrickLehmann at freenet dot de
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: Microsoft Windows Server 2003
 PHP Version:  5.0.0RC3
 New Comment:

Mysql extension works fine. You probably forgot to copy libmysql.dll to
a directory in your path (such as c:\windows\system32). Another option
is to add your php folder to the path.


Previous Comments:


[2004-06-21 00:03:58] PatrickLehmann at freenet dot de

²uncledave

where have you installed PHP?
PHP 4.3.7 doesn't run with Apache2, too.

my load commands:
LoadModule php4_module C:/Programme/PHP4/sapi/php4apache2.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

Apache error: module couldn't be loaded, because file doesn't exist
*lol* it's still there!!!

I remembered that PHP 4.0.4 has a bug with it's install-dir, PHP had to
be installed to C:\php\ otherwise it doesn't run

is this bug still present?



[2004-06-20 23:42:33] PatrickLehmann at freenet dot de

include_path is set to this:
include_path = .;C:\Programme\PHP5\ext

PHP was unpacked to C:\Programme\PHP5

and under extensions this:
extension=php_mysql.dll

I think this is done like the description in the install manual



[2004-06-20 12:17:41] uncledave at xmail dot net

I've experienced the same problem. I'm running XP with Apache 2.04.3 
PHP 5.0 RC3.

I cannot run Apache/PHP with the mysql.dll extension. I get PHP
Startup: Unable to load dyanmic library 'c:\PHP\ext\php_mysql.dll - The
specified module could not be found.'

I have reset to run 4.x and it runs perfectly.. back to 5.0 and the
same error.



[2004-06-20 00:22:03] PatrickLehmann at freenet dot de

Description:

Hi,

my system:
Microsoft Windows Server 2003, Enterprise Edition
Apache 2.0.49
PHP 5.0 RC 3
MySQL 4.0.18

apache with php is running successfully if mysql extension ist
disabled.

when i enable the extension
php_mysql.dll
apache coundn't be started
- no error message
- port 80 is used for apache (a 2. start stops with an error that port
80 is used yet)
- apache is loaded into the RAM

libmysql.dll was copyed to C:\Windows

php runs perfectliy if mysql is disabled, but with this extension ames
no reaction


ok, than the 2. problem
IIS 6.0 doesn't work with the ISAPI extension of php 5
setting:
ISAPI Filter is set to
C:\Programme\PHP5\php5isapi.dll
Filter name: PHP 5 RC 3

the error message is an 404 error in the browser
(index.php with phpinfo command)








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


#28868 [NEW]: Thread safty issue with stream_wrapper_register?

2004-06-21 Thread cleong at nflc dot org
From: cleong at nflc dot org
Operating system: Windows 2000
PHP version:  4.3.7
PHP Bug Type: Filesystem function related
Bug description:  Thread safty issue with stream_wrapper_register?

Description:

On Windows 2000, with PHP running as an Apache module,
stream_wrapper_register() would fail when there are concurent scripts
using that function. It would either fail without an error message or
causes the Apache process to crash. When there's just one script running
the function works fine. 

To reproduce this bug, open a couple browser windows and go to the
reproduce code in each. 

I can get around the bug by generating a random class name and protocol
name everytime (using eval for the class definition).

Reproduce code:
---
?

// example class taken from manual

class VariableStream {
   var $position;
   var $varname;
   
   function stream_open($path, $mode, $options, $opened_path) 
   {
   $url = parse_url($path);
   $this-varname = $url[host];
   $this-position = 0;
   
   return true;
   }

   function stream_read($count) 
   {
   $ret = substr($GLOBALS[$this-varname], $this-position, $count);
   $this-position += strlen($ret);
   return $ret;
   }

   function stream_write($data) 
   {
   $left = substr($GLOBALS[$this-varname], 0, $this-position);
   $right = substr($GLOBALS[$this-varname], $this-position +
strlen($data));
   $GLOBALS[$this-varname] = $left . $data . $right;
   $this-position += strlen($data);
   return strlen($data);
   }

   function stream_tell() 
   {
   return $this-position;
   }

   function stream_eof() 
   {
   return $this-position = strlen($GLOBALS[$this-varname]);
   }

   function stream_seek($offset, $whence) 
   {
   switch ($whence) {
   case SEEK_SET:
   if ($offset  strlen($GLOBALS[$this-varname])  $offset
= 0) {
 $this-position = $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_CUR:
   if ($offset = 0) {
 $this-position += $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_END:
   if (strlen($GLOBALS[$this-varname]) + $offset = 0) {
 $this-position = strlen($GLOBALS[$this-varname]) +
$offset;
 return true;
   } else {
 return false;
   }
   break;
   
   default:
   return false;
   }
   }
}

stream_wrapper_register(var, VariableStream)
   or die(Failed to register protocol);

$myvar = ;
   
$fp = fopen(var://myvar, r+);

fwrite($fp, line1\n);
fwrite($fp, line2\n);
fwrite($fp, line3\n);

rewind($fp);
while (!feof($fp)) {
   echo fgets($fp);
}

session_write_close();  // in case auto-session is on
for($i = 0; $i  30; $i++) {
 // make the script run for 30 seconds
 sleep(1);
}

fclose($fp);
var_dump($myvar);

?

Expected result:

Same result in each window.

Actual result:
--
While the first script is still running, the second script would say
Failed to register protocol. If you refresh the second window, sometimes
it works, sometimes it causes a general protection error. 

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



#28869 [NEW]: possible wrong behavior of fgetcsv (?)

2004-06-21 Thread laph at gmx dot net
From: laph at gmx dot net
Operating system: All
PHP version:  4.3.6
PHP Bug Type: Filesystem function related
Bug description:  possible wrong behavior of fgetcsv (?)

Description:

Assume a file with 1 line of text (toImport.csv) and a [newline] after the
last char in that line.
The code below will echo 2 (Lines) using either fgets or fgetcsv.
While this is right for fgets, it's wrong for fgetcsv (I think), because
in CSV-Files the [newline] (logically) terminates a row, it doesn't start
a new one - at least if you think of a CSV-File as a Recordset from a
SQL-Statement (If you read the last line of a SQL-Result, move the
Row-Pointer to the next row and try to read it, you'll get false/EOF and
not a row with 0 elements).
If you return the Array $data in each iteration you get a array with
(int) 0 elements as last row, what makes using a loop until EOF
impossible, because you (additionally) have to check the number of
elements returned in $data.

It's quite anoying, that fgetcsv makes difference if a csv-file is
terminated by a newline or not.

Reproduce code:
---
$fh = fopen(dirname(__FILE__)./toImport.csv,r);

$row = 0;
while (!feof($fh)) {
$data = fgetcsv($fh,1000,;);
// $data = fgets($fh,1000);
$row++;
}
echo($row);

Expected result:

fgetcsv should echo 1, while fgets should echo 2


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


#28435 [Opn-Csd]: array_count_values() problem

2004-06-21 Thread ofirin at yahoo dot com
 ID:   28435
 User updated by:  ofirin at yahoo dot com
 Reported By:  ofirin at yahoo dot com
-Status:   Open
+Status:   Closed
 Bug Type: Arrays related
 Operating System: Any
 PHP Version:  4CVS-2004-05-18 (stable)
 New Comment:

Ok, I think you're right, we all should be looking forward working with
php5, rather than trying to fix old bugs in php4.


Previous Comments:


[2004-06-21 11:31:59] vladb at pseudo-infinity dot ro

The php5 result seems more accurate than the php4 one. You got strings
in the $books array, no?

Changing this in php4 may break some code out there so maybe it'd be
best to just mention it as a 4-5 inconsistency.



[2004-06-18 14:24:41] programmer at bardware dot de

I noticed this problem with PHP5 RC2 on a Win2k box as an
Apache2-module. I have some HMTL-Checkboxes and on the server side want
to check the selected values. My checkboxes are equally named
name=choice2[] what lets PHP generate an array
$_POST[choice2][0]
$_POST[choice2][1]
$_POST[choice2][2] etc. according to the selected values.
Each checkbox has it's unique value attribute.

To test for a certain value I reverse this array with
$arrTmp=array_count_values($_POST[choice2]);

I now want to access $arrTmp[1] to check if the checkbox with the
attribute value=1 was selected. The respective value was - if
selected - 1, otherwise it's not existent in the
$_POST[choice2]-Array. This did not work. $arrTmp[1] didn't work
either. It was no way possible to access a member of the array.

The other poster mentioned the indexes are generated as strings, I want
to point they cannot be accessed at all.

It worked best on PHP 4.3.6

Best,
Bernhard



[2004-05-18 19:04:43] ofirin at yahoo dot com

Description:

I don't know if this is a php5 or php4 bug, but I'm sure something's
wrong here.
Whenever  in php5 I do an array_count_values() on an array that
contains numeric values as strings the result array uses string keys
instead of the numeric values as indexes. This doesn't happen in php4.
I don't know what behaivor is correct.
I'm using the latest cvs versions of both php4 and php5 btw.

Reproduce code:
---
?php
$books = Array('10', '3', '6', '10');
$quantities = array_count_values($books);
var_dump($books);
var_dump($quantities);
?

Expected result:

This is what happens in php4:

array(4) {
  [0]=
  string(2) 10
  [1]=
  string(1) 3
  [2]=
  string(1) 6
  [3]=
  string(2) 10
}
array(3) {
  [10]=
  int(2)
  [3]=
  int(1)
  [6]=
  int(1)
}

Actual result:
--
This is what happens if php5:

array(4) {
  [0]=
  string(2) 10
  [1]=
  string(1) 3
  [2]=
  string(1) 6
  [3]=
  string(2) 10
}
array(3) {
  [10]=
  int(2)
  [3]=
  int(1)
  [6]=
  int(1)
}





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


#28780 [Opn-Fbk]: Web Server crashes connecting upon OCILogon

2004-06-21 Thread tony2001
 ID:   28780
 Updated by:   [EMAIL PROTECTED]
 Reported By:  reinhard dot e dot voglmaier at gsk dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Sun Solaris 9
 PHP Version:  4.3.7
 Assigned To:  tony2001
 New Comment:

The backtrace shows, that the bug has nothing to do with PHP, but most
likely is a Oracle Client problem.
Could you please search Oracle bug database ?


Previous Comments:


[2004-06-21 14:30:39] reinhard dot e dot voglmaier at gsk dot com

Finally I have the trace: 
Starting program: /opt/apache/itweb/sbin/httpd_php/httpd 
-X 
 
Program received signal SIGSEGV, Segmentation fault. 
0xff0b347c in strlen () from /usr/lib/libc.so.1 
(gdb) bt 
#0  0xff0b347c in strlen () from /usr/lib/libc.so.1 
#1  0xfe79f8f8 in snauca_check_adapter () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#2  0xfe79d8f0 in nau_viat () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#3  0xfe7944f4 in nau_gettab () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#4  0xfe7922b8 in nau_ini () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#5  0xfe783f8c in nainit () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#6  0xfe734c3c in nsnainit () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#7  0xfe7271dc in nsopen () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#8  0xfe70d188 in nscall1 () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#9  0xfe70c7a8 in nscall () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#10 0xfe7b8df0 in niotns () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#11 0xfe7b2954 in nigcall () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#12 0xfe744de0 in osncon () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#13 0xfe55f190 in kpuadef () from /opt/oracl/
product/9.2.0/lib32/libclntsh.so.9.0 
#14 0xfe55108c in upiini () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
#15 0xfe55108c in upiini () from /opt/oracl/product/9.2.0/
lib32/libclntsh.so.9.0 
Previous frame identical to this frame (corrupt stack?) 
(gdb)



[2004-06-16 11:30:35] reinhard dot e dot voglmaier at gsk dot com

Maybe there are problems with the 64 bit Environment ? Is PHP + Oracle
64bit safe ? ( Pointer casted into int or unsigned int ? conversions
between int ? adress arithmetic used ? )  I am using 64bit Oracle.



[2004-06-15 12:42:06] reinhard dot e dot voglmaier at gsk dot com

I'm using Oracle 9.2.0 same product as I am connecting to. 
Oracle is 64 bit ( -m64 switch for gcc ). I started it 
under truss, here the last few lines: 
 
 
lstat(/opt/apache/itweb/htdocs, 0x7FFF80F0) = 0 
getuid()= 60001 
[60001] 
door_info(4, 0x7FFF5D68)= 0 
door_call(4, 0x7FFF5D38)= 0 
sigprocmask(SIG_SETMASK, 0x7C91D500, 
0x7FFF7C90) = 0 
sigprocmask(SIG_SETMASK, 0x7FFF7C7C, 0x) = 
0 
sigaction(SIGINT, 0x7FFF7AF0, 0x7FFF7CE8) 
= 0 
sigprocmask(SIG_SETMASK, 0x7C91D500, 
0x7FFF7C90) = 0 
sigprocmask(SIG_SETMASK, 0x7FFF7C7C, 0x) = 
0 
brk(0x1004C6210)= 0 
brk(0x1004CA210)= 0 
brk(0x1004CA210)= 0 
brk(0x1004CE210)= 0 
brk(0x1004CE210)= 0 
brk(0x1004D2210)= 0 
door_info(4, 0x7FFF4538)= 0 
door_call(4, 0x7FFF4508)= 0 
brk(0x1004D2210)= 0 
brk(0x1004D6210)= 0 
so_socket(PF_INET, SOCK_STREAM, IPPROTO_IP, , 1) = 7 
connect(7, 0x7FFF67F4, 16, 1)   = 0 
getsockname(7, 0x7FFF67F4, 0x7FFF6804, 1) 
= 0 
setsockopt(7, tcp, TCP_NODELAY, 0x7FFF6964, 4, 1) 
= 0 
fcntl(7, F_SETFD, 0x0001)   = 0 
brk(0x1004D6210)= 0 
brk(0x1004DA210)= 0 
brk(0x1004DA210)= 0 
brk(0x1004DE210)= 0 
brk(0x1004DE210)= 0 
brk(0x1004FE210)= 0 
Incurred fault #6, FLTBOUNDS  %pc = 0x7D63C1AC 
  siginfo: SIGSEGV SEGV_MAPERR addr=0x 
Received signal #11, SIGSEGV [default] 
  siginfo: SIGSEGV SEGV_MAPERR addr=0x



[2004-06-15 12:31:26] [EMAIL PROTECTED]

Seems to be a Solaris-specific GDB bug.
Have a look at these messages: 
http://www.mail-archive.com/[EMAIL 

#28868 [Opn-Ana]: Thread safty issue with stream_wrapper_register?

2004-06-21 Thread pollita
 ID:   28868
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cleong at nflc dot org
-Status:   Open
+Status:   Analyzed
 Bug Type: Filesystem function related
 Operating System: Windows 2000
 PHP Version:  4.3.7
 New Comment:

There is absolutely a thread safety issue here.  I assume you're
running Apache2?

For the moment, I'd suggest Apache1 or Apache2-pre-fork.  In the mean
time we'll be working on fixing this asap.


Previous Comments:


[2004-06-21 16:53:43] cleong at nflc dot org

Description:

On Windows 2000, with PHP running as an Apache module,
stream_wrapper_register() would fail when there are concurent scripts
using that function. It would either fail without an error message or
causes the Apache process to crash. When there's just one script
running the function works fine. 

To reproduce this bug, open a couple browser windows and go to the
reproduce code in each. 

I can get around the bug by generating a random class name and protocol
name everytime (using eval for the class definition).

Reproduce code:
---
?

// example class taken from manual

class VariableStream {
   var $position;
   var $varname;
   
   function stream_open($path, $mode, $options, $opened_path) 
   {
   $url = parse_url($path);
   $this-varname = $url[host];
   $this-position = 0;
   
   return true;
   }

   function stream_read($count) 
   {
   $ret = substr($GLOBALS[$this-varname], $this-position,
$count);
   $this-position += strlen($ret);
   return $ret;
   }

   function stream_write($data) 
   {
   $left = substr($GLOBALS[$this-varname], 0, $this-position);
   $right = substr($GLOBALS[$this-varname], $this-position +
strlen($data));
   $GLOBALS[$this-varname] = $left . $data . $right;
   $this-position += strlen($data);
   return strlen($data);
   }

   function stream_tell() 
   {
   return $this-position;
   }

   function stream_eof() 
   {
   return $this-position = strlen($GLOBALS[$this-varname]);
   }

   function stream_seek($offset, $whence) 
   {
   switch ($whence) {
   case SEEK_SET:
   if ($offset  strlen($GLOBALS[$this-varname]) 
$offset = 0) {
 $this-position = $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_CUR:
   if ($offset = 0) {
 $this-position += $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_END:
   if (strlen($GLOBALS[$this-varname]) + $offset = 0) {
 $this-position = strlen($GLOBALS[$this-varname])
+ $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   default:
   return false;
   }
   }
}

stream_wrapper_register(var, VariableStream)
   or die(Failed to register protocol);

$myvar = ;
   
$fp = fopen(var://myvar, r+);

fwrite($fp, line1\n);
fwrite($fp, line2\n);
fwrite($fp, line3\n);

rewind($fp);
while (!feof($fp)) {
   echo fgets($fp);
}

session_write_close();  // in case auto-session is on
for($i = 0; $i  30; $i++) {
 // make the script run for 30 seconds
 sleep(1);
}

fclose($fp);
var_dump($myvar);

?

Expected result:

Same result in each window.

Actual result:
--
While the first script is still running, the second script would say
Failed to register protocol. If you refresh the second window,
sometimes it works, sometimes it causes a general protection error. 





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


#28871 [NEW]: mysql_afftected_rows returns 0 even when updates record

2004-06-21 Thread nav at nc dot ru
From: nav at nc dot ru
Operating system: Windows XP
PHP version:  4.3.6
PHP Bug Type: MySQL related
Bug description:  mysql_afftected_rows returns 0 even when updates record

Description:

I've got the problem similar to already reported here.

mysql_afftected_rows sometimes returns 0, sometimes 1. Although actually
it does UPDATES the record. This query changes user login (password,
e-mail) in the table user (see below. If it matters, MySQL is
3.23.53-max, Apache is 1.3.27):

Reproduce code:
---
mysql_query(UPDATE user SET .$setRequest. WHERE login =
'$userCurrentLogin' AND password = md5('$userCurrentPass'));
/* $setRequest is the string compiled conditionally, but I've just printed
whole query string and it looked correct:

UPDATE user SET login = 'aaa' WHERE login = 'bbb' AND password =
md5('ccc') */

$num = mysql_affected_rows();
if ($num == 0) $errorMsg = Could not complete your request. Check the
data;
else if ($num == -1) $errorMsg = Database error. Try again later;
else $changeMsg = Your data has been successfully changed;

Expected result:

Of course, I expect correct work of mysql_affected_rows :)

Actual result:
--
BUT the result ($num) is sometimes 0, sometimes 1, even if the record is
actually updated.

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


#27517 [Com]: SimpleXML dont get CDATA

2004-06-21 Thread schmich at uiuc dot edu
 ID:   27517
 Comment by:   schmich at uiuc dot edu
 Reported By:  cyppe at telia dot com
 Status:   No Feedback
 Bug Type: XML related
 Operating System: linux
 PHP Version:  5.0.0b4 (beta4)
 New Comment:

Same behavior confirmed with PHP5 RC3 on linux


Previous Comments:


[2004-03-31 19:51:12] jaba at inbox dot lv

Just wanted to add that this is PHP5 RC1 running on Windows XP



[2004-03-31 19:49:57] jaba at inbox dot lv

SimpleXML does support CDATA, but it fails to show nodes consisting of
CDATA when you call print_r() or var_dump().

It only says [tag_name] = simplexml_element Object

When you call $xmlobject-[tag_name] then you get what you expect, but
with print_r() - no!



[2004-03-13 05:01:41] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2004-03-07 09:41:42] [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.




[2004-03-07 09:30:07] cyppe at telia dot com

Description:

SimpleXML seems to work all good, except for getting a CDATA node, it
returns nothing.

Really nothing more to say.






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


#28872 [NEW]: accessing a __get (getter) method from object value fails

2004-06-21 Thread nick dot rich at textmarketer dot co dot uk
From: nick dot rich at textmarketer dot co dot uk
Operating system: Linux
PHP version:  5.0.0RC3
PHP Bug Type: Class/Object related
Bug description:  accessing a __get (getter) method from object value fails

Description:

Trying to access a propery (via the get method) using a 
value from another object as the method name fails.


See code::
if the line /// fails
is 
replaced with

$localVar = $config-methodnames[1];
$test-$localVar

It works correctly

Reproduce code:
---
class config
{
public $methodnames = array(dog,cat);
}

class testClass
{
function Cat(){
echo cat;
}

function Dog(){
echo dog;
}

function __get($method){
eval(\$this-\$method(););
}
}

class main
{
function __construct(){
$config = new config();
$test = new testClass();
$test-$config-methodnames[1]; /// fails
}
}

$test = new main();

Expected result:

cat

Actual result:
--
Fatal error: Call to undefined method testClass::
Object() in /Users/nicholasrich/Sites/bits/
testclass.php(18) : eval()'d code on line 1

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


#28868 [Ana-Asn]: Thread safty issue with stream_wrapper_register?

2004-06-21 Thread pollita
 ID:   28868
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cleong at nflc dot org
-Status:   Analyzed
+Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: Windows 2000
 PHP Version:  4.3.7
-Assigned To:  
+Assigned To:  pollita


Previous Comments:


[2004-06-21 18:34:55] [EMAIL PROTECTED]

There is absolutely a thread safety issue here.  I assume you're
running Apache2?

For the moment, I'd suggest Apache1 or Apache2-pre-fork.  In the mean
time we'll be working on fixing this asap.



[2004-06-21 16:53:43] cleong at nflc dot org

Description:

On Windows 2000, with PHP running as an Apache module,
stream_wrapper_register() would fail when there are concurent scripts
using that function. It would either fail without an error message or
causes the Apache process to crash. When there's just one script
running the function works fine. 

To reproduce this bug, open a couple browser windows and go to the
reproduce code in each. 

I can get around the bug by generating a random class name and protocol
name everytime (using eval for the class definition).

Reproduce code:
---
?

// example class taken from manual

class VariableStream {
   var $position;
   var $varname;
   
   function stream_open($path, $mode, $options, $opened_path) 
   {
   $url = parse_url($path);
   $this-varname = $url[host];
   $this-position = 0;
   
   return true;
   }

   function stream_read($count) 
   {
   $ret = substr($GLOBALS[$this-varname], $this-position,
$count);
   $this-position += strlen($ret);
   return $ret;
   }

   function stream_write($data) 
   {
   $left = substr($GLOBALS[$this-varname], 0, $this-position);
   $right = substr($GLOBALS[$this-varname], $this-position +
strlen($data));
   $GLOBALS[$this-varname] = $left . $data . $right;
   $this-position += strlen($data);
   return strlen($data);
   }

   function stream_tell() 
   {
   return $this-position;
   }

   function stream_eof() 
   {
   return $this-position = strlen($GLOBALS[$this-varname]);
   }

   function stream_seek($offset, $whence) 
   {
   switch ($whence) {
   case SEEK_SET:
   if ($offset  strlen($GLOBALS[$this-varname]) 
$offset = 0) {
 $this-position = $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_CUR:
   if ($offset = 0) {
 $this-position += $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_END:
   if (strlen($GLOBALS[$this-varname]) + $offset = 0) {
 $this-position = strlen($GLOBALS[$this-varname])
+ $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   default:
   return false;
   }
   }
}

stream_wrapper_register(var, VariableStream)
   or die(Failed to register protocol);

$myvar = ;
   
$fp = fopen(var://myvar, r+);

fwrite($fp, line1\n);
fwrite($fp, line2\n);
fwrite($fp, line3\n);

rewind($fp);
while (!feof($fp)) {
   echo fgets($fp);
}

session_write_close();  // in case auto-session is on
for($i = 0; $i  30; $i++) {
 // make the script run for 30 seconds
 sleep(1);
}

fclose($fp);
var_dump($myvar);

?

Expected result:

Same result in each window.

Actual result:
--
While the first script is still running, the second script would say
Failed to register protocol. If you refresh the second window,
sometimes it works, sometimes it causes a general protection error. 





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


#28856 [Opn]: session_start() causes apache process to hang

2004-06-21 Thread rasmus
 ID:   28856
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pubnelle at megaphone dot ch
 Status:   Open
 Bug Type: Session related
 Operating System: Mac OS X server 10.3.4
 PHP Version:  4.3.6
 New Comment:

The suggestion there to use include/require was intended to mean a
local include/require not an external one.  In a typical Apache setup
any files accessible to one virtual host is going to be accessible to
another.  Not directly via http of course, but PHP's include uses the
filesystem so it would be something like:

  include '/var/www/example.com/file.php';

as opposed to:

  include 'http://example.com/file.php';

The former is an order of magnitude faster than the latter.


Previous Comments:


[2004-06-21 07:52:05] pubnelle at megaphone dot ch

That definitely makes sense ! There are plenty of times when you need
to include a file that is on the same server ! Here, it is to use a
Content Management System, which has more rights on the databases, and
which is not directly accessible by our clients. When it is not
localhost, it can simply be another virtual host, by the way. We use it
often.

In the virtual() doc : As of PHP 4.0.6, you can use virtual() on PHP
files. However, it is typically better to use include() or require() if
you need to include another PHP file.  
It is not precised if this is for http include or local include, that's
true.



[2004-06-20 23:03:09] [EMAIL PROTECTED]

Why are you using an http include to localhost?  That makes no sense. 
You have fast direct access to this file already.  Just include it
directly.  If you really need it to act like a completely separate
request (which you shouldn't) use a sub-request via virtual().



[2004-06-20 19:57:22] pubnelle at megaphone dot ch

Description:

session_start() causes apache process to hang when a call is made, via
http include, to another php script which stores the session files at
the same location. It create an http get error in the log files
eventually - I had a hard time to find the problem...
I upgraded the version of PHP from 4.3.1 built in OS X server to 4.3.6,
same problem. I upgraded Apache from 1.3.28 built in OS X server to
1.3.31, same problem.

We really need this, to link a shop to a content management system,
using the same session information to follow up the caddie stuff ... 

It helps to use the workaround of bug #22526, to close the session, but
is this really the only solution ? this is painfull ... 

Reproduce code:
---
?
session_start();
$urltoinclude=http://localhost/index.php;;
include($cmsurl/index.php? . session_name() . = . session_id());
?


Expected result:

The file included ;-) To reproduce it, you need to put this code in a
page that registers the sessions at the same location than the included
URL. 

Actual result:
--
White page hanging ... something appearing eventually (without the
include) after some time, exactly 2 minutes.






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


#28873 [NEW]: PHP Crashes. But not in 4.3.6.

2004-06-21 Thread sayez at fucam dot ac dot be
From: sayez at fucam dot ac dot be
Operating system: Windows 2003 Server
PHP version:  4.3.7
PHP Bug Type: *General Issues
Bug description:  PHP Crashes. But not in 4.3.6.

Description:

 Impossible to tell how to produce the bug for the moment. At the end of
the first page of the site : PHP Encountered error  and all the other
pages are inaccessible. Reset IIS is the only way to solve. We use MSSQL,
GD, LDAP Library and ISAPI module.


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


#28856 [Opn]: session_start() causes apache process to hang

2004-06-21 Thread pubnelle at megaphone dot ch
 ID:   28856
 User updated by:  pubnelle at megaphone dot ch
 Reported By:  pubnelle at megaphone dot ch
 Status:   Open
 Bug Type: Session related
 Operating System: Mac OS X server 10.3.4
 PHP Version:  4.3.6
 New Comment:

Yes, of course, you are right. 
But to start with, we use the maximum of what php offers us to secure
our scripts, so that files that are on our server but not owned by the
same user that the one of the current script cannot be accessed, and
files that are not in the folder of the virtual host cannot be accessed
also. Then, when you need a functionality that is available on this
server, but without giving out the configuration of this functionality
(passwords to access databases, for example), the way to do it is to
access it through http. 
Evey time that this is possible we avoid the include of http url, of
course. But we are extensively using a Content Management System,
developed in php, that works great, and that requires those includes to
have all in one the correct behavior and the design of the client host.
Those includes, once again, are also a protection to scripts that have
more rights on databases than we want to give to the virtual host that
is including it.

By the way, what you do of it is not a problem to me. But the precise
information that this problem, that has already be one for other users,
occurs exactly because of this session point and precisely when we
access it, same session id, twice on the same server, saved in the same
session files, but once through an http include, seemed of interest.
Sure enough, this could be a security feature, and not a bug - but only
if you are aware of it. ;-)


Previous Comments:


[2004-06-21 20:15:51] [EMAIL PROTECTED]

The suggestion there to use include/require was intended to mean a
local include/require not an external one.  In a typical Apache setup
any files accessible to one virtual host is going to be accessible to
another.  Not directly via http of course, but PHP's include uses the
filesystem so it would be something like:

  include '/var/www/example.com/file.php';

as opposed to:

  include 'http://example.com/file.php';

The former is an order of magnitude faster than the latter.



[2004-06-21 07:52:05] pubnelle at megaphone dot ch

That definitely makes sense ! There are plenty of times when you need
to include a file that is on the same server ! Here, it is to use a
Content Management System, which has more rights on the databases, and
which is not directly accessible by our clients. When it is not
localhost, it can simply be another virtual host, by the way. We use it
often.

In the virtual() doc : As of PHP 4.0.6, you can use virtual() on PHP
files. However, it is typically better to use include() or require() if
you need to include another PHP file.  
It is not precised if this is for http include or local include, that's
true.



[2004-06-20 23:03:09] [EMAIL PROTECTED]

Why are you using an http include to localhost?  That makes no sense. 
You have fast direct access to this file already.  Just include it
directly.  If you really need it to act like a completely separate
request (which you shouldn't) use a sub-request via virtual().



[2004-06-20 19:57:22] pubnelle at megaphone dot ch

Description:

session_start() causes apache process to hang when a call is made, via
http include, to another php script which stores the session files at
the same location. It create an http get error in the log files
eventually - I had a hard time to find the problem...
I upgraded the version of PHP from 4.3.1 built in OS X server to 4.3.6,
same problem. I upgraded Apache from 1.3.28 built in OS X server to
1.3.31, same problem.

We really need this, to link a shop to a content management system,
using the same session information to follow up the caddie stuff ... 

It helps to use the workaround of bug #22526, to close the session, but
is this really the only solution ? this is painfull ... 

Reproduce code:
---
?
session_start();
$urltoinclude=http://localhost/index.php;;
include($cmsurl/index.php? . session_name() . = . session_id());
?


Expected result:

The file included ;-) To reproduce it, you need to put this code in a
page that registers the sessions at the same location than the included
URL. 

Actual result:
--
White page hanging ... something appearing eventually (without the
include) after some time, exactly 2 minutes.






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


#28788 [Com]: Bogus form data when forms contains a single input field

2004-06-21 Thread imprestavel at gameguru dot com dot br
 ID:   28788
 Comment by:   imprestavel at gameguru dot com dot br
 Reported By:  lsjoberg at aland dot net
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Redhat Enterprise Linux
 PHP Version:  5.0.0RC3
 New Comment:

Yeah... this is odd.
I can't reproduce it here... Tryed running php as module and cgi.
Let's wait for a word from php team...


Previous Comments:


[2004-06-21 08:46:41] lsjoberg at aland dot net

I created a simple test page (http://www.vallnet.se/test.htm) which
posts forms to both a PHP script which executes print_r($_POST); and a
CGI script which prints its stdin.

When run on a webserver with PHP as a CGI everything executes as
expected. The CGI-script prints 'foo=5' and 'foo=5bar=5' and the
PHP-script '[foo] = 5' and '[foo] = 5'/'[bar] = 5'.

The CGI output from the Apache server is the same, but for the form
with a single element the PHP output is
Array
(
[foo] = 5foo=5
)

The PHP output for the 2-field form is however correct, hence it seems
to be some part of the apache/php interface that is failing...

The same browser(s) and exactly the same scripts were used during
testing.



[2004-06-19 11:56:19] lsjoberg at aland dot net

The original code was fully W3C compliant, the testcase below was
stripped down before submitted.

Browsers used was Mozilla and Opera under FreeBSD and Internet Explorer
in some Windows flavour.

It feels like a browser bug but since it occured when upgrading from
PHP4 to PHP5 without code changes it seems suspicious.

I will do some more testing during next week to see if I can isolate
the problem further.



[2004-06-18 20:33:52] imprestavel at gameguru dot com dot br

It looks more like a browser issue.
Have you tryed writing conformant html?

I tested with Mozilla/rv1.6 and IE/6.0 on Apache/2.0.49, PHP/5.0.0RC3
(register_globals=On and Off), under Windows2000 and didn't have that
problem (with the same no- html).

What browser are you using?



[2004-06-15 11:31:36] lsjoberg at aland dot net

Description:

When a HTML form contains a single input field (this could be plain
INPUT, HIDDEN, SELECT or just about any time) with an associated value
the value is not passed correctly to the receiving PHP script.

This only happends when the form contains exactly one field and when
PHP is run as an Apache2 module. (Could not reproduce with PHP running
as CGI under caudium).

Reproduce code:
---
test.htm:
htmlbody
form method=POST action=test.php
input name=id value=5
input type=submit
/form/body/html

test.php:
?
echo $id;
?

Expected result:

The expected result is that the php script should print a 5 and nothing
else. (We are using register_globals=On).

Actual result:
--
The output of the php-script is '5id=5' instead of '5'.

If a input type=hidden name=foo is added to the html form the correct
output of 5 is displayed.





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


#28872 [Opn]: accessing a __get (getter) method from object value fails

2004-06-21 Thread helly
 ID:   28872
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nick dot rich at textmarketer dot co dot uk
 Status:   Open
 Bug Type: Class/Object related
-Operating System: Linux
+Operating System: *
 PHP Version:  5.0.0RC3
 New Comment:

first of all __get() is supposed to return something.


Previous Comments:


[2004-06-21 19:35:32] nick dot rich at textmarketer dot co dot uk

Description:

Trying to access a propery (via the get method) using a 
value from another object as the method name fails.


See code::
if the line /// fails
is 
replaced with

$localVar = $config-methodnames[1];
$test-$localVar

It works correctly

Reproduce code:
---
class config
{
public $methodnames = array(dog,cat);
}

class testClass
{
function Cat(){
echo cat;
}

function Dog(){
echo dog;
}

function __get($method){
eval(\$this-\$method(););
}
}

class main
{
function __construct(){
$config = new config();
$test = new testClass();
$test-$config-methodnames[1]; /// fails
}
}

$test = new main();

Expected result:

cat

Actual result:
--
Fatal error: Call to undefined method testClass::
Object() in /Users/nicholasrich/Sites/bits/
testclass.php(18) : eval()'d code on line 1





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


#28874 [NEW]: Parse error in if (!empty($this-MyFunction())) echo 'Some one';

2004-06-21 Thread leadaxe at yandex dot ru
From: leadaxe at yandex dot ru
Operating system: Win XP
PHP version:  4.3.7
PHP Bug Type: Class/Object related
Bug description:  Parse error in if (!empty($this-MyFunction())) echo 'Some one';

Description:

sorry, that this is repeat.
It is as #18274, #8702 bags and we wont solution this problem.
We wont use this construction becouse this have common sense.
We wont use result as argument if it possible.

I create same object and use in metod this code, but it create error.

class MyClass {
function Some_One_Function() {
if (!empty($this-MyFunction())) echo 'Some one';
   //this error?
}
function MyFunction() { return true;}
}

But in all changes I very like PHP. Thank you for all.

Reproduce code:
---
class MyClass {
function Some_One_Function() {
if (!empty($this-MyFunction())) echo 'Some one';
   //this error?
}
function MyFunction() { return true;}
}


Expected result:



Parse error: parse error, unexpected '(', expecting ')' in ...
And I now use:

class MyClass {
function Some_One_Function() {
$em=empty($this-MyFunction();
if (!$em)) echo 'Some one';
}
function MyFunction() { return true;}
}

But it isn't logic!

Actual result:
--
I think, that if it worked, it would be very convenient.

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


#28868 [Asn]: Thread safty issue with stream_wrapper_register?

2004-06-21 Thread pollita
 ID:   28868
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cleong at nflc dot org
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: Windows 2000
 PHP Version:  4.3.7
 Assigned To:  pollita
 New Comment:

The userwrappers part of this bug has been fixed in CVS, please try the
next snapshot available from http://snaps.php.net . 

However this particular bug highlights a similar problem with userspace
filters, so I'm going to leave this bugreport open while I address that
side of things.  Fortunately since userspace filters are not available
in PHP4, this will only require fixing in this PHP5 branch.


Previous Comments:


[2004-06-21 18:34:55] [EMAIL PROTECTED]

There is absolutely a thread safety issue here.  I assume you're
running Apache2?

For the moment, I'd suggest Apache1 or Apache2-pre-fork.  In the mean
time we'll be working on fixing this asap.



[2004-06-21 16:53:43] cleong at nflc dot org

Description:

On Windows 2000, with PHP running as an Apache module,
stream_wrapper_register() would fail when there are concurent scripts
using that function. It would either fail without an error message or
causes the Apache process to crash. When there's just one script
running the function works fine. 

To reproduce this bug, open a couple browser windows and go to the
reproduce code in each. 

I can get around the bug by generating a random class name and protocol
name everytime (using eval for the class definition).

Reproduce code:
---
?

// example class taken from manual

class VariableStream {
   var $position;
   var $varname;
   
   function stream_open($path, $mode, $options, $opened_path) 
   {
   $url = parse_url($path);
   $this-varname = $url[host];
   $this-position = 0;
   
   return true;
   }

   function stream_read($count) 
   {
   $ret = substr($GLOBALS[$this-varname], $this-position,
$count);
   $this-position += strlen($ret);
   return $ret;
   }

   function stream_write($data) 
   {
   $left = substr($GLOBALS[$this-varname], 0, $this-position);
   $right = substr($GLOBALS[$this-varname], $this-position +
strlen($data));
   $GLOBALS[$this-varname] = $left . $data . $right;
   $this-position += strlen($data);
   return strlen($data);
   }

   function stream_tell() 
   {
   return $this-position;
   }

   function stream_eof() 
   {
   return $this-position = strlen($GLOBALS[$this-varname]);
   }

   function stream_seek($offset, $whence) 
   {
   switch ($whence) {
   case SEEK_SET:
   if ($offset  strlen($GLOBALS[$this-varname]) 
$offset = 0) {
 $this-position = $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_CUR:
   if ($offset = 0) {
 $this-position += $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   case SEEK_END:
   if (strlen($GLOBALS[$this-varname]) + $offset = 0) {
 $this-position = strlen($GLOBALS[$this-varname])
+ $offset;
 return true;
   } else {
 return false;
   }
   break;
   
   default:
   return false;
   }
   }
}

stream_wrapper_register(var, VariableStream)
   or die(Failed to register protocol);

$myvar = ;
   
$fp = fopen(var://myvar, r+);

fwrite($fp, line1\n);
fwrite($fp, line2\n);
fwrite($fp, line3\n);

rewind($fp);
while (!feof($fp)) {
   echo fgets($fp);
}

session_write_close();  // in case auto-session is on
for($i = 0; $i  30; $i++) {
 // make the script run for 30 seconds
 sleep(1);
}

fclose($fp);
var_dump($myvar);

?

Expected result:

Same result in each window.

Actual result:
--
While the first script is still running, the second script would say
Failed to register protocol. If you refresh the second window,
sometimes it works, sometimes it causes a general protection error. 





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


#10720 [Com]: Error Parsing Browscap.ini

2004-06-21 Thread michael83_2 at hotmail dot com
 ID:   10720
 Comment by:   michael83_2 at hotmail dot com
 Reported By:  istvan at siposs dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows 2000 Professional
 PHP Version:  4.0.5
 New Comment:

I get the same error and it's not fixed with the test.zip file. It
makes a empty browscap.ini file.


Previous Comments:


[2004-05-06 00:20:40] ivan dot roth at free dot fr

Maybe you will read this if you were patient for answers! :)

www.ivan-roth.com/test.zip

this could help you! Extract it in the same directory that browscap.ini
and run it. It will creat a browscap.ini.new file. delete browscap.ini
and rename browscap.ini.new into browscap.ini. This file will then be
compatible with PHP. It worked for me. I hope it'll work for you too.

But I hope that you are not blocked by this problem since 3 years! :)

Bye, Ivan.



[2002-04-06 22:22:20] katsuey at katsuey dot com

I also received a browscap/browscap.ini file in my download of PHP
Triad and I received the same error notice about line 8206 when
attempting to use Komodo (ActiveState.com).  I'm on WinXP



[2001-05-10 10:35:53] istvan at siposs dot com

That's odd. I downloaded the Win32 Zip version from the download page
here. I unzipped the package to c:\php, and under this tree a directory
called browscap was created with a browscap.ini file. In fact, I'm just
looking at the contents of the zip file php-4.0.5-Win32.zip and it has
a browscap\browscap.ini in it. This was the browscap.ini file that I
was referring to.

Istvan Siposs



[2001-05-10 05:11:39] [EMAIL PROTECTED]

There are no browscap.ini files bundled with PHP.

--Jani




[2001-05-07 21:08:51] istvan at siposs dot com

When I modify my php.ini file and point the browscap configuration
setting to the browscap.ini provided with PHP (under
c:\php\browscap\browscap.ini) I get the following error at the end of
every php page:

PHP: Error parsing c:\php\browscap\browscap.ini on line 8206 

If I use the default browscap.ini installed by Windows itself, the
error does not happen.




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


#28875 [NEW]: Wrong regex crashes server

2004-06-21 Thread amoljak at cox dot net
From: amoljak at cox dot net
Operating system: Windows 2000 Server
PHP version:  4.3.6
PHP Bug Type: Reproducible crash
Bug description:  Wrong regex crashes server

Description:

Note the extra ] in the regex. Try to load this page three times and it
will crash the third time.

Reproduce code:
---
?php

$filecontent = my name is amol;
$regex = /(^|[^a-zA-Z0-9-])([Nn]on[-s? []]]degrees?
[Ss]tudents?)([^a-zA-Z0-9-]|$)/es;

//preg_match_all($regex, $filecontent , $matches, PREG_OFFSET_CAPTURE);
preg_match($regex, $filecontent , $matches, PREG_OFFSET_CAPTURE);
print matches = $matchesbr;

?


Expected result:

This is from end user's code and I don't know what he expected. But he was
able to crash the server... thats bad.


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


#28263 [Bgs]: PNG image generation causes Segmentation Fault

2004-06-21 Thread Rich dot West at wesmo dot com
 ID:   28263
 User updated by:  Rich dot West at wesmo dot com
 Reported By:  Rich dot West at wesmo dot com
 Status:   Bogus
 Bug Type: GD related
 Operating System: Fedora Core 1
 PHP Version:  4.3.6
 Assigned To:  pajoye
 New Comment:

I tried the same process against 4.3.7 today, and the result was the
same. :(  No PNG image. :(

Yes, the libpng and libpng-devel packages are in sync with one another,
and yes, the system has the GD libraries installed, and, yes, PHP was
compiled it use the bundled GD library rather than the system-wide
one.

I can get this to work when building 4.3.3, but not with 4.3.5/6/7. 
I've moved libpdf out to a DSO rather than compiling it in, but it made
little difference. :(

I'm trying a complete package rebuild using the SRPM from the FC1
updates to see if that will help..


Previous Comments:


[2004-05-28 05:23:58] Rich dot West at wesmo dot com

I'll check the latest HEAD from CVS.

libpdf was compiled in with --with-libpdf.  Not sure why it would show
up in that particular traceback, though.

 Possible sources of problems:
 - You did not update the -devel package for libpng
 - --with-png-dir=DIR, DIR is not optionnal. Same for jpeg 
   or freetype
 - Be sure you do not have the GD lib installed in your
   system. Use only the bundled one.

From the first posting, it clearly shows --with-png-dir=/usr and
--with-gd.  I thought we got past that whole part.

I'll test it from the latest CVS HEAD branch as you originally
suggested on May 27th, but it is unlikely an installation issue since,
as the thread shows, it works with the same libpng libraries if
compiled with 4.3.3.  Anything later, such as 4.3.5 and 4.3.6, does not
work.



[2004-05-27 22:01:15] [EMAIL PROTECTED]

#1  0x00f1d850 in png_create_struct_2 () from /usr/lib/libpdf.so.1

I'm wondering what the libpdf does here...

Please check your install. The original script works with  php4 and
php5 HEAD and latest RC.

Possible sources of problems:
- You did not update the -devel package for libpng
- --with-png-dir=DIR, DIR is not optionnal. Same for jpeg 
  or freetype
- Be sure you do not have the GD lib installed in your
  system. Use only the bundled one.

I set it back to bogus. As it works on 3 different FC1 (and on FC2)
without problems. I feel your problem as an install issue only.

--Pierre



[2004-05-27 13:00:24] duh at dowebwedo dot com

I am experiencing the same bug since we upgraded from php 4.3.5 tot
4.3.6, 4.3.7 and the latest snapshot (php4-STABLE-200405270830). I have
backtraced the point to where php crashes and that is the
imagecreatefrompng function:

...
eval(sprintf(\$this-image =
imagecreatefrom%s(\$this-image_file);,$this-ext2func[$image_type]));
...

(note: i use eval in my class to dynamically open images; however
without the evaluation the function still kills my application)

However downgrading back to php-4.3.5 does not seem to solve the
problem.

We are running debian stable with all recent upgrades (libpng etc) with
apache (1.3.29) and php and compiled php with the following configure
command:

'./configure' '--with-pgsql' '--with-apxs=/www/bin/apxs' '--with-gd'
'--with-png-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-pear'
'--with-zlib-dir' '--enable-track-vars' '--enable-trans-sid'
'--disable-posix-threads' '--enable-shared' '--enable-exif'
'--enable-memory-limit' 

I hope this bug will be fixed soon.

Grtz, Jeroen



[2004-05-23 01:00:09] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-05-15 06:30:06] [EMAIL PROTECTED]

Change status when you give the feedback asked for.



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

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


#28854 [Com]: Class and Vars

2004-06-21 Thread rodolfo at rodsoft dot org
 ID:   28854
 Comment by:   rodolfo at rodsoft dot org
 Reported By:  toppi at kacke dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: linux/unix
 PHP Version:  5.0.0RC3
 New Comment:

The correct way to declare the member variables would be: 
var $a. This way, your example would be:
class a
{
   var $a;
   var $b;
   var $a;
}

which would give the correct fatal error:
Fatal error: Cannot redeclare a::$a in /var/www/htdocs/tst.php on line
5


Previous Comments:


[2004-06-20 16:27:55] toppi at kacke dot de

Description:

Class and Vars

Declare a var twice

Script breaks without error when including

Reproduce code:
---
class a {

var a;
var b;
var a;

function a(){
   //
}
}



Expected result:

any warning/error

Actual result:
--
script ends/break regular @ including-point





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


#28870 [Opn]: mysqli_bind_result doesn't work with cloned objects

2004-06-21 Thread rodolfo at rodsoft dot org
 ID:   28870
 User updated by:  rodolfo at rodsoft dot org
 Reported By:  rodolfo at rodsoft dot org
 Status:   Open
 Bug Type: *Database Functions
 Operating System: linux 2.6.7
 PHP Version:  5.0.0RC3
 New Comment:

A possible 'hack' that I've found is to bind the result to another
variable before cloning, and just after that restore the bind to the
original variable. This way the result is the expected one. It seems
that there's a problem of how mysqli_bind_result stores the variable
information while it is being cloned.


Previous Comments:


[2004-06-21 18:35:56] rodolfo at rodsoft dot org

Description:

If you pass to mysqli_bind_result a member variable of an object that
will be cloned and modified multiple times, each modification happens
in all cloned objects, as if they weren't cloned copies, but a single
copy of the object.

Reproduce code:
---
?
/* Say you have a database called 'test' with one table
   called 'test' that has one column called 'a' */
$db = new mysqli('localhost');
$db-select_db('test');
$stmt = $db-prepare('SELECT a FROM test');
$stmt-execute();
$result = new stdclass;
// Comment the next line to have the 'right' behaviour
$stmt-bind_result($result-a);
for($i = 0; $i10; ++$i)
{
$result-a = $i;
$results[] = clone $result;
}
foreach($results as $result)
echo $result-a,\n;
$db-close();
?

Expected result:

0
1
2
3
4
5
6
7
8
9

Actual result:
--
9
9
9
9
9
9
9
9
9
9





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


#28837 [Opn-Fbk]: White page

2004-06-21 Thread iliaa
 ID:   28837
 Updated by:   [EMAIL PROTECTED]
 Reported By:  flotosello at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  4.3.7
 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:


[2004-06-18 20:12:16] flotosello at hotmail dot com

Description:

Hello,
After sending a message on my forum, or just clicking on a link, my
visitors get a white page.
Some people told me this comes from the PHP 4.3.7.
Is that true ?
Regards

Expected result:

A white page






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


#28846 [Opn-Fbk]: Apache2 child killed by Illegal instruction (4)

2004-06-21 Thread iliaa
 ID:   28846
 Updated by:   [EMAIL PROTECTED]
 Reported By:  trond at sausjord dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Solaris 9
 PHP Version:  4.3.7
 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.


Please provide a shortest possible script that can be used 
to replicate the bug. 


Previous Comments:


[2004-06-19 20:13:01] trond at sausjord dot com

Description:

The apache child dies when I try to run Horde 2.2.5 on Apache 2.0.49. 
It happens both with prefork and worker.

From Apache error log:
[Sat Jun 19 18:21:35 2004] [notice] child pid 15489 exit signal Illegal
instruction (4)

Php build:
'./configure' '--prefix=/usr/local' '--with-mysql'
'--with-apxs2=/usr/local/apache/bin/apxs' '--with-openssl'
'--with-gettext' '--with-xml' '--with-imap=../imap-2004/'
'--enable-debug' 

Apache2 build:
CFLAGS=-mcpu=athlon-mp -march=athlon-mp -O3; export CFLAGS
./configure \
--prefix=/usr/local/apache \
--enable-ssl \
--enable-auth-dbm \
--enable-so \
--enable-nonportable-atomics=yes \
--with-mpm=worker 


Reproduce code:
---
See index.php in Horde-2.2.5 (www.horde.org)

Actual result:
--
GDB Backtrace:
(gdb) bt
#0  0xdd58f262 in zend_highlight (syntax_highlighter_ini=0x81c09a8,
tsrm_ls=0x81f6a58)
at /usr/local/php-4.3.7/Zend/zend_highlight.c:105
#1  0xddade18d in apr_pool_destroy () from
/usr/local/apache/lib/libapr-0.so.0
#2  0xddade248 in apr_pool_destroy () from
/usr/local/apache/lib/libapr-0.so.0
#3  0x080ca667 in main ()

Zend/zend_highlight.c:
105:zend_printf(code);






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


#28876 [Opn-Bgs]: MySQL Stored Procedure

2004-06-21 Thread pollita
 ID:   28876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mdf092 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: MS XP
 PHP Version:  4.3.7
 New Comment:

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

Thank you for your interest in PHP.

.


Previous Comments:


[2004-06-21 23:30:43] mdf092 at yahoo dot com

Description:

Why PHP Doesn't support MySQL Stored Procedure?






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


#28850 [Opn-Bgs]: Passing 0 as expire in setcookie is not the same as passing nothing

2004-06-21 Thread iliaa
 ID:   28850
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fromphpnet at blaksaga dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.3.7
 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

If you want the value to default to whatever PHP defaults 
to pass NULL. 


Previous Comments:


[2004-06-20 03:36:08] fromphpnet at blaksaga dot com

Description:

The overall jist of the problem is this.  I want to be able to set a
cookie and specify the domain and path WITHOUT setting an expiration
(making the cookie get killed when the browser is closed).

This is what the documentation for setcookie states:

 All the arguments except the name argument are optional. You may also
replace an argument with an empty string () in order to skip that
argument. Because the expire and secure arguments are integers, they
cannot be skipped with an empty string, use a zero (0) instead.

Unfortunately, using a 0 for expire has different results than when
passing nothing.  The cookie is not killed at session end when using 0
like it should be.

These statements should produce exactly the same results but do not:

setcookie ( blaksaga_cookies , enabled, 0 );
setcookie ( blaksaga_cookies2 , enabled );

This is either a bug in the setcookie function or in your
documentation.  None-the-less, there needs to be some way to skip the
expire argument while passing domain and path arguments.






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


#28875 [Opn-Fbk]: Wrong regex crashes server

2004-06-21 Thread iliaa
 ID:   28875
 Updated by:   [EMAIL PROTECTED]
 Reported By:  amoljak at cox dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows 2000 Server
 PHP Version:  4.3.6
 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:


[2004-06-21 22:58:29] amoljak at cox dot net

Description:

Note the extra ] in the regex. Try to load this page three times and it
will crash the third time.

Reproduce code:
---
?php

$filecontent = my name is amol;
$regex = /(^|[^a-zA-Z0-9-])([Nn]on[-s? []]]degrees?
[Ss]tudents?)([^a-zA-Z0-9-]|$)/es;

//preg_match_all($regex, $filecontent , $matches,
PREG_OFFSET_CAPTURE);
preg_match($regex, $filecontent , $matches, PREG_OFFSET_CAPTURE);
print matches = $matchesbr;

?


Expected result:

This is from end user's code and I don't know what he expected. But he
was able to crash the server... thats bad.






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


#28772 [Com]: No input file specified.

2004-06-21 Thread jaoshar at yahoo dot fr
 ID:   28772
 Comment by:   jaoshar at yahoo dot fr
 Reported By:  pieter at amazed dot nl
 Status:   Bogus
 Bug Type: iPlanet related
 Operating System: win nt 4
 PHP Version:  4.3.7
 New Comment:

No, it is a bug. I use PHP v4.3.5 and it works fine in cmd, but returns
the unremovable No input file specified with Apache (2.0.48 or
1.3.39). 
I've been months on this problem, read all the support/discussion
places, but it seems there's no way out of this problem.
My personal conclusion is that PHP guys intended to put such a bug in
the windows binary (maybe to support products like Sokkit). 
I stopped trying. When it will be solved, I'll be back to PHP ;o), but
learnd lots of things with Perl in the meanwhile !


Previous Comments:


[2004-06-14 15:45:43] [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. 

Thank you for your interest in PHP.

.



[2004-06-14 15:29:36] pieter at amazed dot nl

Description:

I recently installed the latest php 437 win 32 version

after associating  works fine test.php with cmd

want to work under netscape 3.6x enterprise
shellcgi

all i get is No input file specified


Reproduce code:
---
no input file specified






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


#28763 [Fbk-NoF]: Tidy extension causing aborted MySQL connections

2004-06-21 Thread php-bugs
 ID:   28763
 Updated by:   [EMAIL PROTECTED]
 Reported By:  johnfivealive at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Unknown/Other Function
 Operating System: Fedora Core 2
 PHP Version:  5.0.0RC3
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.


Previous Comments:


[2004-06-14 01:39:11] [EMAIL PROTECTED]

Check you mysql settings:
http://dev.mysql.com/doc/mysql/en/Communication_errors.html



[2004-06-13 18:02:35] johnfivealive at hotmail dot com

Description:

Whenever I execute a MySQL query I call my escapeString function to
escape strings properly before inserting them into the database. When I
call the tidy_repair_string function from my escapeString function, I
start seeing the following error in the MySQL error log:

Aborted connection 199 to db: 'logik' user: 'logik' host: `localhost'
(Got an error reading communication packets)

This error only seems to occur when I'm attempting to execute a lot of
queries in succession, for example importing a large XML file into my
database.

I think there is some bug between PHP and the Tidy extension. Perhaps
Tidy is taking too long to return or their are some thread
synchronization issues which are causing MySQL to malfunction. I'm
pretty sure it is the Tidy extension that is causing problems here
because when I comment out the call to tidy_repair_string my program
works with no problems whatsoever.

Tidy info as reported by phpinfo():

tidy
Tidy supportenabled
libTidy Release 1st June 2004
Extension Version   2.0-dev ($Id: tidy.c,v 1.53 2004/05/28 20:32:52 john
Exp $)


Reproduce code:
---
This is how I'm calling tidy_repair_string:

public static function tidyString( $string )
{
$tidyOptions = array( bare = true,
  break-before-br = true,
  char-encoding = latin1,
  clean = true,
  doctype = omit,
  drop-proprietary-attributes = true,
  logical-emphasis = false,
  output-xhtml = true,
  quote-ampersand = true,
  show-body-only = true,
  word-2000 = true,
  wrap = 0 );

// Get rid of all funky characters
return tidy_repair_string( $string, $tidyOptions ); // PHP 5
}

Expected result:

Tidy should work in sequence with MySQL queries.


Actual result:
--
The correct string is returned, but when queries need to be executed
quickly and in succession things start getting erratic and MySQL says:

Aborted connection 199 to db: 'logik' user: 'logik' host: `localhost'
(Got an error reading communication packets)

Also PHP outputs the following warning:


Warning: Unknown list entry type in request shutdown (18545152) in
Unknown on line 0

Other times, the script never finishes executing, thus no output is
produced, warnings or otherwise.

There are also MySQL warnings, but these are a result of Tidy not
returning the correct string, or perhaps not returning in time.

When I don't call the tidy function, there are not warnings or
problems.





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


#28875 [Fbk-Csd]: Wrong regex crashes server

2004-06-21 Thread amoljak at cox dot net
 ID:   28875
 User updated by:  amoljak at cox dot net
 Reported By:  amoljak at cox dot net
-Status:   Feedback
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Windows 2000 Server
 PHP Version:  4.3.6
 New Comment:

I tried PHP 4.3.8-dev and it is not crashing. So I am closing the bug.
I will reopen if it occures on the machine I initially tried.

Thanks


Previous Comments:


[2004-06-22 00:45:31] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-06-21 22:58:29] amoljak at cox dot net

Description:

Note the extra ] in the regex. Try to load this page three times and it
will crash the third time.

Reproduce code:
---
?php

$filecontent = my name is amol;
$regex = /(^|[^a-zA-Z0-9-])([Nn]on[-s? []]]degrees?
[Ss]tudents?)([^a-zA-Z0-9-]|$)/es;

//preg_match_all($regex, $filecontent , $matches,
PREG_OFFSET_CAPTURE);
preg_match($regex, $filecontent , $matches, PREG_OFFSET_CAPTURE);
print matches = $matchesbr;

?


Expected result:

This is from end user's code and I don't know what he expected. But he
was able to crash the server... thats bad.






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


#28263 [Bgs-Csd]: PNG image generation causes Segmentation Fault

2004-06-21 Thread Rich dot West at wesmo dot com
 ID:   28263
 User updated by:  Rich dot West at wesmo dot com
 Reported By:  Rich dot West at wesmo dot com
-Status:   Bogus
+Status:   Closed
 Bug Type: GD related
 Operating System: Fedora Core 1
 PHP Version:  4.3.6
 Assigned To:  pajoye
 New Comment:

Fixed!

I rebuilt the whole package based upon the 4.3.6 SRPM, updated it for
4.3.7, and viola!  It works!


Previous Comments:


[2004-06-21 23:20:23] Rich dot West at wesmo dot com

I tried the same process against 4.3.7 today, and the result was the
same. :(  No PNG image. :(

Yes, the libpng and libpng-devel packages are in sync with one another,
and yes, the system has the GD libraries installed, and, yes, PHP was
compiled it use the bundled GD library rather than the system-wide
one.

I can get this to work when building 4.3.3, but not with 4.3.5/6/7. 
I've moved libpdf out to a DSO rather than compiling it in, but it made
little difference. :(

I'm trying a complete package rebuild using the SRPM from the FC1
updates to see if that will help..



[2004-05-28 05:23:58] Rich dot West at wesmo dot com

I'll check the latest HEAD from CVS.

libpdf was compiled in with --with-libpdf.  Not sure why it would show
up in that particular traceback, though.

 Possible sources of problems:
 - You did not update the -devel package for libpng
 - --with-png-dir=DIR, DIR is not optionnal. Same for jpeg 
   or freetype
 - Be sure you do not have the GD lib installed in your
   system. Use only the bundled one.

From the first posting, it clearly shows --with-png-dir=/usr and
--with-gd.  I thought we got past that whole part.

I'll test it from the latest CVS HEAD branch as you originally
suggested on May 27th, but it is unlikely an installation issue since,
as the thread shows, it works with the same libpng libraries if
compiled with 4.3.3.  Anything later, such as 4.3.5 and 4.3.6, does not
work.



[2004-05-27 22:01:15] [EMAIL PROTECTED]

#1  0x00f1d850 in png_create_struct_2 () from /usr/lib/libpdf.so.1

I'm wondering what the libpdf does here...

Please check your install. The original script works with  php4 and
php5 HEAD and latest RC.

Possible sources of problems:
- You did not update the -devel package for libpng
- --with-png-dir=DIR, DIR is not optionnal. Same for jpeg 
  or freetype
- Be sure you do not have the GD lib installed in your
  system. Use only the bundled one.

I set it back to bogus. As it works on 3 different FC1 (and on FC2)
without problems. I feel your problem as an install issue only.

--Pierre



[2004-05-27 13:00:24] duh at dowebwedo dot com

I am experiencing the same bug since we upgraded from php 4.3.5 tot
4.3.6, 4.3.7 and the latest snapshot (php4-STABLE-200405270830). I have
backtraced the point to where php crashes and that is the
imagecreatefrompng function:

...
eval(sprintf(\$this-image =
imagecreatefrom%s(\$this-image_file);,$this-ext2func[$image_type]));
...

(note: i use eval in my class to dynamically open images; however
without the evaluation the function still kills my application)

However downgrading back to php-4.3.5 does not seem to solve the
problem.

We are running debian stable with all recent upgrades (libpng etc) with
apache (1.3.29) and php and compiled php with the following configure
command:

'./configure' '--with-pgsql' '--with-apxs=/www/bin/apxs' '--with-gd'
'--with-png-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-pear'
'--with-zlib-dir' '--enable-track-vars' '--enable-trans-sid'
'--disable-posix-threads' '--enable-shared' '--enable-exif'
'--enable-memory-limit' 

I hope this bug will be fixed soon.

Grtz, Jeroen



[2004-05-23 01:00:09] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



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

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


#28877 [Com]: The First 4 letters missing When Post

2004-06-21 Thread scottm at spamcop dot net
 ID:   28877
 Comment by:   scottm at spamcop dot net
 Reported By:  jli at pegasuspharm dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: MS Windows 2000
 PHP Version:  4.3.6
 New Comment:

Can you confirm your php version as this sounds like a bug in php
4.2.3

See
http://bugs.php.net/bug.php?id=19404


Previous Comments:


[2004-06-22 03:01:48] jli at pegasuspharm dot com

Description:

The First 4 letters missing with the following codes When Post:(Note:
the text fileds below is an array like desc[])  

form name=service method=post action=?php $_SERVER[PHP_SELF];
? onSubmit=return checkEnter();
input name=Desc[] type=text size=40 maxlength=50  value=?php
echo $_POST[Desc][0]; ?

input name=Desc[] type=text size=40 maxlength=50  value=?php
echo $_POST[Desc][1]; ?

input name=Desc[] type=text size=40 maxlength=50  value=?php
echo $_POST[Desc][2]; ?

/form

Reproduce code:
---
form name=service method=post action=?php $_SERVER[PHP_SELF];
? onSubmit=return checkEnter();
input name=Desc[] type=text size=40 maxlength=50  value=?php
echo $_POST[Desc][0]; ?

input name=Desc[] type=text size=40 maxlength=50  value=?php
echo $_POST[Desc][1]; ?

input name=Desc[] type=text size=40 maxlength=50  value=?php
echo $_POST[Desc][2]; ?

/form

Actual result:
--
The first 4 letters provided in a field missing.





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


#28850 [Bgs]: Passing 0 as expire in setcookie is not the same as passing nothing

2004-06-21 Thread fromphpnet at blaksaga dot com
 ID:   28850
 User updated by:  fromphpnet at blaksaga dot com
 Reported By:  fromphpnet at blaksaga dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.3.7
 New Comment:

I'm sorry, but in my eyes this is a bug.  If nothing else, it is a
documentation bug.

-
 All the arguments except the name argument are optional. You may also
replace an argument with an empty string () in order to skip that
argument. Because the expire and secure arguments are integers, they
cannot be skipped with an empty string, use a zero (0) instead.
-

Unless I am reading it wrong, the documentation is incorrect.

But thank you for your time.  I will post a comment on the doc page
about this.  If you could include/change it in the docs it would be
appreciated.  Thanks,
blaksaga


Previous Comments:


[2004-06-22 00:44:59] [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

If you want the value to default to whatever PHP defaults 
to pass NULL. 



[2004-06-20 03:36:08] fromphpnet at blaksaga dot com

Description:

The overall jist of the problem is this.  I want to be able to set a
cookie and specify the domain and path WITHOUT setting an expiration
(making the cookie get killed when the browser is closed).

This is what the documentation for setcookie states:

 All the arguments except the name argument are optional. You may also
replace an argument with an empty string () in order to skip that
argument. Because the expire and secure arguments are integers, they
cannot be skipped with an empty string, use a zero (0) instead.

Unfortunately, using a 0 for expire has different results than when
passing nothing.  The cookie is not killed at session end when using 0
like it should be.

These statements should produce exactly the same results but do not:

setcookie ( blaksaga_cookies , enabled, 0 );
setcookie ( blaksaga_cookies2 , enabled );

This is either a bug in the setcookie function or in your
documentation.  None-the-less, there needs to be some way to skip the
expire argument while passing domain and path arguments.






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


#22328 [Com]: Erroneous behaviour of fetchRow method

2004-06-21 Thread tko at lostway dot org
 ID:   22328
 Comment by:   tko at lostway dot org
 Reported By:  miki_fossati at libero dot it
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: linux suse 7.2
 PHP Version:  4.3.3RC2-dev
 Assigned To:  georg
 New Comment:

mysql bug #706 is not a bug. It is a specification.

So you should check mysql_errno().

A client user should reset errno somehow (I think of re-connecting db)
if he needs.


Previous Comments:


[2003-06-24 07:29:23] [EMAIL PROTECTED]

It's a bug in libmysql which is already reported (mysql bug #
706)



[2003-06-23 19:30:59] [EMAIL PROTECTED]

Happens with PHP 4.3.3RC2-dev, Georg? :)




[2003-06-21 11:40:51] [EMAIL PROTECTED]

Ok, I've removed the mysql_errno() check on fetchInto().

IMHO this is a bug in the mysql extension, which doesn't properly reset
the error. This problem doesn't ocurr with postgres or interbase.

Test script to reproduce the problem:
?php
$con = mysql_connect('localhost', 'root');
mysql_selectdb('test');
$res = mysql_query('SELECT * FROM table');
$continue = true;
do {
$row = mysql_fetch_row($res);
if (mysql_errno()) {
// Here there is no fetch_row error, it's the same
// from FAKE QUERY
echo Failed fetching with error:  . mysql_errno() . \n;
// Don't want to continue on fetch errors
$continue = false;
} elseif (!$row) {
$continue = false;
} else {
$res2 = mysql_query('FAKE QUERY');
echo Failed to launch FAKE QUERY:  . mysql_errno() . \n;
// Ok, I got the error but want to continue
$continue = true;
}
} while ($continue);

?

Output:
Failed to launch FAKE QUERY: 1064
Failed fetching with error: 1064





[2003-05-11 01:19:07] [EMAIL PROTECTED]

Actually lsmith's fix seems to be fine. Is there anything speaking
against applying it?



[2003-04-29 15:14:00] [EMAIL PROTECTED]

the problem is in the implementation of fetchInto:

function fetchInto($result, $arr, $fetchmode, $rownum=null)
{
if ($rownum !== null) {
if ([EMAIL PROTECTED]($result, $rownum)) {
return null;
}
}
if ($fetchmode  DB_FETCHMODE_ASSOC) {
$arr = @mysql_fetch_array($result, MYSQL_ASSOC);
} else {
$arr = @mysql_fetch_row($result);
}
if (!$arr) {
$errno = @mysql_errno($this-connection);
if (!$errno) {
return NULL;
}
return $this-mysqlRaiseError($errno);
}
return DB_OK;
}

this line picks up the error that was meant for the FAKE QUERY and
think by mistake that therefore not the end of the result set was
reached but an error occured.

Since during a fetch only a connection error can occur it might be a
good idea to remove the mysql_errno() call in order to fix this.

Alternative we could check for a connection error:
if (!$arr) {
$errno = @mysql_errno($this-connection);
if ($errno == 2013) {
return $this-mysqlRaiseError($errno);
}
return NULL;
}
$errno = @mysql_errno($this-connection);



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

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


#28878 [NEW]: Setting of inikey's in obj.conf fails

2004-06-21 Thread michaelw at webcentral dot com dot au
From: michaelw at webcentral dot com dot au
Operating system: Solaris 9
PHP version:  4.3.7
PHP Bug Type: iPlanet related
Bug description:  Setting of inikey's in obj.conf fails

Description:

Attempting to set ini values within the obj.conf file (or vserver.obj.conf
if thats where your virtual hosts are pointed) fails silently. 


This appears to be caused by the logic in sapi/nsapi/nsapi.c ( static void
nsapi_php_ini_entries(NSLS_D TSRMLS_DC) ) , in particular the following
snippet:

--- SNIP ---
ok=1;
for (j=0; nsapi_exclude_from_ini_entries[j]; j++) {
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j])); 
}

if (ok) {
--- SNIP ---

It appears that ok is never returning as TRUE, and thus the code never
enters the if (ok) block. 

I modified it as follows (although I'm sure there are better ways..):

--- SNIP ---
ok=1;
for (j=0; nsapi_exclude_from_ini_entries[j]; j++) {
  if (!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]))  
 
{
  ok = 0;
}
  }
if (ok) {
--- SNIP ---

Additionally, the code that actually updates the ini value in the same
method):

--- SNIP ---
if (ok) {
  /* change the ini entry */
  if
(zend_alter_ini_entry(entry-param-name,strlen(entry-param-name)+1,entry-param-value,strlen(entry-param-value),PHP_INI_USER,PHP_INI_STAGE_RUNTIME)==FAILURE)
  
{
  log_error(LOG_WARN, pblock_findval(fn, NSG(pb)),NSG(sn), NSG(rq),
Cannot change php.ini key \%s\ to \%s\, entry-param-name,
entry-param-value);
}
}
--- SNIP ---

checks the method to see if it is PHP_INI_USER allowed, whilst since it is
in a system file (obj.conf or vserver.obj.conf) I would expect it to test
against PHP_INI_SYSTEM ?




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


#28826 [Opn-Bgs]: SimpleXML expands entities but DOM + XSL does not

2004-06-21 Thread joe at joerags dot com
 ID:   28826
 User updated by:  joe at joerags dot com
 Reported By:  joe at joerags dot com
-Status:   Open
+Status:   Bogus
 Bug Type: XSLT related
 Operating System: Mac OS 10.2.8
 PHP Version:  5CVS-2004-06-18 (dev)
 New Comment:

I did the following and the test script I submitted 
works.

Using Fink (http://fink.sourceforge.net), I had it 
build and install libxml2 2.5.10 and libxslt 1.0.32. I 
then recompiled PHP 5 RC3 with these configuration 
commands: ./configure --prefix=/usr/local --with-zlib 
--with-libxml-dir=/sw --with-xsl=/sw --with-apxs=/usr/
sbin/apxs

The test script I submitted likely didn't work either 
because of user error on my part or a bug in something 
other than PHP.


Previous Comments:


[2004-06-18 11:09:05] joe at joerags dot com

Description:

When attempting to do an XSL transformation using the 
new DOM and XSL extensions available in PHP 5, I've 
noticed entities aren't expanded in the output. If I 
import the DOM object into SimpleXML, the entities are 
expanded.

The first time I attempted to run the following code I 
was using PHP 5 RC3, libxml2 2.6.10, and libxslt 1.1.7. 
I am now using CVS versions of PHP 5, libxml2, and 
libxslt in order to see if this was a bug fixed in 
either PHP 5, libxml2, or libxslt. The CVS versions I'm 
using were downloaded June 18th.

I run Apache 1.3.31 under Mac OS 10.2.8. I don't recall 
seeing any errors when I built and installed Apache, 
PHP, libxml2, or libxslt.

Reproduce code:
---
?php
$xml = EOD
!DOCTYPE example [
!ENTITY entity1 Entity 1
!ENTITY entity2 Entity 2
]
example
  element1Example Document/element1
  element2entity1;/element2
  element3entity2;/element3
/example
EOD;

$xsl = EOD
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xsl:template match=example
pXSL Element 1: xsl:value-of select=element1 //p
pXSL Element 2: xsl:value-of select=element2 //p
pXSL Element 3: xsl:value-of select=element3 //p
  /xsl:template
/xsl:stylesheet
EOD;

$xmlDocument = new DomDocument;
$xmlDocument-loadXML($xml);
$xslDocument = new DomDocument;
$xslDocument-loadXML($xsl);
$processor = new XsltProcessor;
$processor-importStyleSheet($xslDocument);
print $processor-transformToXML($xmlDocument);

$xmlDocument = simplexml_import_dom($xmlDocument);
print 'pSimpleXML Element 1: ' . $xmlDocument-element1 . '/p';
print 'pSimpleXML Element 2: ' . $xmlDocument-element2 . '/p';
print 'pSimpleXML Element 3: ' . $xmlDocument-element3 . '/p';
?

Expected result:

XSL Element 1: Example Document

XSL Element 2: Entity 1

XSL Element 3: Entity 2

SimpleXML Element 1: Example Document

SimpleXML Element 2: Entity 1

SimpleXML Element 3: Entity 2

Actual result:
--
XSL Element 1: Example Document

XSL Element 2: 

XSL Element 3: 

SimpleXML Element 1: Example Document

SimpleXML Element 2: Entity 1

SimpleXML Element 3: Entity 2





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


#28263 [Csd-Bgs]: PNG image generation causes Segmentation Fault

2004-06-21 Thread derick
 ID:   28263
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Rich dot West at wesmo dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: GD related
 Operating System: Fedora Core 1
 PHP Version:  4.3.6
 Assigned To:  pajoye
 New Comment:

Not a bug in PHP then, so marking it bogus.


Previous Comments:


[2004-06-22 01:35:28] Rich dot West at wesmo dot com

Fixed!

I rebuilt the whole package based upon the 4.3.6 SRPM, updated it for
4.3.7, and viola!  It works!



[2004-06-21 23:20:23] Rich dot West at wesmo dot com

I tried the same process against 4.3.7 today, and the result was the
same. :(  No PNG image. :(

Yes, the libpng and libpng-devel packages are in sync with one another,
and yes, the system has the GD libraries installed, and, yes, PHP was
compiled it use the bundled GD library rather than the system-wide
one.

I can get this to work when building 4.3.3, but not with 4.3.5/6/7. 
I've moved libpdf out to a DSO rather than compiling it in, but it made
little difference. :(

I'm trying a complete package rebuild using the SRPM from the FC1
updates to see if that will help..



[2004-05-28 05:23:58] Rich dot West at wesmo dot com

I'll check the latest HEAD from CVS.

libpdf was compiled in with --with-libpdf.  Not sure why it would show
up in that particular traceback, though.

 Possible sources of problems:
 - You did not update the -devel package for libpng
 - --with-png-dir=DIR, DIR is not optionnal. Same for jpeg 
   or freetype
 - Be sure you do not have the GD lib installed in your
   system. Use only the bundled one.

From the first posting, it clearly shows --with-png-dir=/usr and
--with-gd.  I thought we got past that whole part.

I'll test it from the latest CVS HEAD branch as you originally
suggested on May 27th, but it is unlikely an installation issue since,
as the thread shows, it works with the same libpng libraries if
compiled with 4.3.3.  Anything later, such as 4.3.5 and 4.3.6, does not
work.



[2004-05-27 22:01:15] [EMAIL PROTECTED]

#1  0x00f1d850 in png_create_struct_2 () from /usr/lib/libpdf.so.1

I'm wondering what the libpdf does here...

Please check your install. The original script works with  php4 and
php5 HEAD and latest RC.

Possible sources of problems:
- You did not update the -devel package for libpng
- --with-png-dir=DIR, DIR is not optionnal. Same for jpeg 
  or freetype
- Be sure you do not have the GD lib installed in your
  system. Use only the bundled one.

I set it back to bogus. As it works on 3 different FC1 (and on FC2)
without problems. I feel your problem as an install issue only.

--Pierre



[2004-05-27 13:00:24] duh at dowebwedo dot com

I am experiencing the same bug since we upgraded from php 4.3.5 tot
4.3.6, 4.3.7 and the latest snapshot (php4-STABLE-200405270830). I have
backtraced the point to where php crashes and that is the
imagecreatefrompng function:

...
eval(sprintf(\$this-image =
imagecreatefrom%s(\$this-image_file);,$this-ext2func[$image_type]));
...

(note: i use eval in my class to dynamically open images; however
without the evaluation the function still kills my application)

However downgrading back to php-4.3.5 does not seem to solve the
problem.

We are running debian stable with all recent upgrades (libpng etc) with
apache (1.3.29) and php and compiled php with the following configure
command:

'./configure' '--with-pgsql' '--with-apxs=/www/bin/apxs' '--with-gd'
'--with-png-dir' '--with-freetype-dir' '--with-jpeg-dir' '--with-pear'
'--with-zlib-dir' '--enable-track-vars' '--enable-trans-sid'
'--disable-posix-threads' '--enable-shared' '--enable-exif'
'--enable-memory-limit' 

I hope this bug will be fixed soon.

Grtz, Jeroen



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

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