#24616 [Opn]: Process started with exec cmd /dev/null dies when httpd is closed

2003-07-12 Thread carb at videotron dot ca
 ID:   24616
 User updated by:  carb at videotron dot ca
 Reported By:  carb at videotron dot ca
 Status:   Open
 Bug Type: Apache related
 Operating System: RedHat 9.0
 PHP Version:  4.3.2
 New Comment:

Same behavior with:

?PHP
  session_write_close(); 
  
  //Simple example to reproduce problematic forking
  exec(ping localhost /dev/null /dev/null 2/dev/null );

   
?


Previous Comments:


[2003-07-12 01:00:33] carb at videotron dot ca

Description:

When forking off a process from PHP with the statement exec(command 
/dev/null ), the process will get killed when the httpd is closed.  


Note: This occurs even though ps is telling me that the parent process
id is init (parent process id 1).


Reproduce code:
---
?PHP
  
  session_write_close();  

  //Simple example to reproduce problematic forking.
  exec(ping localhost  /dev/null );
   
?

Expected result:

A continuous ping process should be running in the backgroud,
independently of httpd.  When httpd is closed, the ping (or whatever
relevant) process should keep running.

Actual result:
--
When httpd is closed, the ping (or whatever relevant) process dies.





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



#23967 [Com]: number_format() returns 0 all the time

2003-07-12 Thread youmeit at yahoo dot com
 ID:   23967
 Comment by:   youmeit at yahoo dot com
 Reported By:  russ at zerotech dot net
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Gentoo Linux
 PHP Version:  4.3.2
 New Comment:

This is Max. The format_number is working after all.

It was something I missed in the code. Was passing the parameter w/o
($)

My bad!


Previous Comments:


[2003-07-12 00:40:29] youmeit at yahoo dot com

I have downloaded the latest stable version 4.3.2 and the issue with 0
being returned has not been fixed!

Is it possible someone could recompile the code for Windows
distribution?

Thank you very much...

Max



[2003-06-04 16:00:05] russ at zerotech dot net

I recompiled my glibc, I was unaware it was compiled at -O3, I was
pretty certain I had specified it myself to -O2 and pentium3 only,
maybe I hit it up accidentally during an emerge  -u world.  

Once I compiled it with -O2, number_format() began working again.



[2003-06-03 10:28:06] russ at zerotech dot net

I compiled the snapshot, no compiler optimizations, and I enabled
debugging.  My GCC version is:

gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice). 
Perhaps it's propolice causing it? As of PHP 4.3.1 though, compiled
with propolice, everything worked fine. I still get the same problem
with number_format() with the snapshow from today.

