#39071 [Opn-Fbk]: imagettftext cuts off first pixel

2006-10-07 Thread pajoye
 ID:   39071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joel at seligstein dot com
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Irrelevant
 PHP Version:  5.1.6
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Please provide a link to the TTF file. Which freetype version do you
use?


Previous Comments:


[2006-10-06 22:05:10] joel at seligstein dot com

I'm going to keep changing my mind, here.  The J obviously is missing a
pixel as well.  It appears some or all of the letters are mixing a
pixel.



[2006-10-06 22:01:26] joel at seligstein dot com

After other tests, this appears just to be the capital I letter.



[2006-10-06 21:43:26] joel at seligstein dot com

Description:

Using text anywhere on an image using a local font (copy of
Verdana.TTF), imagettffont cuts off the first pixel.  This is easily
evident in the capital letter I.

gd_info():
array(12) {
  [GD Version]=
  string(27) bundled (2.0.28 compatible)
  [FreeType Support]=
  bool(true)
  [FreeType Linkage]=
  string(13) with freetype
  [T1Lib Support]=
  bool(false)
  [GIF Read Support]=
  bool(true)
  [GIF Create Support]=
  bool(true)
  [JPG Support]=
  bool(true)
  [PNG Support]=
  bool(true)
  [WBMP Support]=
  bool(true)
  [XPM Support]=
  bool(false)
  [XBM Support]=
  bool(true)
  [JIS-mapped Japanese Font Support]=
  bool(false)
}


Reproduce code:
---
header( Content-type: image/png );
$i = imagecreate(100,100);
$white = imagecolorallocate($i,255,255,255);
$black = imagecolorallocate($i,0,0,0);
imagefill( $i, 0,0,$white);
imagettftext( $i, 10, 0, 30, 30, $black, /path/to/Verdana.TTF, I am
testing );
imagepng($i);

And you will see the letter I has the first pixel cut off.



Expected result:

I'd expect full letters, not missing the first pixel.






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


#39020 [Opn]: PHP in FastCGI server mode crashes

2006-10-07 Thread hugo at leisink dot net
 ID:   39020
 User updated by:  hugo at leisink dot net
 Reported By:  hugo at leisink dot net
 Status:   Open
-Bug Type: Documentation problem
+Bug Type: Reproducible crash
 Operating System: Debian Linux
 PHP Version:  5.1.6
 New Comment:

New problem: for some of my sites, I got FastCGI working. For some
sites not. PHP dumps a 200MB core file in /tmp. I think we really got a
crash here.


Previous Comments:


[2006-10-03 12:25:40] hugo at leisink dot net

Ok, I've got something interesting. I've been digging through the
source and found the statement PHP_FCGI_MAX_REQUESTS. I've found the
file /sapi/cgi/README.FastCGI, which says some things about the
environment settings PHP_FCGI_CHILDREN and PHP_FCGI_MAX_REQUESTS. I'm
running PHP now with 5 children and everything looks oke (Don't close
this bugreport yet, please. Wanna do some more tests first). It even
survived several stresstests with 'ab'.

But now I have this question: Why is this important (read: necessary)
information NOT in the manualpage!?!?!



[2006-10-03 11:19:50] hugo at leisink dot net

5.2.0RC5-dev also quits/crashes. I agree that Valgrind doesn't show any
crash. But the result is the same: PHP stops running.  I'm trying real
hard to find out what is happing or what causes PHP to quit/crash. It
looks like it's random. Somethings it stops after 100 requests,
somethings after 5000. 

I'm using Debian sarge, which comes with PHP 4.3.10. This version has
the same problem.

I'm writing my own webserver and I'm now implementing FastCGI support.
So, it is possible that my webserver doesn't send the right FastCGI
commands/record information. But if so, it shouldn't make PHP to stop
running.



[2006-10-03 09:41:16] [EMAIL PROTECTED]

The valgrinds output doesn't show any crash, btw.



[2006-10-03 09:40:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-10-03 07:34:52] hugo at leisink dot net

Description:

If PHP is started as a FastCGI server, it crashes when a large amount
of request are being send. I used /usr/sbin/ab -n 1 -c 10 URL to
stresstest it. It crashes after about 3000 requests.

Reproduce code:
---
Start PHP as a FastCGI server. Configure a FastCGI-enabled webserver.
Use /usr/sbin/ab -n 1 -c 10 URL to stress-test it. PHP will crash
after a few thousand requests.

Expected result:

No crash

Actual result:
--
Valgrind output:

==13767== Memcheck, a memory error detector for x86-linux.
==13767== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et
al.
==13767== Using valgrind-2.4.0, a program supervision framework for
x86-linux.
==13767== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et
al.
==13767== For more details, rerun with: -v
==13767==
==13767==
==13767== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 100 from
3)
==13767== malloc/free: in use at exit: 19166 bytes in 1225 blocks.
==13767== malloc/free: 898027 allocs, 896802 frees, 340213828 bytes
allocated.
==13767== For counts of detected errors, rerun with: -v
==13767== searching for pointers to 1225 not-freed blocks.
==13767== checked 1415844 bytes.
==13767==
==13767== 4 bytes in 1 blocks are definitely lost in loss record 1 of
7
==13767==at 0x1B90459D: malloc (vg_replace_malloc.c:130)
==13767==by 0x1B8E9346: (within /lib/ld-2.3.2.so)
==13767==by 0x1B8EA5A5: _dl_map_object (in /lib/ld-2.3.2.so)
==13767==by 0x1B8EEB08: (within /lib/ld-2.3.2.so)
==13767==by 0x1B8F0015: _dl_catch_error (in /lib/ld-2.3.2.so)
==13767==by 0x1B8EF580: _dl_map_object_deps (in /lib/ld-2.3.2.so)
==13767==by 0x1BF61EDF: (within /lib/libc-2.3.2.so)
==13767==by 0x1B8F0015: _dl_catch_error (in /lib/ld-2.3.2.so)
==13767==by 0x1BF62675: _dl_open (in /lib/libc-2.3.2.so)
==13767==by 0x1BF639B2: (within /lib/libc-2.3.2.so)
==13767==by 0x1B8F0015: _dl_catch_error (in /lib/ld-2.3.2.so)
==13767==by 0x1BF6396D: (within /lib/libc-2.3.2.so)
==13767==
==13767==
==13767== 54 bytes in 2 blocks are definitely lost in loss record 4 of
7
==13767==at 0x1B90459D: malloc (vg_replace_malloc.c:130)
==13767==by 0x1C388F81: ???
==13767==by 0x1C388E4A: ???
==13767==by 0x1C35AFC1: ???
==13767==by 0x1C352128: ???
==13767==by 0x1C2F4995: ???
==13767==by 0x1C2F4B0A: ???
==13767==by 0x1C2F349E: ???
==13767==by 0x1C2F3729: ???
==13767==by 0x1BF472A3: getprotobyname_r (in /lib/libc-2.3.2.so)
==13767==by 0x1BF4714E: getprotobyname 

#39020 [Opn]: PHP in FastCGI server mode crashes

2006-10-07 Thread hugo at leisink dot net
 ID:   39020
 User updated by:  hugo at leisink dot net
 Reported By:  hugo at leisink dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Debian Linux
 PHP Version:  5.1.6
 New Comment:

Here is the tcpdump output for a working site (created myself)

09:01:09.578644 IP localhost.localdomain.44604 
localhost.localdomain.2345: S 861441178:861441178(0) win 32767 mss
16396,sackOK,timestamp 921070006 0,nop,wscale 0
0x:  4500 003c e52c 4000 4006 578d 7f00 0001  E...,@[EMAIL 
PROTECTED]
0x0010:  7f00 0001 ae3c 0929 3358 8c9a    ..)3X..
0x0020:  a002 7fff 77b8  0204 400c 0402 080a  [EMAIL PROTECTED]
0x0030:  36e6 69b6   0103 03006.i.
09:01:09.578672 IP localhost.localdomain.2345 
localhost.localdomain.44604: S 875467929:875467929(0) ack 861441179 win
32767 mss 16396,sackOK,timestamp 921070006 921070006,nop,wscale 0
0x:  4500 003c  4000 4006 3cba 7f00 0001  E..[EMAIL 
PROTECTED]@..
0x0010:  7f00 0001 0929 ae3c 342e 9499 3358 8c9b  .).4...3X..
0x0020:  a012 7fff 0e43  0204 400c 0402 080a  [EMAIL PROTECTED]
0x0030:  36e6 69b6 36e6 69b6 0103 03006.i.6.i.
09:01:09.578698 IP localhost.localdomain.44604 
localhost.localdomain.2345: . ack 1 win 32767 nop,nop,timestamp
921070006 921070006
0x:  4500 0034 e52d 4000 4006 5794 7f00 0001  [EMAIL 
PROTECTED]@.W.
0x0010:  7f00 0001 ae3c 0929 3358 8c9b 342e 949a  ..)3X..4...
0x0020:  8010 7fff 7760  0101 080a 36e6 69b6  w`..6.i.
0x0030:  36e6 69b66.i.
09:01:09.579438 IP localhost.localdomain.44604 
localhost.localdomain.2345: P 1:819(818) ack 1 win 32767
nop,nop,timestamp 921070006 921070006
0x:  4500 0366 e52e 4000 4006 5461 7f00 0001  [EMAIL 
PROTECTED]@.Ta
0x0010:  7f00 0001 ae3c 0929 3358 8c9b 342e 949a  ..)3X..4...
0x0020:  8018 7fff 9863  0101 080a 36e6 69b6  .c..6.i.
0x0030:  36e6 69b6 0101 0001 0008  0001   6.i.
0x0040:    0104 0001 0312  1107 4741  ..GA
0x0050:  5445 5741 595f 494e 5445 5246 4143 4543  TEWAY_INTERFACEC
0x0060:  4749 2f31 2e31 0d26 444f 4355 4d45 4e54  GI/1.1.DOCUMENT
0x0070:  5f52 4f4f 542f 686f 6d65 2f77 6562 7369  _ROOT/home/websi
0x0080:  7465 732f 6c65 6973 696e 6b2f 7072 6f6a  tes/leisink/proj
0x0090:  6563 7473 2f70 7562 6c69 630e 0352 4551  ects/public..REQ
0x00a0:  5545 5354 5f4d 4554 484f 4447 4554 0b01  UEST_METHODGET..
0x00b0:  5245 5155 4553 545f 5552 492f 0b0a 5343  REQUEST_URI/..SC
0x00c0:  5249 5054 5f4e 414d 452f 696e 6465 782e  RIPT_NAME/index.
0x00d0:  7068 700f 3053 4352 4950 545f 4649 4c45  php.0SCRIPT_FILE
0x00e0:  4e41 4d45 2f68 6f6d 652f 7765 6273 6974  NAME/home/websit
0x00f0:  6573 2f6c 6569 7369 6e6b 2f70 726f 6a65  es/leisink/proje
0x0100:  6374 732f 7075 626c 6963 2f69 6e64 6578  cts/public/index
0x0110:  2e70 6870 0b08 5245 4d4f 5445 5f41   .php..REMOTE_ADD
0x0120:  5231 302e 342e 302e 320b 0253 4552 5645  R10.4.0.2..SERVE
0x0130:  525f 504f 5254 3830 0b14 5345 5256 4552  R_PORT80..SERVER
0x0140:  5f4e 414d 4570 726f 6a65 6374 732e 6c65  _NAMEprojects.le
0x0150:  6973 696e 6b2e 6f72 670f 0853 4552 5645  isink.org..SERVE
0x0160:  525f 5052 4f54 4f43 4f4c 4854 5450 2f31  R_PROTOCOLHTTP/1
0x0170:  2e31 0f0d 5345 5256 4552 5f53 4f46 5457  .1..SERVER_SOFTW
0x0180:  4152 4548 6961 7761 7468 6120 7635 2e30  AREHiawatha.v5.0
0x0190:  0f03 5245 4449 5245 4354 5f53 5441 5455  ..REDIRECT_STATU
0x01a0:  5332 3030 0f05 434f 4e4e 4543 5449 4f4e  S200..CONNECTION
0x01b0:  5f54 5950 4570 6c61 696e 0b63 4854 5450  _TYPEplain.cHTTP
0x01c0:  5f41 4343 4550 5474 6578 742f 786d 6c2c  _ACCEPTtext/xml,
0x01d0:  6170 706c 6963 6174 696f 6e2f 786d 6c2c  application/xml,
0x01e0:  6170 706c 6963 6174 696f 6e2f 7868 746d  application/xhtm
0x01f0:  6c2b 786d 6c2c 7465 7874 2f68 746d 6c3b  l+xml,text/html;
0x0200:  713d 302e 392c 7465 7874 2f70 6c61 696e  q=0.9,text/plain
0x0210:  3b71 3d30 2e38 2c69 6d61 6765 2f70 6e67  ;q=0.8,image/png
0x0220:  2c2a 2f2a 3b71 3d30 2e35 131e 4854 5450  ,*/*;q=0.5..HTTP
0x0230:  5f41 4343 4550 545f 4348 4152 5345 5449  _ACCEPT_CHARSETI
0x0240:  534f 2d38 3835 392d 312c 7574 662d 383b  SO-8859-1,utf-8;
0x0250:  713d 302e 372c 2a3b 713d 302e 3714 0e48  q=0.7,*;q=0.7..H
0x0260:  5454 505f 4143 4345 5054 5f4c 414e 4755  TTP_ACCEPT_LANGU
0x0270:  4147 4565 6e2d 7573 2c65 6e3b 713d 302e  AGEen-us,en;q=0.
0x0280:  3509 1448 5454 505f 484f 5354 7072 6f6a  5..HTTP_HOSTproj
0x0290:  6563 7473 2e6c 6569 7369 6e6b 2e6f 7267  ects.leisink.org

#39020 [Opn]: PHP in FastCGI server mode crashes

2006-10-07 Thread hugo at leisink dot net
 ID:   39020
 User updated by:  hugo at leisink dot net
 Reported By:  hugo at leisink dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Debian Linux
 PHP Version:  5.1.6
 New Comment:

And here is the tcpdump output for a request (myphpadmin website) that
crashes PHP in fastcgi mode:

09:01:20.192597 IP localhost.localdomain.42965 
localhost.localdomain.2345: S 871050168:871050168(0) win 32767 mss
16396,sackOK,timestamp 921071067 0,nop,wscale 0
0x:  4500 003c 4663 4000 4006 f656 7f00 0001  E..[EMAIL 
PROTECTED]@..V
0x0010:  7f00 0001 a7d5 0929 33eb 2bb8    ...)3.+.
0x0020:  a002 7fff da49  0204 400c 0402 080a  [EMAIL PROTECTED]
0x0030:  36e6 6ddb   0103 03006.m.
09:01:20.192632 IP localhost.localdomain.2345 
localhost.localdomain.42965: S 885975743:885975743(0) ack 871050169 win
32767 mss 16396,sackOK,timestamp 921071067 921071067,nop,wscale 0
0x:  4500 003c  4000 4006 3cba 7f00 0001  E..[EMAIL 
PROTECTED]@..
0x0010:  7f00 0001 0929 a7d5 34ce eabf 33eb 2bb9  .)..4...3.+.
0x0020:  a012 7fff 15e9  0204 400c 0402 080a  [EMAIL PROTECTED]
0x0030:  36e6 6ddb 36e6 6ddb 0103 03006.m.6.m.
09:01:20.192660 IP localhost.localdomain.42965 
localhost.localdomain.2345: . ack 1 win 32767 nop,nop,timestamp
921071067 921071067
0x:  4500 0034 4664 4000 4006 f65d 7f00 0001  [EMAIL 
PROTECTED]@..]
0x0010:  7f00 0001 a7d5 0929 33eb 2bb9 34ce eac0  ...)3.+.4...
0x0020:  8010 7fff 7f06  0101 080a 36e6 6ddb  6.m.
0x0030:  36e6 6ddb6.m.
09:01:20.193329 IP localhost.localdomain.42965 
localhost.localdomain.2345: P 1:883(882) ack 1 win 32767
nop,nop,timestamp 921071067 921071067
0x:  4500 03a6 4665 4000 4006 f2ea 7f00 0001  [EMAIL 
PROTECTED]@...
0x0010:  7f00 0001 a7d5 0929 33eb 2bb9 34ce eac0  ...)3.+.4...
0x0020:  8018 7fff 463e  0101 080a 36e6 6ddb  F..6.m.
0x0030:  36e6 6ddb 0101 0001 0008  0001   6.m.
0x0040:    0104 0001 0352  1107 4741  .RGA
0x0050:  5445 5741 595f 494e 5445 5246 4143 4543  TEWAY_INTERFACEC
0x0060:  4749 2f31 2e31 0d1c 444f 4355 4d45 4e54  GI/1.1..DOCUMENT
0x0070:  5f52 4f4f 542f 686f 6d65 2f77 6562 7369  _ROOT/home/websi
0x0080:  7465 732f 6c65 6973 696e 6b2f 6d79 7371  tes/leisink/mysq
0x0090:  6c0e 0352 4551 5545 5354 5f4d 4554 484f  l..REQUEST_METHO
0x00a0:  4447 4554 0b01 5245 5155 4553 545f 5552  DGET..REQUEST_UR
0x00b0:  492f 0b0a 5343 5249 5054 5f4e 414d 452f  I/..SCRIPT_NAME/
0x00c0:  696e 6465 782e 7068 700f 2653 4352 4950  index.php.SCRIP
0x00d0:  545f 4649 4c45 4e41 4d45 2f68 6f6d 652f  T_FILENAME/home/
0x00e0:  7765 6273 6974 6573 2f6c 6569 7369 6e6b  websites/leisink
0x00f0:  2f6d 7973 716c 2f69 6e64 6578 2e70 6870  /mysql/index.php
0x0100:  0b08 5245 4d4f 5445 5f41  5231 302e  ..REMOTE_ADDR10.
0x0110:  342e 302e 320b 0353 4552 5645 525f 504f  4.0.2..SERVER_PO
0x0120:  5254 3434 330b 1153 4552 5645 525f 4e41  RT443..SERVER_NA
0x0130:  4d45 6d79 7371 6c2e 6c65 6973 696e 6b2e  MEmysql.leisink.
0x0140:  6f72 670f 0853 4552 5645 525f 5052 4f54  org..SERVER_PROT
0x0150:  4f43 4f4c 4854 5450 2f31 2e31 0f0d 5345  OCOLHTTP/1.1..SE
0x0160:  5256 4552 5f53 4f46 5457 4152 4548 6961  RVER_SOFTWAREHia
0x0170:  7761 7468 6120 7635 2e30 0f03 5245 4449  watha.v5.0..REDI
0x0180:  5245 4354 5f53 5441 5455 5332 3030 0f03  RECT_STATUS200..
0x0190:  434f 4e4e 4543 5449 4f4e 5f54 5950 4553  CONNECTION_TYPES
0x01a0:  534c 0b63 4854 5450 5f41 4343 4550 5474  SL.cHTTP_ACCEPTt
0x01b0:  6578 742f 786d 6c2c 6170 706c 6963 6174  ext/xml,applicat
0x01c0:  696f 6e2f 786d 6c2c 6170 706c 6963 6174  ion/xml,applicat
0x01d0:  696f 6e2f 7868 746d 6c2b 786d 6c2c 7465  ion/xhtml+xml,te
0x01e0:  7874 2f68 746d 6c3b 713d 302e 392c 7465  xt/html;q=0.9,te
0x01f0:  7874 2f70 6c61 696e 3b71 3d30 2e38 2c69  xt/plain;q=0.8,i
0x0200:  6d61 6765 2f70 6e67 2c2a 2f2a 3b71 3d30  mage/png,*/*;q=0
0x0210:  2e35 131e 4854 5450 5f41 4343 4550 545f  .5..HTTP_ACCEPT_
0x0220:  4348 4152 5345 5449 534f 2d38 3835 392d  CHARSETISO-8859-
0x0230:  312c 7574 662d 383b 713d 302e 372c 2a3b  1,utf-8;q=0.7,*;
0x0240:  713d 302e 3714 0e48 5454 505f 4143 4345  q=0.7..HTTP_ACCE
0x0250:  5054 5f4c 414e 4755 4147 4565 6e2d 7573  PT_LANGUAGEen-us
0x0260:  2c65 6e3b 713d 302e 3509 1148 5454 505f  ,en;q=0.5..HTTP_
0x0270:  484f 5354 6d79 7371 6c2e 6c65 6973 696e  HOSTmysql.leisin
0x0280:  6b2e 6f72 670f 5a48 5454 505f 5553 4552  k.org.ZHTTP_USER
0x0290:  5f41 4745 

#39073 [NEW]: safe_mode_include_dir not honored

2006-10-07 Thread jim at centerfuse dot net
From: jim at centerfuse dot net
Operating system: FreeBSD 4.11
PHP version:  5.1.6
PHP Bug Type: Safe Mode/open_basedir
Bug description:  safe_mode_include_dir not honored

Description:

Just upgraded to php 5.1.6, and safe_mode_include_dir doesn't appear to be
honored. I'm running with safe mode = On and one directory in the
include_dir. Trying to include/fopen/etc any file from that directory
results in a safemode UID restriction. phpinfo() shows that PHP is reading
the correct configuration file and that it knows about
safe_mode_include_dir. 

Reproduce code:
---
//in php.ini: safe_mode_include_dir = /usr/local/share/FUSE)

$fp = fopen('/usr/local/share/FUSE/FUSE-main.php', 'r')



Expected result:

fopen should return file pointer

Actual result:
--
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1006 is not allowed to access
/usr/local/share/FUSE/FUSE-main.php owned by uid 0 in
/home/context/public_html/test.php on line 13

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


#39073 [Opn]: safe_mode_include_dir not honored

2006-10-07 Thread jim at centerfuse dot net
 ID:   39073
 User updated by:  jim at centerfuse dot net
 Reported By:  jim at centerfuse dot net
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: FreeBSD 4.11
 PHP Version:  5.1.6
 New Comment:

note, the trailing parentheses that appears in my reproduce code after
the safe_mode_include_dir is *not* present in php.ini, it was a typo.


Previous Comments:


[2006-10-07 08:09:58] jim at centerfuse dot net

Description:

Just upgraded to php 5.1.6, and safe_mode_include_dir doesn't appear to
be honored. I'm running with safe mode = On and one directory in the
include_dir. Trying to include/fopen/etc any file from that directory
results in a safemode UID restriction. phpinfo() shows that PHP is
reading the correct configuration file and that it knows about
safe_mode_include_dir. 

Reproduce code:
---
//in php.ini: safe_mode_include_dir = /usr/local/share/FUSE)

$fp = fopen('/usr/local/share/FUSE/FUSE-main.php', 'r')



Expected result:

fopen should return file pointer

Actual result:
--
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1006 is not allowed to access
/usr/local/share/FUSE/FUSE-main.php owned by uid 0 in
/home/context/public_html/test.php on line 13





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


#39059 [Bgs-Opn]: str_replace: fourth parameter is always zero

2006-10-07 Thread dirk dot thomas at 4wdmedia dot de
 ID:   39059
 User updated by:  dirk dot thomas at 4wdmedia dot de
-Reported By:  third-chance at gmx dot de
+Reported By:  dirk dot thomas at 4wdmedia dot de
-Status:   Bogus
+Status:   Open
 Bug Type: Strings related
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2006-10-06 (snap)
 New Comment:

I have testet the example-script with the updated snapshot. Now it
works as expected!

So it looks like that this bug has been fixed between the two snaps:
php5.2-win32-200610051830.zip
and 
php5.2-win32-200610070230.zip

I could not test the php6-version, because their are no current
win32-builds available (last is 20060924).

Thank you


Previous Comments:


[2006-10-06 17:26:35] third-chance at gmx dot de

A friend of mine testet the latest snap on his computer and encoutered
the same bug.
He also uses WinXP SP2 and called the cli of php for the test.



[2006-10-06 16:08:26] third-chance at gmx dot de

I tried again using the cli in a fresh directory. The problem is still
their.
I also tried with an older snapshot from my disc
(php5.2-win32-200608171030): just the same.

When using for example the release 5.1.6 everything works fine.

Are their anywhere older snapshots to norrow down the timewindow?
Perhaps i could find the point between to snaps, where it stops working
on my computer?

PS: i encouter the same problem with the latest 6.0-snap



[2006-10-06 15:20:11] [EMAIL PROTECTED]

Just tried php-5.2.0RC5 and it works as expected.



[2006-10-06 14:22:14] third-chance at gmx dot de

I do not have any old version of php5ts.dll anywhere. Just the current
on in the php-directory.



[2006-10-06 12:44:35] [EMAIL PROTECTED]

Please make sure you deleted php5ts.dll from 5.1.6 and put the one from
the snapshot instead.
I cannot reproduce it with the snapshot.



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

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



#39073 [Opn]: safe_mode_include_dir not honored

2006-10-07 Thread jim at centerfuse dot net
 ID:   39073
 User updated by:  jim at centerfuse dot net
 Reported By:  jim at centerfuse dot net
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: FreeBSD 4.11
 PHP Version:  5.1.6
 New Comment:

get_cfg_var() and ini_get() both return the correct
safe_mode_include_dir, but it seems to just be ignored. Just for good
measure, I also tried using a different directory altogether, but got
the same results.


Previous Comments:


[2006-10-07 08:10:57] jim at centerfuse dot net

note, the trailing parentheses that appears in my reproduce code after
the safe_mode_include_dir is *not* present in php.ini, it was a typo.



[2006-10-07 08:09:58] jim at centerfuse dot net

Description:

Just upgraded to php 5.1.6, and safe_mode_include_dir doesn't appear to
be honored. I'm running with safe mode = On and one directory in the
include_dir. Trying to include/fopen/etc any file from that directory
results in a safemode UID restriction. phpinfo() shows that PHP is
reading the correct configuration file and that it knows about
safe_mode_include_dir. 

Reproduce code:
---
//in php.ini: safe_mode_include_dir = /usr/local/share/FUSE)

$fp = fopen('/usr/local/share/FUSE/FUSE-main.php', 'r')



Expected result:

fopen should return file pointer

Actual result:
--
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1006 is not allowed to access
/usr/local/share/FUSE/FUSE-main.php owned by uid 0 in
/home/context/public_html/test.php on line 13





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


#39074 [NEW]: Problem with getHostByAddr

2006-10-07 Thread webmaster at smiliz dot info
From: webmaster at smiliz dot info
Operating system: Windows XP
PHP version:  5.2.0RC5
PHP Bug Type: Unknown/Other Function
Bug description:  Problem with getHostByAddr

Description:

OS : windows XP
Apache 2.2.3
PHP 5.2 rc5

getHostByAddr not return host and the performance as reduced  !

Reproduce code:
---
$fai = @getHostByAddr($_SERVER['REMOTE_ADDR']);
$fai = str_replace(' ','',$fai); 
$fai = strtolower($fai); 
$rep = explode('.', $fai);
if ( $rep[0] ==  ) {
$reponse = Inconnu;
}elseif ( $rep[1] ==  ){
 $reponse = ucwords($rep[0]);
}else{
 $reponse =
ucwords($rep[count($rep)-2])...strtolower($rep[count($rep)-1]);
}
echo $reponse;


echo var_dump(getHostByAddr($_SERVER['REMOTE_ADDR']));
= result : string(13) xxx.xxx.xxx.xxx 

Expected result:

wanadoo.fr

Actual result:
--
xxx.xxx


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


#39075 [NEW]: htmlentities() seems to mistranslate pound sign

2006-10-07 Thread fasaxc at f2s dot com
From: fasaxc at f2s dot com
Operating system: Not known
PHP version:  5.1.6
PHP Bug Type: Unknown/Other Function
Bug description:  htmlentities() seems to mistranslate pound sign

Description:

Calling htmlentities on '£' generates two entities rather than just
pound; as expected.

Reproduce code:
---
?php echo £=.htmlentities('£'); ?

Expected result:

Output should be £=pound;

Actual result:
--
£=Acirc;pound;, where did the 'Acirc;' come from?

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


#39059 [Opn-Csd]: str_replace: fourth parameter is always zero

2006-10-07 Thread tony2001
 ID:   39059
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dirk dot thomas at 4wdmedia dot de
-Status:   Open
+Status:   Closed
 Bug Type: Strings related
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2006-10-06 (snap)


Previous Comments:


[2006-10-07 09:15:13] dirk dot thomas at 4wdmedia dot de

I have testet the example-script with the updated snapshot. Now it
works as expected!

So it looks like that this bug has been fixed between the two snaps:
php5.2-win32-200610051830.zip
and 
php5.2-win32-200610070230.zip

I could not test the php6-version, because their are no current
win32-builds available (last is 20060924).

Thank you



[2006-10-06 17:26:35] third-chance at gmx dot de

A friend of mine testet the latest snap on his computer and encoutered
the same bug.
He also uses WinXP SP2 and called the cli of php for the test.



[2006-10-06 16:08:26] third-chance at gmx dot de

I tried again using the cli in a fresh directory. The problem is still
their.
I also tried with an older snapshot from my disc
(php5.2-win32-200608171030): just the same.

When using for example the release 5.1.6 everything works fine.

Are their anywhere older snapshots to norrow down the timewindow?
Perhaps i could find the point between to snaps, where it stops working
on my computer?

PS: i encouter the same problem with the latest 6.0-snap



[2006-10-06 15:20:11] [EMAIL PROTECTED]

Just tried php-5.2.0RC5 and it works as expected.



[2006-10-06 14:22:14] third-chance at gmx dot de

I do not have any old version of php5ts.dll anywhere. Just the current
on in the php-directory.



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

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


#39074 [Opn-Fbk]: Problem with getHostByAddr

2006-10-07 Thread tony2001
 ID:   39074
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at smiliz dot info
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  5.2.0RC5
 New Comment:

Please makre sure you have a reachable working DNS server set up and
give it a try with PHP CLI.


Previous Comments:


[2006-10-07 09:23:36] webmaster at smiliz dot info

Description:

OS : windows XP
Apache 2.2.3
PHP 5.2 rc5

getHostByAddr not return host and the performance as reduced  !

Reproduce code:
---
$fai = @getHostByAddr($_SERVER['REMOTE_ADDR']);
$fai = str_replace(' ','',$fai); 
$fai = strtolower($fai); 
$rep = explode('.', $fai);
if ( $rep[0] ==  ) {
$reponse = Inconnu;
}elseif ( $rep[1] ==  ){
 $reponse = ucwords($rep[0]);
}else{
 $reponse =
ucwords($rep[count($rep)-2])...strtolower($rep[count($rep)-1]);
}
echo $reponse;


echo var_dump(getHostByAddr($_SERVER['REMOTE_ADDR']));
= result : string(13) xxx.xxx.xxx.xxx 

Expected result:

wanadoo.fr

Actual result:
--
xxx.xxx






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


#39075 [Opn-Bgs]: htmlentities() seems to mistranslate pound sign

2006-10-07 Thread tony2001
 ID:   39075
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fasaxc at f2s dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Not known
 PHP Version:  5.1.6
 New Comment:

var_dump(£);
=
string(2) £

Notice the 2. This is Unicode character.



Previous Comments:


[2006-10-07 09:27:23] fasaxc at f2s dot com

Description:

Calling htmlentities on '£' generates two entities rather than just
pound; as expected.

Reproduce code:
---
?php echo £=.htmlentities('£'); ?

Expected result:

Output should be £=pound;

Actual result:
--
£=Acirc;pound;, where did the 'Acirc;' come from?





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


#39074 [Fbk-Opn]: Problem with getHostByAddr

2006-10-07 Thread webmaster at smiliz dot info
 ID:   39074
 User updated by:  webmaster at smiliz dot info
 Reported By:  webmaster at smiliz dot info
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  5.2.0RC5
 New Comment:

I'm verify working dns on my server computer - OK !
I'm try with php CLI - getHostByAddr not return host !
But in localhost, getHostByAddr return localhost.


Previous Comments:


[2006-10-07 09:40:21] [EMAIL PROTECTED]

Please makre sure you have a reachable working DNS server set up and
give it a try with PHP CLI.



[2006-10-07 09:23:36] webmaster at smiliz dot info

Description:

OS : windows XP
Apache 2.2.3
PHP 5.2 rc5

getHostByAddr not return host and the performance as reduced  !

Reproduce code:
---
$fai = @getHostByAddr($_SERVER['REMOTE_ADDR']);
$fai = str_replace(' ','',$fai); 
$fai = strtolower($fai); 
$rep = explode('.', $fai);
if ( $rep[0] ==  ) {
$reponse = Inconnu;
}elseif ( $rep[1] ==  ){
 $reponse = ucwords($rep[0]);
}else{
 $reponse =
ucwords($rep[count($rep)-2])...strtolower($rep[count($rep)-1]);
}
echo $reponse;


echo var_dump(getHostByAddr($_SERVER['REMOTE_ADDR']));
= result : string(13) xxx.xxx.xxx.xxx 

Expected result:

wanadoo.fr

Actual result:
--
xxx.xxx






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


#39077 [NEW]: PATH_INFO not available in PHP 5.2 win32

2006-10-07 Thread pcdinh at gmail dot com
From: pcdinh at gmail dot com
Operating system: Windows XP
PHP version:  5.2.0RC5
PHP Bug Type: Apache2 related
Bug description:  PATH_INFO not available in PHP 5.2 win32

Description:

I would like to user $_SERVER['PATH_INFO'] in one of my search-engine
friendly script but unfortunately, it is not available under Apache 2.2,
PHP 5.2 RC5 installed as a module. PHP engine said: Undefined index:
PATH_INFO

Reproduce code:
---
Sample code

index.php in mod_rewrite folder

a href=http://localhost/mod_rewrite/forum/21/3.html;url/a
?php
var_dump($_SERVER['PATH_INFO']);
?

.htaccess in mod_rewrite folder

AcceptPathInfo On
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^index.php(/.*) /index.php [E=PATH_INFO:$1,L]
RewriteRule ^(.*)/(.*)/(.*).html
http://localhost/mod_rewrite/index.php?module=$1cid=$2topic=$3

=
My environment
=My PHP directives in httpd.conf of Apache 2.2.3

LoadModule php5_module c:/server/php5/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir c:/server/php5

Directory D:/webroot
#
# Possible values for the Options directive are None, All,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
MultiViews
#
# Note that MultiViews must be named *explicitly* --- Options All
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please
see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess
files.
# It can be All, None, or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

AcceptPathInfo On

/Directory


=My PHP.ini

extension=php_mbstring.dll
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll


;extension=php_apc.dll
;extension=php_memcache.dll
;extension=php_http.dll


extension=php_pdo.dll
extension=php_pdo_mysql.dll

;zend_extension_ts = C:/server/php5/ext/php_xdebug.dll

Expected result:

I expected that when I click on the link
http://localhost/mod_rewrite/forum/21/3.html the value of PATH_INFO will
be printed out from http://localhost/mod_rewrite/index.php because
.htaccess should be routed the request to index.php.

Actual result:
--
The script has printed out: 

Notice: Undefined index: PATH_INFO in D:\webroot\mod_rewrite\index.php on
line 3
NULL

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

#39077 [Opn-Bgs]: PATH_INFO not available in PHP 5.2 win32

2006-10-07 Thread pcdinh at gmail dot com
 ID:   39077
 User updated by:  pcdinh at gmail dot com
 Reported By:  pcdinh at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  5.2.0RC5
 New Comment:

Sorry I have made a mistake. Just ignore it.


Previous Comments:


[2006-10-07 14:15:33] pcdinh at gmail dot com

Description:

I would like to user $_SERVER['PATH_INFO'] in one of my search-engine
friendly script but unfortunately, it is not available under Apache
2.2, PHP 5.2 RC5 installed as a module. PHP engine said: Undefined
index: PATH_INFO

Reproduce code:
---
Sample code

index.php in mod_rewrite folder

a href=http://localhost/mod_rewrite/forum/21/3.html;url/a
?php
var_dump($_SERVER['PATH_INFO']);
?

.htaccess in mod_rewrite folder

AcceptPathInfo On
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^index.php(/.*) /index.php [E=PATH_INFO:$1,L]
RewriteRule ^(.*)/(.*)/(.*).html
http://localhost/mod_rewrite/index.php?module=$1cid=$2topic=$3

=
My environment
=My PHP directives in httpd.conf of Apache 2.2.3

LoadModule php5_module c:/server/php5/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir c:/server/php5

Directory D:/webroot
#
# Possible values for the Options directive are None, All,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
MultiViews
#
# Note that MultiViews must be named *explicitly* --- Options
All
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please
see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess
files.
# It can be All, None, or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

AcceptPathInfo On

/Directory


=My PHP.ini

extension=php_mbstring.dll
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll


;extension=php_apc.dll
;extension=php_memcache.dll
;extension=php_http.dll


extension=php_pdo.dll
extension=php_pdo_mysql.dll

;zend_extension_ts = C:/server/php5/ext/php_xdebug.dll

Expected result:

I expected that when I click on the link
http://localhost/mod_rewrite/forum/21/3.html the value of PATH_INFO
will be printed out from http://localhost/mod_rewrite/index.php because
.htaccess should be routed the request to index.php.

Actual result:
--
The script has printed out: 

Notice: Undefined index: PATH_INFO in D:\webroot\mod_rewrite\index.php
on line 3
NULL





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


#39074 [Opn-Fbk]: Problem with getHostByAddr

2006-10-07 Thread tony2001
 ID:   39074
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at smiliz dot info
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  5.2.0RC5
 New Comment:

Does `nslookup ip addr` work for you?


Previous Comments:


[2006-10-07 13:34:14] webmaster at smiliz dot info

I'm verify working dns on my server computer - OK !
I'm try with php CLI - getHostByAddr not return host !
But in localhost, getHostByAddr return localhost.



[2006-10-07 09:40:21] [EMAIL PROTECTED]

Please makre sure you have a reachable working DNS server set up and
give it a try with PHP CLI.



[2006-10-07 09:23:36] webmaster at smiliz dot info

Description:

OS : windows XP
Apache 2.2.3
PHP 5.2 rc5

getHostByAddr not return host and the performance as reduced  !

Reproduce code:
---
$fai = @getHostByAddr($_SERVER['REMOTE_ADDR']);
$fai = str_replace(' ','',$fai); 
$fai = strtolower($fai); 
$rep = explode('.', $fai);
if ( $rep[0] ==  ) {
$reponse = Inconnu;
}elseif ( $rep[1] ==  ){
 $reponse = ucwords($rep[0]);
}else{
 $reponse =
ucwords($rep[count($rep)-2])...strtolower($rep[count($rep)-1]);
}
echo $reponse;


echo var_dump(getHostByAddr($_SERVER['REMOTE_ADDR']));
= result : string(13) xxx.xxx.xxx.xxx 

Expected result:

wanadoo.fr

Actual result:
--
xxx.xxx






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


#39074 [Fbk-Opn]: Problem with getHostByAddr

2006-10-07 Thread webmaster at smiliz dot info
 ID:   39074
 User updated by:  webmaster at smiliz dot info
 Reported By:  webmaster at smiliz dot info
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  5.2.0RC5
 New Comment:

yes is work.
nslookup xxx.xxx.xxx.xxx

return =
Serveur : xx
Address: xxx.xxx.xxx.xxx
etc...


Previous Comments:


[2006-10-07 18:09:36] [EMAIL PROTECTED]

Does `nslookup ip addr` work for you?



[2006-10-07 13:34:14] webmaster at smiliz dot info

I'm verify working dns on my server computer - OK !
I'm try with php CLI - getHostByAddr not return host !
But in localhost, getHostByAddr return localhost.



[2006-10-07 09:40:21] [EMAIL PROTECTED]

Please makre sure you have a reachable working DNS server set up and
give it a try with PHP CLI.



[2006-10-07 09:23:36] webmaster at smiliz dot info

Description:

OS : windows XP
Apache 2.2.3
PHP 5.2 rc5

getHostByAddr not return host and the performance as reduced  !

Reproduce code:
---
$fai = @getHostByAddr($_SERVER['REMOTE_ADDR']);
$fai = str_replace(' ','',$fai); 
$fai = strtolower($fai); 
$rep = explode('.', $fai);
if ( $rep[0] ==  ) {
$reponse = Inconnu;
}elseif ( $rep[1] ==  ){
 $reponse = ucwords($rep[0]);
}else{
 $reponse =
ucwords($rep[count($rep)-2])...strtolower($rep[count($rep)-1]);
}
echo $reponse;


echo var_dump(getHostByAddr($_SERVER['REMOTE_ADDR']));
= result : string(13) xxx.xxx.xxx.xxx 

Expected result:

wanadoo.fr

Actual result:
--
xxx.xxx






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


#39074 [Opn]: Problem with getHostByAddr

2006-10-07 Thread webmaster at smiliz dot info
 ID:   39074
 User updated by:  webmaster at smiliz dot info
 Reported By:  webmaster at smiliz dot info
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  5.2.0RC5
 New Comment:

I'm test PHP 5.2RC5 whith apache 1.3.37.
getHostByAddr return correctly Host = wanadoo.fr

But, i'm test PHP 5.2 RC5 with Apache 2.2.3 on the same server and =
getHostByAddr not return host


Previous Comments:


[2006-10-07 18:35:16] webmaster at smiliz dot info

yes is work.
nslookup xxx.xxx.xxx.xxx

return =
Serveur : xx
Address: xxx.xxx.xxx.xxx
etc...



[2006-10-07 18:09:36] [EMAIL PROTECTED]

Does `nslookup ip addr` work for you?



[2006-10-07 13:34:14] webmaster at smiliz dot info

I'm verify working dns on my server computer - OK !
I'm try with php CLI - getHostByAddr not return host !
But in localhost, getHostByAddr return localhost.



[2006-10-07 09:40:21] [EMAIL PROTECTED]

Please makre sure you have a reachable working DNS server set up and
give it a try with PHP CLI.



[2006-10-07 09:23:36] webmaster at smiliz dot info

Description:

OS : windows XP
Apache 2.2.3
PHP 5.2 rc5

getHostByAddr not return host and the performance as reduced  !

Reproduce code:
---
$fai = @getHostByAddr($_SERVER['REMOTE_ADDR']);
$fai = str_replace(' ','',$fai); 
$fai = strtolower($fai); 
$rep = explode('.', $fai);
if ( $rep[0] ==  ) {
$reponse = Inconnu;
}elseif ( $rep[1] ==  ){
 $reponse = ucwords($rep[0]);
}else{
 $reponse =
ucwords($rep[count($rep)-2])...strtolower($rep[count($rep)-1]);
}
echo $reponse;


echo var_dump(getHostByAddr($_SERVER['REMOTE_ADDR']));
= result : string(13) xxx.xxx.xxx.xxx 

Expected result:

wanadoo.fr

Actual result:
--
xxx.xxx






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


#39078 [NEW]: Plus sign in URL arg received as space

2006-10-07 Thread main at springtimesoftware dot com
From: main at springtimesoftware dot com
Operating system: Windows XP
PHP version:  5.1.6
PHP Bug Type: Feature/Change Request
Bug description:  Plus sign in URL arg received as space

Description:

I searched the bug database, but could not find this problem addressed.

This is a simple case using default configurations where a client
JavaScript script sends a plus sign and a space as an argument as part of
a URL to a server.

The script constructs the URL using the JavaScript 'escape' function, as
recommended: 

URL='www.example.com/example.php?Arg='+escape('+ ');

The server, running Apache and PHP, automatically runs urldecode (that is,
I think it does; I could not find this documented in the PHP manual even
after I did a lot of searching).

The PHP code

$Arg=$_GET[Arg];

receives the string as(two spaces) instead of the expected + .
This is not a bug, but documented behavior of urldecode!

My request for a feature is this: add a runtime-accessible configuration
option to suppress any default decoding of GET, POST, and other such
arrays. Then the programmer can use rawurldecode to decode arguments
properly.

Note: Although I only mentioned plus sign and space above, I really want
to pass a string that can contain characters with any byte value, 0 to
255. This is to support cryptology protocols.

David Spector
Springtime Software




Reproduce code:
---
Let me know if you really need a test case. It would include a client page
and a server page.


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


#39079 [NEW]: PHP 5.1.6 doesn't compile with MySQL 5.0.x and OpenSSL 0.9.8d

2006-10-07 Thread henrik at schack dot dk
From: henrik at schack dot dk
Operating system: Rhel4
PHP version:  5.1.6
PHP Bug Type: Compile Failure
Bug description:  PHP 5.1.6 doesn't compile with MySQL 5.0.x and OpenSSL 0.9.8d

Description:

Compile fails with the following message:
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)(.text+0x54): In
function `CRYPTO_lock':
/home/mysqldev/rpm/BUILD/mysql-5.0.26/extra/yassl/taocrypt/src/misc.cpp:37:
multiple definition of `CRYPTO_lock'
/opt/openssl/lib/libcrypto.a(cryptlib.o)(.text+0x224): first defined here
/usr/bin/ld: Warning: size of symbol `CRYPTO_lock' changed from 283 in
/opt/openssl/lib/libcrypto.a(cryptlib.o) to 7 in
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)(.text+0x5c): In
function `CRYPTO_add_lock':
/home/mysqldev/rpm/BUILD/mysql-5.0.26/extra/yassl/taocrypt/src/misc.cpp:38:
multiple definition of `CRYPTO_add_lock'
/opt/openssl/lib/libcrypto.a(cryptlib.o)(.text+0x340): first defined here
/usr/bin/ld: Warning: size of symbol `CRYPTO_add_lock' changed from 98 in
/opt/openssl/lib/libcrypto.a(cryptlib.o) to 7 in
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1





Reproduce code:
---
Configured withe the folowing statement:
./configure  --with-mysql=/usr --with-mysqli
--with-apxs=/usr/local/apache/bin/apxs --enable-track-vars --with-gd
--with-xml --with-ttf --with-gmp --with-zlib-dir=/usr/lib
--with-jpeg-dir=/usr/lib --with-expat-dir=/usr --with-png-dir=/usr/lib
--with-xmlrpc --enable-exif --enable-ftp --with-mhash --with-mcrypt
--with-gettext --with-mbstring --with-iconv --enable-memory-limit
--with-dom=/usr/lib --enable-soap --with-xsl --with-curl
--with-curlwrappers --enable-dba --with-db4 --with-pdo-mysql
--without-pdo-sqlite --enable-mbstring --with-openssl=/opt/openssl

OpenSSL 0.9.8d
MySQL 5.0.26, did also try with 5.0.24 which gave a few more errors.




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


#39073 [Opn]: safe_mode_include_dir not honored

2006-10-07 Thread jim at centerfuse dot net
 ID:   39073
 User updated by:  jim at centerfuse dot net
 Reported By:  jim at centerfuse dot net
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: FreeBSD 4.11
 PHP Version:  5.1.6
 New Comment:

This bug does not seem to affect require_once(), require(), or
include(), which are still able to access the file from a different UID
(as long as safe_mode_include_dir is set as it should be). However,
other file operations such as file_exists and fopen fail. In the
example below, note that the include() succeeds because the output does
say this is the test file


CODE

//
// safe_mode_include_dir is /home/php_include_test
// 
// the file /home/php_include_test/test 
// simply says this is the test filebr /

$test_file = '/home/php_include_test/test';

include($test_file);

if ( file_exists($test_file) ) {
echo 'Test file exists.br /';
}
else {
echo 'Test file does not existbr /';
}

if ( is_readable($test_file) ) {
echo 'Test file is readable.br /';
}
else {
echo 'Test file not readablebr /';
}

if ( $fp = fopen($test_file, 'r') ) {
echo 'Test file opened for read.br /';
fclose($fp);
}
else {
echo 'Test file could not be opened for readbr /';
}

===
OUTPUT
===
this is the test file
Test file does not exist
Test file not readable

Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1010 is not allowed to access
/home/php_include_test/test owned by uid 0 in
/home/www/jim/public_html/jimtest.php on line 21

Warning: fopen(/home/php_include_test/test) [function.fopen]: failed to
open stream: Inappropriate ioctl for device in
/home/www/jim/public_html/jimtest.php on line 21
Test file could not be opened for read


Previous Comments:


[2006-10-07 09:19:06] jim at centerfuse dot net

get_cfg_var() and ini_get() both return the correct
safe_mode_include_dir, but it seems to just be ignored. Just for good
measure, I also tried using a different directory altogether, but got
the same results.



[2006-10-07 08:10:57] jim at centerfuse dot net

note, the trailing parentheses that appears in my reproduce code after
the safe_mode_include_dir is *not* present in php.ini, it was a typo.



[2006-10-07 08:09:58] jim at centerfuse dot net

Description:

Just upgraded to php 5.1.6, and safe_mode_include_dir doesn't appear to
be honored. I'm running with safe mode = On and one directory in the
include_dir. Trying to include/fopen/etc any file from that directory
results in a safemode UID restriction. phpinfo() shows that PHP is
reading the correct configuration file and that it knows about
safe_mode_include_dir. 

Reproduce code:
---
//in php.ini: safe_mode_include_dir = /usr/local/share/FUSE)

$fp = fopen('/usr/local/share/FUSE/FUSE-main.php', 'r')



Expected result:

fopen should return file pointer

Actual result:
--
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1006 is not allowed to access
/usr/local/share/FUSE/FUSE-main.php owned by uid 0 in
/home/context/public_html/test.php on line 13





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



#39080 [NEW]: Memory leak in XSLTProcessor-transformToDoc()

2006-10-07 Thread odinuv at gmail dot com
From: odinuv at gmail dot com
Operating system: win32
PHP version:  5CVS-2006-10-07 (snap)
PHP Bug Type: XSLT related
Bug description:  Memory leak in XSLTProcessor-transformToDoc()

Description:

Using a certain data the function call to XSLTProcessor-transformToDoc()
produces a 2kb-4kb memory leak. This happens *only* on win32 (tested on NT
5.0 build 2195 and
NT 5.2 build 3790) platform. Reproduced succesfully on apache 2.0.55 and
2.0.59 with php 5.1.6 and todays snapshot 5.2.0RC6-dev.

Reproduce code:
---
Code is standard (taken from manual) procedure to transform XML+XSTL into
a HTML document. Both URLs contain same files:
1.xml - source XML data
1.xsl - source XSLT data
character-entities.dtd - necessery entities definitions 
test.txt - PHP source code for the transformation

URL1: (not online 24/7, showing the current php process usage on server)
https://81.27.200.150:13580/transformToDoc/test.php

URL2: (online 24/7, not showing the current mem usage - for downloading
only) http://virklis.cust.ignum.cz/transformToDoc/test.php


Actual result:
--
Every page refresh produces a 2-4Kb raise in memory used by PHP (see live
on https://81.27.200.150:13580/transformToDoc/test.php)

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


#38985 [Csd]: Can't cast COM objects to boolean

2006-10-07 Thread larry dot menard at rogers dot com
 ID:   38985
 User updated by:  larry dot menard at rogers dot com
 Reported By:  larry dot menard at rogers dot com
 Status:   Closed
 Bug Type: COM related
 Operating System: Windows XP, SP2
 PHP Version:  5.2.0RC4
 Assigned To:  ilia
 New Comment:

Confirmed, it now works.  Thanks!


Previous Comments:


[2006-10-06 12:25:18] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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





[2006-10-06 12:05:39] [EMAIL PROTECTED]

I think this one liner will do the job, but haven't been able to verify
it:

Index: com_handlers.c
===
RCS file: /repository/php-src/ext/com_dotnet/com_handlers.c,v
retrieving revision 1.37
diff -u -p -r1.37 com_handlers.c
--- com_handlers.c  29 Apr 2006 18:45:29 -  1.37
+++ com_handlers.c  6 Oct 2006 12:03:31 -
@@ -539,7 +539,7 @@ static int com_object_cast(zval *readobj
return SUCCESS;
}
 
-   return FAILURE;
+   return zend_std_cast_object_tostring(readobj, writeobj, type
TSRMLS_CC);
 }
 
 static int com_object_count(zval *object, long *count TSRMLS_DC)
cvs diff: Diffing tests





[2006-10-06 06:48:00] [EMAIL PROTECTED]

No idea why it was assigned to me.
I've never had win32 build env.



[2006-10-06 01:17:16] [EMAIL PROTECTED]

batting back to you Tony; between moving offices this last week and a
dead laptop I don't have a win32 build environment and won't have one
in time to get this fixed for 5.2.

As per our email discussion, I think the fix for this issue is to not
return failure from the COM object cast handler in the case that we
can't convert to variant bool, but to use regular PHP boolean cast at
that point (after trying variant bool conversion) and returning
success.




[2006-09-28 19:55:41] larry dot menard at rogers dot com

Description:

First of all, I'm usng RC5, not RC4 (RC5 is not in the list above).

Can't cast an object of type COM to boolean.

Reproduce code:
---
$dbc = new COM('WinNT://Domain'); var_dump((bool)$dbc);

Expected result:

bool(true)

Actual result:
--
Catchable fatal error:  Object of class com could not be converted to
boolean





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


#39078 [Opn-Bgs]: Plus sign in URL arg received as space

2006-10-07 Thread tony2001
 ID:   39078
 Updated by:   [EMAIL PROTECTED]
 Reported By:  main at springtimesoftware dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

That's why you should use urlencode().


Previous Comments:


[2006-10-07 18:54:46] main at springtimesoftware dot com

Description:

I searched the bug database, but could not find this problem
addressed.

This is a simple case using default configurations where a client
JavaScript script sends a plus sign and a space as an argument as part
of a URL to a server.

The script constructs the URL using the JavaScript 'escape' function,
as recommended: 

URL='www.example.com/example.php?Arg='+escape('+ ');

The server, running Apache and PHP, automatically runs urldecode (that
is, I think it does; I could not find this documented in the PHP manual
even after I did a lot of searching).

The PHP code

$Arg=$_GET[Arg];

receives the string as(two spaces) instead of the expected + .
This is not a bug, but documented behavior of urldecode!

My request for a feature is this: add a runtime-accessible
configuration option to suppress any default decoding of GET, POST, and
other such arrays. Then the programmer can use rawurldecode to decode
arguments properly.

Note: Although I only mentioned plus sign and space above, I really
want to pass a string that can contain characters with any byte value,
0 to 255. This is to support cryptology protocols.

David Spector
Springtime Software




Reproduce code:
---
Let me know if you really need a test case. It would include a client
page and a server page.






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


#39073 [Opn-Bgs]: safe_mode_include_dir not honored

2006-10-07 Thread tony2001
 ID:   39073
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jim at centerfuse dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: FreeBSD 4.11
 PHP Version:  5.1.6
 New Comment:

The ini directive is called safe_mode_*INCLUDE*_dir.
Please read what it's used for:
http://www.php.net/manual/en/features.safe-mode.php


Previous Comments:


[2006-10-07 19:19:12] jim at centerfuse dot net

This bug does not seem to affect require_once(), require(), or
include(), which are still able to access the file from a different UID
(as long as safe_mode_include_dir is set as it should be). However,
other file operations such as file_exists and fopen fail. In the
example below, note that the include() succeeds because the output does
say this is the test file


CODE

//
// safe_mode_include_dir is /home/php_include_test
// 
// the file /home/php_include_test/test 
// simply says this is the test filebr /

$test_file = '/home/php_include_test/test';

include($test_file);

if ( file_exists($test_file) ) {
echo 'Test file exists.br /';
}
else {
echo 'Test file does not existbr /';
}

if ( is_readable($test_file) ) {
echo 'Test file is readable.br /';
}
else {
echo 'Test file not readablebr /';
}

if ( $fp = fopen($test_file, 'r') ) {
echo 'Test file opened for read.br /';
fclose($fp);
}
else {
echo 'Test file could not be opened for readbr /';
}

===
OUTPUT
===
this is the test file
Test file does not exist
Test file not readable

Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1010 is not allowed to access
/home/php_include_test/test owned by uid 0 in
/home/www/jim/public_html/jimtest.php on line 21

Warning: fopen(/home/php_include_test/test) [function.fopen]: failed to
open stream: Inappropriate ioctl for device in
/home/www/jim/public_html/jimtest.php on line 21
Test file could not be opened for read



[2006-10-07 09:19:06] jim at centerfuse dot net

get_cfg_var() and ini_get() both return the correct
safe_mode_include_dir, but it seems to just be ignored. Just for good
measure, I also tried using a different directory altogether, but got
the same results.



[2006-10-07 08:10:57] jim at centerfuse dot net

note, the trailing parentheses that appears in my reproduce code after
the safe_mode_include_dir is *not* present in php.ini, it was a typo.



[2006-10-07 08:09:58] jim at centerfuse dot net

Description:

Just upgraded to php 5.1.6, and safe_mode_include_dir doesn't appear to
be honored. I'm running with safe mode = On and one directory in the
include_dir. Trying to include/fopen/etc any file from that directory
results in a safemode UID restriction. phpinfo() shows that PHP is
reading the correct configuration file and that it knows about
safe_mode_include_dir. 

Reproduce code:
---
//in php.ini: safe_mode_include_dir = /usr/local/share/FUSE)

$fp = fopen('/usr/local/share/FUSE/FUSE-main.php', 'r')



Expected result:

fopen should return file pointer

Actual result:
--
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1006 is not allowed to access
/usr/local/share/FUSE/FUSE-main.php owned by uid 0 in
/home/context/public_html/test.php on line 13





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


#39078 [Bgs-Opn]: Plus sign in URL arg received as space

2006-10-07 Thread main at springtimesoftware dot com
 ID:   39078
 User updated by:  main at springtimesoftware dot com
 Reported By:  main at springtimesoftware dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

JavaScript does not support urlencode.

Perhaps if you read the bug report again?

David


Previous Comments:


[2006-10-07 20:27:56] [EMAIL PROTECTED]

That's why you should use urlencode().



[2006-10-07 18:54:46] main at springtimesoftware dot com

Description:

I searched the bug database, but could not find this problem
addressed.

This is a simple case using default configurations where a client
JavaScript script sends a plus sign and a space as an argument as part
of a URL to a server.

The script constructs the URL using the JavaScript 'escape' function,
as recommended: 

URL='www.example.com/example.php?Arg='+escape('+ ');

The server, running Apache and PHP, automatically runs urldecode (that
is, I think it does; I could not find this documented in the PHP manual
even after I did a lot of searching).

The PHP code

$Arg=$_GET[Arg];

receives the string as(two spaces) instead of the expected + .
This is not a bug, but documented behavior of urldecode!

My request for a feature is this: add a runtime-accessible
configuration option to suppress any default decoding of GET, POST, and
other such arrays. Then the programmer can use rawurldecode to decode
arguments properly.

Note: Although I only mentioned plus sign and space above, I really
want to pass a string that can contain characters with any byte value,
0 to 255. This is to support cryptology protocols.

David Spector
Springtime Software




Reproduce code:
---
Let me know if you really need a test case. It would include a client
page and a server page.






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


#39078 [Opn-Bgs]: Plus sign in URL arg received as space

2006-10-07 Thread tony2001
 ID:   39078
 Updated by:   [EMAIL PROTECTED]
 Reported By:  main at springtimesoftware dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Javascript has escape() method exactly for that.


Previous Comments:


[2006-10-07 20:38:38] main at springtimesoftware dot com

JavaScript does not support urlencode.

Perhaps if you read the bug report again?

David



[2006-10-07 20:27:56] [EMAIL PROTECTED]

That's why you should use urlencode().



[2006-10-07 18:54:46] main at springtimesoftware dot com

Description:

I searched the bug database, but could not find this problem
addressed.

This is a simple case using default configurations where a client
JavaScript script sends a plus sign and a space as an argument as part
of a URL to a server.

The script constructs the URL using the JavaScript 'escape' function,
as recommended: 

URL='www.example.com/example.php?Arg='+escape('+ ');

The server, running Apache and PHP, automatically runs urldecode (that
is, I think it does; I could not find this documented in the PHP manual
even after I did a lot of searching).

The PHP code

$Arg=$_GET[Arg];

receives the string as(two spaces) instead of the expected + .
This is not a bug, but documented behavior of urldecode!

My request for a feature is this: add a runtime-accessible
configuration option to suppress any default decoding of GET, POST, and
other such arrays. Then the programmer can use rawurldecode to decode
arguments properly.

Note: Although I only mentioned plus sign and space above, I really
want to pass a string that can contain characters with any byte value,
0 to 255. This is to support cryptology protocols.

David Spector
Springtime Software




Reproduce code:
---
Let me know if you really need a test case. It would include a client
page and a server page.






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


#39078 [Bgs-Opn]: Plus sign in URL arg received as space

2006-10-07 Thread main at springtimesoftware dot com
 ID:   39078
 User updated by:  main at springtimesoftware dot com
 Reported By:  main at springtimesoftware dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

The JavaScript escape function does not do what the urlencode function
does.

If it did, then escape on the JavaScript side would match urldecode on
the PHP side, and this problem would not exist.

If you apply escape to + , you get + . On the PHP side, PHP
automatically applies urldecode, and you get   .

So, the problem is that plus sign does not get through to the PHP
script.

Is that clear now?

David


Previous Comments:


[2006-10-07 20:48:17] [EMAIL PROTECTED]

Javascript has escape() method exactly for that.



[2006-10-07 20:38:38] main at springtimesoftware dot com

JavaScript does not support urlencode.

Perhaps if you read the bug report again?

David



[2006-10-07 20:27:56] [EMAIL PROTECTED]

That's why you should use urlencode().



[2006-10-07 18:54:46] main at springtimesoftware dot com

Description:

I searched the bug database, but could not find this problem
addressed.

This is a simple case using default configurations where a client
JavaScript script sends a plus sign and a space as an argument as part
of a URL to a server.

The script constructs the URL using the JavaScript 'escape' function,
as recommended: 

URL='www.example.com/example.php?Arg='+escape('+ ');

The server, running Apache and PHP, automatically runs urldecode (that
is, I think it does; I could not find this documented in the PHP manual
even after I did a lot of searching).

The PHP code

$Arg=$_GET[Arg];

receives the string as(two spaces) instead of the expected + .
This is not a bug, but documented behavior of urldecode!

My request for a feature is this: add a runtime-accessible
configuration option to suppress any default decoding of GET, POST, and
other such arrays. Then the programmer can use rawurldecode to decode
arguments properly.

Note: Although I only mentioned plus sign and space above, I really
want to pass a string that can contain characters with any byte value,
0 to 255. This is to support cryptology protocols.

David Spector
Springtime Software




Reproduce code:
---
Let me know if you really need a test case. It would include a client
page and a server page.






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


#39079 [Opn-Bgs]: PHP 5.1.6 doesn't compile with MySQL 5.0.x and OpenSSL 0.9.8d

2006-10-07 Thread tony2001
 ID:   39079
 Updated by:   [EMAIL PROTECTED]
 Reported By:  henrik at schack dot dk
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Rhel4
 PHP Version:  5.1.6
 New Comment:

Not PHP problem, please report it to MySQL people.


Previous Comments:


[2006-10-07 19:08:38] henrik at schack dot dk

Description:

Compile fails with the following message:
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)(.text+0x54): In
function `CRYPTO_lock':
/home/mysqldev/rpm/BUILD/mysql-5.0.26/extra/yassl/taocrypt/src/misc.cpp:37:
multiple definition of `CRYPTO_lock'
/opt/openssl/lib/libcrypto.a(cryptlib.o)(.text+0x224): first defined
here
/usr/bin/ld: Warning: size of symbol `CRYPTO_lock' changed from 283 in
/opt/openssl/lib/libcrypto.a(cryptlib.o) to 7 in
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)(.text+0x5c): In
function `CRYPTO_add_lock':
/home/mysqldev/rpm/BUILD/mysql-5.0.26/extra/yassl/taocrypt/src/misc.cpp:38:
multiple definition of `CRYPTO_add_lock'
/opt/openssl/lib/libcrypto.a(cryptlib.o)(.text+0x340): first defined
here
/usr/bin/ld: Warning: size of symbol `CRYPTO_add_lock' changed from 98
in /opt/openssl/lib/libcrypto.a(cryptlib.o) to 7 in
/usr/lib/mysql/libmysqlclient.a(libtaocrypt_la-misc.o)
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1





Reproduce code:
---
Configured withe the folowing statement:
./configure  --with-mysql=/usr --with-mysqli
--with-apxs=/usr/local/apache/bin/apxs --enable-track-vars --with-gd
--with-xml --with-ttf --with-gmp --with-zlib-dir=/usr/lib
--with-jpeg-dir=/usr/lib --with-expat-dir=/usr --with-png-dir=/usr/lib
--with-xmlrpc --enable-exif --enable-ftp --with-mhash --with-mcrypt
--with-gettext --with-mbstring --with-iconv --enable-memory-limit
--with-dom=/usr/lib --enable-soap --with-xsl --with-curl
--with-curlwrappers --enable-dba --with-db4 --with-pdo-mysql
--without-pdo-sqlite --enable-mbstring --with-openssl=/opt/openssl

OpenSSL 0.9.8d
MySQL 5.0.26, did also try with 5.0.24 which gave a few more errors.








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


#39078 [Opn]: Plus sign in URL arg received as space

2006-10-07 Thread main at springtimesoftware dot com
 ID:   39078
 User updated by:  main at springtimesoftware dot com
 Reported By:  main at springtimesoftware dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Oops, I should have said that escape('+ ') gives '+%20'.

On the PHP side, the + is considered an alias for  , so the script
sees(urldecode converts + into   and %20 into  ).

I stand by the wording in the feature request.

David


Previous Comments:


[2006-10-07 20:58:17] main at springtimesoftware dot com

The JavaScript escape function does not do what the urlencode function
does.

If it did, then escape on the JavaScript side would match urldecode on
the PHP side, and this problem would not exist.

If you apply escape to + , you get + . On the PHP side, PHP
automatically applies urldecode, and you get   .

So, the problem is that plus sign does not get through to the PHP
script.

Is that clear now?

David



[2006-10-07 20:48:17] [EMAIL PROTECTED]

Javascript has escape() method exactly for that.



[2006-10-07 20:38:38] main at springtimesoftware dot com

JavaScript does not support urlencode.

Perhaps if you read the bug report again?

David



[2006-10-07 20:27:56] [EMAIL PROTECTED]

That's why you should use urlencode().



[2006-10-07 18:54:46] main at springtimesoftware dot com

Description:

I searched the bug database, but could not find this problem
addressed.

This is a simple case using default configurations where a client
JavaScript script sends a plus sign and a space as an argument as part
of a URL to a server.

The script constructs the URL using the JavaScript 'escape' function,
as recommended: 

URL='www.example.com/example.php?Arg='+escape('+ ');

The server, running Apache and PHP, automatically runs urldecode (that
is, I think it does; I could not find this documented in the PHP manual
even after I did a lot of searching).

The PHP code

$Arg=$_GET[Arg];

receives the string as(two spaces) instead of the expected + .
This is not a bug, but documented behavior of urldecode!

My request for a feature is this: add a runtime-accessible
configuration option to suppress any default decoding of GET, POST, and
other such arrays. Then the programmer can use rawurldecode to decode
arguments properly.

Note: Although I only mentioned plus sign and space above, I really
want to pass a string that can contain characters with any byte value,
0 to 255. This is to support cryptology protocols.

David Spector
Springtime Software




Reproduce code:
---
Let me know if you really need a test case. It would include a client
page and a server page.






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


#39080 [Opn-Fbk]: Memory leak in XSLTProcessor-transformToDoc()

2006-10-07 Thread tony2001
 ID:   39080
 Updated by:   [EMAIL PROTECTED]
 Reported By:  odinuv at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: XSLT related
 Operating System: win32
 PHP Version:  5CVS-2006-10-07 (snap)
 New Comment:

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:


[2006-10-07 19:35:39] odinuv at gmail dot com

Description:

Using a certain data the function call to
XSLTProcessor-transformToDoc() produces a 2kb-4kb memory leak. This
happens *only* on win32 (tested on NT 5.0 build 2195 and
NT 5.2 build 3790) platform. Reproduced succesfully on apache 2.0.55
and 2.0.59 with php 5.1.6 and todays snapshot 5.2.0RC6-dev.

Reproduce code:
---
Code is standard (taken from manual) procedure to transform XML+XSTL
into a HTML document. Both URLs contain same files:
1.xml - source XML data
1.xsl - source XSLT data
character-entities.dtd - necessery entities definitions 
test.txt - PHP source code for the transformation

URL1: (not online 24/7, showing the current php process usage on
server) https://81.27.200.150:13580/transformToDoc/test.php

URL2: (online 24/7, not showing the current mem usage - for downloading
only) http://virklis.cust.ignum.cz/transformToDoc/test.php


Actual result:
--
Every page refresh produces a 2-4Kb raise in memory used by PHP (see
live on https://81.27.200.150:13580/transformToDoc/test.php)





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


#39078 [Opn-Bgs]: Plus sign in URL arg received as space

2006-10-07 Thread tony2001
 ID:   39078
 Updated by:   [EMAIL PROTECTED]
 Reported By:  main at springtimesoftware dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

PHP receives POST/GET data from Apache in decoded form, so if
Javascript doesn't encode + sign, we can't fix it or even change it
in anyway.


Previous Comments:


[2006-10-07 21:02:10] main at springtimesoftware dot com

Oops, I should have said that escape('+ ') gives '+%20'.

On the PHP side, the + is considered an alias for  , so the script
sees(urldecode converts + into   and %20 into  ).

I stand by the wording in the feature request.

David



[2006-10-07 20:58:17] main at springtimesoftware dot com

The JavaScript escape function does not do what the urlencode function
does.

If it did, then escape on the JavaScript side would match urldecode on
the PHP side, and this problem would not exist.

If you apply escape to + , you get + . On the PHP side, PHP
automatically applies urldecode, and you get   .

So, the problem is that plus sign does not get through to the PHP
script.

Is that clear now?

David



[2006-10-07 20:48:17] [EMAIL PROTECTED]

Javascript has escape() method exactly for that.



[2006-10-07 20:38:38] main at springtimesoftware dot com

JavaScript does not support urlencode.

Perhaps if you read the bug report again?

David



[2006-10-07 20:27:56] [EMAIL PROTECTED]

That's why you should use urlencode().



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

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


#39078 [Bgs]: Plus sign in URL arg received as space

2006-10-07 Thread main at springtimesoftware dot com
 ID:   39078
 User updated by:  main at springtimesoftware dot com
 Reported By:  main at springtimesoftware dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

So you are saying that this problem is definitely in Apache, not in
PHP?

You are saying that Apache converts plus signs into spaces?

Please confirm this, it is hard to believe.

David


Previous Comments:


[2006-10-07 21:39:53] [EMAIL PROTECTED]

PHP receives POST/GET data from Apache in decoded form, so if
Javascript doesn't encode + sign, we can't fix it or even change it
in anyway.



[2006-10-07 21:02:10] main at springtimesoftware dot com

Oops, I should have said that escape('+ ') gives '+%20'.

On the PHP side, the + is considered an alias for  , so the script
sees(urldecode converts + into   and %20 into  ).

I stand by the wording in the feature request.

David



[2006-10-07 20:58:17] main at springtimesoftware dot com

The JavaScript escape function does not do what the urlencode function
does.

If it did, then escape on the JavaScript side would match urldecode on
the PHP side, and this problem would not exist.

If you apply escape to + , you get + . On the PHP side, PHP
automatically applies urldecode, and you get   .

So, the problem is that plus sign does not get through to the PHP
script.

Is that clear now?

David



[2006-10-07 20:48:17] [EMAIL PROTECTED]

Javascript has escape() method exactly for that.



[2006-10-07 20:38:38] main at springtimesoftware dot com

JavaScript does not support urlencode.

Perhaps if you read the bug report again?

David



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

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


#39078 [Bgs]: Plus sign in URL arg received as space

2006-10-07 Thread derick
 ID:   39078
 Updated by:   [EMAIL PROTECTED]
 Reported By:  main at springtimesoftware dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

It's not hard to believe... it's what the RFC states:
http://www.freesoft.org/CIE/RFC/1738/4.htm, read the section unsafe.


Previous Comments:


[2006-10-07 21:44:08] main at springtimesoftware dot com

So you are saying that this problem is definitely in Apache, not in
PHP?

You are saying that Apache converts plus signs into spaces?

Please confirm this, it is hard to believe.

David



[2006-10-07 21:39:53] [EMAIL PROTECTED]

PHP receives POST/GET data from Apache in decoded form, so if
Javascript doesn't encode + sign, we can't fix it or even change it
in anyway.



[2006-10-07 21:02:10] main at springtimesoftware dot com

Oops, I should have said that escape('+ ') gives '+%20'.

On the PHP side, the + is considered an alias for  , so the script
sees(urldecode converts + into   and %20 into  ).

I stand by the wording in the feature request.

David



[2006-10-07 20:58:17] main at springtimesoftware dot com

The JavaScript escape function does not do what the urlencode function
does.

If it did, then escape on the JavaScript side would match urldecode on
the PHP side, and this problem would not exist.

If you apply escape to + , you get + . On the PHP side, PHP
automatically applies urldecode, and you get   .

So, the problem is that plus sign does not get through to the PHP
script.

Is that clear now?

David



[2006-10-07 20:48:17] [EMAIL PROTECTED]

Javascript has escape() method exactly for that.



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

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


#39080 [Fbk-Opn]: Memory leak in XSLTProcessor-transformToDoc()

2006-10-07 Thread odinuv at gmail dot com
 ID:   39080
 User updated by:  odinuv at gmail dot com
 Reported By:  odinuv at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: XSLT related
 Operating System: win32
 PHP Version:  5CVS-2006-10-07 (snap)
 New Comment:

Since the script is 40 lines long i provided the link (as suggested)
I'll write all the links directly:
PHP script source code:
http://virklis.cust.ignum.cz/transformToDoc/test.txt
XSLT Input file (1st argument): 
http://virklis.cust.ignum.cz/transformToDoc/1.xsl
XML Input file (2nd argument):
http://virklis.cust.ignum.cz/transformToDoc/1.xml
DTD:
http://virklis.cust.ignum.cz/transformToDoc/character-entities.dtd

The script is 40 lines long to 
- load the input files
- do the transformation
- determine memory used by php
If it were shorter it wouldn't be complete. The input files are
necessary for the problem to arise.


Previous Comments:


[2006-10-07 21:29:32] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2006-10-07 19:35:39] odinuv at gmail dot com

Description:

Using a certain data the function call to
XSLTProcessor-transformToDoc() produces a 2kb-4kb memory leak. This
happens *only* on win32 (tested on NT 5.0 build 2195 and
NT 5.2 build 3790) platform. Reproduced succesfully on apache 2.0.55
and 2.0.59 with php 5.1.6 and todays snapshot 5.2.0RC6-dev.

Reproduce code:
---
Code is standard (taken from manual) procedure to transform XML+XSTL
into a HTML document. Both URLs contain same files:
1.xml - source XML data
1.xsl - source XSLT data
character-entities.dtd - necessery entities definitions 
test.txt - PHP source code for the transformation

URL1: (not online 24/7, showing the current php process usage on
server) https://81.27.200.150:13580/transformToDoc/test.php

URL2: (online 24/7, not showing the current mem usage - for downloading
only) http://virklis.cust.ignum.cz/transformToDoc/test.php


Actual result:
--
Every page refresh produces a 2-4Kb raise in memory used by PHP (see
live on https://81.27.200.150:13580/transformToDoc/test.php)





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


#39078 [Bgs-Opn]: Plus sign in URL arg received as space

2006-10-07 Thread main at springtimesoftware dot com
 ID:   39078
 User updated by:  main at springtimesoftware dot com
 Reported By:  main at springtimesoftware dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

I'm not sure I'm following you.

Section Reserved: in RFC 1738 (at
http://www.freesoft.org/CIE/RFC/1738/4.htm) states:


Thus, only alphanumerics, the special characters $-_.+!*'(),, and
reserved characters used for their reserved purposes may be used
unencoded within a URL.


Since + is listed, I would expect that any agent that obeyed this RFC
would transmit + unchanged.

That means that Apache should transmit + unchanged to PHP.

This is why I would be surprised to find that Apache is the cause of
this problem.

Indeed, if I browse (using IE 6.0) to a Web page that contains a call
to phpinfo(), browsing using a URL that contains the argument
Arg=+%20, then phpinfo() reports that _SERVER[QUERY_STRING] has the
value Arg=+%20. (I just did this, I'm not making this up.)

This confirms that the plus sign is getting to PHP okay.

So wouldn't you agree with me that Apache cannot be causing this
problem?

PHP must be using urldecode() when it parses the arguments into the
$_GET array, yes? Otherwise, how would the plus sign in the argument
become a space?

David


Previous Comments:


[2006-10-07 22:15:37] [EMAIL PROTECTED]

It's not hard to believe... it's what the RFC states:
http://www.freesoft.org/CIE/RFC/1738/4.htm, read the section unsafe.



[2006-10-07 21:44:08] main at springtimesoftware dot com

So you are saying that this problem is definitely in Apache, not in
PHP?

You are saying that Apache converts plus signs into spaces?

Please confirm this, it is hard to believe.

David



[2006-10-07 21:39:53] [EMAIL PROTECTED]

PHP receives POST/GET data from Apache in decoded form, so if
Javascript doesn't encode + sign, we can't fix it or even change it
in anyway.



[2006-10-07 21:02:10] main at springtimesoftware dot com

Oops, I should have said that escape('+ ') gives '+%20'.

On the PHP side, the + is considered an alias for  , so the script
sees(urldecode converts + into   and %20 into  ).

I stand by the wording in the feature request.

David



[2006-10-07 20:58:17] main at springtimesoftware dot com

The JavaScript escape function does not do what the urlencode function
does.

If it did, then escape on the JavaScript side would match urldecode on
the PHP side, and this problem would not exist.

If you apply escape to + , you get + . On the PHP side, PHP
automatically applies urldecode, and you get   .

So, the problem is that plus sign does not get through to the PHP
script.

Is that clear now?

David



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

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


#39073 [Bgs]: safe_mode_include_dir not honored

2006-10-07 Thread jim at centerfuse dot net
 ID:   39073
 User updated by:  jim at centerfuse dot net
 Reported By:  jim at centerfuse dot net
 Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: FreeBSD 4.11
 PHP Version:  5.1.6
 New Comment:

file_exists() had previously worked for me in safe mode, most likely
because I was using PHP 5.1.4, which was subject to bug #37987 (invalid
return of file_exists() in safe mode). My apologies for the bogus bug,
but you can understand my confusion.


Previous Comments:


[2006-10-07 20:31:45] [EMAIL PROTECTED]

The ini directive is called safe_mode_*INCLUDE*_dir.
Please read what it's used for:
http://www.php.net/manual/en/features.safe-mode.php



[2006-10-07 19:19:12] jim at centerfuse dot net

This bug does not seem to affect require_once(), require(), or
include(), which are still able to access the file from a different UID
(as long as safe_mode_include_dir is set as it should be). However,
other file operations such as file_exists and fopen fail. In the
example below, note that the include() succeeds because the output does
say this is the test file


CODE

//
// safe_mode_include_dir is /home/php_include_test
// 
// the file /home/php_include_test/test 
// simply says this is the test filebr /

$test_file = '/home/php_include_test/test';

include($test_file);

if ( file_exists($test_file) ) {
echo 'Test file exists.br /';
}
else {
echo 'Test file does not existbr /';
}

if ( is_readable($test_file) ) {
echo 'Test file is readable.br /';
}
else {
echo 'Test file not readablebr /';
}

if ( $fp = fopen($test_file, 'r') ) {
echo 'Test file opened for read.br /';
fclose($fp);
}
else {
echo 'Test file could not be opened for readbr /';
}

===
OUTPUT
===
this is the test file
Test file does not exist
Test file not readable

Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1010 is not allowed to access
/home/php_include_test/test owned by uid 0 in
/home/www/jim/public_html/jimtest.php on line 21

Warning: fopen(/home/php_include_test/test) [function.fopen]: failed to
open stream: Inappropriate ioctl for device in
/home/www/jim/public_html/jimtest.php on line 21
Test file could not be opened for read



[2006-10-07 09:19:06] jim at centerfuse dot net

get_cfg_var() and ini_get() both return the correct
safe_mode_include_dir, but it seems to just be ignored. Just for good
measure, I also tried using a different directory altogether, but got
the same results.



[2006-10-07 08:10:57] jim at centerfuse dot net

note, the trailing parentheses that appears in my reproduce code after
the safe_mode_include_dir is *not* present in php.ini, it was a typo.



[2006-10-07 08:09:58] jim at centerfuse dot net

Description:

Just upgraded to php 5.1.6, and safe_mode_include_dir doesn't appear to
be honored. I'm running with safe mode = On and one directory in the
include_dir. Trying to include/fopen/etc any file from that directory
results in a safemode UID restriction. phpinfo() shows that PHP is
reading the correct configuration file and that it knows about
safe_mode_include_dir. 

Reproduce code:
---
//in php.ini: safe_mode_include_dir = /usr/local/share/FUSE)

$fp = fopen('/usr/local/share/FUSE/FUSE-main.php', 'r')



Expected result:

fopen should return file pointer

Actual result:
--
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The
script whose uid is 1006 is not allowed to access
/usr/local/share/FUSE/FUSE-main.php owned by uid 0 in
/home/context/public_html/test.php on line 13





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


#36516 [Com]: Sybase library names have changed in Sybase 15.x

2006-10-07 Thread jmherod at sbcglobal dot net
 ID:   36516
 Comment by:   jmherod at sbcglobal dot net
 Reported By:  sean at digitalworkshop dot net
 Status:   No Feedback
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Solaris 10
 PHP Version:  5.1.2
 New Comment:

Same problem exists for Sybase 12.5.3 under MacOSX 10.4.7. 

There is an additional library in the MacOSX Sybase distribution
(-lsybsrv) that must be included in the liblist for the build to
succeed.


Previous Comments:


[2006-04-20 01:00:00] php-bugs at lists dot php dot net

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



[2006-04-12 17:06:33] [EMAIL PROTECTED]

Or send the config.m4 you have to me: [EMAIL PROTECTED]
and I'll see if it's usable. (do NOT send the configure file or diff of
it :)



[2006-02-24 18:37:14] [EMAIL PROTECTED]

Put them somewhere in the net.



[2006-02-24 18:33:15] sean at digitalworkshop dot net

Guys, if you can tell me where to upload files to, I'll happily provide
patches to work around the changed library names. I thought I could
attach them to this ticket but can't see how right now.



[2006-02-24 18:22:48] sean at digitalworkshop dot net

Description:

In the new 15.x release of Sybase ASE, they have changed the names of
the client library files which the PHP extension links to.

Up to and including Sybase ASE 12.5.x, these were:

-lcs -lct -lcomn -lintl

But now they are:

-lsybcs -lsybct -lsybcomn -lsybintl


This affects the following files in the PHP build:

./configure
./ext/sybase_ct/config.m4

I have patched the config scripts and successfully built/tested PHP
with ASE 15.0 sybase_ct support. I'll attach patch files to this ticket
for someone to play with ... the config scripts will need to me modified
to check for which version of client library is present and set up the
link arguments accordingly. I'll try to help out here if I manage to
get some time to work on it!








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


#38937 [Opn]: openssl_csr_parse()

2006-10-07 Thread bassijunior at yahoo dot com dot br
 ID:   38937
 User updated by:  bassijunior at yahoo dot com dot br
 Reported By:  bassijunior at yahoo dot com dot br
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Hi, 
I think so. 
But I don´t know how to use the snapshot.
What can I do to use this? I did a download, but now, apache  doesn´t
work.


Previous Comments:


[2006-10-05 11:28:10] [EMAIL PROTECTED]

With 5.2.0 or later:

Is it what you are looking for?

$csr = file_get_contents('somecsr');
$csr_details = openssl_csr_get_subject($csr, 1)
print_r($details);

and to get the pkey:
$key = openssl_csr_get_public_key($csr);

You can try it using the snapshot: http://snaps.php.net but it will not
be backported to 5.1.



[2006-10-05 01:34:54] bassijunior at yahoo dot com dot br

No. 
I am developing a project using the openssl functions in the PHP.
These certificates, that I generate,  aren´t to use as web certificate.
I will use this certificate to prove that a user submited a file for me,
for example. It's a aplication very unusual.

Condensing, before generate a certificate, I have to generate a request
certificate, ok? I do this using openssl_csr_new function.
I only want to know how I can read a certificate request. To read the
certificate(.PEM) I use the openssl_X509_parse, how I showed in my last
comment, but I also need to read the certificate request. How can I read
it? Is there a openssl__parse to read a certificate request?

Thanks!



[2006-10-03 01:02:47] [EMAIL PROTECTED]

By request, do you mean from an url? like https://example.com?



[2006-10-03 00:54:21] bassijunior at yahoo dot com dot br

For example, with a  openssl_X509_parse function() I can print the
certificate. But I need to do this with a request created by
openssl_csr_new() function. 

I oopen the certificate and I print this:

?php
.
.
.

$cert = $pwd\\demoCA\\user_cert_signed.pem;


$fp = fopen ($cert, rb, 1);
if($fp===false)
{
echo Erro abrindo arquivo;
exit;
}
$conteudo = addslashes(fread ($fp, filesize($cert)));


//$cert_dados = file_get_contents($cert);

$nome=openssl_x509_parse($conteudo);

print_r($nome[subject][CN]);
print_r($nome[subject][C]);
print_r($nome[subject][ST]);
print_r($nome[subject][L]);

.
.
.
?

I want to do this with request too, and not only with a certificate. 

Thanks!!



[2006-10-03 00:17:03] [EMAIL PROTECTED]

What are you trying to do?

Parse a peer certicate?



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

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