[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ ./php -r 'echo
number_format(4000,2); echo \n;'
0.00
[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ ./php -r 'echo
number_format(0,2); echo \n;'
0.00
[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ ./php -r 'echo
number_format(230,2); echo \n;'
0.00
[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ ./php -r 'echo
number_format(234440,2); echo \n;'
0.00
[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ ./php -r 'echo
number_format(234440,2); echo \n;'
0.00
[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ gdb --args ./php -r
'echo number_format(234440,2); echo \n;'

To make absolutely sure I'm not doing something different, I compiled
PHP 4.3.1 again, the same way I compiled 4.3.2 and the daily SNAPSHOT,
these are the results I get:
[EMAIL PROTECTED]:~/php-4.3.1/sapi/cli$ ./php -r 'echo number_format(500);
echo \n;'
500
[EMAIL PROTECTED]:~/php-4.3.1/sapi/cli$ ./php -r 'echo number_format(500);
echo \n;'
500
[EMAIL PROTECTED]:~/php-4.3.1/sapi/cli$ ./php -r 'echo number_format(7500);
echo \n;'
7,500
[EMAIL PROTECTED]:~/php-4.3.1/sapi/cli$ ./php -r 'echo number_format(7500,2);
echo \n;'
7,500.00

Obviously since it doesn't crash I can't bt on the core, but I set a
breakpoint at the first call to spprintf which appears to be the major
difference in _php_math_number_function() in math.c between 4.3.1 and
4.3.2.  It breaks at the first call which is made from
_php_math_number_function().

[EMAIL PROTECTED]:~/php4-STABLE-200306031330/sapi/cli$ gdb --args ./php -r
'echo number_format(234440,2); echo \n;'
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i686-pc-linux-gnu...
(gdb) break spprintf
Breakpoint 1 at 0x8128f55: file
/home/russ/php4-STABLE-200306031330/main/spprintf.c, line 641.
(gdb) run
Starting program: /home/russ/php4-STABLE-200306031330/sapi/cli/php -r
echo\ number_format\(\234440\,2\)\;\ echo\ \\\n\\;

Breakpoint 1, spprintf (pbuf=0xb3a8, max_len=0, format=0x8183b58
%.*f) at /home/russ/php4-STABLE-200306031330/main/spprintf.c:641
641 va_start(ap, format);
(gdb) bt
#0  spprintf (pbuf=0xb3a8, max_len=0, format=0x8183b58 %.*f) at
/home/russ/php4-STABLE-200306031330/main/spprintf.c:641
#1  0x080cb73a in _php_math_number_format (d=234440, dec=2,
dec_point=46 '.', thousand_sep=44 ',')
at /home/russ/php4-STABLE-200306031330/ext/standard/math.c:997
#2  0x080cbd1c in zif_number_format (ht=2, return_value=0x81ee2fc,
this_ptr=0x0, return_value_used=1)
at /home/russ/php4-STABLE-200306031330/ext/standard/math.c:1101
#3  0x0816d0a8 in execute (op_array=0x81edf5c) at
/home/russ/php4-STABLE-200306031330/Zend/zend_execute.c:1606
#4  0x08151f13 in zend_eval_string (str=0xb97d echo
number_format(\234440\,2); echo \\\n\;, retval_ptr=0x0,
string_name=0x81a88b4 Command line code) at
/home/russ/php4-STABLE-200306031330/Zend/zend_execute_API.c:636
#5  0x08173613 in main (argc=3, argv=0xb804) at
/home/russ/php4-STABLE-200306031330/sapi/cli/php_cli.c:859
#6  0x400b2767 in __libc_start_main () from /lib/libc.so.6
(gdb)

Let me 

#24594 [Ver]: IMG_COLOR_TILED and imagefill not working with all images

2003-07-12 Thread jakmania at libertysurf dot fr
 ID:   24594
 User updated by:  jakmania at libertysurf dot fr
 Reported By:  jakmania at libertysurf dot fr
 Status:   Verified
 Bug Type: GD related
 Operating System: All
 PHP Version:  4.3.3RC2-dev
 New Comment:

It's a GD bug, not a PHP one, 'cause I've got the same wrong result in
perl :(((


Previous Comments:


[2003-07-10 16:07:37] jakmania at libertysurf dot fr

Well, It should work with imagefill() just like it does with other
functions (imagefilledrectangle...) I mean, just filling  with the
tile, not only drawing a 'kind' of line or just doing nothing.
Someone should check GD. If this problem doesn't occur with the C
version itself, or with a Perl interface, then it's a PHP bug,
otherwise it's a GD bug.



[2003-07-10 12:21:31] [EMAIL PROTECTED]

Here's my test script:

?php
header (Content-type: image/png);
$im = imagecreatefrompng(basic.png); /* 200 x 200 */
$tile = imagecreatefrompng(tile.png); /* 10 x 10 */
imagesettile($im, $tile);
// imagefilledpolygon ($im, array(0,0,200,0,200,200,0,200), 4,
IMG_COLOR_TILED); // Works
// imagefilledrectangle ($im, 10,10,190,190, IMG_COLOR_TILED); //
Works
imagefill($im,10,10,IMG_COLOR_TILED); // Does not work?
imagepng($im);
?

But when I used imagefill(), it only draw one line in the top with the
tile and the tile image was somewhat scaled down..(I'm not sure if it's
supposed to work like this? :)

# file tile.png 
tile.png: PNG image data, 10 x 10, 8-bit/color RGB, non-interlaced
# file basic.png 
basic.png: PNG image data, 200 x 200, 8-bit/color RGB, non-interlaced





[2003-07-10 11:59:16] jakmania at libertysurf dot fr

Description:

If you imagesettile on an image created through imagecreate then
use imagefill and IMG_COLOR_TILED as color as explained in the
documentation, it's fine. But if the basic image is not created on the
fly, eg. it is imported through imagecreatefromXXX then your tile
image won't be apply on that image :-)
NB: any version of GD, even the bundled one.
See an example of NOT working code below.
Thanx

Reproduce code:
---
?php
header (Content-type: image/png);
$im = imagecreatefrompng(basic.png); /* 200 x 200 */
$im = imagecreatefrompng(tile.png); /* 10 x 10 */
imagesettile($im, $tily);
imagefill($im,110,90,IMG_COLOR_TILED);
imagepng($im);
imagedestroy($im);
?

Expected result:

basic.png (a map in fact) tiled on a delimited area (a country).

Actual result:
--
Just the basic image (basic.png), not tiled at all.





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



#13604 [Com]: odbc_primarykeys with Access

2003-07-12 Thread sa_kelkar at yahoo dot com
 ID:   13604
 Comment by:   sa_kelkar at yahoo dot com
 Reported By:  phperror at gustl dot at
 Status:   No Feedback
 Bug Type: ODBC related
 Operating System: W98, W98SE
 PHP Version:  4.0.6
 New Comment:

I have same problem with odbc_primarykeys when i am using with the DB2.
Please guide me

my code is
?php
//include 'conn.inc';

$usernm=db2admin;
$pwd=nic20pao03lx#;
$schemaname=db2admin.;
$conn=odbc_connect(PAOLX,$usernm,$pwd);

$m=odbc_primarykeys($conn,SYSIBM,SYSIBM,TB_DDO_ELECTRICITY);
echo $m;
?


Previous Comments:


[2002-09-09 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-08-05 20:38:19] [EMAIL PROTECTED]

Using the latest CVS I cannot get your sample code to work at all.  It
seems the $tables is never populated on my end.  Any chance you can
post a sample schema, or see if this is still happening?



[2002-07-29 13:58:14] [EMAIL PROTECTED]

Jeff please limit yourself to one bug report per bug.  If you have
issues with other ODBC functionality, feel free to open a seperate bug
report.  



[2002-07-29 12:55:49] jeff dot albert at ualberta dot ca

Hello,
I'm having the same problem with win2k, Apache, and PHP 4.2.2,
accessing any of a number of Access databases; the error seems to occur
with any attempt access any of the following functions:

odbc_columns
odbc_columnprivileges
odbc_tables
odbc_tableprivileges

incidentally, occasionally the tables functions will actually cause
php.exe to crash outright. Here's the simplest example of code that
causes the problem:

?php
$con = odbc_connect(dev, , );
$result = odbc_columnprivileges($con, , , , %);
?

cheers,
jeff albert



[2002-06-06 13:00:59] josh at engledental dot com

I get the same error when trying to run odbc_specialcolumns.  SQL state
0 is success, so I guess its the ODBC driver which isn't handling
things correctly?  Any ideas?



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

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



#24614 [Opn-Csd]: php as cgi always report 'No input file specified.'

2003-07-12 Thread deptotecnico at towebs dot com
 ID:   24614
 User updated by:  deptotecnico at towebs dot com
 Reported By:  deptotecnico at towebs dot com
-Status:   Open
+Status:   Closed
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  4.3.3RC1
 New Comment:

after further investigation and debugging, setting doc_root in php.ini
fixed the issue. my apologies.


Previous Comments:


[2003-07-12 00:44:39] deptotecnico at towebs dot com

of course, this should be read as:

 .. looking around and I've seen several old reports for and a few new
ones, but no fixed whatsoever.



[2003-07-11 19:10:01] deptotecnico at towebs dot com

Description:

  
  If I compile php as cgi (--enable-force-cgi-redirect is not used), I
always get 'No input file specified' while browsing any .php file.
  I've tried with 4.3.1, 4.3.2 and 4.3.3RC1, with php.ini-recommended
as the init file. 
  php -v gives:

PHP 4.3.3RC1 (cgi) (built: Jul 11 2003 20:52:32)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

  running the same code from console (path/to/php/cgi file.php) works
fine. 
  I've been looking around and I've seen several old reports for this
and a few ones, but no fixed whatsoever.
  I've also checked the CVS repository, but doesn't seem like anything
has changed wrt in cgi_main.c.




Reproduce code:
---
?
phpinfo ();
?

Expected result:

phpinfo() output.

Actual result:
--
No input file specified.





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



#24607 [Opn-Bgs]: encoding of .php file affects php behaviour

2003-07-12 Thread moriyoshi
 ID:   24607
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zjcboy at fescomail dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: win xp pro
 PHP Version:  4.3.1
 New Comment:

Dupe of bug #22247


Previous Comments:


[2003-07-11 11:35:45] zjcboy at fescomail dot net

Description:

PHP Code:
?php 
session_start(); 
$_SESSION['test']='this is a test'; 
echo $_SESSION['test']; 
? 
If the code above is encoded in ANSI, it works fine.
But if the code is encoded in Unicode or UTF8, it just says Cannot
send session cache limiter - headers already sent .

Note that when encoded in different formats, the size of the .php file
is different. For example, the code above, when encoded in ANSI, is
just 90 bytes. but in Utf8, it is 93 bytes and in Unicode, it's 182
bytes.
PHP Code:
session_start(); 
requires to be put before any output, but in UTF8, the 3 extra bytes
compared from in ANSI may cause some output.(I think so)

Because I have to echo some non-english characters (such as Chinese), I
have to use Unicode or UTF8 encoding, but it doesn't work as mentioned
before. I wonder if there's any way to solve this. 


Expected result:

no matter how .php files are encoded, they just work fine.






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



#24617 [NEW]: i couldn't run php on winxp as a php moudle

2003-07-12 Thread khashayarsad at yahoo dot com
From: khashayarsad at yahoo dot com
Operating system: win xp
PHP version:  4.3.2
PHP Bug Type: *General Issues
Bug description:  i couldn't run php on winxp as a php moudle

Description:

i use win xp and apache2 and php 4.3

i have add this line in http.cnf:
LoadModule php4_module c:\php\sapi\php4apache2.dll

and i have gotten this error:
Syntax error on line 173 of C:/Program Files/Apache
Group/Apache2/conf/httpd.conf:Can't locate API module structure
`php4_module' in file C:/php/sapi/php4apache2.dll: No error




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



#24556 [Ver-Asn]: strip_tags() leaks and crashes

2003-07-12 Thread moriyoshi
 ID:   24556
 Updated by:   [EMAIL PROTECTED]
 Reported By:  asykakimo at yahoo dot com dot tw
-Status:   Verified
+Status:   Assigned
 Bug Type: Strings related
 Operating System: Win2000
 PHP Version:  4.3.3RC2-dev
 Assigned To:  moriyoshi


Previous Comments:


[2003-07-09 08:20:37] [EMAIL PROTECTED]

This patch seems to plug the overflow:

Index: string.c
===
RCS file: /repository/php-src/ext/standard/string.c,v
retrieving revision 1.333.2.32
diff -u -r1.333.2.32 string.c
--- string.c29 Jun 2003 15:36:10 -  1.333.2.32
+++ string.c9 Jul 2003 13:17:51 -
@@ -3336,7 +3336,7 @@
br = 0;
if (allow) {
php_strtolower(allow, allow_len);
-   tbuf = emalloc(PHP_TAG_BUF_SIZE+1);
+   tbuf = emalloc(PHP_TAG_BUF_SIZE+2);
tp = tbuf;
} else {
tbuf = tp = NULL;





[2003-07-09 08:13:21] [EMAIL PROTECTED]

This is not file_get_contents() or any other filesystem function
related:

---
/usr/src/web/php/php4_3/ext/standard/string.c(3530) : Block 0x0874B580
status:
Beginning:  OK (allocated on
/usr/src/web/php/php4_3/ext/standard/string.c:3339, 1024 bytes)
  End:  Overflown (magic=0x2A8FCC63 instead of 0x2A8FCC84)
1 byte(s) overflown
---
href/usr/src/web/php/php4_3/ext/standard/string.c(3339) :  Freeing
0x0874B5A4 (1024 bytes), script=t.php


strip_tags() causes the crash. (leaks seem to crash winblows, not linux
:)





[2003-07-09 02:24:43] asykakimo at yahoo dot com dot tw

Description:

The file_get_contents will cause PHP crash in the following code:
$contents=str_replace(\n,  ,file_get_contents($file));
$contents=strip_tags($contents,'aframeareameta');
$tags=(preg_match(|/frameset|i,$contents))?src:href;
$tags=(preg_match(|meta
http-equiv=\?refresh\?.*url|i,$contents))?url:$tags;
echo $tags;


The $file variable is come from http://www.starwars.com/index.html

If I replace the file_get_contents with fread function, the php remain
this bug too.

Thank







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



#22510 [Ver-Csd]: Zend Engine crashes calling FREE_ZVAL from zend_assign_to_variable_reference

2003-07-12 Thread moriyoshi
 ID:   22510
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at codewhore dot org
-Status:   Verified
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.4
 PHP Version:  4CVS-2003-06-01 (stable)
 New Comment:

The fix by Zeev will be in php5.




Previous Comments:


[2003-06-02 10:56:43] [EMAIL PROTECTED]

Just tested your last script with PHP 5.0.0-dev (ZE2),
and it does not crash:

# sapi/cli/php /home/jani/t.php 

Notice: Undefined variable:  a in /home/jani/t.php on line 32
/usr/src/web/php/php5/Zend/zend_execute.c(2782) :  Freeing 0x089681F4
(16 bytes), script=/home/jani/t.php

And commenting out the line 32 (with $a=$a) makes it not crash in PHP
4.3.3-dev too:

$ php t.php 
/usr/src/web/php/php4/Zend/zend_execute.c(1702) :  Freeing 0x088A427C
(12 bytes), script=t.php




[2003-06-01 11:38:31] php at codewhore dot org

A shorter crashing version of tests/lang/22510.phpt. 
Notice that removal of the silence operator (@) in 
method2() makes the crash go away.

?php
  class foo
  {
function method1() {
  return $this-foo;
}

function method2() {
  return @$this-foo;
}
  }

  class bar
  {
function run1() {
  $instance = new foo();
  $instance-method1();
}

function run2() {
  $instance = new foo();
  $instance-method2();
  $instance-method2();
}
  }

  function ouch($bar) {
$bar-run1();
  }

  function ok($bar) {
$a = $a;
$bar-run2();
  }

  $bar = new bar();
  ok($bar);
  ouch($bar);
?



[2003-05-31 18:52:20] php at codewhore dot org

Hi:

I believe there's a missing refcount increment causing this bug, and I
think I may have uncovered some evidence that could get us closer to a
fix. I've added opcode dumps to zend_execute.c with a well-placed perl
command, so as to see the instructions as they're executed.

All of the following has been performed against a clean snapshot of
PHP4
CVS HEAD.

Given the following script, containing one class with two methods
differing only by a silence operator:

  ?php
class foo
{
  function method1() {
return $this-foo;
  }

  function method2() {
return @$this-foo;
  }
}

$i = new foo();
$i-method1();
echo \n;
$i-method2();
  ?

The following opcodes pass throuch the main switch() in execute(), in
this order:

  ZEND_NOP
  ZEND_NEW
  ZEND_JMP_NO_CTOR
  ZEND_FETCH_W
  ZEND_FETCH_LOCAL
  ZEND_ASSIGN
  ZEND_FETCH_W
  ZEND_FETCH_LOCAL
  ZEND_INIT_FCALL_BY_NAME
  ZEND_DO_FCALL_BY_NAME
  ZEND_FETCH_W
  ZEND_FETCH_LOCAL
  ZEND_FETCH_OBJ_W
  ZEND_RETURN
  ZEND_ECHO
  ZEND_FETCH_W
  ZEND_FETCH_LOCAL
  ZEND_INIT_FCALL_BY_NAME
  ZEND_DO_FCALL_BY_NAME
  ZEND_BEGIN_SILENCE
  ZEND_FETCH_R
  ZEND_FETCH_LOCAL
  ZEND_FETCH_OBJ_R
  ZEND_END_SILENCE
  ZEND_RETURN
  ZEND_RETURN

Here, we see the object property which will eventually become the
return
value of method1() being fetched by the engine with ZEND_FETCH_OBJ_W,
which triggers a zend_fetch_property_address(..., BP_VAR_W) from
zend_execute.c:1354, eventually bumping the reference count in
zend_fetch_property_address_inner:
  
  case BP_VAR_W: {
  zval *new_zval = EG(uninitialized_zval);
  new_zval-refcount++;
  zend_hash_update(ht, prop_ptr-value.str.val, ...snip...);
}

However, it seems the addition of the silence operator (which wouldn't
have an effect on the read/write status of the fetch or the refcount,
I
wouldn't think) makes the engine fetch with ZEND_FETCH_OBJ_R;
eventually
triggering another branch of the switch in
zend_get_property_address_inner:
  
  case BP_VAR_R:
zend_error(E_NOTICE,Undefined property:  %s,
prop_ptr-value.str.val);
/* break missing intentionally */
  case BP_VAR_IS:
retval = EG(uninitialized_zval_ptr);
break;

Which omits the increment of the reference count. There is a call to
AI_USE_PTR() on the read path that isn't on the write path, but that
looks like it doesn't touch the refcount of anything.

So, anyway.

I may be completely off in left-field here; apologies if you've made
it
this far and none of this represents any sort of sane thinking. :)
But,
is it possible that the silence operator, when applied to a fetch of
an
object property that is returned by reference, is being miscompiled as
ZEND_FETCH_OBJ_R rather than ZEND_FETCH_OBJ_W?

(Be gentle with replies; this is the first time I've ever really
touched
the Zend Engine's guts.)



[2003-03-31 17:03:45] [EMAIL PROTECTED]

(pasted from bug #22996) user supplied comment  backtrace

What I did:

Compiled 4.3.2RC1 on my Sun Ultra10/Sparc64 NetBSD 1.6.

Used:
./configure --enable-debug --with-apxs

#24556 [Asn-Csd]: strip_tags() leaks and crashes

2003-07-12 Thread moriyoshi
 ID:   24556
 Updated by:   [EMAIL PROTECTED]
 Reported By:  asykakimo at yahoo dot com dot tw
-Status:   Assigned
+Status:   Closed
 Bug Type: Strings related
 Operating System: Win2000
 PHP Version:  4.3.3RC2-dev
 Assigned To:  moriyoshi
 New Comment:

This bug has been fixed in CVS.

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

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




Previous Comments:


[2003-07-09 08:20:37] [EMAIL PROTECTED]

This patch seems to plug the overflow:

Index: string.c
===
RCS file: /repository/php-src/ext/standard/string.c,v
retrieving revision 1.333.2.32
diff -u -r1.333.2.32 string.c
--- string.c29 Jun 2003 15:36:10 -  1.333.2.32
+++ string.c9 Jul 2003 13:17:51 -
@@ -3336,7 +3336,7 @@
br = 0;
if (allow) {
php_strtolower(allow, allow_len);
-   tbuf = emalloc(PHP_TAG_BUF_SIZE+1);
+   tbuf = emalloc(PHP_TAG_BUF_SIZE+2);
tp = tbuf;
} else {
tbuf = tp = NULL;





[2003-07-09 08:13:21] [EMAIL PROTECTED]

This is not file_get_contents() or any other filesystem function
related:

---
/usr/src/web/php/php4_3/ext/standard/string.c(3530) : Block 0x0874B580
status:
Beginning:  OK (allocated on
/usr/src/web/php/php4_3/ext/standard/string.c:3339, 1024 bytes)
  End:  Overflown (magic=0x2A8FCC63 instead of 0x2A8FCC84)
1 byte(s) overflown
---
href/usr/src/web/php/php4_3/ext/standard/string.c(3339) :  Freeing
0x0874B5A4 (1024 bytes), script=t.php


strip_tags() causes the crash. (leaks seem to crash winblows, not linux
:)





[2003-07-09 02:24:43] asykakimo at yahoo dot com dot tw

Description:

The file_get_contents will cause PHP crash in the following code:
$contents=str_replace(\n,  ,file_get_contents($file));
$contents=strip_tags($contents,'aframeareameta');
$tags=(preg_match(|/frameset|i,$contents))?src:href;
$tags=(preg_match(|meta
http-equiv=\?refresh\?.*url|i,$contents))?url:$tags;
echo $tags;


The $file variable is come from http://www.starwars.com/index.html

If I replace the file_get_contents with fread function, the php remain
this bug too.

Thank







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



#24576 [Fbk-Opn]: Segmentation fault on sapi_initialize_empty_request

2003-07-12 Thread druid at mail dot cz
 ID:   24576
 User updated by:  druid at mail dot cz
 Reported By:  druid at mail dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.2
 New Comment:

There's no apache. I'm talking about the php binary. The sapi.

Fyi, I switched back to gcc 3.2.1 and everything's ok.


Previous Comments:


[2003-07-10 11:51:51] [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

(Make sure the build time is later than Jul 10, 2003 15:30.)

Which apache2 version? 
How was it configured?
How do you start it?
What other modules are enabled in it?




[2003-07-10 03:03:40] druid at mail dot cz

I tried php-5b1 and it is nearly the same, except the gdb output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 22382)]
0x081b1e50 in sapi_initialize_empty_request ()
(gdb) bt
#0  0x081b1e50 in sapi_initialize_empty_request ()
#1  0x081ac114 in php_module_startup ()
#2  0x40395ca6 in __libc_start_main () from /lib/libc.so.6



[2003-07-10 02:34:58] druid at mail dot cz

Description:

Php always crashes at start. I've tested it with sapi.
I've got the latest gcc and glibc:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr --enable-shared
--enable-threads=posix --with-slibdir=/lib --enable-__cxa_atexit
--enable-clocale=gnu --enable-__vt_8iostream
Thread model: posix
gcc version 3.3

./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib --enable-bcmath --with-bz2=shared --enable-calendar \
--enable-exif --enable-ftp --with-ttf --with-gettext \
--with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir \
--with-mysql --with-mysql-sock --with-recode=shared \
--with-imap --with-imap-ssl=/usr/local/ssl \
--enable-debug

glibc-2.3.2

Reproduce code:
---
SAPI_API void sapi_initialize_empty_request(TSRMLS_D)
{
SG(server_context) = NULL;
SG(request_info).request_method = NULL;
SG(request_info).auth_user = SG(request_info).auth_password =
NULL;
SG(request_info).content_type_dup = NULL;
}

The last line is the problem.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
sapi_initialize_empty_request () at /usr/src/php-4.3.2/main/SAPI.c:437
437 SG(request_info).content_type_dup = NULL;
(gdb) bt
#0  sapi_initialize_empty_request () at
/usr/src/php-4.3.2/main/SAPI.c:437
#1  0x081841d7 in php_module_startup (sf=0x82e02e0,
additional_modules=0x82e02e0, num_additional_modules=137240573)
at /usr/src/php-4.3.2/main/main.c:1083
#2  0x6e690078 in ?? ()






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



#24618 [NEW]: Image does not display if include file has whitespace after last ?

2003-07-12 Thread Ron at Termolog dot com
From: Ron at Termolog dot com
Operating system: Windows XP and Linux
PHP version:  4.3.2
PHP Bug Type: GD related
Bug description:  Image does not display if include file has whitespace after last ?

Description:

If an iclude file contains any form of whitespace after the closing ?
then an image (Png and Jpeg) displayed in the calling php file will not
display. 

Reproduce code:
---
? 
header(Content-type: image/jpeg);
include anyfile.php3;

$img = @ImageCreate (100, 100);
$Blue  = ImageColorAllocate($img,0,0,255);
imagefilledrectangle($img, 20, 20, 80, 80, $Blue);
ImageJpeg ($img);
imagedestroy($img);
?  
--- 
?  //This is the include file (anyfile.php3)
$dummy=1;
? 

Expected result:

The image should be displayed

Actual result:
--
Image is not displayed

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



#24389 [Com]: PHP 5 : Windows build needs a MySQL DLL

2003-07-12 Thread rcherry at raysoft dot net
 ID:   24389
 Comment by:   rcherry at raysoft dot net
 Reported By:  philip at cornado dot com
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  5CVS-2003-06-29 (dev)
 Assigned To:  edink
 New Comment:

The Windows binary distribution - PHP 5.0.0b1 -  downloaded 24 hours
ago, includes libmysql.dll, but does NOT include php_mysql.dll.  Where
can I find a copy of pup_mysql.dll?  Thanks.


Previous Comments:


[2003-07-03 16:56:14] [EMAIL PROTECTED]

Philip, this bug was fixed, so leave it closed.



[2003-07-02 20:55:21] [EMAIL PROTECTED]

ipa, did you copy libmySQL.dll to your SYSTEMROOT?  And/or has this
been fixed in the newest snap?



[2003-07-02 13:08:36] enc at omni dot lt

Well, i guess Postgre now will get more attention from PHP Windows
users.



[2003-06-30 16:16:42] ipa at assis dot lt

php_mysql.dll from snap says
PHP Warning:  Unknown(): Invalid library (maybe not a PHP library)
'php_mysql.dll'  in Unknown on line 0



[2003-06-29 20:21:31] [EMAIL PROTECTED]

OK. PHP 5 snaps and distro's include php_mysql.dll (php extension) and
dlls\libmySQL.dll (remember to copy this to the system folder).



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

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



#24618 [Opn-Bgs]: Image does not display if include file has whitespace after last ?

2003-07-12 Thread elmicha
 ID:   24618
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Ron at Termolog dot com
-Status:   Open
+Status:   Bogus
 Bug Type: GD related
 Operating System: Windows XP and Linux
 PHP Version:  4.3.2
 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

See http://www.php.net/function.include and
http://www.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode.




Previous Comments:


[2003-07-12 07:20:16] Ron at Termolog dot com

Description:

If an iclude file contains any form of whitespace after the closing ?
then an image (Png and Jpeg) displayed in the calling php file will not
display. 

Reproduce code:
---
? 
header(Content-type: image/jpeg);
include anyfile.php3;

$img = @ImageCreate (100, 100);
$Blue  = ImageColorAllocate($img,0,0,255);
imagefilledrectangle($img, 20, 20, 80, 80, $Blue);
ImageJpeg ($img);
imagedestroy($img);
?  
--- 
?  //This is the include file (anyfile.php3)
$dummy=1;
? 

Expected result:

The image should be displayed

Actual result:
--
Image is not displayed





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



#24579 [Opn-Bgs]: output buffering dont work

2003-07-12 Thread elmicha
 ID:   24579
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lr at bestheads dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Linux
 PHP Version:  4.3.2
 New Comment:

I can't reproduce this with PHP 4.3.2. To make your script complete, I
appended:

ob_start(callback);
echo bla %TITLE% bla;
ob_end_flush();

and the PHP tags. If you can provide a _complete_, short script to
reproduce this problem, feel free to re-open this bug.


Previous Comments:


[2003-07-10 03:39:20] lr at bestheads dot com

Description:

could be related to #24121

have a site wich use outout buffering (ob_start(callback) (in the
callback funktion i do some str_replace 's ) in 4.3.1 it worked
perfekt.

in 4.3.2 it does not work. it seems the callback funktion is not
called.

if you need further information let me know.

Reproduce code:
---
function callback($buffer){
$buffer2=$buffer;
$buffer2=str_replace(%TITLE%,asdfadsf,$buffer2);
return $buffer2;
}






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



#24619 [NEW]: PHP5 crashes on global

2003-07-12 Thread mail at ciruz dot de
From: mail at ciruz dot de
Operating system: Linux (2.4.21)
PHP version:  5.0.0b1 (beta1)
PHP Bug Type: Reproducible crash
Bug description:  PHP5 crashes on global

Description:

PHP5 crashes with the attached code.
It seems to crash at the Entry 'GLOBAL' and some others.

Reproduce code:
---
This code is in a function. It should global every variable:
foreach($GLOBALS as $field=$value) if($field!='t'  $field!='r' 
$field!='field'  $field!='value') global ${$field};

The following code works, but is TOO SLOW!
foreach($GLOBALS as $field=$value) if($field!='t'  $field!='r' 
$field!='field'  $field!='value') eval('global $'.$field.';'); // Use
eval for PHP5 compatibility!

Expected result:

Every variable should be globales - only $t, $r, $field and $value not.

Actual result:
--
No output from PHP. It crashes and gives nothing back to Apache.

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



#24614 [Csd-Bgs]: php as cgi always report 'No input file specified.'

2003-07-12 Thread sniper
 ID:   24614
 Updated by:   [EMAIL PROTECTED]
 Reported By:  deptotecnico at towebs dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  4.3.3RC1
 New Comment:

..


Previous Comments:


[2003-07-12 03:22:05] deptotecnico at towebs dot com

after further investigation and debugging, setting doc_root in php.ini
fixed the issue. my apologies.



[2003-07-12 00:44:39] deptotecnico at towebs dot com

of course, this should be read as:

 .. looking around and I've seen several old reports for and a few new
ones, but no fixed whatsoever.



[2003-07-11 19:10:01] deptotecnico at towebs dot com

Description:

  
  If I compile php as cgi (--enable-force-cgi-redirect is not used), I
always get 'No input file specified' while browsing any .php file.
  I've tried with 4.3.1, 4.3.2 and 4.3.3RC1, with php.ini-recommended
as the init file. 
  php -v gives:

PHP 4.3.3RC1 (cgi) (built: Jul 11 2003 20:52:32)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

  running the same code from console (path/to/php/cgi file.php) works
fine. 
  I've been looking around and I've seen several old reports for this
and a few ones, but no fixed whatsoever.
  I've also checked the CVS repository, but doesn't seem like anything
has changed wrt in cgi_main.c.




Reproduce code:
---
?
phpinfo ();
?

Expected result:

phpinfo() output.

Actual result:
--
No input file specified.





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



#24619 [Opn-Csd]: PHP5 crashes on global

2003-07-12 Thread sniper
 ID:   24619
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mail at ciruz dot de
-Status:   Open
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux (2.4.21)
 PHP Version:  5.0.0b1 (beta1)
 New Comment:

Already fixed in CVS.



Previous Comments:


[2003-07-12 08:16:00] mail at ciruz dot de

Description:

PHP5 crashes with the attached code.
It seems to crash at the Entry 'GLOBAL' and some others.

Reproduce code:
---
This code is in a function. It should global every variable:
foreach($GLOBALS as $field=$value) if($field!='t'  $field!='r' 
$field!='field'  $field!='value') global ${$field};

The following code works, but is TOO SLOW!
foreach($GLOBALS as $field=$value) if($field!='t'  $field!='r' 
$field!='field'  $field!='value') eval('global $'.$field.';'); // Use
eval for PHP5 compatibility!

Expected result:

Every variable should be globales - only $t, $r, $field and $value not.

Actual result:
--
No output from PHP. It crashes and gives nothing back to Apache.





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



#24576 [Opn-Bgs]: Segmentation fault on sapi_initialize_empty_request

2003-07-12 Thread sniper
 ID:   24576
 Updated by:   [EMAIL PROTECTED]
 Reported By:  druid at mail dot cz
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.2
 New Comment:

Some gcc bug then.



Previous Comments:


[2003-07-12 06:11:31] druid at mail dot cz

There's no apache. I'm talking about the php binary. The sapi.

Fyi, I switched back to gcc 3.2.1 and everything's ok.



[2003-07-10 11:51:51] [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

(Make sure the build time is later than Jul 10, 2003 15:30.)

Which apache2 version? 
How was it configured?
How do you start it?
What other modules are enabled in it?




[2003-07-10 03:03:40] druid at mail dot cz

I tried php-5b1 and it is nearly the same, except the gdb output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 22382)]
0x081b1e50 in sapi_initialize_empty_request ()
(gdb) bt
#0  0x081b1e50 in sapi_initialize_empty_request ()
#1  0x081ac114 in php_module_startup ()
#2  0x40395ca6 in __libc_start_main () from /lib/libc.so.6



[2003-07-10 02:34:58] druid at mail dot cz

Description:

Php always crashes at start. I've tested it with sapi.
I've got the latest gcc and glibc:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr --enable-shared
--enable-threads=posix --with-slibdir=/lib --enable-__cxa_atexit
--enable-clocale=gnu --enable-__vt_8iostream
Thread model: posix
gcc version 3.3

./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib --enable-bcmath --with-bz2=shared --enable-calendar \
--enable-exif --enable-ftp --with-ttf --with-gettext \
--with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir \
--with-mysql --with-mysql-sock --with-recode=shared \
--with-imap --with-imap-ssl=/usr/local/ssl \
--enable-debug

glibc-2.3.2

Reproduce code:
---
SAPI_API void sapi_initialize_empty_request(TSRMLS_D)
{
SG(server_context) = NULL;
SG(request_info).request_method = NULL;
SG(request_info).auth_user = SG(request_info).auth_password =
NULL;
SG(request_info).content_type_dup = NULL;
}

The last line is the problem.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
sapi_initialize_empty_request () at /usr/src/php-4.3.2/main/SAPI.c:437
437 SG(request_info).content_type_dup = NULL;
(gdb) bt
#0  sapi_initialize_empty_request () at
/usr/src/php-4.3.2/main/SAPI.c:437
#1  0x081841d7 in php_module_startup (sf=0x82e02e0,
additional_modules=0x82e02e0, num_additional_modules=137240573)
at /usr/src/php-4.3.2/main/main.c:1083
#2  0x6e690078 in ?? ()






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



#24617 [Opn-Bgs]: i couldn't run php on winxp as a php moudle

2003-07-12 Thread sniper
 ID:   24617
 Updated by:   [EMAIL PROTECTED]
 Reported By:  khashayarsad at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: win xp
 PHP Version:  4.3.2
 New Comment:

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

Thank you for your interest in PHP.

...



Previous Comments:


[2003-07-12 04:04:16] khashayarsad at yahoo dot com

Description:

i use win xp and apache2 and php 4.3

i have add this line in http.cnf:
LoadModule php4_module c:\php\sapi\php4apache2.dll

and i have gotten this error:
Syntax error on line 173 of C:/Program Files/Apache
Group/Apache2/conf/httpd.conf:Can't locate API module structure
`php4_module' in file C:/php/sapi/php4apache2.dll: No error








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



#24576 [Bgs]: Segmentation fault on sapi_initialize_empty_request

2003-07-12 Thread druid at mail dot cz
 ID:   24576
 User updated by:  druid at mail dot cz
 Reported By:  druid at mail dot cz
 Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.2
 New Comment:

Only some incompatibility. I'm not saying that gcc 3.3 isn't crap but
it was stable version so we can expect that it will be included in some
distros... At least I wouldn't underestimate it.


Previous Comments:


[2003-07-12 09:11:38] [EMAIL PROTECTED]

Some gcc bug then.




[2003-07-12 06:11:31] druid at mail dot cz

There's no apache. I'm talking about the php binary. The sapi.

Fyi, I switched back to gcc 3.2.1 and everything's ok.



[2003-07-10 11:51:51] [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

(Make sure the build time is later than Jul 10, 2003 15:30.)

Which apache2 version? 
How was it configured?
How do you start it?
What other modules are enabled in it?




[2003-07-10 03:03:40] druid at mail dot cz

I tried php-5b1 and it is nearly the same, except the gdb output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 22382)]
0x081b1e50 in sapi_initialize_empty_request ()
(gdb) bt
#0  0x081b1e50 in sapi_initialize_empty_request ()
#1  0x081ac114 in php_module_startup ()
#2  0x40395ca6 in __libc_start_main () from /lib/libc.so.6



[2003-07-10 02:34:58] druid at mail dot cz

Description:

Php always crashes at start. I've tested it with sapi.
I've got the latest gcc and glibc:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr --enable-shared
--enable-threads=posix --with-slibdir=/lib --enable-__cxa_atexit
--enable-clocale=gnu --enable-__vt_8iostream
Thread model: posix
gcc version 3.3

./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib --enable-bcmath --with-bz2=shared --enable-calendar \
--enable-exif --enable-ftp --with-ttf --with-gettext \
--with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir \
--with-mysql --with-mysql-sock --with-recode=shared \
--with-imap --with-imap-ssl=/usr/local/ssl \
--enable-debug

glibc-2.3.2

Reproduce code:
---
SAPI_API void sapi_initialize_empty_request(TSRMLS_D)
{
SG(server_context) = NULL;
SG(request_info).request_method = NULL;
SG(request_info).auth_user = SG(request_info).auth_password =
NULL;
SG(request_info).content_type_dup = NULL;
}

The last line is the problem.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
sapi_initialize_empty_request () at /usr/src/php-4.3.2/main/SAPI.c:437
437 SG(request_info).content_type_dup = NULL;
(gdb) bt
#0  sapi_initialize_empty_request () at
/usr/src/php-4.3.2/main/SAPI.c:437
#1  0x081841d7 in php_module_startup (sf=0x82e02e0,
additional_modules=0x82e02e0, num_additional_modules=137240573)
at /usr/src/php-4.3.2/main/main.c:1083
#2  0x6e690078 in ?? ()






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



#24620 [NEW]: Error multi dimensional array

2003-07-12 Thread fadfdsj at libero dot it
From: fadfdsj at libero dot it
Operating system: FreeBSD 4.3
PHP version:  4.3.1
PHP Bug Type: Arrays related
Bug description:  Error multi dimensional array

Description:

I lost some information passin an array in a cicle. 
This is the link:
http://www.covelit.com/borsaitalia.php

Reproduce code:
---
?

error_reporting (E_ALL);

echo str_pad( , 256);
for ($j=1; $j=5; $j++)  {

// download the page

$link =
'http://www.24oreborsaonline.ilsole24ore.com/MainController?page=litalfc=litalflivello1='.
$j .'ind1=p=1s=2t=7';
$data = '';
// Read the page
$handle = fopen ($link, rb);
if ($handle){
  while (!feof($handle)) {
 $data.=fread($handle,4096);
  }
}
else{
echo File non Valido - Trim;
}
fclose($handle);

$ere = EOT
A
HREF=MainController\?page=dtquotamp;QUOTE=!(.*)\.MIamp;c=dtquotamp;i=!(.*).MIamp;ind1=(.*)amp;p=1amp;s=2amp;t=7(.*)\/A
EOT;


// Grab the information 

preg_match_all(/$ere/im, $data, $descr_titoli);

for ($i=0; $i = count($descr_titoli[0]); $i++) {
if ($descr_titoli[1][$i] != NULL) {

$anagrafica_titoli[$i]['COD'] = $descr_titoli[1][$i];

// Output the code as test
echo  $anagrafica_titoli[$i]['COD'].'br';
$anagrafica_titoli[$i]['ISDN'] = $descr_titoli[3][$i];
$anagrafica_titoli[$i]['DESCRIZIONE'] = $descr_titoli[4][$i];
}
}
}

// Print the array but the result is differet from the original
print_r($anagrafica_titoli);

?

Expected result:

I'm expecting that the array  $anagrafica_titoli  had 132 elements but it
have 43 elements.
 If I echo the result i obtain the corret data but when i store in an
array i lost some information

Actual result:
--
  
  
  
  
ASRbrACEbrAEGbrACObrAPMbrANGbrACPbrACSbrACTbrAFIbrAEbrAEMbrAETbrAISWbrARNbrALGLbrAZAbrALbrAMGbrAMPbrARQbrARTbrASMbrASTbrATbrAGLbrAUTbrADFbrADFRbrbr
/
bNotice/b:  Undefined offset:  29 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b on
line b28/bbr /
NTVbrBBVAbrCRGbrCRGRbrBDCbrBDBbrBDBRbrBFIbrBFEbrBFERbrBINbrBINRbrBLbrPRObrBSCbrBSRPbrBANbrBbrBAYbrBVbrBBbrBEbrBENbrBNSbrBSSbrBIbrBPLbrBNLbrBNLRbrBOEbrBFbrBREbrBRIbrBULbrBZURbrBZUbrPCREbrPELbrPINbrPLObrPMIbrSPObrBPUbrBPVNbrbr
/
bNotice/b:  Undefined offset:  44 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b on
line b28/bbr /
CLTbrCADbrCAIbrCEDbrCALTRbrCALTbrCMFbrCPRbrCAPbrCDNbrCARRbrCASSbrCDBbrCDCbrCMBbrCEMbrCZbrCHLbrCIRbrCRObrCLEbrCOFbrCRAbrCBbrCFIbrCVALbrCEbrCRMbrCREbrCSPbrCTObrCCbrRICbrbr
/
bNotice/b:  Undefined offset:  33 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b on
line b28/bbr /
DAbrDbrDANbrDANRbrDASbrDALbrDAMbrDLGbrDIBbrDMAbrDMHbrbr
/
bNotice/b:  Undefined offset:  11 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b on
line b28/bbr /
EBIbrEDNbrEDNRbrELNbrEMbrENELbrENRbrENGbrENIbrPLAbrERGbrERIbrESbrPRTbrEUPbrbr
/
bNotice/b:  Undefined offset:  15 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b on
line b28/bbr /
Array
(
[0] = Array
(
[COD] = EBI
[ISDN] = IT0001423562
[DESCRIZIONE] = e.Biscom
)

[1] = Array
(
[COD] = EDN
[ISDN] = IT0003152417
[DESCRIZIONE] = Edison
)

[2] = Array
(
[COD] = EDNR
[ISDN] = IT0003372205
[DESCRIZIONE] = Edison r
)

[3] = Array
(
[COD] = ELN
[ISDN] = IT0001481867
[DESCRIZIONE] = El.En.
)

[4] = Array
(
[COD] = EM
[ISDN] = IT0001237053
[DESCRIZIONE] = Emak
)

[5] = Array
(
[COD] = ENEL
[ISDN] = IT0003128367
[DESCRIZIONE] = Enel
)

[6] = Array
(
[COD] = ENR
[ISDN] = IT076189
[DESCRIZIONE] = EnerTAD
)

[7] = Array
(
[COD] = ENG
[ISDN] = IT0003029441
[DESCRIZIONE] = Engineering
)

[8] = Array
(
[COD] = ENI
[ISDN] = IT0003132476
[DESCRIZIONE] = Eni
)

[9] = Array
(
[COD] = PLA
[ISDN] = IT0001439725
[DESCRIZIONE] = ePlanet
)

[10] = Array
(
[COD] = ERG
[ISDN] = IT0001157020
[DESCRIZIONE] = Erg
)

[11] = Array
(
[COD] = ERI
[ISDN] = IT072816
[DESCRIZIONE] = Ericsson
)

[12] = Array
(
[COD] = ES
[ISDN] = IT0001398541
[DESCRIZIONE] = Espresso
)

[13] = Array
(
[COD] = PRT
[ISDN] = 

#24620 [Opn]: Error multi dimensional array

2003-07-12 Thread fadfdsj at libero dot it
 ID:   24620
 User updated by:  fadfdsj at libero dot it
 Reported By:  fadfdsj at libero dot it
 Status:   Open
 Bug Type: Arrays related
 Operating System: FreeBSD 4.3
 PHP Version:  4.3.1
 New Comment:

I have to grab some information by a web site.


Previous Comments:


[2003-07-12 10:16:53] fadfdsj at libero dot it

Description:

I lost some information passin an array in a cicle. 
This is the link:
http://www.covelit.com/borsaitalia.php

Reproduce code:
---
?

error_reporting (E_ALL);

echo str_pad( , 256);
for ($j=1; $j=5; $j++)  {

// download the page

$link =
'http://www.24oreborsaonline.ilsole24ore.com/MainController?page=litalfc=litalflivello1='.
$j .'ind1=p=1s=2t=7';
$data = '';
// Read the page
$handle = fopen ($link, rb);
if ($handle){
  while (!feof($handle)) {
 $data.=fread($handle,4096);
  }
}
else{
echo File non Valido - Trim;
}
fclose($handle);

$ere = EOT
A
HREF=MainController\?page=dtquotamp;QUOTE=!(.*)\.MIamp;c=dtquotamp;i=!(.*).MIamp;ind1=(.*)amp;p=1amp;s=2amp;t=7(.*)\/A
EOT;


// Grab the information 

preg_match_all(/$ere/im, $data, $descr_titoli);

for ($i=0; $i = count($descr_titoli[0]); $i++) {
if ($descr_titoli[1][$i] != NULL) {

$anagrafica_titoli[$i]['COD'] = $descr_titoli[1][$i];

// Output the code as test
echo  $anagrafica_titoli[$i]['COD'].'br';
$anagrafica_titoli[$i]['ISDN'] = $descr_titoli[3][$i];
$anagrafica_titoli[$i]['DESCRIZIONE'] = $descr_titoli[4][$i];
}
}
}

// Print the array but the result is differet from the original
print_r($anagrafica_titoli);

?

Expected result:

I'm expecting that the array  $anagrafica_titoli  had 132 elements but
it have 43 elements.
 If I echo the result i obtain the corret data but when i store in an
array i lost some information

Actual result:
--
   
   
   
   
ASRbrACEbrAEGbrACObrAPMbrANGbrACPbrACSbrACTbrAFIbrAEbrAEMbrAETbrAISWbrARNbrALGLbrAZAbrALbrAMGbrAMPbrARQbrARTbrASMbrASTbrATbrAGLbrAUTbrADFbrADFRbrbr
/
bNotice/b:  Undefined offset:  29 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
NTVbrBBVAbrCRGbrCRGRbrBDCbrBDBbrBDBRbrBFIbrBFEbrBFERbrBINbrBINRbrBLbrPRObrBSCbrBSRPbrBANbrBbrBAYbrBVbrBBbrBEbrBENbrBNSbrBSSbrBIbrBPLbrBNLbrBNLRbrBOEbrBFbrBREbrBRIbrBULbrBZURbrBZUbrPCREbrPELbrPINbrPLObrPMIbrSPObrBPUbrBPVNbrbr
/
bNotice/b:  Undefined offset:  44 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
CLTbrCADbrCAIbrCEDbrCALTRbrCALTbrCMFbrCPRbrCAPbrCDNbrCARRbrCASSbrCDBbrCDCbrCMBbrCEMbrCZbrCHLbrCIRbrCRObrCLEbrCOFbrCRAbrCBbrCFIbrCVALbrCEbrCRMbrCREbrCSPbrCTObrCCbrRICbrbr
/
bNotice/b:  Undefined offset:  33 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
DAbrDbrDANbrDANRbrDASbrDALbrDAMbrDLGbrDIBbrDMAbrDMHbrbr
/
bNotice/b:  Undefined offset:  11 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
EBIbrEDNbrEDNRbrELNbrEMbrENELbrENRbrENGbrENIbrPLAbrERGbrERIbrESbrPRTbrEUPbrbr
/
bNotice/b:  Undefined offset:  15 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
Array
(
[0] = Array
(
[COD] = EBI
[ISDN] = IT0001423562
[DESCRIZIONE] = e.Biscom
)

[1] = Array
(
[COD] = EDN
[ISDN] = IT0003152417
[DESCRIZIONE] = Edison
)

[2] = Array
(
[COD] = EDNR
[ISDN] = IT0003372205
[DESCRIZIONE] = Edison r
)

[3] = Array
(
[COD] = ELN
[ISDN] = IT0001481867
[DESCRIZIONE] = El.En.
)

[4] = Array
(
[COD] = EM
[ISDN] = IT0001237053
[DESCRIZIONE] = Emak
)

[5] = Array
(
[COD] = ENEL
[ISDN] = IT0003128367
[DESCRIZIONE] = Enel
)

[6] = Array
(
[COD] = ENR
[ISDN] = IT076189
[DESCRIZIONE] = EnerTAD
)

[7] = Array
(
[COD] = ENG
[ISDN] = IT0003029441
[DESCRIZIONE] = Engineering
)

[8] = Array
(
[COD] = ENI
[ISDN] = IT0003132476
[DESCRIZIONE] = Eni
)

[9] = Array
(
[COD] = PLA
[ISDN] = IT0001439725
[DESCRIZIONE] = ePlanet
)

[10] = Array
(
[COD] = ERG
[ISDN] = IT0001157020
[DESCRIZIONE] = Erg
)

[11] = Array
(
[COD] = ERI
[ISDN] = 

#24614 [Bgs-Csd]: php as cgi always report 'No input file specified.'

2003-07-12 Thread deptotecnico at towebs dot com
 ID:   24614
 User updated by:  deptotecnico at towebs dot com
 Reported By:  deptotecnico at towebs dot com
-Status:   Bogus
+Status:   Closed
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  4.3.3RC1
 New Comment:

sigh. what really fixed the problem was adding --enable-discard-path.


Previous Comments:


[2003-07-12 08:17:55] [EMAIL PROTECTED]

..



[2003-07-12 03:22:05] deptotecnico at towebs dot com

after further investigation and debugging, setting doc_root in php.ini
fixed the issue. my apologies.



[2003-07-12 00:44:39] deptotecnico at towebs dot com

of course, this should be read as:

 .. looking around and I've seen several old reports for and a few new
ones, but no fixed whatsoever.



[2003-07-11 19:10:01] deptotecnico at towebs dot com

Description:

  
  If I compile php as cgi (--enable-force-cgi-redirect is not used), I
always get 'No input file specified' while browsing any .php file.
  I've tried with 4.3.1, 4.3.2 and 4.3.3RC1, with php.ini-recommended
as the init file. 
  php -v gives:

PHP 4.3.3RC1 (cgi) (built: Jul 11 2003 20:52:32)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

  running the same code from console (path/to/php/cgi file.php) works
fine. 
  I've been looking around and I've seen several old reports for this
and a few ones, but no fixed whatsoever.
  I've also checked the CVS repository, but doesn't seem like anything
has changed wrt in cgi_main.c.




Reproduce code:
---
?
phpinfo ();
?

Expected result:

phpinfo() output.

Actual result:
--
No input file specified.





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



#24621 [NEW]: Unable to load php_mysql.dll - The specified procedure could not be found

2003-07-12 Thread eric at cosky dot com
From: eric at cosky dot com
Operating system: Windows XP SP 1
PHP version:  5CVS-2003-07-12 (dev)
PHP Bug Type: MySQL related
Bug description:  Unable to load php_mysql.dll - The specified procedure could not be 
found

Description:

Using PHP snapshot file from today: php5-win32-200307121430.zip

PHP appears to be installed and working, except when I tried to use
phpMyAdmin with it where phpMyAdmin started saying that mysql support
wasn't enabled. Looking into it further, php_info() does not show any
mysql extensions enabled. I haven't seen it clearly stated that mysql
needs to be explicitly loaded now in php version 5.0 but it has been
implied in a couple places so I think the thing to do was add the
following line to php.ini:

extension=php_mysql.dll


When starting php, this dialog box comes up:

Unknown(): Unable to load dynamic library
'C:\php\extensions\php_mysql.dll' - The specified procedure could not be
found

This seems like it is what I need to be doing, and the result seems
possibly due to a bug.
Thanks for any info,
Eric Cosky


Reproduce code:
---
?php php_info(); ?

Expected result:

I expect to see mysql extensions described along with everything else.


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



#24623 [NEW]: G for Gigabytes

2003-07-12 Thread chkno at chkno dot net
From: chkno at chkno dot net
Operating system: 
PHP version:  Irrelevant
PHP Bug Type: Feature/Change Request
Bug description:  G for Gigabytes

Description:

In the php.ini parser, 2M is shorthand for 2 megabytes (2 * 
1024 * 1024). 
 
Can we have a G for Gigabytes? 

Reproduce code:
---
; (in php.ini)

upload_max_filesize = 2G

Actual result:
--
PHP Warning:  upload_max_filesize of 2 bytes exceeded - file 
[file=test] not saved in Unknown on line 0, referer: 
http://chkno.com/upload.php 

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



#24621 [Bgs]: Unable to load php_mysql.dll - The specified procedure could not be found

2003-07-12 Thread eric at cosky dot com
 ID:   24621
 User updated by:  eric at cosky dot com
 Reported By:  eric at cosky dot com
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: Windows XP SP 1
 PHP Version:  5CVS-2003-07-12 (dev)
 New Comment:

Thanks for the quick suggestion!

That wasn't quite the problem, but close enough to give me a clue for
what to look for. After I verified the DLL was in fact being loaded, I
was able to determine that the DLL being loaded wasn't the correct
version - I had a DLL from a previous version of PHP lingering in my
windows/system32 folder that was getting found in the search path
before the current version.

Once again I am reminded of why I should never copy DLLs to the windows
directory and instead just update global path search variables so I
don't have old versions lurking about like this.

Thanks again,
Eric Cosky


Previous Comments:


[2003-07-12 13:22:49] [EMAIL PROTECTED]

Be sure to also copy libmySQL.dll to the appropriate location (like you
do with every other DLL in the dlls/ folder).



[2003-07-12 12:44:09] eric at cosky dot com

Description:

Using PHP snapshot file from today: php5-win32-200307121430.zip

PHP appears to be installed and working, except when I tried to use
phpMyAdmin with it where phpMyAdmin started saying that mysql support
wasn't enabled. Looking into it further, php_info() does not show any
mysql extensions enabled. I haven't seen it clearly stated that mysql
needs to be explicitly loaded now in php version 5.0 but it has been
implied in a couple places so I think the thing to do was add the
following line to php.ini:

extension=php_mysql.dll


When starting php, this dialog box comes up:

Unknown(): Unable to load dynamic library
'C:\php\extensions\php_mysql.dll' - The specified procedure could not
be found

This seems like it is what I need to be doing, and the result seems
possibly due to a bug.
Thanks for any info,
Eric Cosky


Reproduce code:
---
?php php_info(); ?

Expected result:

I expect to see mysql extensions described along with everything else.






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



#24624 [NEW]: post_max_size et al 32bit signed integers

2003-07-12 Thread chkno at chkno dot net
From: chkno at chkno dot net
Operating system: FreeBSD-4.8 i386
PHP version:  4.3.3RC1
PHP Bug Type: Feature/Change Request
Bug description:  post_max_size et al 32bit signed integers

Description:

PHP stores some config variables (eg post_max_size ) as 32 bit 
signed integers when more space would be useful. 
 
 

Reproduce code:
---
; (in php.ini)

post_max_size = 2049M

Actual result:
--
PHP Warning:  POST Content-Length of 0 bytes exceeds the 
limit of -2146435072 bytes in Unknown on line 0, referer: 
http://chkno.com/upload.php 

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



#24623 [Com]: G for Gigabytes

2003-07-12 Thread b_ulrich at t-online dot de
 ID:  24623
 Comment by:  b_ulrich at t-online dot de
 Reported By: chkno at chkno dot net
 Status:  Open
 Bug Type:Feature/Change Request
 PHP Version: Irrelevant
 New Comment:

If you will add the G for Gigabytes just add the T for Terabytes too,
so it will be future save until doomsday. (or at least for the next 5
or 10 years :-) )


Previous Comments:


[2003-07-12 16:17:42] chkno at chkno dot net

Description:

In the php.ini parser, 2M is shorthand for 2 megabytes (2 * 
1024 * 1024). 
 
Can we have a G for Gigabytes? 

Reproduce code:
---
; (in php.ini)

upload_max_filesize = 2G

Actual result:
--
PHP Warning:  upload_max_filesize of 2 bytes exceeded - file 
[file=test] not saved in Unknown on line 0, referer: 
http://chkno.com/upload.php 





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



#24625 [NEW]: Objects get unregistered from session when using floats

2003-07-12 Thread martin at bamg dot ca
From: martin at bamg dot ca
Operating system: RH7.3
PHP version:  4.3.2
PHP Bug Type: Session related
Bug description:  Objects get unregistered from session when using floats

Description:

CONFIG:
./configure --with-apxs=/usr/local/apache/bin/apxs
--with-png-dir=../libpng-1.2.5/ --with-zlib-dir=../zlib-1.1.4/
--enable-ftp --with-jpeg-dir=../jpeg-6b/ --with-mysql=../../mysql
--enable-gd-imgstrttf --enable-gd-native-ttf --with-mm=../mm-1.3.0/
--enable-trans-sid --with-mcrypt --enable-memory-limit --with-gd
--enable-cgi-redirect

Making any of a registered object's variables into floats de-registers the
object from the session.



Reproduce code:
---
session_start();
session_register( test );
echo IS OBJECT:  . is_object( $test );

class testclass {
var $float;

function testclass() {
$this-float = 2;
}

function setValue( $val ) {
$this-float = $val;
}
}
$test = new testclass();
//$test-setValue( 2.0 ); //uncomment here


Expected result:

In the provided code, running the script and reloading the page returns:

IS OBJECT: 1

which is fine

Actual result:
--
Now, uncommenting the last line of the script, which sets $this-float
to a float value and reloading the page returns:

IS OBJECT:

which is not good. $test is no longer recognized as an object.

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



#24625 [Opn]: Objects get unregistered from session when using floats

2003-07-12 Thread martin at bamg dot ca
 ID:   24625
 User updated by:  martin at bamg dot ca
 Reported By:  martin at bamg dot ca
 Status:   Open
 Bug Type: Session related
 Operating System: RH7.3
 PHP Version:  4.3.2
 New Comment:

mistake in my email address. oops: martin at bang dot ca. can't seem
to edit it now...


Previous Comments:


[2003-07-12 17:34:31] martin at bamg dot ca

Description:

CONFIG:
./configure --with-apxs=/usr/local/apache/bin/apxs
--with-png-dir=../libpng-1.2.5/ --with-zlib-dir=../zlib-1.1.4/
--enable-ftp --with-jpeg-dir=../jpeg-6b/ --with-mysql=../../mysql
--enable-gd-imgstrttf --enable-gd-native-ttf --with-mm=../mm-1.3.0/
--enable-trans-sid --with-mcrypt --enable-memory-limit --with-gd
--enable-cgi-redirect

Making any of a registered object's variables into floats de-registers
the object from the session.



Reproduce code:
---
session_start();
session_register( test );
echo IS OBJECT:  . is_object( $test );

class testclass {
var $float;

function testclass() {
$this-float = 2;
}

function setValue( $val ) {
$this-float = $val;
}
}
$test = new testclass();
//$test-setValue( 2.0 ); //uncomment here


Expected result:

In the provided code, running the script and reloading the page
returns:

IS OBJECT: 1

which is fine

Actual result:
--
Now, uncommenting the last line of the script, which sets
$this-float to a float value and reloading the page returns:

IS OBJECT:

which is not good. $test is no longer recognized as an object.





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



#24626 [NEW]: foreach stops with boolen expresion in loop

2003-07-12 Thread eric at austarmetro dot com dot au
From: eric at austarmetro dot com dot au
Operating system: Win XP
PHP version:  4.3.3RC1
PHP Bug Type: Scripting Engine problem
Bug description:  foreach stops with boolen expresion in loop

Description:

The foreach loop exits early and sets the $status variable to .
The problem is fixed by changing 
$status = $status  status( $b );
to
$status = status( $b );

Hope this is bogus :)
I have tried this on WinXP PHP4.3.3RC1 and FREEBSD PHP4.3.1 both give the
same result.

Eric


Reproduce code:
---
?
function status( $c ) {
   echo $c;
   if( $c == 'two' )
  return 0;
   return 1;
}

$a = array( 'one ','two ','three ','four ' );
$status = 1;
foreach( $a as $b )
{
 $status = $status   status( $b );
}
echo  foreach stopped. Status = .$status;
if( isset( $status ) )
 echo  set ;
else
 echo unset;
?

Expected result:

onetwothreefour foreach stopped. Status = 0 set

Actual result:
--
onetwo foreach stopped. Status = set

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



#24627 [NEW]: feof always returns false

2003-07-12 Thread duerra at yahoo dot com
From: duerra at yahoo dot com
Operating system: XP Pro
PHP version:  4.3.3RC1
PHP Bug Type: Filesystem function related
Bug description:  feof always returns false

Description:

In PHP 4.3.3RC1, feof (Windows) always returns false in the code provided
below, and goes into an endless loop.

Reproduce code:
---
$count = 0;
if ($handle = opendir(./))
{
  while (false !== ($file = readdir($handle)))
  { 
if(!is_dir($file) AND $file != '.' AND $file !='..' AND $file
!='default' AND (strstr($file, .php) OR strstr($file, .htm) OR
strstr($file, .txt)))
{
  if(!$open = fopen($file, r))
  {
echo Could Not Open File;
exit;
  }
  while(!feof($open))
  {
$count++;
  }
  fclose($open);
}   
  }
}
echo $count;

Expected result:

123456
(or another number)

Actual result:
--
Infinite loop once a file is opened (I cut out the test code that I used
to verify that it's actually a bug in order to stay within the 20 line
limit).

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



#24614 [Csd-Bgs]: php as cgi always report 'No input file specified.'

2003-07-12 Thread sniper
 ID:   24614
 Updated by:   [EMAIL PROTECTED]
 Reported By:  deptotecnico at towebs dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  4.3.3RC1
 New Comment:

Whatever, it's still user error. Please don't touch this anymore.



Previous Comments:


[2003-07-12 11:34:10] deptotecnico at towebs dot com

sigh. what really fixed the problem was adding --enable-discard-path.



[2003-07-12 08:17:55] [EMAIL PROTECTED]

..



[2003-07-12 03:22:05] deptotecnico at towebs dot com

after further investigation and debugging, setting doc_root in php.ini
fixed the issue. my apologies.



[2003-07-12 00:44:39] deptotecnico at towebs dot com

of course, this should be read as:

 .. looking around and I've seen several old reports for and a few new
ones, but no fixed whatsoever.



[2003-07-11 19:10:01] deptotecnico at towebs dot com

Description:

  
  If I compile php as cgi (--enable-force-cgi-redirect is not used), I
always get 'No input file specified' while browsing any .php file.
  I've tried with 4.3.1, 4.3.2 and 4.3.3RC1, with php.ini-recommended
as the init file. 
  php -v gives:

PHP 4.3.3RC1 (cgi) (built: Jul 11 2003 20:52:32)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

  running the same code from console (path/to/php/cgi file.php) works
fine. 
  I've been looking around and I've seen several old reports for this
and a few ones, but no fixed whatsoever.
  I've also checked the CVS repository, but doesn't seem like anything
has changed wrt in cgi_main.c.




Reproduce code:
---
?
phpinfo ();
?

Expected result:

phpinfo() output.

Actual result:
--
No input file specified.





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



#24620 [Opn-Bgs]: Error multi dimensional array

2003-07-12 Thread sniper
 ID:   24620
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fadfdsj at libero dot it
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: FreeBSD 4.3
 PHP Version:  4.3.1
 New Comment:

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

Thank you for your interest in PHP.

..


Previous Comments:


[2003-07-12 10:19:08] fadfdsj at libero dot it

I have to grab some information by a web site.



[2003-07-12 10:16:53] fadfdsj at libero dot it

Description:

I lost some information passin an array in a cicle. 
This is the link:
http://www.covelit.com/borsaitalia.php

Reproduce code:
---
?

error_reporting (E_ALL);

echo str_pad( , 256);
for ($j=1; $j=5; $j++)  {

// download the page

$link =
'http://www.24oreborsaonline.ilsole24ore.com/MainController?page=litalfc=litalflivello1='.
$j .'ind1=p=1s=2t=7';
$data = '';
// Read the page
$handle = fopen ($link, rb);
if ($handle){
  while (!feof($handle)) {
 $data.=fread($handle,4096);
  }
}
else{
echo File non Valido - Trim;
}
fclose($handle);

$ere = EOT
A
HREF=MainController\?page=dtquotamp;QUOTE=!(.*)\.MIamp;c=dtquotamp;i=!(.*).MIamp;ind1=(.*)amp;p=1amp;s=2amp;t=7(.*)\/A
EOT;


// Grab the information 

preg_match_all(/$ere/im, $data, $descr_titoli);

for ($i=0; $i = count($descr_titoli[0]); $i++) {
if ($descr_titoli[1][$i] != NULL) {

$anagrafica_titoli[$i]['COD'] = $descr_titoli[1][$i];

// Output the code as test
echo  $anagrafica_titoli[$i]['COD'].'br';
$anagrafica_titoli[$i]['ISDN'] = $descr_titoli[3][$i];
$anagrafica_titoli[$i]['DESCRIZIONE'] = $descr_titoli[4][$i];
}
}
}

// Print the array but the result is differet from the original
print_r($anagrafica_titoli);

?

Expected result:

I'm expecting that the array  $anagrafica_titoli  had 132 elements but
it have 43 elements.
 If I echo the result i obtain the corret data but when i store in an
array i lost some information

Actual result:
--
   
   
   
   
ASRbrACEbrAEGbrACObrAPMbrANGbrACPbrACSbrACTbrAFIbrAEbrAEMbrAETbrAISWbrARNbrALGLbrAZAbrALbrAMGbrAMPbrARQbrARTbrASMbrASTbrATbrAGLbrAUTbrADFbrADFRbrbr
/
bNotice/b:  Undefined offset:  29 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
NTVbrBBVAbrCRGbrCRGRbrBDCbrBDBbrBDBRbrBFIbrBFEbrBFERbrBINbrBINRbrBLbrPRObrBSCbrBSRPbrBANbrBbrBAYbrBVbrBBbrBEbrBENbrBNSbrBSSbrBIbrBPLbrBNLbrBNLRbrBOEbrBFbrBREbrBRIbrBULbrBZURbrBZUbrPCREbrPELbrPINbrPLObrPMIbrSPObrBPUbrBPVNbrbr
/
bNotice/b:  Undefined offset:  44 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
CLTbrCADbrCAIbrCEDbrCALTRbrCALTbrCMFbrCPRbrCAPbrCDNbrCARRbrCASSbrCDBbrCDCbrCMBbrCEMbrCZbrCHLbrCIRbrCRObrCLEbrCOFbrCRAbrCBbrCFIbrCVALbrCEbrCRMbrCREbrCSPbrCTObrCCbrRICbrbr
/
bNotice/b:  Undefined offset:  33 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
DAbrDbrDANbrDANRbrDASbrDALbrDAMbrDLGbrDIBbrDMAbrDMHbrbr
/
bNotice/b:  Undefined offset:  11 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
EBIbrEDNbrEDNRbrELNbrEMbrENELbrENRbrENGbrENIbrPLAbrERGbrERIbrESbrPRTbrEUPbrbr
/
bNotice/b:  Undefined offset:  15 in
b/usr/local/psa/home/vhosts/covelit.com/httpdocs/borsaitalia.php/b
on line b28/bbr /
Array
(
[0] = Array
(
[COD] = EBI
[ISDN] = IT0001423562
[DESCRIZIONE] = e.Biscom
)

[1] = Array
(
[COD] = EDN
[ISDN] = IT0003152417
[DESCRIZIONE] = Edison
)

[2] = Array
(
[COD] = EDNR
[ISDN] = IT0003372205
[DESCRIZIONE] = Edison r
)

[3] = Array
(
[COD] = ELN
[ISDN] = IT0001481867
[DESCRIZIONE] = El.En.
)

[4] = Array
(
[COD] = EM
[ISDN] = IT0001237053
[DESCRIZIONE] = Emak
)

[5] = Array
(
[COD] = ENEL
[ISDN] = IT0003128367
[DESCRIZIONE] = Enel
)

[6] = Array
(
[COD] = ENR
[ISDN] = IT076189
[DESCRIZIONE] = EnerTAD
)

[7] = Array
(
[COD] = ENG
[ISDN] = IT0003029441
[DESCRIZIONE] = Engineering
)

[8] = Array
(

#24627 [Com]: feof always returns false

2003-07-12 Thread b_ulrich at t-online dot de
 ID:   24627
 Comment by:   b_ulrich at t-online dot de
 Reported By:  duerra at yahoo dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

Your example works correct:
while(!feof($open))
  {
$count++;
  }

must be an endless loop because the filepointer never moves.
Maybe you should do an fread($open,1024); inside the while loop. Or
what ever you want to count.


Previous Comments:


[2003-07-12 18:07:44] duerra at yahoo dot com

Description:

In PHP 4.3.3RC1, feof (Windows) always returns false in the code
provided below, and goes into an endless loop.

Reproduce code:
---
$count = 0;
if ($handle = opendir(./))
{
  while (false !== ($file = readdir($handle)))
  { 
if(!is_dir($file) AND $file != '.' AND $file !='..' AND $file
!='default' AND (strstr($file, .php) OR strstr($file, .htm) OR
strstr($file, .txt)))
{
  if(!$open = fopen($file, r))
  {
echo Could Not Open File;
exit;
  }
  while(!feof($open))
  {
$count++;
  }
  fclose($open);
}   
  }
}
echo $count;

Expected result:

123456
(or another number)

Actual result:
--
Infinite loop once a file is opened (I cut out the test code that I
used to verify that it's actually a bug in order to stay within the 20
line limit).





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



#24626 [Opn-Bgs]: foreach stops with boolen expresion in loop

2003-07-12 Thread elmicha
 ID:   24626
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eric at austarmetro dot com dot au
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Win XP
 PHP Version:  4.3.3RC1
 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.

 is a boolean operator,  works bitwise (on integers, not on
strings). = also works bitwise.

And $c == 'two' does never happen in the script you posted. If you
remove the spaces from your $a values, $status('two') will return 0,
which makes $status 0. After that, the status() function is never
called again, because $status already is 0, which is equivalent to
false (short-circuit evaluation). Stick some echos in the loop and
you'll see that it works just fine.


Previous Comments:


[2003-07-12 17:45:22] eric at austarmetro dot com dot au

Description:

The foreach loop exits early and sets the $status variable to .
The problem is fixed by changing 
$status = $status  status( $b );
to
$status = status( $b );

Hope this is bogus :)
I have tried this on WinXP PHP4.3.3RC1 and FREEBSD PHP4.3.1 both give
the same result.

Eric


Reproduce code:
---
?
function status( $c ) {
   echo $c;
   if( $c == 'two' )
  return 0;
   return 1;
}

$a = array( 'one ','two ','three ','four ' );
$status = 1;
foreach( $a as $b )
{
 $status = $status   status( $b );
}
echo  foreach stopped. Status = .$status;
if( isset( $status ) )
 echo  set ;
else
 echo unset;
?

Expected result:

onetwothreefour foreach stopped. Status = 0 set

Actual result:
--
onetwo foreach stopped. Status = set





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



#24627 [Opn-Bgs]: feof always returns false

2003-07-12 Thread elmicha
 ID:   24627
 Updated by:   [EMAIL PROTECTED]
 Reported By:  duerra at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 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

Yes, b_ulrich is right.


Previous Comments:


[2003-07-12 18:21:03] b_ulrich at t-online dot de

Your example works correct:
while(!feof($open))
  {
$count++;
  }

must be an endless loop because the filepointer never moves.
Maybe you should do an fread($open,1024); inside the while loop. Or
what ever you want to count.



[2003-07-12 18:07:44] duerra at yahoo dot com

Description:

In PHP 4.3.3RC1, feof (Windows) always returns false in the code
provided below, and goes into an endless loop.

Reproduce code:
---
$count = 0;
if ($handle = opendir(./))
{
  while (false !== ($file = readdir($handle)))
  { 
if(!is_dir($file) AND $file != '.' AND $file !='..' AND $file
!='default' AND (strstr($file, .php) OR strstr($file, .htm) OR
strstr($file, .txt)))
{
  if(!$open = fopen($file, r))
  {
echo Could Not Open File;
exit;
  }
  while(!feof($open))
  {
$count++;
  }
  fclose($open);
}   
  }
}
echo $count;

Expected result:

123456
(or another number)

Actual result:
--
Infinite loop once a file is opened (I cut out the test code that I
used to verify that it's actually a bug in order to stay within the 20
line limit).





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



#24627 [Bgs]: feof always returns false

2003-07-12 Thread duerra at yahoo dot com
 ID:   24627
 User updated by:  duerra at yahoo dot com
 Reported By:  duerra at yahoo dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

This always worked correct in previous versions of PHP.  It wasn't
until the move to 4.3.3RC1 (from 4.3.2) that I had this infinite
looping problem.


Previous Comments:


[2003-07-12 18:28:42] [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

Yes, b_ulrich is right.



[2003-07-12 18:21:03] b_ulrich at t-online dot de

Your example works correct:
while(!feof($open))
  {
$count++;
  }

must be an endless loop because the filepointer never moves.
Maybe you should do an fread($open,1024); inside the while loop. Or
what ever you want to count.



[2003-07-12 18:07:44] duerra at yahoo dot com

Description:

In PHP 4.3.3RC1, feof (Windows) always returns false in the code
provided below, and goes into an endless loop.

Reproduce code:
---
$count = 0;
if ($handle = opendir(./))
{
  while (false !== ($file = readdir($handle)))
  { 
if(!is_dir($file) AND $file != '.' AND $file !='..' AND $file
!='default' AND (strstr($file, .php) OR strstr($file, .htm) OR
strstr($file, .txt)))
{
  if(!$open = fopen($file, r))
  {
echo Could Not Open File;
exit;
  }
  while(!feof($open))
  {
$count++;
  }
  fclose($open);
}   
  }
}
echo $count;

Expected result:

123456
(or another number)

Actual result:
--
Infinite loop once a file is opened (I cut out the test code that I
used to verify that it's actually a bug in order to stay within the 20
line limit).





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



#24628 [NEW]: missing space

2003-07-12 Thread prof_moriarty at veryfast dot biz
From: prof_moriarty at veryfast dot biz
Operating system: win98
PHP version:  4.3.2
PHP Bug Type: MySQL related
Bug description:  missing space

Description:

Exeptionally minor bug, but a bug nonetheless.
mysql_stat, documentation says that the resulting string should be
explodable into 7 elements

However in reality it can only be broken up into 6 elements.

It's broken up using double space. I've used preg_replace, and explode,
and either way i only get 6 results when splitting via double space   .

Basically, there's a missing space in the output, between the end of 'open
tables', and the start of 'queries per sec'.

Shouldn't take a fraction of a sec to fix. :)

Reproduce code:
---
var_dump(explode('  ', mysql_stat()));

Expected result:

Array
(
[0] = Uptime: 5380
[1] = Threads: 2
[2] = Questions: 1321299
[3] = Slow queries: 0
[4] = Opens: 26
[5] = Flush tables: 1
[6] = Open tables: 17
[7] = Queries per second avg: 245.595
)

Actual result:
--
array(7) {
  [0]=
  string(12) Uptime: 6910
  [1]=
  string(10) Threads: 2
  [2]=
  string(15) Questions: 2229
  [3]=
  string(15) Slow queries: 0
  [4]=
  string(9) Opens: 77
  [5]=
  string(15) Flush tables: 1
  [6]=
  string(45) Open tables: 13 Queries per second avg: 0.323
}

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



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

2003-07-12 Thread daten at breitraum dot com
 ID:   20110
 Comment by:   daten at breitraum dot com
 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:

hi,
I got this bug too.
PHP Version 4.2.3

I got a class 
CAdminBorder - extends CAdmin
CAdmin extents CAdminAttitudes

if the construktor of cadmin i used a function
in CAdminAttitudes
like this:
$this-PasswordFile = $this-getPasswordFile();
result:
Fatal error: input in flex scanner failed in mypath on line 1

Then I try this:
$this-PasswordFile = parent::getPasswordFile();
everything works fine.


Previous Comments:


[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.





[2002-10-26 15:05:14] jeroen at unfix dot org

Severity: Cosmetic for error reporting

PHP Fatal error:  input in flex scanner failed in directoryname

When doing a:
8
include(/tmp/);
8

For instance will produce above error, maybe a You can't include
directories would be nice?






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



#24629 [NEW]: Socket_select doesnt work

2003-07-12 Thread zparta at skebo dot ac
From: zparta at skebo dot ac
Operating system: FreeBSD 4.8
PHP version:  4.3.3RC1
PHP Bug Type: Sockets related
Bug description:  Socket_select doesnt work

Description:

cant use socket_select in freebsd with neither 4.3.3rc1 or 4.3.2 when
using real sockets not fsockets

Reproduce code:
---
dont have any

Expected result:

dont know


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



#24629 [Opn-Fbk]: Socket_select doesnt work

2003-07-12 Thread elmicha
 ID:   24629
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zparta at skebo dot ac
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: FreeBSD 4.8
 PHP Version:  4.3.3RC1
 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:


[2003-07-12 20:23:18] zparta at skebo dot ac

Description:

cant use socket_select in freebsd with neither 4.3.3rc1 or 4.3.2 when
using real sockets not fsockets

Reproduce code:
---
dont have any

Expected result:

dont know






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



#24629 [Fbk-Opn]: Socket_select doesnt work

2003-07-12 Thread zparta at skebo dot ac
 ID:   24629
 User updated by:  zparta at skebo dot ac
 Reported By:  zparta at skebo dot ac
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: FreeBSD 4.8
 PHP Version:  4.3.3RC1
 New Comment:

Reproduce code:
---
$this-_address = 'irc.homelien.no';
$this-_port = '6667';
$this-_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = @socket_connect($this-_socket, $this-_address,
$this-_port);

while ($this-_state() == SMARTIRC_STATE_CONNECTED) {
$this-_checkbuffer();

$timeout = $this-_selecttimeout();
if ($this-_usesockets == true) {
$sread = array($this-_socket);
$result = @socket_select($sread, $w = null, $e = null,
0, $timeout*1000);

if ($result == 1) {
// the socket got data to read
$rawdata = @socket_read($this-_socket, 10240);
} else if ($result === false) {
// panic! panic! something went wrong!
$this-log(SMARTIRC_DEBUG_NOTICE, 'WARNING:
socket_select() returned false, something went wrong! Reason:
'.socket_strerror(socket_last_error()), __FILE__, __LINE__);
exit;
} else {
// no data
$rawdata = null;
}
//this code is taken from the Net_SmartIRC class from pear

Expected result:

Jul 13 03:47:04 SmartIRC.php(1636) WARNING: socket_select() returned
false, something went wrong! Reason: Invalid argument


and the author of Net_SmartIRC has tested this on my machine and he
says that i should bugreport this here because socket_select doesnt
work on freebsd 4.8 dont know if it is version specific.


Previous Comments:


[2003-07-12 20:27:55] [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.




[2003-07-12 20:23:18] zparta at skebo dot ac

Description:

cant use socket_select in freebsd with neither 4.3.3rc1 or 4.3.2 when
using real sockets not fsockets

Reproduce code:
---
dont have any

Expected result:

dont know






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



#24630 [NEW]: extract with EXTR_REFS makes weird references

2003-07-12 Thread tater at potatoe dot com
From: tater at potatoe dot com
Operating system: OS X 10.2
PHP version:  4.3.3RC1
PHP Bug Type: Scripting Engine problem
Bug description:  extract with EXTR_REFS makes weird references

Description:

If you create an array by assigning its elements the value of a scalar
variable (or, in PHP5, by using array_combine() with an array of keys and
an array built with array_fill() or array_pad()), then extract(array,
EXTR_REFS) will make that scalar into a reference, as well as making all
the array elements references to the same... location? I don't know, they
all end up pointing to the same thing, so that changing any one of them
changes all of them.

This tests the same on the current PHP4 release and the latest CVS PHP5
code.


Reproduce code:
---
?php
function trap()
{
$tick = 0;
$x = array('x1'=$tick, 'x2'=$tick, 'x3'=0, 'x4'=0);
$y = array('y1'=$tick, 'y2'=$tick, 'y3'=0, 'y4'=0);
var_dump(get_defined_vars());
foreach ($x as $k = $v)
$$k = $x[$k];
extract($y, EXTR_REFS);
var_dump(get_defined_vars());
$x1 = 1;
$y1 = 2;
$y3 = 4;
var_dump(get_defined_vars());
$tick = 5;
var_dump(get_defined_vars());
}
trap();
?

Expected result:

Changing $y1 should only change it and y['y1'].
Changing $tick should only change $tick.

Actual result:
--
Changing $y1 or $tick changes the other as well.

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



#24629 [Opn-Fbk]: Socket_select doesnt work

2003-07-12 Thread sniper
 ID:   24629
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zparta at skebo dot ac
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: FreeBSD 4.8
 PHP Version:  4.3.3RC1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-07-12 20:47:07] zparta at skebo dot ac

Reproduce code:
---
$this-_address = 'irc.homelien.no';
$this-_port = '6667';
$this-_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = @socket_connect($this-_socket, $this-_address,
$this-_port);

while ($this-_state() == SMARTIRC_STATE_CONNECTED) {
$this-_checkbuffer();

$timeout = $this-_selecttimeout();
if ($this-_usesockets == true) {
$sread = array($this-_socket);
$result = @socket_select($sread, $w = null, $e = null,
0, $timeout*1000);

if ($result == 1) {
// the socket got data to read
$rawdata = @socket_read($this-_socket, 10240);
} else if ($result === false) {
// panic! panic! something went wrong!
$this-log(SMARTIRC_DEBUG_NOTICE, 'WARNING:
socket_select() returned false, something went wrong! Reason:
'.socket_strerror(socket_last_error()), __FILE__, __LINE__);
exit;
} else {
// no data
$rawdata = null;
}
//this code is taken from the Net_SmartIRC class from pear

Expected result:

Jul 13 03:47:04 SmartIRC.php(1636) WARNING: socket_select() returned
false, something went wrong! Reason: Invalid argument


and the author of Net_SmartIRC has tested this on my machine and he
says that i should bugreport this here because socket_select doesnt
work on freebsd 4.8 dont know if it is version specific.



[2003-07-12 20:27:55] [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.




[2003-07-12 20:23:18] zparta at skebo dot ac

Description:

cant use socket_select in freebsd with neither 4.3.3rc1 or 4.3.2 when
using real sockets not fsockets

Reproduce code:
---
dont have any

Expected result:

dont know






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



#24630 [Opn-Bgs]: extract with EXTR_REFS makes weird references

2003-07-12 Thread sniper
 ID:   24630
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tater at potatoe dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: OS X 10.2
 PHP Version:  5.0.0b2-dev
 New Comment:

Try search the bug database before submitting new reports..
there are couple of related reports still open. (mostly documentation
issues..)



Previous Comments:


[2003-07-12 20:47:59] tater at potatoe dot com

Description:

If you create an array by assigning its elements the value of a scalar
variable (or, in PHP5, by using array_combine() with an array of keys
and an array built with array_fill() or array_pad()), then
extract(array, EXTR_REFS) will make that scalar into a reference, as
well as making all the array elements references to the same...
location? I don't know, they all end up pointing to the same thing, so
that changing any one of them changes all of them.

This tests the same on the current PHP4 release and the latest CVS PHP5
code.


Reproduce code:
---
?php
function trap()
{
$tick = 0;
$x = array('x1'=$tick, 'x2'=$tick, 'x3'=0, 'x4'=0);
$y = array('y1'=$tick, 'y2'=$tick, 'y3'=0, 'y4'=0);
var_dump(get_defined_vars());
foreach ($x as $k = $v)
$$k = $x[$k];
extract($y, EXTR_REFS);
var_dump(get_defined_vars());
$x1 = 1;
$y1 = 2;
$y3 = 4;
var_dump(get_defined_vars());
$tick = 5;
var_dump(get_defined_vars());
}
trap();
?

Expected result:

Changing $y1 should only change it and y['y1'].
Changing $tick should only change $tick.

Actual result:
--
Changing $y1 or $tick changes the other as well.





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



#24628 [Opn-Bgs]: missing space

2003-07-12 Thread sniper
 ID:   24628
 Updated by:   [EMAIL PROTECTED]
 Reported By:  prof_moriarty at veryfast dot biz
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: win98
 PHP Version:  4.3.2
 New Comment:

Mysql problem. (we just print out whatever mysql returns)



Previous Comments:


[2003-07-12 19:41:20] prof_moriarty at veryfast dot biz

Description:

Exeptionally minor bug, but a bug nonetheless.
mysql_stat, documentation says that the resulting string should be
explodable into 7 elements

However in reality it can only be broken up into 6 elements.

It's broken up using double space. I've used preg_replace, and explode,
and either way i only get 6 results when splitting via double space  
.

Basically, there's a missing space in the output, between the end of
'open tables', and the start of 'queries per sec'.

Shouldn't take a fraction of a sec to fix. :)

Reproduce code:
---
var_dump(explode('  ', mysql_stat()));

Expected result:

Array
(
[0] = Uptime: 5380
[1] = Threads: 2
[2] = Questions: 1321299
[3] = Slow queries: 0
[4] = Opens: 26
[5] = Flush tables: 1
[6] = Open tables: 17
[7] = Queries per second avg: 245.595
)

Actual result:
--
array(7) {
  [0]=
  string(12) Uptime: 6910
  [1]=
  string(10) Threads: 2
  [2]=
  string(15) Questions: 2229
  [3]=
  string(15) Slow queries: 0
  [4]=
  string(9) Opens: 77
  [5]=
  string(15) Flush tables: 1
  [6]=
  string(45) Open tables: 13 Queries per second avg: 0.323
}





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



#24629 [Fbk-Opn]: Socket_select doesnt work

2003-07-12 Thread zparta at skebo dot ac
 ID:   24629
 User updated by:  zparta at skebo dot ac
 Reported By:  zparta at skebo dot ac
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: FreeBSD 4.8
 PHP Version:  4.3.3RC1
 New Comment:

doesnt work with PHP4.3.3RC2-dev either the latest stable from today
php4-STABLE-200307130130


Previous Comments:


[2003-07-12 20:54:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-07-12 20:47:07] zparta at skebo dot ac

Reproduce code:
---
$this-_address = 'irc.homelien.no';
$this-_port = '6667';
$this-_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = @socket_connect($this-_socket, $this-_address,
$this-_port);

while ($this-_state() == SMARTIRC_STATE_CONNECTED) {
$this-_checkbuffer();

$timeout = $this-_selecttimeout();
if ($this-_usesockets == true) {
$sread = array($this-_socket);
$result = @socket_select($sread, $w = null, $e = null,
0, $timeout*1000);

if ($result == 1) {
// the socket got data to read
$rawdata = @socket_read($this-_socket, 10240);
} else if ($result === false) {
// panic! panic! something went wrong!
$this-log(SMARTIRC_DEBUG_NOTICE, 'WARNING:
socket_select() returned false, something went wrong! Reason:
'.socket_strerror(socket_last_error()), __FILE__, __LINE__);
exit;
} else {
// no data
$rawdata = null;
}
//this code is taken from the Net_SmartIRC class from pear

Expected result:

Jul 13 03:47:04 SmartIRC.php(1636) WARNING: socket_select() returned
false, something went wrong! Reason: Invalid argument


and the author of Net_SmartIRC has tested this on my machine and he
says that i should bugreport this here because socket_select doesnt
work on freebsd 4.8 dont know if it is version specific.



[2003-07-12 20:27:55] [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.




[2003-07-12 20:23:18] zparta at skebo dot ac

Description:

cant use socket_select in freebsd with neither 4.3.3rc1 or 4.3.2 when
using real sockets not fsockets

Reproduce code:
---
dont have any

Expected result:

dont know






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



#24328 [Fbk-NoF]: symbol not found: executor_globals

2003-07-12 Thread sniper
 ID:   24328
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Pavel dot Zakouril at mff dot cuni dot cz
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Dynamic loading
 Operating System: UnixWare 7.1.1
 PHP Version:  4.3.2
 New Comment:

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.




Previous Comments:


[2003-07-07 19:31:13] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-06-27 02:51:44] Pavel dot Zakouril at mff dot cuni dot cz

 Where did that 'liboci8.so' come from?

It is built durig 'make' and installed during 'make install', as it was
described in my first report.

 It should be just oci8.so.

??? All php extensions have names lib*.so under UnixWare.

 Why do you set EXTRA_LIBS before running configure..?

Answer to question 'why -lthread must be in EXTRA_LIBS ?' you can find
at http://php.cz/manual/en/ref.oci8.php. And if I do not include -lucb
into EXTRA_LIBS, I will get an error 'undefined symbol alloca' when
starting php.

Note what I wrote in my first report: Apache module (using the same
liboci8.so) works fine, problem is only with the CLI version.

But anyway, (cd ext/oci8  phpize  ./configure
--with-oci8=/u01/app/oracle/product/8.1.7  make) produces the
following output:

UX:sh (phpize): ERROR: aclocal: Not found
UX:sh (phpize): ERROR: autoconf: Not found
UX:sh (phpize): ERROR: autoheader: Not found
You should add the contents of `/usr/local/share/aclocal/libtool.m4' to
`aclocal
.m4'.
Configuring for:
  PHP Api Version:   20020918
  Zend Module Api No:   20020429
  Zend Extension Api No:   20021010
zsh: no such file or directory: ./configure



[2003-06-26 18:07:52] [EMAIL PROTECTED]

Where did that 'liboci8.so' come from? It should be just oci8.so.
What does 'ldd liboci8.so' output?
Why do you set EXTRA_LIBS before running configure..?

Does building oci8 via the phpize way work?
(cd ext/oci8  phpize  ./configure
--with-oci8=/u01/app/oracle/product/8.1.7  make)





[2003-06-25 05:07:23] Pavel dot Zakouril at mff dot cuni dot cz

Description:

I have installed PHP 4.3.2 by following way:

export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export LD_LIBRARY_PATH=/usr/local/lib:$ORACLE_HOME/lib
export CC=cc
export EXTRA_LIBS='-lthread -lucb'
./configure --with-oci8=shared --with-apxs --without-mysql
--without-pear --enable-sigchild
make
make install

Apache module works fine, but CLI version built at the same time fails
with the following message:

ducklet 191# php
PHP Warning:  Unknown(): Unable to load dynamic library
'/usr/local/lib/php/extensions/no-debug-non-zts-20020429/liboci8.so' -
dynamic linker: php: relocation error: symbol not found:
executor_globals; referenced from:
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/liboci8.so in
Unknown on line 0

What can be wrong ?







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



#24524 [Fbk-NoF]: failed to open stream: Cannot allocate memory

2003-07-12 Thread sniper
 ID:   24524
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jccl at infoquality dot inf dot br
-Status:   Feedback
+Status:   No Feedback
 Bug Type: *General Issues
 Operating System: Conectiva Linux 7
 PHP Version:  4.3.3RC1
 New Comment:

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.




Previous Comments:


[2003-07-07 18:59:52] [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.




[2003-07-07 15:54:08] jccl at infoquality dot inf dot br

Description:

I got this bug in other release candidates of earlier PHP versions. It
seems to occur when my server were having a lot of load at php pages.






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



#24497 [Fbk-NoF]: PHP crash parsing very large xml file

2003-07-12 Thread sniper
 ID:   24497
 Updated by:   [EMAIL PROTECTED]
 Reported By:  deeno at ukf dot net
-Status:   Feedback
+Status:   No Feedback
 Bug Type: XML related
 Operating System: Redhat 7.2
 PHP Version:  4.3.2
 New Comment:

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.




Previous Comments:


[2003-07-07 06:05:11] [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.






[2003-07-04 08:38:26] deeno at ukf dot net

Description:

I'm using PHP to parse a very large XML file (a SOAP message - I use
NuSOAP). This is usually resulting in a seg fault (stack trace below),
but in some cases Apache is dumping the following error to the error
log:

FATAL:  erealloc():  Unable to allocate -1073875731 bytes

Unfortunately, it is difficult to reproduce with a simple example due
the the size of the data.

PHP was configured as follows:
./configure --with-apxs=/home/test/apache/bin/apxs --with-mm=/usr/lib
--prefix=/opt/php --with-openssl=/opt/openssl/ --without-mysql
--with-curl=/opt/curl/ --with-mcrypt=/opt/mcrypt/

Expected result:

Normal execution of script

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x40109a5a in chunk_alloc (ar_ptr=0x401be4e0, nb=32) at malloc.c:2879
2879malloc.c: No such file or directory.
in malloc.c
(gdb) where
#0  0x40109a5a in chunk_alloc (ar_ptr=0x401be4e0, nb=32) at
malloc.c:2879
#1  0x40109858 in __libc_malloc (bytes=28) at malloc.c:2811
#2  0x404efbaf in _emalloc (size=12) at
/home/do/php-4.3.2/Zend/zend_alloc.c:158
#3  0x40510fa7 in execute (op_array=0x8398814) at
/home/do/php-4.3.2/Zend/zend_execute.c:1601
#4  0x404f67fe in call_user_function_ex (function_table=0x8521100,
object_pp=0x8510b80, function_name=0x82f742c,
retval_ptr_ptr=0xbffde9a8, param_count=3, params=0x18a8694c,
no_separation=1, symbol_table=0x0)
at /home/do/php-4.3.2/Zend/zend_execute_API.c:559
#5  0x404f6204 in call_user_function (function_table=0x81bbbc8,
object_pp=0x8510b80, function_name=0x82f742c,
retval_ptr=0x11c7674c, param_count=3, params=0xbffdea60) at
/home/do/php-4.3.2/Zend/zend_execute_API.c:401
#6  0x404b7a06 in xml_call_handler (parser=0x8510b44,
handler=0x82f742c, argc=3, argv=0xbffdea60)
at /home/do/php-4.3.2/ext/xml/xml.c:377
#7  0x404b810a in _xml_startElementHandler (userData=0x8510b44,
name=0x8454e38 item, attributes=0x8368048)
at /home/do/php-4.3.2/ext/xml/xml.c:661
#8  0x404bbb29 in doContent (parser=0x82b6a18, startTagLevel=0,
enc=0x40547280,
s=0x480704f6 item xsi:type=\xsd:string\/item\n  item
xsi:type=\xsd:string\/item\n  item
xsi:type=\xsd:string\/item\n  item
xsi:type=\xsd:string\/item\n  item
xsi:type=\xsd:string\/it..., end=0x4922ba13 , nextPtr=0x0) at
/home/do/php-4.3.2/ext/xml/expat/xmlparse.c:1659
#9  0x404bb2d8 in contentProcessor (parser=0x82b6a18,
start=0x4794402f soapenv:Envelope
xmlns:soapenv=\http://schemas.xmlsoap.org/soap/envelope/\;
xmlns:xsd=\http://www.w3.org/2001/XMLSchema\;
xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\;\n
soapenv:Body\n  ns1:l..., end=0x4922ba13 , endPtr=0x0) at
/home/do/php-4.3.2/ext/xml/expat/xmlparse.c:1349
#10 0x404bd623 in doProlog (parser=0x82b6a18, enc=0x40547280,
s=0x4794402f soapenv:Envelope
xmlns:soapenv=\http://schemas.xmlsoap.org/soap/envelope/\;
xmlns:xsd=\http://www.w3.org/2001/XMLSchema\;
xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\;\n
soapenv:Body\n  ns1:l..., end=0x4922ba13 , tok=29,
next=0x4794402f soapenv:Envelope
xmlns:soapenv=\http://schemas.xmlsoap.org/soap/envelope/\;
xmlns:xsd=\http://www.w3.org/2001/XMLSchema\;
xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\;\n
soapenv:Body\n  ns1:l..., nextPtr=0x0) at
/home/do/php-4.3.2/ext/xml/expat/xmlparse.c:2687
#11 0x404bd1ba in prologProcessor (parser=0x82b6a18,
s=0x47944008 ?xml version=\1.0\
encoding=\UTF-8\?\nsoapenv:Envelope
xmlns:soapenv=\http://schemas.xmlsoap.org/soap/envelope/\;
xmlns:xsd=\http://www.w3.org/2001/XMLSchema\;
xmlns:xsi=\http://www.w3.org/2001/XMLSch;..., end=0x4922ba13 ,
nextPtr=0x0) at /home/do/php-4.3.2/ext/xml/expat/xmlparse.c:2523
#12 0x404baefa in php_XML_ParseBuffer (parser=0x82b6a18, len=26114571,
isFinal=1)
at /home/do/php-4.3.2/ext/xml/expat/xmlparse.c:1150
#13 0x404baea8 in php_XML_Parse (parser=0x82b6a18,
s=0x4605c014 ?xml 

#24630 [Bgs-Opn]: extract with EXTR_REFS makes weird references

2003-07-12 Thread tater at potatoe dot com
 ID:   24630
 User updated by:  tater at potatoe dot com
 Reported By:  tater at potatoe dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: OS X 10.2
 PHP Version:  5.0.0b2-dev
 New Comment:

OK, tell me this is bogus:
---
?php
function trap1()
{
$a = 10;
$b = array('x'=$a);
$x = $b['x'];
$x = 5;
var_dump(get_defined_vars());
}
trap1();
function trap2()
{
$a = 10;
$b = array('x'=$a);
extract($b, EXTR_REFS);
$x = 5;
var_dump(get_defined_vars());
}
trap2();
?
In first function, $a is unchanged. In second, it is altered. They
should behave the same way. It is only
extract() making the difference.


Previous Comments:


[2003-07-12 21:04:27] [EMAIL PROTECTED]

Try search the bug database before submitting new reports..
there are couple of related reports still open. (mostly documentation
issues..)




[2003-07-12 20:47:59] tater at potatoe dot com

Description:

If you create an array by assigning its elements the value of a scalar
variable (or, in PHP5, by using array_combine() with an array of keys
and an array built with array_fill() or array_pad()), then
extract(array, EXTR_REFS) will make that scalar into a reference, as
well as making all the array elements references to the same...
location? I don't know, they all end up pointing to the same thing, so
that changing any one of them changes all of them.

This tests the same on the current PHP4 release and the latest CVS PHP5
code.


Reproduce code:
---
?php
function trap()
{
$tick = 0;
$x = array('x1'=$tick, 'x2'=$tick, 'x3'=0, 'x4'=0);
$y = array('y1'=$tick, 'y2'=$tick, 'y3'=0, 'y4'=0);
var_dump(get_defined_vars());
foreach ($x as $k = $v)
$$k = $x[$k];
extract($y, EXTR_REFS);
var_dump(get_defined_vars());
$x1 = 1;
$y1 = 2;
$y3 = 4;
var_dump(get_defined_vars());
$tick = 5;
var_dump(get_defined_vars());
}
trap();
?

Expected result:

Changing $y1 should only change it and y['y1'].
Changing $tick should only change $tick.

Actual result:
--
Changing $y1 or $tick changes the other as well.





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



#21503 [Opn-Fbk]: Failed to write session data (Files).

2003-07-12 Thread sniper
 ID:   21503
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ccollins at totsp dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Red Hat Linux 7.3 - 2.4.18-18
 PHP Version:  4.3.0
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-01-08 10:34:09] ccollins at totsp dot com

space on /tmp is not an issue, there is 25GB avail on that partition.



[2003-01-08 09:33:37] [EMAIL PROTECTED]

Is it possible that you may running out of space in /tmp?



[2003-01-07 20:40:14] ccollins at totsp dot com

I have very frequent errors in my logfiles concerning the session data.
 

[07-Jan-2003 18:46:30] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp/php_sess) in Unknown on line 0

Users are sometimes reporting a problem where sessions are not
maintained but this is apparently *usually* transparent to the users
and it is not often noticed.  

The obvious things are in place, there IS a directory /tmp/php_sess and
it is owned by the webserver user.  I am using PHP 4.3.0 in safe_mode,
as such:

session.save_handler = files   
   

session.save_path = /tmp/php_sess  
   

session.use_cookies = On   
   

session.name = PHPSESSID   
   

session.auto_start = 0 
   

session.cookie_lifetime = 0
   

session.cookie_path = /
   

session.cookie_domain =
   

session.serialize_handler = php
   

session.gc_probability = On
   

session.gc_maxlifetime = 1440  
   

session.entropy_length = 0 
   

session.cache_limiter = nocache
   

session.cache_expire = 180 
   

session.use_trans_sid = On   

I have apparently had this problem for quite some time dating back to
4.2.x.  

Please advise if there is anything I can try or do?  I have read
through the other similar bug reports that do exist but they all refer
to version 4.2.3 and earlier and say the issue is solved in later
version or snapshot.  

Is this still a known issue in 4.3.0?  

Thanks.  





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



#24631 [NEW]: call_user_func (and call_user_func_array) disrespect returned references

2003-07-12 Thread matthewb at syrah dot us
From: matthewb at syrah dot us
Operating system: FreeBSD
PHP version:  4.3.2
PHP Bug Type: Unknown/Other Function
Bug description:  call_user_func (and call_user_func_array) disrespect returned 
references

Description:

call_user_func and call_user_func do respect functions that return
references.  That is, function foo that returns a references to an object,
does not return a reference to an object when foo is called via
call_user_func.  Instead, foo called via call_user_func returns a copy
of the object.  (I'm not sure copy is the right word.)  See the code
example for a concise example of the problem.

Note: this may cease to be a problem in PHP5, as it is my understanding
that objects will be passed/returned by reference by default.

If my you do not understand my description and my reproduce code, email me
and I will happily explain it to you.

Many thanks.

Reproduce code:
---
?php

$x-var = 1;

function  foo ($x) {
  return $x; }

$y = foo ($x);
print y-var = . $y-var. br\n;
$x-var++;
print y-var = . $y-var. br\n;

$z = call_user_func (foo, $x);
print z-var = . $z-var. br\n;
$x-var++;
print z-var = . $z-var. br\n;

$w = call_user_func_array (foo, array ($x));
print w-var = . $w-var. br\n;
$x-var++;
print w-var = . $w-var. br\n;

?


Expected result:

y-var = 1br
y-var = 2br
z-var = 2br
z-var = 3br
w-var = 3br
w-var = 4br

Note that I expect z-var and w-var to get inceremented just as y-var
gets inceremented.

Actual result:
--
y-var = 1br
y-var = 2br
z-var = 2br
z-var = 2br
w-var = 3br
w-var = 3br

Note that in reality, however, z-var and w- did not get inceremented.

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



#24631 [Opn-Csd]: call_user_func (and call_user_func_array) disrespect returned references

2003-07-12 Thread sniper
 ID:   24631
 Updated by:   [EMAIL PROTECTED]
 Reported By:  matthewb at syrah dot us
-Status:   Open
+Status:   Closed
-Bug Type: Unknown/Other Function
+Bug Type: Scripting Engine problem
 Operating System: FreeBSD
 PHP Version:  4.3.2
 New Comment:

Fixed in ZE2 (PHP5).



Previous Comments:


[2003-07-12 21:46:02] matthewb at syrah dot us

Description:

call_user_func and call_user_func do respect functions that return
references.  That is, function foo that returns a references to an
object, does not return a reference to an object when foo is called via
call_user_func.  Instead, foo called via call_user_func returns a
copy of the object.  (I'm not sure copy is the right word.)  See
the code example for a concise example of the problem.

Note: this may cease to be a problem in PHP5, as it is my understanding
that objects will be passed/returned by reference by default.

If my you do not understand my description and my reproduce code, email
me and I will happily explain it to you.

Many thanks.

Reproduce code:
---
?php

$x-var = 1;

function  foo ($x) {
  return $x; }

$y = foo ($x);
print y-var = . $y-var. br\n;
$x-var++;
print y-var = . $y-var. br\n;

$z = call_user_func (foo, $x);
print z-var = . $z-var. br\n;
$x-var++;
print z-var = . $z-var. br\n;

$w = call_user_func_array (foo, array ($x));
print w-var = . $w-var. br\n;
$x-var++;
print w-var = . $w-var. br\n;

?


Expected result:

y-var = 1br
y-var = 2br
z-var = 2br
z-var = 3br
w-var = 3br
w-var = 4br

Note that I expect z-var and w-var to get inceremented just as y-var
gets inceremented.

Actual result:
--
y-var = 1br
y-var = 2br
z-var = 2br
z-var = 2br
w-var = 3br
w-var = 3br

Note that in reality, however, z-var and w- did not get inceremented.





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



#24630 [Opn-Fbk]: extract with EXTR_REFS makes weird references

2003-07-12 Thread sniper
 ID:   24630
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tater at potatoe dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: OS X 10.2
 PHP Version:  5.0.0b2-dev
 New Comment:

IMO, it's exactly how it's supposed to work.
To emulate the EXTR_REFS:

?php
function trap1()
{
$a = 10;
$b = array('x'=$a);
$x = $b['x'];
$x = 5;
var_dump(get_defined_vars());
}
trap1();



Previous Comments:


[2003-07-12 21:40:25] tater at potatoe dot com

OK, tell me this is bogus:
---
?php
function trap1()
{
$a = 10;
$b = array('x'=$a);
$x = $b['x'];
$x = 5;
var_dump(get_defined_vars());
}
trap1();
function trap2()
{
$a = 10;
$b = array('x'=$a);
extract($b, EXTR_REFS);
$x = 5;
var_dump(get_defined_vars());
}
trap2();
?
In first function, $a is unchanged. In second, it is altered. They
should behave the same way. It is only
extract() making the difference.



[2003-07-12 21:04:27] [EMAIL PROTECTED]

Try search the bug database before submitting new reports..
there are couple of related reports still open. (mostly documentation
issues..)




[2003-07-12 20:47:59] tater at potatoe dot com

Description:

If you create an array by assigning its elements the value of a scalar
variable (or, in PHP5, by using array_combine() with an array of keys
and an array built with array_fill() or array_pad()), then
extract(array, EXTR_REFS) will make that scalar into a reference, as
well as making all the array elements references to the same...
location? I don't know, they all end up pointing to the same thing, so
that changing any one of them changes all of them.

This tests the same on the current PHP4 release and the latest CVS PHP5
code.


Reproduce code:
---
?php
function trap()
{
$tick = 0;
$x = array('x1'=$tick, 'x2'=$tick, 'x3'=0, 'x4'=0);
$y = array('y1'=$tick, 'y2'=$tick, 'y3'=0, 'y4'=0);
var_dump(get_defined_vars());
foreach ($x as $k = $v)
$$k = $x[$k];
extract($y, EXTR_REFS);
var_dump(get_defined_vars());
$x1 = 1;
$y1 = 2;
$y3 = 4;
var_dump(get_defined_vars());
$tick = 5;
var_dump(get_defined_vars());
}
trap();
?

Expected result:

Changing $y1 should only change it and y['y1'].
Changing $tick should only change $tick.

Actual result:
--
Changing $y1 or $tick changes the other as well.





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



#24627 [Bgs-Opn]: feof always returns false

2003-07-12 Thread duerra at yahoo dot com
 ID:   24627
 User updated by:  duerra at yahoo dot com
 Reported By:  duerra at yahoo dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

php.net's own manual shows that this should work.  I'm not reading the
file, but rather just gathering a count of each line.  As I stated,
this has always worked in previous versions of PHP, and is also many
tutorials and books, including PHP and MySQL Web Development (as I am
looking at the example right now) have shown an example almost
identical to what I've posted here on how to do such looping and
counting.  I believe that the file pointer not moving is exactly the
problem (please correct me if I'm wrong).  Is that not a bug, and if
not, what has changed between 4.3.2 and 4.3.3 that I have not noticed??
 I see nothing of reference in the change log for 4.3.3


Previous Comments:


[2003-07-12 18:31:30] duerra at yahoo dot com

This always worked correct in previous versions of PHP.  It wasn't
until the move to 4.3.3RC1 (from 4.3.2) that I had this infinite
looping problem.



[2003-07-12 18:28:42] [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

Yes, b_ulrich is right.



[2003-07-12 18:21:03] b_ulrich at t-online dot de

Your example works correct:
while(!feof($open))
  {
$count++;
  }

must be an endless loop because the filepointer never moves.
Maybe you should do an fread($open,1024); inside the while loop. Or
what ever you want to count.



[2003-07-12 18:07:44] duerra at yahoo dot com

Description:

In PHP 4.3.3RC1, feof (Windows) always returns false in the code
provided below, and goes into an endless loop.

Reproduce code:
---
$count = 0;
if ($handle = opendir(./))
{
  while (false !== ($file = readdir($handle)))
  { 
if(!is_dir($file) AND $file != '.' AND $file !='..' AND $file
!='default' AND (strstr($file, .php) OR strstr($file, .htm) OR
strstr($file, .txt)))
{
  if(!$open = fopen($file, r))
  {
echo Could Not Open File;
exit;
  }
  while(!feof($open))
  {
$count++;
  }
  fclose($open);
}   
  }
}
echo $count;

Expected result:

123456
(or another number)

Actual result:
--
Infinite loop once a file is opened (I cut out the test code that I
used to verify that it's actually a bug in order to stay within the 20
line limit).





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



#24627 [Opn-Bgs]: feof always returns false

2003-07-12 Thread sniper
 ID:   24627
 Updated by:   [EMAIL PROTECTED]
 Reported By:  duerra at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

There must have been some bug in previous versions,
feof() never moves the file pointer so you end up in endless loop, of
course. (I don't know where in the manual it's said it moves the file
pointer..)



Previous Comments:


[2003-07-12 22:39:43] duerra at yahoo dot com

php.net's own manual shows that this should work.  I'm not reading the
file, but rather just gathering a count of each line.  As I stated,
this has always worked in previous versions of PHP, and is also many
tutorials and books, including PHP and MySQL Web Development (as I am
looking at the example right now) have shown an example almost
identical to what I've posted here on how to do such looping and
counting.  I believe that the file pointer not moving is exactly the
problem (please correct me if I'm wrong).  Is that not a bug, and if
not, what has changed between 4.3.2 and 4.3.3 that I have not noticed??
 I see nothing of reference in the change log for 4.3.3



[2003-07-12 18:31:30] duerra at yahoo dot com

This always worked correct in previous versions of PHP.  It wasn't
until the move to 4.3.3RC1 (from 4.3.2) that I had this infinite
looping problem.



[2003-07-12 18:28:42] [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

Yes, b_ulrich is right.



[2003-07-12 18:21:03] b_ulrich at t-online dot de

Your example works correct:
while(!feof($open))
  {
$count++;
  }

must be an endless loop because the filepointer never moves.
Maybe you should do an fread($open,1024); inside the while loop. Or
what ever you want to count.



[2003-07-12 18:07:44] duerra at yahoo dot com

Description:

In PHP 4.3.3RC1, feof (Windows) always returns false in the code
provided below, and goes into an endless loop.

Reproduce code:
---
$count = 0;
if ($handle = opendir(./))
{
  while (false !== ($file = readdir($handle)))
  { 
if(!is_dir($file) AND $file != '.' AND $file !='..' AND $file
!='default' AND (strstr($file, .php) OR strstr($file, .htm) OR
strstr($file, .txt)))
{
  if(!$open = fopen($file, r))
  {
echo Could Not Open File;
exit;
  }
  while(!feof($open))
  {
$count++;
  }
  fclose($open);
}   
  }
}
echo $count;

Expected result:

123456
(or another number)

Actual result:
--
Infinite loop once a file is opened (I cut out the test code that I
used to verify that it's actually a bug in order to stay within the 20
line limit).





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



#24627 [Bgs]: feof always returns false

2003-07-12 Thread duerra at yahoo dot com
 ID:   24627
 User updated by:  duerra at yahoo dot com
 Reported By:  duerra at yahoo dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

Just a comment from the feof reference, as a basic point:

if ($fp = fopen($filename, 'r'))
{
while (!feof($fp))
{
  // ...
}
}

That's exactly what I'm doing here (though the stating of the file
pointer not moving is not explicitly stated, this is shown as working
to a level that I have attempted to code...)


Previous Comments:


[2003-07-12 22:42:29] [EMAIL PROTECTED]

There must have been some bug in previous versions,
feof() never moves the file pointer so you end up in endless loop, of
course. (I don't know where in the manual it's said it moves the file
pointer..)




[2003-07-12 22:39:43] duerra at yahoo dot com

php.net's own manual shows that this should work.  I'm not reading the
file, but rather just gathering a count of each line.  As I stated,
this has always worked in previous versions of PHP, and is also many
tutorials and books, including PHP and MySQL Web Development (as I am
looking at the example right now) have shown an example almost
identical to what I've posted here on how to do such looping and
counting.  I believe that the file pointer not moving is exactly the
problem (please correct me if I'm wrong).  Is that not a bug, and if
not, what has changed between 4.3.2 and 4.3.3 that I have not noticed??
 I see nothing of reference in the change log for 4.3.3



[2003-07-12 18:31:30] duerra at yahoo dot com

This always worked correct in previous versions of PHP.  It wasn't
until the move to 4.3.3RC1 (from 4.3.2) that I had this infinite
looping problem.



[2003-07-12 18:28:42] [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

Yes, b_ulrich is right.



[2003-07-12 18:21:03] b_ulrich at t-online dot de

Your example works correct:
while(!feof($open))
  {
$count++;
  }

must be an endless loop because the filepointer never moves.
Maybe you should do an fread($open,1024); inside the while loop. Or
what ever you want to count.



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

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



#24625 [Opn-Csd]: Objects get unregistered from session when using floats

2003-07-12 Thread sniper
 ID:   24625
 Updated by:   [EMAIL PROTECTED]
 Reported By:  martin at bang dot ca
-Status:   Open
+Status:   Closed
 Bug Type: Session related
 Operating System: RH7.3
 PHP Version:  4.3.2
 New Comment:

Please try using this CVS snapshot:

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

Seems to be fixed. (works fine here)



Previous Comments:


[2003-07-12 17:34:31] martin at bang dot ca

Description:

CONFIG:
./configure --with-apxs=/usr/local/apache/bin/apxs
--with-png-dir=../libpng-1.2.5/ --with-zlib-dir=../zlib-1.1.4/
--enable-ftp --with-jpeg-dir=../jpeg-6b/ --with-mysql=../../mysql
--enable-gd-imgstrttf --enable-gd-native-ttf --with-mm=../mm-1.3.0/
--enable-trans-sid --with-mcrypt --enable-memory-limit --with-gd
--enable-cgi-redirect

Making any of a registered object's variables into floats de-registers
the object from the session.



Reproduce code:
---
session_start();
session_register( test );
echo IS OBJECT:  . is_object( $test );

class testclass {
var $float;

function testclass() {
$this-float = 2;
}

function setValue( $val ) {
$this-float = $val;
}
}
$test = new testclass();
//$test-setValue( 2.0 ); //uncomment here


Expected result:

In the provided code, running the script and reloading the page
returns:

IS OBJECT: 1

which is fine

Actual result:
--
Now, uncommenting the last line of the script, which sets
$this-float to a float value and reloading the page returns:

IS OBJECT:

which is not good. $test is no longer recognized as an object.





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



#24627 [Bgs]: feof always returns false

2003-07-12 Thread sniper
 ID:   24627
 Updated by:   [EMAIL PROTECTED]
 Reported By:  duerra at yahoo dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

Don't mix user added comments to real documentation..



Previous Comments:


[2003-07-12 22:45:39] duerra at yahoo dot com

Just a comment from the feof reference, as a basic point:

if ($fp = fopen($filename, 'r'))
{
while (!feof($fp))
{
  // ...
}
}

That's exactly what I'm doing here (though the stating of the file
pointer not moving is not explicitly stated, this is shown as working
to a level that I have attempted to code...)



[2003-07-12 22:42:29] [EMAIL PROTECTED]

There must have been some bug in previous versions,
feof() never moves the file pointer so you end up in endless loop, of
course. (I don't know where in the manual it's said it moves the file
pointer..)




[2003-07-12 22:39:43] duerra at yahoo dot com

php.net's own manual shows that this should work.  I'm not reading the
file, but rather just gathering a count of each line.  As I stated,
this has always worked in previous versions of PHP, and is also many
tutorials and books, including PHP and MySQL Web Development (as I am
looking at the example right now) have shown an example almost
identical to what I've posted here on how to do such looping and
counting.  I believe that the file pointer not moving is exactly the
problem (please correct me if I'm wrong).  Is that not a bug, and if
not, what has changed between 4.3.2 and 4.3.3 that I have not noticed??
 I see nothing of reference in the change log for 4.3.3



[2003-07-12 18:31:30] duerra at yahoo dot com

This always worked correct in previous versions of PHP.  It wasn't
until the move to 4.3.3RC1 (from 4.3.2) that I had this infinite
looping problem.



[2003-07-12 18:28:42] [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

Yes, b_ulrich is right.



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

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



#24627 [Bgs]: feof always returns false

2003-07-12 Thread duerra at yahoo dot com
 ID:   24627
 User updated by:  duerra at yahoo dot com
 Reported By:  duerra at yahoo dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

Sorry.  Here's from the documentation on fgets()

$handle = fopen (/tmp/inputfile.txt, r);
while (!feof ($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose ($handle);

In essence, what was being done instead of the line beginning with
$buffer=, was $count++.  This this then a requirement now in 4.3.3
that a line is actually retrieved for the file pointer to move?  If so,
I'll quit nagging you all =P


Previous Comments:


[2003-07-12 22:48:03] [EMAIL PROTECTED]

Don't mix user added comments to real documentation..




[2003-07-12 22:45:39] duerra at yahoo dot com

Just a comment from the feof reference, as a basic point:

if ($fp = fopen($filename, 'r'))
{
while (!feof($fp))
{
  // ...
}
}

That's exactly what I'm doing here (though the stating of the file
pointer not moving is not explicitly stated, this is shown as working
to a level that I have attempted to code...)



[2003-07-12 22:42:29] [EMAIL PROTECTED]

There must have been some bug in previous versions,
feof() never moves the file pointer so you end up in endless loop, of
course. (I don't know where in the manual it's said it moves the file
pointer..)




[2003-07-12 22:39:43] duerra at yahoo dot com

php.net's own manual shows that this should work.  I'm not reading the
file, but rather just gathering a count of each line.  As I stated,
this has always worked in previous versions of PHP, and is also many
tutorials and books, including PHP and MySQL Web Development (as I am
looking at the example right now) have shown an example almost
identical to what I've posted here on how to do such looping and
counting.  I believe that the file pointer not moving is exactly the
problem (please correct me if I'm wrong).  Is that not a bug, and if
not, what has changed between 4.3.2 and 4.3.3 that I have not noticed??
 I see nothing of reference in the change log for 4.3.3



[2003-07-12 18:31:30] duerra at yahoo dot com

This always worked correct in previous versions of PHP.  It wasn't
until the move to 4.3.3RC1 (from 4.3.2) that I had this infinite
looping problem.



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

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



#24610 [Opn-Bgs]: core dump installing pear

2003-07-12 Thread sniper
 ID:   24610
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gbaratto at superb dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: freebsd 4.8
 PHP Version:  4.3.2
 New Comment:

openssl and pfpro don't like each other. Not PHP bug.
(report that to the pfpro developers..)



Previous Comments:


[2003-07-11 14:24:07] gbaratto at superb dot net

Description:

configure and compilation goes fine, make install brakes. It works fine
if I take out --with-openssl

export LDFLAGS=-I/usr/local/include/pthread/linuxthreads
-L/usr/local/lib -llthread -llgcc_r (THIS IS BECAUSE PAYFLOW PRO
REQUIRES THREADS)

./configure  --prefix=/home/apache/php-4.3.2
--with-apxs2=/home/apache/httpd-2.0.47/bin/apxs --with-mysql=/usr/local
--with-pfpro=/home/apache/verisign/payflowpro/freebsd/lib
--enable-trans-sid --with-mcrypt --with-openssl

I think this is a problem between thread payflow lib and non- thread
libssl or zlib. Any idea on how to make this to work? 



Actual result:
--
ERROR:

%make install
Installing PHP CLI binary:/home/apache/php-4.3.2/bin/
Installing PHP CLI man page:  /home/apache/php-4.3.2/man/man1/
Installing PHP SAPI module
/home/apache/httpd-2.0.47/build/instdso.sh
SH_LIBTOOL='/home/apache/httpd-2.0.47/build/libtool' libphp4.la
/home/apache/httpd-2.0.47/modules
/home/apache/httpd-2.0.47/build/libtool --mode=install cp libphp4.la
/home/apache/httpd-2.0.47/modules/
cp .libs/libphp4.so /home/apache/httpd-2.0.47/modules/libphp4.so
cp .libs/libphp4.lai /home/apache/httpd-2.0.47/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish
/home/apache/src/php-4.3.2/libs'
chmod 755 /home/apache/httpd-2.0.47/modules/libphp4.so
[activating module `php4' in
/home/apache/httpd-2.0.47/conf/httpd.conf]
Installing shared extensions:
/home/apache/php-4.3.2/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment:  /home/apache/php-4.3.2/lib/php/
Segmentation fault (core dumped)
*** Error code 139

Stop in /home/apache/src/php-4.3.2.
*** Error code 1

Stop in /home/apache/src/php-4.3.2.


GDB RESULTS:
-
%gdb sapi/cli/php php.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-unknown-freebsd...Deprecated bfd_read
called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 933 in fill_symbuf

Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/liblthread.so.2...done.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from
/home/apache/verisign/payflowpro/freebsd/lib/libpfpro.so...done.
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.12...done.
Reading symbols from /usr/local/lib/libmcrypt.so.8...done.
Reading symbols from /usr/local/lib/libltdl.so.1...done.
Reading symbols from /usr/lib/libssl.so.3...done.
Reading symbols from /usr/lib/libcrypto.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x2845ff50 in strcmp () from /usr/lib/libc.so.4
(gdb) bt full
#0  0x2845ff50 in strcmp () from /usr/lib/libc.so.4
No symbol table info available.
#1  0x281ff80e in PNVersion () from
/home/apache/verisign/payflowpro/freebsd/lib/libpfpro.so
No symbol table info available.
Cannot access memory at address 0x2.
---





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



#24627 [Bgs]: feof always returns false

2003-07-12 Thread sniper
 ID:   24627
 Updated by:   [EMAIL PROTECTED]
 Reported By:  duerra at yahoo dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: XP Pro
 PHP Version:  4.3.3RC1
 New Comment:

It has ALWAYS been the requirement. Some buffer sizes and so were
adjusted in 4.3.2 (or something alike, can't remember exactly what it
was right now) which made it LOOK like it worked for you.



Previous Comments:


[2003-07-12 22:51:35] duerra at yahoo dot com

Sorry.  Here's from the documentation on fgets()

$handle = fopen (/tmp/inputfile.txt, r);
while (!feof ($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose ($handle);

In essence, what was being done instead of the line beginning with
$buffer=, was $count++.  This this then a requirement now in 4.3.3
that a line is actually retrieved for the file pointer to move?  If so,
I'll quit nagging you all =P



[2003-07-12 22:48:03] [EMAIL PROTECTED]

Don't mix user added comments to real documentation..




[2003-07-12 22:45:39] duerra at yahoo dot com

Just a comment from the feof reference, as a basic point:

if ($fp = fopen($filename, 'r'))
{
while (!feof($fp))
{
  // ...
}
}

That's exactly what I'm doing here (though the stating of the file
pointer not moving is not explicitly stated, this is shown as working
to a level that I have attempted to code...)



[2003-07-12 22:42:29] [EMAIL PROTECTED]

There must have been some bug in previous versions,
feof() never moves the file pointer so you end up in endless loop, of
course. (I don't know where in the manual it's said it moves the file
pointer..)




[2003-07-12 22:39:43] duerra at yahoo dot com

php.net's own manual shows that this should work.  I'm not reading the
file, but rather just gathering a count of each line.  As I stated,
this has always worked in previous versions of PHP, and is also many
tutorials and books, including PHP and MySQL Web Development (as I am
looking at the example right now) have shown an example almost
identical to what I've posted here on how to do such looping and
counting.  I believe that the file pointer not moving is exactly the
problem (please correct me if I'm wrong).  Is that not a bug, and if
not, what has changed between 4.3.2 and 4.3.3 that I have not noticed??
 I see nothing of reference in the change log for 4.3.3



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

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



#24630 [Fbk-Opn]: extract with EXTR_REFS makes weird references

2003-07-12 Thread tater at potatoe dot com
 ID:   24630
 User updated by:  tater at potatoe dot com
 Reported By:  tater at potatoe dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: OS X 10.2
 PHP Version:  5.0.0b2-dev
 New Comment:

But '$b = array('x'=$a);' is quite different from
'$b = array('x'=$a);', and extract() is retroactively
altering the definition of $b. $b['x'] should just be a copy
of $a. I think it's just a symbol table problem. If I do:

$a = 10;
$b['x'] = $a;
$a = 10;
extract($b, EXTR_REFS);
$x = 5;

now $a is not changed. If $b['x'] really was $a, that would not be the
case.


Previous Comments:


[2003-07-12 22:34:23] [EMAIL PROTECTED]

IMO, it's exactly how it's supposed to work.
To emulate the EXTR_REFS:

?php
function trap1()
{
$a = 10;
$b = array('x'=$a);
$x = $b['x'];
$x = 5;
var_dump(get_defined_vars());
}
trap1();




[2003-07-12 21:40:25] tater at potatoe dot com

OK, tell me this is bogus:
---
?php
function trap1()
{
$a = 10;
$b = array('x'=$a);
$x = $b['x'];
$x = 5;
var_dump(get_defined_vars());
}
trap1();
function trap2()
{
$a = 10;
$b = array('x'=$a);
extract($b, EXTR_REFS);
$x = 5;
var_dump(get_defined_vars());
}
trap2();
?
In first function, $a is unchanged. In second, it is altered. They
should behave the same way. It is only
extract() making the difference.



[2003-07-12 21:04:27] [EMAIL PROTECTED]

Try search the bug database before submitting new reports..
there are couple of related reports still open. (mostly documentation
issues..)




[2003-07-12 20:47:59] tater at potatoe dot com

Description:

If you create an array by assigning its elements the value of a scalar
variable (or, in PHP5, by using array_combine() with an array of keys
and an array built with array_fill() or array_pad()), then
extract(array, EXTR_REFS) will make that scalar into a reference, as
well as making all the array elements references to the same...
location? I don't know, they all end up pointing to the same thing, so
that changing any one of them changes all of them.

This tests the same on the current PHP4 release and the latest CVS PHP5
code.


Reproduce code:
---
?php
function trap()
{
$tick = 0;
$x = array('x1'=$tick, 'x2'=$tick, 'x3'=0, 'x4'=0);
$y = array('y1'=$tick, 'y2'=$tick, 'y3'=0, 'y4'=0);
var_dump(get_defined_vars());
foreach ($x as $k = $v)
$$k = $x[$k];
extract($y, EXTR_REFS);
var_dump(get_defined_vars());
$x1 = 1;
$y1 = 2;
$y3 = 4;
var_dump(get_defined_vars());
$tick = 5;
var_dump(get_defined_vars());
}
trap();
?

Expected result:

Changing $y1 should only change it and y['y1'].
Changing $tick should only change $tick.

Actual result:
--
Changing $y1 or $tick changes the other as well.





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



#21973 [Opn-Asn]: 'configure' script can't find libpng.(a|so), openldap, libjava...

2003-07-12 Thread sniper
 ID:   21973
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j-devenish at users dot sourceforge dot net
-Status:   Open
+Status:   Assigned
 Bug Type: *Configuration Issues
 Operating System: Solaris 8
 PHP Version:  4.3.3RC2-dev
-Assigned To:  
+Assigned To:  sniper
 New Comment:

We can add a new macro to the configure, which is used 
always for the direct search of a library files. Now the list of common
paths are:

/usr/local/lib /usr/lib

With 64bit linux distros:

/usr/lib/lib64/

(not sure if if e.g. /usr/local/lib64 can exist too?)

Sparc64:

*/lib/sparcv9/

I'll look into adding the macro to make the configure
be a bit friendlier. :)



Previous Comments:


[2003-01-31 05:28:14] [EMAIL PROTECTED]

If you want support your environment we would have to change all
configure files. We would have to change all
lines of the form .../lib/... with ../$LIB_DIR/... and
add some configure magic to determine what $LIB_DIR should be (in your
case it would be sparcv9).



[2003-01-31 03:34:09] j-devenish at users dot sourceforge dot net

In response to (1):

This makes no difference. I'm not sure if we're on the same
planet. I'm not quite sure what the patch was meant to
achieve (and thus I don't understand what I was supposed
to do to take advantage of it once configure was
regenerated). I think the loop that fails to find libpng
is indeed the one you've provided the patch for, so you
and I are possibly within the same universe.

In response to (2):

 Since you obviated a system immanent feature...

Hey, I'm really confused now. I'm not at all sure what
nuance you're implying with those words. I really
don't understand why you said it at all. Can I try
saying this to you:

/usr/local/include/libpng/png.h (for both arch)
/usr/local/include/libpng/pngconf.h (for both arch)
/usr/local/lib/libpng12.so (32-bit)
/usr/local/lib/sparcv9/libpng12.so (64-bit)

PHP needs to use the files in /usr/local/include/libpng
and /usr/local/lib/sparcv9. The library path is already
known by the compiler, linker, and loader.



[2003-01-30 18:42:42] j-devenish at users dot sourceforge dot net

./configure from the 4.3.0 release contains constructs like:

for i in /usr /usr/local $PHP_PNG_DIR; do
   test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f \
  $i/lib/libpng.a  GD_PNG_DIR=$i
done

The 'lib/libpng.' bit is hard-coded. But my libpng is at
/usr/local/lib/sparcv9/libpng.so

The end of configure's output is:

checking for the location of libpng... yes
checking for the location of libXpm... yes
checking for FreeType 1.x support... yes
checking for FreeType 2... yes
checking for T1lib support... yes
checking whether to enable truetype string function in GD... yes
checking for fabsf... no
checking for floorf... no
If configure fails try --with-jpeg-dir=DIR
configure: error: libpng.(a|so) not found.

as a user of PHP4, this message does not help me help myself because:

 - it already said it found libpng.
 - it says 'try --with-jpeg-dir' yet the error is for PNG.

I was able to work around this by manually hacking configure on a
one-off basis.

However, it then can't find other libraries, like OpenLDAP, because it
again has hard-coded paths.

I was hoping that PHP 4.3.0 had some semblence of 64-bit clean-ness in
its code after its disasterous run of pre-releases, but I can't even
get that far since it won't configure under a multi-mode environment
such as Solaris/UltraSPARC. Presumably it would have similar trouble
with HP and SGI systems.

--end--




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



#22245 [Opn-Ver]: Unserialize Problem with References

2003-07-12 Thread sniper
 ID:   22245
 Updated by:   [EMAIL PROTECTED]
-Summary:  Unserialize Problem with References:
 Reported By:  goth at php-resource dot de
-Status:   Open
+Status:   Verified
 Bug Type: Session related
 Operating System: LINUX
-PHP Version:  4CVS-2003-02-16 (stable)
+PHP Version:  4.3.3RC2-dev, 5.0.0b2-dev
 Assigned To:  sas
 New Comment:

Even as you think I'm arrogant and dumb, I'm marking this as verified.
(In hope you really get a heart-attack..:)

Here's a complete test case script:

?php

session_start();

if (isset($_GET['destroy'])) {
session_destroy();
header(Location: {$_SERVER['PHP_SELF']});
exit();
}

echo register_globals: , ((ini_get('register_globals')) ? 'On' :
'Off'), br /;

if (!isset($_SESSION[A])  !isset($_SESSION[B])) {
$_SESSION[A]=10;
$_SESSION[B]=$_SESSION[A];
}

echo BEFORE: A=.$_SESSION[A].br /;
echo BEFORE: B=.$_SESSION[B].br /;
$_SESSION[A]++;
echo AFTER: A=.$_SESSION[A].br /;
echo AFTER: B=.$_SESSION[B].br /;

echo br /a href='{$_SERVER['PHP_SELF']}?destroy=1'destroy
session/a after changing register_globals setting to see the bug in
effect;
echo br /(and reload the page couple of times..);

?

When register_globals = On  - Works.
When register_globals = Off - Does not work.




Previous Comments:


[2003-05-26 21:55:27] gschine at middlebury dot edu

we have had extensive experience with this, and it 
seems that the above bug only occurs while 
register_globals is OFF. when it's on everything works 
as expected.



[2003-05-20 17:53:40] goth at php-resource dot de

Yes I am very sure that php4-STABLE-200302071830 worked properly with
the stated code above ... !

Another Question ... what does R:1 mean in this serialization??

A|i:10;B|R:1;



[2003-05-20 17:38:00] [EMAIL PROTECTED]

Not reproducible. I tried this with 4.2.3, 4.3.1 and current 4_3 CVS.
The references between $_SESSION entries are never reestablished. 

Additionally, I tried a cvs checkout -r PHP_4_3_0 -D 2/7/2003 with the
same negative result.

So, are you absolutely sure that you have some code where this works?
Did you use register_globals = on?



[2003-02-17 07:19:16] goth at php-resource dot de

Hello,

probably a hint:

my php4-STABLE-200302071830 works fine ...

php430 does not ... so as php4-STABLE-200302162230



[2003-02-16 21:29:16] goth at php-resource dot de

Hello,

I've got a Problem unserializing variables which are a reference. An to
me it seems to be a bug ... !

Example:

session_start();
$_SESSION[A]=10;
$_SESSION[B]=$_SESSION[A];

is correctly serialized to:
A|i:10;B|R:1;

I am happy ... ;)

But if I call this session again ... maybe the next page PHP seems to
loose the information that B was a reference.

Example:
session_start();
echo BEFORE: A=.$_SESSION[A].br /;
echo BEFORE: B=.$_SESSION[B].br /;
$_SESSION[A]++;
echo AFTER: A=.$_SESSION[A].br /;
echo AFTER: B=.$_SESSION[B].br /;

It results to:

BEFORE: A=10
BEFORE: B=10
AFTER: A=11
AFTER: B=10

where I thought of A and B having the same value ... for B beeing a
reference to A ...

@sniper: Please don't answer ... your arrogant (and almost dumb)
answers cause me one heart-attack after the other ... !!




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



#21965 [Opn-Fbk]: gettext uses entries out of different files at the same time

2003-07-12 Thread sniper
 ID:   21965
 Updated by:   [EMAIL PROTECTED]
 Reported By:  thorsten dot kussler at communardo dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Gettext related
 Operating System: Solaris
 PHP Version:  4.2.3
 New Comment:

I bet this happens with later PHP versions, like 4.3.2 too?
What is the full configure line you have used to configure PHP ??



Previous Comments:


[2003-01-30 12:20:35] thorsten dot kussler at communardo dot de

I thought that it might be a problem. PHP is compiled --width-apache
and not as an CGI. 
BUT:
I set explicitly the LC_MESAGES var infront of each call of gettext
because of that. 
The behavior is the same if i'm the only user on the server.
How is that behavior explicable with thread conflicts ???

I have no idea

iliaa
have you any other experiences with that phenomena or examples of
problematic system configurations?



[2003-01-30 11:43:10] [EMAIL PROTECTED]

Are you using gettext in multi-threaded enviroment if so, that would
explain the behaviour you are seeing because gettext is NOT
thread-safe.



[2003-01-30 11:00:54] thorsten dot kussler at communardo dot de

This behavior is reproduceable on Solaris 7.x and 2.6



[2003-01-30 10:47:45] thorsten dot kussler at communardo dot de

gettext uses entries out of differend files at the same time!!

During the execution time of on single script the languages changes
without an reproduceable behavior.

As an example:
the first 10 strings are translated in german, the next three strings
in english, the next vive  again in german and thze rest in english.

The same application on a different OS like LINUX or Windows works
pretty well. It is only a problem on Solaris. 

The version of GNU gettext is 0.10.37 on all systems.

Please could you help me finding a solution.

Thorsten Kussler







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



#22459 [Opn-Fbk]: Fatal error: session_start() [function.session-start]

2003-07-12 Thread sniper
 ID:   22459
 Updated by:   [EMAIL PROTECTED]
 Reported By:  froeschlin at designpark dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Red-Hat/Linux
 PHP Version:  4.3.1
 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

Add you configure line here too.



Previous Comments:


[2003-02-27 09:48:18] froeschlin at designpark dot de

We have remove the Optimizer but after 2-3 hours the error come again.



[2003-02-27 08:48:57] [EMAIL PROTECTED]

Turn off Zend Optimizer v2.1.0 and see if the problem persists.



[2003-02-27 08:33:48] froeschlin at designpark dot de

When we use session_start() we get a random coming error on our system
who give us out the folloing massage:

Fatal error: session_start() [function.session-start]: Failed to
initialize session module 

Sometimes the error dont come over days. 
We cant recognize why and how it develops.
Also the compiling of php are error less.

Our config - http://217.175.242.77/phpinfo.php




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



#22519 [Opn-Fbk]: Apache catches SEGV

2003-07-12 Thread sniper
 ID:   22519
 Updated by:   [EMAIL PROTECTED]
 Reported By:  thomas dot mieslinger at gls-germany dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Informix related
 Operating System: Solaris 7 intel
 PHP Version:  4.3.2-RC1
 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

And copy paste the errors you get in Apache error_log here.
(not all of them, just those with different line numbers..:)



Previous Comments:


[2003-03-20 02:19:19] thomas dot mieslinger at gls-germany dot com

Trust me, we didn't change a bit with php, php.ini, apache or
httpd.conf. OK the database grew and we changed some PHP scripts, but
the bug appears on any page even if it worked for two weeks.
In some situations the -439 appears more often espeially when one or
more really large selects are running (result set  1M).

Now whats this when I say we see -439. When a php page is opened it
first checks for some entries in the database. These calls die with
error -439.

I am sure that it is an php problem because with dbaccess or perl I can
connect to the databases and work with it.

Please tell me which Client SDK and Dynamic Server you use for the
development of php/informix.



[2003-03-19 11:28:28] [EMAIL PROTECTED]

So what changed during the 2 weeks that made it to fail again? Are you
absolutely sure this is PHP problem at all?
And what do you mean with Now we see -439 again. ??




[2003-03-19 10:15:40] thomas dot mieslinger at gls-germany dot com

I recompilied PHP (see attached phpinfo and version string from ifx.ec)
and it worked for two weeks. Now we see -439 again.

Hopefully I can attach a backtrace later this evening.

phpinfo:
PHP Version 4.3.2-dev

System SunOS gpname 5.7 Generic_106542-23 i86pc
Build Date Mar 7 2003 16:01:11
Configure Command './configure' '--with-informix' '--without-mysql'
'--with-apache=../apache_1.3.27' '--enable-sockets'
'--with-gd=/usr/local/' '--with-jpeg-dir=/usr/local/'
'--with-png-dir=/usr/local' '--with-zlib-dir=/usr/local/'
'--enable-debug'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /export/opt/local/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build yes
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib

Zend logo This program makes use of the Zend Scripting Language
Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

ifx.ec:
$Id: ifx.ec,v 1.69.2.12 2003/02/27 09:00:51 nobbie Exp $



[2003-03-04 10:27:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-03 09:43:12] thomas dot mieslinger at gls-germany dot com

Hello,

In the errorlog of my Apache 1.3.27 I see these messages:

/export/opt/local/src/php-4.3.1/ext/informix/ifx.ec(2998) :  Freeing
0x08836314 (89 bytes),
script=/export/web/htdocs-depotadm-v2/ww/export/opt/local/src/php-4.3.1/ext/informix/ifx.ec(2875)
:  Freeing 0x08836FBC (84 bytes),
script=/export/web/htdocs-depotadm-v2/ww/export/opt/local/src/php-4.3.1/ext/informix/ifx.ec(2998)
:  Freeing 0x0839558C (266 bytes),
script=/export/web/htdocs-depotadm-v2/w/export/opt/local/src/php-4.3.1/ext/informix/ifx.ec(2981)
:  Freeing 0x08395504 (84 bytes),
script=/export/web/htdocs-depotadm-v2/ww/export/opt/local/src/php-4.3.1/ext/informix/ifx.ec(2875)
:  Freeing 0x08394F54 (84 bytes),
script=/export/web/htdocs-depotadm-v2/ww[Mon Mar  3 15:07:02 2003]
[notice] child pid 6240 exit signal Segmentation Fault (11)

When running in gdb I get this stacktrace
Starting program: /usr/local/apache/bin/httpd -f
/etc/apache/httpd.conf-test -X
[New LWP2]
[New LWP3]
[New LWP4]
[New LWP5]

Program received signal SIGSEGV, Segmentation fault.
0xdf8dcbce in memmove ()
(gdb) bt
#0  0xdf8dcbce in memmove ()
#1  0xdfbab6b3 in _sqlocwrite ()
#2  0xdfb9bfa3 in _sqg_blob ()
#3  0xdfba7b57 in _iqupdtargs ()
#4  0xdfba6650 in _iqftch ()
#5  0xdfba5ea4 in sqli_curs_fetch ()
#6  0x80db1f1 in zif_ifx_fetch_row (ht=1, return_value=0x87f1104,
this_ptr=0x0, return_value_used=1)
at /export/opt/local/src/php-4.3.1/ext/informix/ifx.ec:1703
#7  0x80c42d0 in execute (op_array=0x8592ac8) at
/export/opt/local/src/php-4.3.1/Zend/zend_execute.c:1596
#8  0x80c44d0 in execute (op_array=0x887fb9c) at
/export/opt/local/src/php-4.3.1/Zend/zend_execute.c:1640
#9  0x80b3879 in 

#22526 [Opn-Fbk]: session_start/popen hang

2003-07-12 Thread sniper
 ID:   22526
 Updated by:   [EMAIL PROTECTED]
 Reported By:  iberry at raxnet dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Windows 2000
 PHP Version:  4.3.2
 New Comment:

Please try using this CVS snapshot:

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

And update the version if this still happens.



Previous Comments:


[2003-06-24 03:33:56] marcus at quintic dot co dot uk

I have exactly the same problem with fopen+fpassthru instead of popen
(just filed a bug that got closed as a duplicate #24295) on Windows XP.
It makes session-based authentication next to useless for an app we are
developing. CGI does not cure it, neither does disabling the trans_sid.
The bug is apparent in 4.2.x and upwards in our case (on Apache 1.3.27)



[2003-06-06 11:03:10] mobrien at milleker dot org

Same problem observed in 4.3.2 on Win2K with Apache 1.3.1

Benny - Read the section in the install.txt about running in CGI mode
(if you have not already): this is a completely unacceptable situation
for production environments, IMO.



[2003-06-02 06:21:56] bbubble622 at yahoo dot com

Finally I was able to switch to CGI based PHP.
Although it is (very) slow, it gives the right results !

-benny



[2003-06-01 12:18:32] iberry at raxnet dot net

I experienced this problem under PHP 4.3.2 as well.



[2003-06-01 11:50:06] bbubble622 at yahoo dot com

yes !



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

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



#22529 [Opn-Fbk]: snmpset is not working

2003-07-12 Thread sniper
 ID:   22529
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mb at solstaden dot net
-Status:   Open
+Status:   Feedback
 Bug Type: SNMP related
 Operating System: FreeBSD 4.8 Prerelease
 PHP Version:  4CVS-2003-03-04 (stable)
 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

And if it fails, try the patch above.



Previous Comments:


[2003-03-19 17:44:00] jamuel at my740il dot com

That patch argument should be -p0 (a zero not an oh).

FWIW, the diff was from PHP-4.3.2 RC1

Cheers,

JPS



[2003-03-19 17:38:21] jamuel at my740il dot com

Ok so the following patch resolves the issue on my system.  Not really
sure why the existing function call fails but regardless snmpset now
works correctly with shortened textual oids, full textual oids, and
full numeric oids.  I also tested snmpget and it works fine as well.

--- snmp.c  Fri Feb 21 02:42:01 2003
+++ snmp.c  Tue Mar 18 13:58:48 2003
@@ -217,7 +217,7 @@ static void php_snmp_internal(INTERNAL_F
if (st = 2) { /* walk */
rootlen = MAX_NAME_LEN;
if (strlen(objid)) { /* on a walk, an empty string
means top of tree
- no error */
-   if (read_objid(objid, root, rootlen)) {
+   if (snmp_parse_oid(objid, root, rootlen)) {
gotroot = 1;
} else {
php_error_docref(NULL TSRMLS_CC,
E_WARNING, Invalid
object identifier: %s, objid);


Do a patch -po -l from the ../ext/snmp directory and paste the above
patch-text into patch, press CTRL-D twice to exit patch and you
should see patching file snmp.c.  cd back to the root of the PHP-4
source directory, make clean, make all, make install and you should be
in business!

BTW, no really sure how this form will mangle the patch-text but it's
really only a one line change.  So you could just manually edit the
snmp.c file and look for line 220 and make the change from read_objid
to snmp_parse_oid (the parameters remain unchanged.)

Hope that helps . . .


Cheers,

JPS



[2003-03-12 16:06:55] jamuel at my740il dot com

I am getting the same error message with the latest (today's) 4.3 snap
shot.  From a php script I can either specify the entire OID
numerically or the entire symbolic OID--I just can't use the shortened
symbolic OID:

snmpset(10.1.1.1, private, .1.3.6.1.2.1.1.5.0, s, MyBox) --
works OK

snmpset(10.1.1.1, private,
.iso.org.dod.internet.mgmt.mib-2.system.sysName.0, s, MyBox) --
works OK

snmpset(10.1.1.1, private, system.sysName.0, s, MyBox) --
BROKEN

snmpset(10.1.1.1, private, sysName.0, s, MyBox) -- BROKEN

Linux 2.4
NetSNMP 5.0.8-pre1
PHP 4.3.2-dev [from phpinfo()]

Any help would be appreciated.

Regards,

JPS



[2003-03-05 00:21:50] mb at solstaden dot net

I did upgrade!

Sorry to say, same error.
I tried with system.sysContact.0 and sysCobtact.0

Warning: snmpset() [function.snmpset]: Invalid object identifier:
system.sysContact.0 in /usr/local/www/data/snmp.php on line 27

Warning: snmpset() [function.snmpset]: Error in packet: (noSuchName)
There is no such variable name in this MIB. in
/usr/local/www/data/snmp.php on line 27

Warning: snmpset() [function.snmpset]: This name does not exist:
SNMPv2-SMI::mib-2 in /usr/local/www/data/snmp.php on line 27

Magnus



[2003-03-04 19:23:43] [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



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

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



#22566 [Opn-Fbk]: imap_mail hang the script

2003-07-12 Thread sniper
 ID:   22566
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lmstudio at 1system dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: IMAP related
 Operating System: Windows 2000 Pro
 PHP Version:  4.3.2-dev
 New Comment:

Does mail() work..?



Previous Comments:


[2003-03-13 00:54:31] lmstudio at 1system dot ru

Sorry for delay.
I installed new version - my prombler still present.

On http://www.lmstudio.arctel.ru/mail_output.html
now you can find the whole PHP script for testing.



[2003-03-11 20:17:20] [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.





[2003-03-06 12:54:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-03-06 04:18:01] lmstudio at 1system dot ru

The whole content for the 4-th param. for imap_mail can be found at
http://www.lmstudio.arctel.ru/mail_output.html



[2003-03-06 01:22:56] lmstudio at 1system dot ru

I try to send email from my PHP script with imap_mail function. My mail
consists a simple message part and attachment as ~250KB file. I compose
mail header with imap_compose function, here it's output:

From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY=90-31600-1046934660=:2764
X-Mailer: PHP4.3.1

--90-31600-1046934660=:2764
Content-Type: TEXT/plain; CHARSET=Windows-1251

Hello !!!
--90-31600-1046934660=:2764
Content-Type: IMAGE/gif
Content-Transfer-Encoding: BASE64
Content-Description: img.gif
Content-Disposition: attachment; filename=img.gif

R0lGODlhTwKeBPcAAPP1+d7v/9zv99bv/+bm/97m/97m99bm/9bm997e
/97e98nn/tbe/9fg7Nbe987e/87e99nW/9bW99bW78He/c7W/9bW5M7W987W
787W5sXW987W3sXW787O/9vH/8XW5s7O97vW/87O77rW98XO/87N5sXO98/P
... ~250KB ...
99mbRu95/3vgM2f4xB++8IGP/N4rP/jFZ77vnR/940s/+dRfvvWbP33tV3/7
1+9+9rkffu+LH/zjN3/50TMP/e+rn/zsP7/702/89sv//fSP//PtD3/955//
+Pc/9vfv/9av/wCQAAdQAOeP+YIgIAAAOw==

--90-31600-1046934660=:2764--

And imap_mail hang the script.
Help, please.




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



#23169 [Opn-Fbk]: SQLCODE=-1802 Connection name in use.

2003-07-12 Thread sniper
 ID:   23169
 Updated by:   [EMAIL PROTECTED]
 Reported By:  varkab at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Informix related
 Operating System: SunOS 5.8
 PHP Version:  4.3.1
 New Comment:

Get the latest snapshot and try this with CLI binary.
(NOT within webserver)

You should also try some better supported webserver, such as
Apache 1.3.27..



Previous Comments:


[2003-04-29 08:12:01] varkab at yahoo dot com

I tried. Didn't help.
I wonder, if someone has same configuration (solaris8,iPlanet4.1 and
DB-Informix 9) and doesn't have
any problem?

Thanks.



[2003-04-28 10:36:54] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-04-11 10:15:39] varkab at yahoo dot com

Additional information:
SunOS 5.8,
Web Server iPlanet4.1,
DB-Informix 9.
 
Problem: After restart WebServer the first connection always is fine
and get some data, after refresh or open new connection (in spite of
closed previous or not) mostly got this error: ---SQLCODE=-1802
Connection name in use---
 and only occasional (rare)connection continuously trying to refresh
button in browser. 
I tried with Allow and prevent persistent links in php.ini
and ifx_connect() and ifx_pconnect(). 
When I do connect and retrieve data from command line, no problem, the
connection always is fine.
Any suggestion?

 Thanks,
Var 




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



#23952 [Opn-Fbk]: segmentation fault during script execution under apache

2003-07-12 Thread sniper
 ID:   23952
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anton at ur dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD 4.8-STABLE
 PHP Version:  4.3.2
 New Comment:

Please try using this CVS snapshot:

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

And update the version information to be what it says in phpinfo().
Also, if this still happens, provide a short, complete example script.
(everything in ONE file, max 20 lines long)



Previous Comments:


[2003-06-02 13:33:40] anton at ur dot ru

I've installed the snapshot. Result is the same:

Program received signal SIGSEGV, Segmentation fault.
0x8097db7 in zend_get_executed_lineno ()
at
/usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute_API.c:271

271 return active_opline-lineno;
Program received signal SIGSEGV, Segmentation fault.
#0  0x8097db7 in zend_get_executed_lineno ()
at
/usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute_API.c:271

#1  0x80a1b36 in zend_error (type=8, format=0x8233b3b Undefined index:
 %s)
at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend.c:733
#2  0x80b711b in zend_fetch_dimension_address_inner (ht=0x844de24,
op2=0x8428458, Ts=0xbfbf9618, type=0)
at
/usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute.c:626
#3  0x80aedbb in zend_fetch_dimension_address (result=0x8428438,
op1=0x8428448, op2=0x8428458, Ts=0xbfbf9618, type=0)
at
/usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute.c:777
#4  0x80b0bec in execute (op_array=0x83c12a4)
at
/usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend_execute.c:1273
#5  0x80a2095 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/src-new/.apache/php4-STABLE-200306021730/Zend/zend.c:887
#6  0x8076caf in php_execute_script (primary_file=0xbfbff708)
at /usr/src-new/.apache/php4-STABLE-200306021730/main/main.c:1683
#7  0x80b739e in apache_php_module_main (r=0x8347034,
display_source_mode=0)
at
/usr/src-new/.apache/php4-STABLE-200306021730/sapi/apache/sapi_apache.c:5



[2003-06-02 13:00:59] [EMAIL PROTECTED]

No, don't send me the files. Just try the snapshot first.




[2003-06-02 12:35:24] anton at ur dot ru

Can i send you via email this script and all included files ?

I have this error not only in this script - lot of scripts on my server
causes this error. 

I'l try CVS snapshot tomorrow.

I have to say, that i see this error in php 4.3.*

Scripts works fine in php 4.2.2 and older.



[2003-06-02 10:36:59] [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


Also, without a complete script it is impossible for us to start
looking where the bug might be. (it's like looking for a needle in
haystack, without a magnet :)

First you need to include everything in one file (no include()'s or
other external references) and then work
your way down reducing the code piece by piece until you get the
shortest possible script causing the crash.

It looks like your script is causing some error, and the error output
procedure crashes when trying to figure out the line of where the error
happens..




[2003-06-02 07:04:43] anton at ur dot ru

I don't have a short script and i can't reproduce it in short script. 
http://www.uralweb.ru/region/index.phps - this is a script that causes
described error



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

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



#24616 [Opn-Bgs]: Process started with exec cmd /dev/null dies when httpd is closed

2003-07-12 Thread sniper
 ID:   24616
 Updated by:   [EMAIL PROTECTED]
 Reported By:  carb at videotron dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: RedHat 9.0
 PHP Version:  4.3.2
 New Comment:

This is a feature, not bug. (look in bug #15529 for another
perpective.. :)



Previous Comments:


[2003-07-12 01:07:27] carb at videotron dot ca

Same behavior with:

?PHP
  session_write_close(); 
  
  //Simple example to reproduce problematic forking
  exec(ping localhost /dev/null /dev/null 2/dev/null );

   
?



[2003-07-12 01:00:33] carb at videotron dot ca

Description:

When forking off a process from PHP with the statement exec(command 
/dev/null ), the process will get killed when the httpd is closed.  


Note: This occurs even though ps is telling me that the parent process
id is init (parent process id 1).


Reproduce code:
---
?PHP
  
  session_write_close();  

  //Simple example to reproduce problematic forking.
  exec(ping localhost  /dev/null );
   
?

Expected result:

A continuous ping process should be running in the backgroud,
independently of httpd.  When httpd is closed, the ping (or whatever
relevant) process should keep running.

Actual result:
--
When httpd is closed, the ping (or whatever relevant) process dies.





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



#24629 [Opn]: Socket_select doesnt work

2003-07-12 Thread sniper
 ID:   24629
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zparta at skebo dot ac
 Status:   Open
 Bug Type: Sockets related
-Operating System: FreeBSD 4.8
+Operating System: FreeBSD 4.8 (Only!)
 PHP Version:  4.3.3RC2-dev
 New Comment:

Works fine with latest CVS of PHP and SmartIRC.
(under Linux, so it's propably yet another FreeBSD-only bug)



Previous Comments:


[2003-07-12 21:10:33] zparta at skebo dot ac

doesnt work with PHP4.3.3RC2-dev either the latest stable from today
php4-STABLE-200307130130



[2003-07-12 20:54:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-07-12 20:47:07] zparta at skebo dot ac

Reproduce code:
---
$this-_address = 'irc.homelien.no';
$this-_port = '6667';
$this-_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = @socket_connect($this-_socket, $this-_address,
$this-_port);

while ($this-_state() == SMARTIRC_STATE_CONNECTED) {
$this-_checkbuffer();

$timeout = $this-_selecttimeout();
if ($this-_usesockets == true) {
$sread = array($this-_socket);
$result = @socket_select($sread, $w = null, $e = null,
0, $timeout*1000);

if ($result == 1) {
// the socket got data to read
$rawdata = @socket_read($this-_socket, 10240);
} else if ($result === false) {
// panic! panic! something went wrong!
$this-log(SMARTIRC_DEBUG_NOTICE, 'WARNING:
socket_select() returned false, something went wrong! Reason:
'.socket_strerror(socket_last_error()), __FILE__, __LINE__);
exit;
} else {
// no data
$rawdata = null;
}
//this code is taken from the Net_SmartIRC class from pear

Expected result:

Jul 13 03:47:04 SmartIRC.php(1636) WARNING: socket_select() returned
false, something went wrong! Reason: Invalid argument


and the author of Net_SmartIRC has tested this on my machine and he
says that i should bugreport this here because socket_select doesnt
work on freebsd 4.8 dont know if it is version specific.



[2003-07-12 20:27:55] [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.




[2003-07-12 20:23:18] zparta at skebo dot ac

Description:

cant use socket_select in freebsd with neither 4.3.3rc1 or 4.3.2 when
using real sockets not fsockets

Reproduce code:
---
dont have any

Expected result:

dont know






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



#21637 [Opn-Fbk]: Header('Location: ... ') problem

2003-07-12 Thread sniper
 ID:   21637
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pthiebaud at labeltechnologies dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2000, WinXP
 PHP Version:  4.3.0, 4.3.2dev
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-05-23 13:35:44] jonsagara at hotmail dot com

Windows 2k Pro, SP3
PHP 4.3.1, running as CGI
IIS 5

I am experiencing a similar problem.  If I hard-code the redirect page,
then it works fine:
?php
header(Location: goto.php);
exit;
?

But if I try to use a variable, INETINFO.EXE crashes (yes, it redirects
to itself, but there are different execution paths):
?php
...
header(Location:  . $_SERVER[SCRIPT_NAME]);
exit;
?

I have a reproducible case.  Do you want the files?



[2003-04-28 12:13:14] [EMAIL PROTECTED]

I had a strange problem with IIS and redirects; when output buffering
was enabled, a redirecting page (that had some debug output) would show
output from the page that it was being redirected to, after its own
output.
This needs further investigation :/




[2003-01-27 02:49:47] pthiebaud at labeltechnologies dot com

No, the output is on the result page. Ex: page 1 redirect to page 2 and
page 2 echos out Hello World. In the case we put the
header('Content-type: text/html'); line we do see Hello world, if
we delete that line we don't se Hello world (not as simple as this,
but you got the idea). By the way we also do an ob_flush to make sure
everything is treated, but it doesn't change a thing.



[2003-01-25 08:56:12] [EMAIL PROTECTED]

you have *output* on a redirect page?

this once again doesn't make sense at all to me ...

(but still it should not hang, esp. if it worked in 4.2.x)

how does IIS handle redirects? does it just pass them to the client or
does it handle some of them itself?



[2003-01-17 10:50:58] pthiebaud at labeltechnologies dot com

We did try to remove the header('Content-type: text/html') portion of
the code. We then have problems with the print_r or the echo
functions that will not work correctly. We receive only part of the
page, PHP seems to forget to process some lines of code. If we put back
the header line, then the code works perfectly.



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

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



#22713 [Opn-Fbk]: Strange HTTP headers behaviour when using output buffering and callback

2003-07-12 Thread sniper
 ID:   22713
 Updated by:   [EMAIL PROTECTED]
 Reported By:  public at asd-group dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows XP
 PHP Version:  4.3.2-RC
 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

And update the version if it still happens with the snapshot.



Previous Comments:


[2003-04-28 12:33:09] [EMAIL PROTECTED]

Related to #21637, assuming that you are using ISAPI.



[2003-03-22 11:22:27] public at asd-group dot com

Anyone looking at this problem - there is no workaround to this, so a
fix is needed?



[2003-03-17 20:46:48] public at asd-group dot com

I'm not sure how this just became a documentation problem.

Sure, the recent manuals are incomplete/wrong with respect to ob_start,
and that should be corrected.

And regarding the chunk size parameter, I can tell you from actual
testing and feedback from someone who knows the PHP source code (see
http://www.zend.com/phorum/read.php?num=3id=23814loc=0thread=23814)
that it *DOES* cause the output callback to be called *ONCE* for each
output statement, whether it is just one character (echo 1) or many
(echo A very,very,.very,very long string). 

That doesnt sound like setting a chunk size of 2 to me (assuming that
means that the output buffer is flushed in chunks of 2 characters -
without the correct info in the manual its hard to know).

However, in any event, if the output callback instructs PHP to ignore
the output text (by returning ) then headers should not be flushed
and headers_sent() should continue to return FALSE.

In a much larger application (too large to post), where I first saw
this, there's an an additional curiosity. With output being captured
and 'thrown away' by the output callback in this manner, the first
'echo' statement causes headers_sent() to return true, yet the code
later does header() calls to set cookies, and these do not fail with a
'headers already sent' type of message (and the cookies get sent).

I hoped to reproduce this within the little code snippet above, but
that does fail with the expeced message if a call to header() is made
after the first echo statement.

Please could you recategorise this to a code issue.



[2003-03-17 20:08:32] [EMAIL PROTECTED]

Here's the proto for ob_start():

proto bool ob_start([ string|array user_function [, int chunk_size [,
bool erase]]])

The 2nd parameter determines the chunk size..not how many times the
callback is called.




[2003-03-17 13:58:03] public at asd-group dot com

Hmm I did read and follow the notes, and the following sample script is
easily extacted from my description. 4.3.2 made no difference.

?php

   $Html = Array();

   // Output buffering callback - just buffers text and returns  to
PHP (telling it to ignore output)
   function PhpOutputCb ($txt)
   {
  global $Html;
  if ($txt != )
 {$Html[] = $txt;}
  return ;
   }

   // Install output buffering callback, called on each output
statement (due to second parameter)
   // ISSUE: Second parameter should be documented
   ob_start('PhpOutputCb', 2);

   $t = preBefore first output statement, headers_sent() =  . (int)
headers_sent() .  /pre\n;

   echo html\n.
head\n.
meta http-equiv=\Content-Type\ content=\text/html;
charset=windows-1252\\n.
meta http-equiv=\Content-Language\ content=\en-us\\n.
titleBug1/title\n.
/head\n.
body\n.
$t . \n;

   // ISSUE: Why does headers_sent() now return true, even though
headers should not have been sent (as no output actually sent)
   echo preAfter first output statement, headers_sent() =  .  (int)
 headers_sent() .  /pre\n;

   echo /body\n.
/html\n;

   // QUESTION: If commented-in, this exit() call causes PhpOutputCb to
be called with  text - why ??
   //exit();

   // Turn off output buffering and physically output text which our
callback buffered
   ob_end_clean();
   foreach ($Html as $key = $val)
{ echo $val; }
?



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

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



#22747 [Opn-Fbk]: Getting maximum execution timeout errors on lines which shouldnt be doing so

2003-07-12 Thread sniper
 ID:   22747
 Updated by:   [EMAIL PROTECTED]
 Reported By:  carl at voodoomedia dot co dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Windows 2000 SP3
 PHP Version:  4.3.2-RC
 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

And update the version if this still happens to you (when using the
snapshot). And make sure you delete ALL old remains of PHP related
files first before installing the snapshot!!



Previous Comments:


[2003-03-25 07:07:25] carl at voodoomedia dot co dot uk

Hi there,

I'm using Apache 1.3.27 on a windows 2000 SP3 machine, dual P3 1.6ghz
processors and 1.5GB RAM

PHP is loading as an apache module and i've tried 4.3.1 and 4.3.2
latest cvs binaries.


the differences in my ini from php-dist are

short_open_tags = Off
precision = 14
zlib_output_compression = on (but only did this last night wsa off
until then)
allow_call_time_pass_reference = off
max_execution_time = 40
error_reporting = E_ALL
display_errors = Off
log_errors = On
ignore_repeated_errors = on
error_log = e:\php.log
register_argc_argv = off
magic_quotes_runtime = on
include_path = e:\www\
doc_root = e:\www\
extensions_dir = c:\php\extensions
upload_max_file_size=4M
default_socket_timeout=30
SMTP=[ip to local smtp server]
session_save_path = c:\php\sessions
session.gc_dividend = 1000
session.bug_compat_warn = 0 (makes no difference, still see em)



Thanks



[2003-03-25 06:46:39] [EMAIL PROTECTED]

What webserver is used? How is PHP configured in it?
Are you using CGI binary or a module?
What is the diff -u between the php.ini-dist file and your
php.ini ? 





[2003-03-25 05:51:58] carl at voodoomedia dot co dot uk

I'm afraid that You're doing something wrong just isn't an acceptable
answer.

It's a problem with PHP's session handler or serializer for sure. I can
replicate it by using this script

?php
 session_start();
 if (!isset($_SESSION['tempVal'])) $_SESSION['tempVal'] = 0;
 $_SESSION['tempVal']++; 
 echo 'session val is now '.$_SESSION['tempVal'].'BR';
 echo 'A HREF=sesstest.phpclick here to reload/A
?

If I call that page from an automated page refresh script that I have
at some point within an hour I will get 

[25-Mar-2003 11:37:27] PHP Fatal error:  Maximum execution time of 40
seconds exceeded in e:\www\sesstest.php on line 2.



[2003-03-18 11:38:50] [EMAIL PROTECTED]

You're doing something wrong, ask support questions on the mailing
lists.





[2003-03-18 09:32:54] carl at voodoomedia dot co dot uk

It happens without zend installed, I installed that last night in the
hope that it would solve the time outs by speeding things up :(((



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

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



#22676 [Opn-Fbk]: Warning: 1 is not a Sybase link index in...

2003-07-12 Thread sniper
 ID:   22676
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mgruenb at gmx dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Sybase (dblib) related
 Operating System: Gentoo + SuSE
 PHP Version:  4.3.1
 New Comment:

Did you try it or not? (with latest CVS snapshot)



Previous Comments:


[2003-05-09 08:17:50] mgruenb at gmx dot net

--with-sybase-ct
is not really a bug fix. Does this mean --with-sybase is no longer
supported?



[2003-05-09 07:31:44] [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.





[2003-05-01 19:28:53] [EMAIL PROTECTED]

Try --with-sybase-ct option instead.




[2003-03-13 09:10:40] mgruenb at gmx dot net

OK I've also tried (on Gentoo only):

php4-200303131430.tar.bz2
php4-STABLE-200303131430.tar.bz2

with the same results / error messages. Btw, I get the following during
compilation:

/opt/sybase/lib/libsybdb.so: `sys_errlist' is deprecated; use
`strerror' or `strerror_r' instead
/opt/sybase/lib/libsybdb.so: `sys_nerr' is deprecated; use `strerror'
or `strerror_r' instead

Sybase version is ASE 11.9.2

With
php5-200303131430.tar.bz2 I get the following during compilation:

gcc  -Iext/sybase/ -I/usr/local/php5-200303131430/ext/sybase/
-DPHP_ATOM_INC -I/usr/local/php5-200303131430/include
-I/usr/local/php5-200303131430/main -I/usr/local/php5-200303131430
-I/usr/local/php5-200303131430/Zend -I/usr/include/libxml2
-I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/sybase/include
-I/usr/local/php5-200303131430/ext/xml/expat 
-I/usr/local/php5-200303131430/TSRM  -g -O2  -c
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c -o
ext/sybase/php_sybase_db.o   echo  ext/sybase/php_sybase_db.lo
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function
`php_sybase_do_connect':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:395: request
for member `value' in something not a structure or union
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function
`zif_sybase_select_db':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:669: invalid
type argument of `unary *'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function
`zif_sybase_free_result':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:927: parse
error before if
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: At top level:
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:928: parse
error before return
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930:
`sybase_result_index' undeclared here (not in a function)
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: `type'
undeclared here (not in a function)
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: warning:
initialization makes integer from pointer without a cast
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930:
initializer element is not constant
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: warning:
data definition has no type or storage class
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:932: parse
error before if
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:934: parse
error before '-' token
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:936: parse
error before '(' token
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:937: parse
error before '-' token
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function
`zif_sybase_fetch_object':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1081: invalid
lvalue in assignment
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1082: invalid
lvalue in assignment
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function
`zif_sybase_result':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1299: request
for member `value' in something not a structure or union
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function
`zif_sybase_affected_rows':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid
type argument of `-'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid
type argument of `-'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343:
incompatible types in initialization
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343:
incompatible types in assignment
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid
type argument of `unary *'

#23685 [Opn-Fbk]: fake values returned when OID value is an empty string

2003-07-12 Thread sniper
 ID:   23685
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s dot zagrodzki at net dot icm dot edu dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: SNMP related
 Operating System: Linux 2.2
 PHP Version:  4.3.2RC4-dev
 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

Some changes have been made lately.



Previous Comments:


[2003-05-19 04:30:19] s dot zagrodzki at net dot icm dot edu dot pl

I've copied ext/snmp directory from this snapshot into my php source
tree (when I tried to compile the snap as it is, it complained about
too old db3 library). It didn't help.



[2003-05-18 16:57:47] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-05-18 15:47:25] s dot zagrodzki at net dot icm dot edu dot pl

PHP with snmp module. Sample piece of output from snmpwalk utility from
ucd-snmp:
$ snmpwalk router community
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias
...
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.3 = lacze do Obs. Astr.
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.4 =
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.5 = : lacze do Wydz.
Zarzadzania
...
(value of ifAlias.4 is an empty string).
Sample script:
?
$ifAlias = snmprealwalk(router, community,
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias);
print_r($ifAlias);
?

Output of sample script:
[ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.3] = lacze do Obs.
Astr.
[ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.4] = lacze do Obs.
Astr.
[ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.5] = : lacze do
Wydz. Zarzadz
(ifAlias.4 is now the same as ifAlias.3, not an empty string).

ucd-snmp 4.2.6
router is Cisco 2511 with IOS 11.1(5) (don't suppose it matters, but
just in case...)





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



#23973 [Opn-Fbk]: Ming Funtion don't work

2003-07-12 Thread sniper
 ID:   23973
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vicviper at skcc dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Ming related
 Operating System: XP sp1a, Win2K sp3
 PHP Version:  4.3.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-06-03 02:36:32] vicviper at skcc dot com

OS : Windows 2K sp3, Windows XP sp1 Hangul Version
HTTPD : Apache2, IIS 5.0
Browser : IE 6.0

don't work it or Crash System.

?
  $f = new SWFFont(_sans); //Crash
  /*
$f = new SWFFont(test.fdb); //Crash
$f = new SWFFont(_sarif); //Crash
etc. etc. etc
 */
  $t = new SWFText();
  $t-setFont($f);
  $t-setColor(255, 0, 0);
  $t-setHeight(60);
  $t-addString(Advanced PHP);

  $m = new SWFMovie();
  $m-setDimension(320, 240);
  $i = $m-add($t);
  $i-moveTo(160-$t-getWidth(Advanced PHP)/2,
120+$t-getAscent()/2);

  $filename =test.swf;
  $m-save($filename);
?
embed src=./?echo $filename;? quality=high loop=false
pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlashtype=application/x-shockwave-flash;
width=600 height=300
/embed

Fix plz!!




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



#23705 [Opn-Ver]: Reassigned object-ref params don't propagate back properly.

2003-07-12 Thread sniper
 ID:   23705
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joachim at lous dot org
-Status:   Open
+Status:   Verified
-Bug Type: Scripting Engine problem
+Bug Type: Zend Engine 2 problem
-Operating System: Windows 2000
+Operating System: *
-PHP Version:  4.3.1
+PHP Version:  5.0.0b2-dev, 4.3.3RC2-dev
 New Comment:

Same result with ZE2.



Previous Comments:


[2003-05-19 14:59:47] joachim at lous dot org

It doesn't seem to be possible to replace a passed object references
with a different one.

I expected the following code to print 5:

class a{
var $val;
function a($val){ $this-val = $val;}
}
function replace($src, $dest){
$dest = $src;
}
$src = new a(2);
$dest = new a(1);
replace($src,$dest);
$src-val=5;
echo $dest-val;

In stead it prints 1.
Changing the '=' to '=', it prints '2', as expected.
Surely this must be a bug? If not, is there really no way to get the
reference across?

I need this for building trees: passing the current node pointer, have
the function change the tree and make the ref point to a new current
node. I can work around it by returning the new reference in stead, but
that only works for one ref.

Using binary installer from website.





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



#24196 [Opn-NoF]: Serialize segfaults in a rare instance

2003-07-12 Thread sniper
 ID:   24196
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ramato at squiz dot net
-Status:   Open
+Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Redhat 7.3
 PHP Version:  4.3.2
 New Comment:

No short example script provided.



Previous Comments:


[2003-06-17 00:20:32] ramato at squiz dot net

I might be able to arrange shell access to the machine and show you the
code thats doing it if that would help ? The problem is that its in a
codebase which has around 300,000 lines of code in it which makes
pinning it down more difficult. But if you think shell access to the
machine would help let me know.



[2003-06-16 08:18:49] [EMAIL PROTECTED]

We really need the example script, otherwise it's impossible
to even guess where the problem is..




[2003-06-16 01:16:39] ramato at squiz dot net

I forgot to include the actual seg fault message in the report. 

(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x4024b352 in php_var_serialize_class_name (buf=0xbffd9fec,
struc=0x86829d0) at
/root/apache+php/php4-STABLE-200306160330/ext/standard/var.c:416
416 PHP_SET_CLASS_ATTRIBUTES(*struc);



[2003-06-15 23:59:34] ramato at squiz dot net

Snapshot still crashes. Backtrace looks esentially identical. I will
see if I can get a simple test script but I have tried a few times in
the past to make one and havn't been able to. 

I have a bunch of core files that I can work on and I can reproduce it
every time, however I couldn't work out enough about the internals to
figure out how to get gdb to print out the var that is getting passed
to it (which I suspect to be the problem).

I tried asking on the dev list if anyone has any ideas about this and
they suggested recompiling with gcc 2.95 but that didn't make any
difference.



[2003-06-15 22:19:35] [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


And if that crashes too, please try to provide a short example
script..




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

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



#24629 [Opn]: Socket_select doesnt work

2003-07-12 Thread zparta at skebo dot ac
 ID:   24629
 User updated by:  zparta at skebo dot ac
 Reported By:  zparta at skebo dot ac
 Status:   Open
 Bug Type: Sockets related
 Operating System: FreeBSD 4.8 (Only!)
 PHP Version:  4.3.3RC2-dev
 New Comment:

ok thats to bad :( il just have to wait until its fixed


Previous Comments:


[2003-07-13 00:04:21] [EMAIL PROTECTED]

Works fine with latest CVS of PHP and SmartIRC.
(under Linux, so it's propably yet another FreeBSD-only bug)




[2003-07-12 21:10:33] zparta at skebo dot ac

doesnt work with PHP4.3.3RC2-dev either the latest stable from today
php4-STABLE-200307130130



[2003-07-12 20:54:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-07-12 20:47:07] zparta at skebo dot ac

Reproduce code:
---
$this-_address = 'irc.homelien.no';
$this-_port = '6667';
$this-_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = @socket_connect($this-_socket, $this-_address,
$this-_port);

while ($this-_state() == SMARTIRC_STATE_CONNECTED) {
$this-_checkbuffer();

$timeout = $this-_selecttimeout();
if ($this-_usesockets == true) {
$sread = array($this-_socket);
$result = @socket_select($sread, $w = null, $e = null,
0, $timeout*1000);

if ($result == 1) {
// the socket got data to read
$rawdata = @socket_read($this-_socket, 10240);
} else if ($result === false) {
// panic! panic! something went wrong!
$this-log(SMARTIRC_DEBUG_NOTICE, 'WARNING:
socket_select() returned false, something went wrong! Reason:
'.socket_strerror(socket_last_error()), __FILE__, __LINE__);
exit;
} else {
// no data
$rawdata = null;
}
//this code is taken from the Net_SmartIRC class from pear

Expected result:

Jul 13 03:47:04 SmartIRC.php(1636) WARNING: socket_select() returned
false, something went wrong! Reason: Invalid argument


and the author of Net_SmartIRC has tested this on my machine and he
says that i should bugreport this here because socket_select doesnt
work on freebsd 4.8 dont know if it is version specific.



[2003-07-12 20:27:55] [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.




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

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