#29453 [Com]: IMAP support breaks .so

2004-09-21 Thread thierry dot salmon at just dot fgov dot be
 ID:   29453
 Comment by:   thierry dot salmon at just dot fgov dot be
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Gentoo Linux  x86_64 (Opteron)
 PHP Version:  5.0.0
 New Comment:

Same problem with apache-1.3.31 + php-5.0.1 on RH9
-
apache
./configure --verbose \
--prefix=/opt/WEB/apache-1.3.31_compiled \
--enable-module=most \
--enable-shared=max \
--enable-module=so \
 configure.log 21
=ok
--
php-4.3.8
./configure \
 --prefix=/opt/WEB/php-4.3.8_compiled \
 --with-apxs=/opt/WEB/apache-1.3.31_compiled/bin/apxs \
 --with-informix=/opt/informix.se \
 --with-oci8=/opt/Oracle_10g/oracle/product/10.1.0/db_1 \
 --without-mysql \
 --enable-sigchild \
 --enable-memory-limit \
 --with-libxml-dir=/opt/WEB/libxml2-2.6.8_compiled \
 configure.log 21
=ok
Installing PHP SAPI module:   apache
[activating module `php4' in
/opt/WEB/apache-1.3.31_compiled/conf/httpd.conf]
cp libs/libphp4.so /opt/WEB/apache-1.3.31_compiled/libexec/libphp4.so
chmod 755 /opt/WEB/apache-1.3.31_compiled/libexec/libphp4.so
cp /opt/WEB/apache-1.3.31_compiled/conf/httpd.conf
/opt/WEB/apache-1.3.31_compiled/conf/httpd.conf.bak
cp /opt/WEB/apache-1.3.31_compiled/conf/httpd.conf.new
/opt/WEB/apache-1.3.31_compiled/conf/httpd.conf
rm /opt/WEB/apache-1.3.31_compiled/conf/httpd.conf.new
Installing PHP CLI binary:/opt/WEB/php-4.3.8_compiled/bin/
Installing PHP CLI man page: 
/opt/WEB/php-4.3.8_compiled/man/man1/
Installing PEAR environment:  /opt/WEB/php-4.3.8_compiled/lib/php/
[PEAR] Archive_Tar- installed: 1.1
[PEAR] Console_Getopt - installed: 1.2
[PEAR] PEAR   - installed: 1.3.2
Wrote PEAR system config file at:
/opt/WEB/php-4.3.8_compiled/etc/pear.conf
You may want to add: /opt/WEB/php-4.3.8_compiled/lib/php to your
php.ini include_path
[PEAR] DB - installed: 1.6.2
[PEAR] HTTP   - installed: 1.2.2
[PEAR] Mail   - installed: 1.1.3
[PEAR] Net_SMTP   - installed: 1.2.3
[PEAR] Net_Socket - installed: 1.0.1
[PEAR] XML_Parser - installed: 1.0.1
[PEAR] XML_RPC- installed: 1.1.0
Installing build environment:
/opt/WEB/php-4.3.8_compiled/lib/php/build/
Installing header files: 
/opt/WEB/php-4.3.8_compiled/include/php/
Installing helper programs:   /opt/WEB/php-4.3.8_compiled/bin/
  program: phpize
  program: php-config
  program: phpextdist


php-5.0.1./configure \
 --prefix=/opt/WEB/php-5.0.1_compiled \
 --with-apxs=/opt/WEB/apache-1.3.31_compiled/bin/apxs \
 --with-informix=/opt/informix.se \
 --with-oci8=/opt/Oracle_10g/oracle/product/10.1.0/db_1 \
 --without-mysql \
 --enable-sigchild \
 --enable-memory-limit \
 --with-libxml-dir=/opt/WEB/libxml2-2.6.8_compiled \
 configure.log 21
=
Installing PHP SAPI module:   apache
[activating module `php5' in
/opt/WEB/apache-1.3.31_compiled/conf/httpd.conf]
cp libs/libphp5.so /opt/WEB/apache-1.3.31_compiled/libexec/libphp5.so
cp: cannot stat `libs/libphp5.so': No such file or directory
apxs:Break: Command failed with rc=1
make: *** [install-sapi] Error 1


Previous Comments:


[2004-09-17 17:30:40] mojoandy at yahoo dot com

I'm getting the same issue with Mandrake 10 on AMD64.  Exactly the same
issue, so it ain't Gentoo.



[2004-09-14 09:28:11] [EMAIL PROTECTED]

You may be right Derick. 
But it's a little weird that it works with php 4.x.
And it's also weird that I can compile a whole linux system with my
build environment and only php5 reports problems.

Anyway - I was able to do a work around and if noone else thinks that
this could be a php problem I agree with you to set this bug to bogus.
Thanks for looking into the issue Derick.

Daniel Khan



[2004-09-14 08:36:06] [EMAIL PROTECTED]

I'd say blame the Gentoo people for not offering solid programs. No bug
here - bogus.



[2004-09-13 20:05:08] [EMAIL PROTECTED]

libtool-1.5.2-r5
automake-1.8.5-r1
autoconf-2.59-r4

FYI:
I haven't had problems with other software yet and as it's a gentoo
system nearly everything get's compiled from scratch.

My portage tree doesn't even offer autoconf-2.13 anymore btw.
I am on amd64 and so not that free in choosing older software
versions.

Meanwhile I compiled the IMAP support as Dynamic Extension and it works
now.

My config.nice for ext/imap looks like this:

CC='gcc' \
CXX='g++' \
'./configure' \
'--with-imap=/usr/lib/' \
'--with-imap-ssl' \
$@


BUT:
If I only do a ./configure I get:
checking whether SSL libraries are needed for c-client... no
checking whether 

#29205 [Opn-Asn]: NaN in php_sunrise_sunset()

2004-09-21 Thread momo
 ID:   29205
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjdouma at xs4all dot nl
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Linux 2.6.7
 PHP Version:  5.0.0
-Assigned To:  
+Assigned To:  momo
 New Comment:

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.


Previous Comments:


[2004-09-21 08:32:41] [EMAIL PROTECTED]

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.



[2004-07-16 11:54:17] bjdouma at xs4all dot nl

Description:

Good morning,

Re. php-5.0.0   

I noticed in sunfuncs.c/php_sunrise_sunset() there's this commented out
snippet:

  /* XXX: What's the use of this block.. ?
   * if (!calc_sunset  cosH  1 || calc_sunset  cosH  -1) {
   *throw doesnthappen(); 
   * }
   */ 

What the 'if' clause actually would detect is cases where you have no
sunrise or sunset, i.e. during the midnight sun period, on the Northern
hemisphere around June 21st, above ca. 66.5 deg latitude.

For instance, try:

php_sunrise_sunset( 182, 66, 0, 90.83, 0 );

this should give a good value for sunrise, very early in the morning.

Now try
   
php_sunrise_sunset( 182, 67, 0, 90.83, 0 );

this should give NaN.

The reason is obvious: above ca. 66.56 deg latitude in the summer (here
day 182) you have the midnight sun period: the sun doesn't set and/or
rise.

However, this function isn't used anywhere -- is it?

--bjd

[EMAIL PROTECTED]







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


#29205 [Opn-Asn]: NaN in php_sunrise_sunset()

2004-09-21 Thread momo
 ID:   29205
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjdouma at xs4all dot nl
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Linux 2.6.7
 PHP Version:  5.0.0
-Assigned To:  
+Assigned To:  momo
 New Comment:

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.


Previous Comments:


[2004-09-21 08:32:41] [EMAIL PROTECTED]

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.



[2004-07-16 11:54:17] bjdouma at xs4all dot nl

Description:

Good morning,

Re. php-5.0.0   

I noticed in sunfuncs.c/php_sunrise_sunset() there's this commented out
snippet:

  /* XXX: What's the use of this block.. ?
   * if (!calc_sunset  cosH  1 || calc_sunset  cosH  -1) {
   *throw doesnthappen(); 
   * }
   */ 

What the 'if' clause actually would detect is cases where you have no
sunrise or sunset, i.e. during the midnight sun period, on the Northern
hemisphere around June 21st, above ca. 66.5 deg latitude.

For instance, try:

php_sunrise_sunset( 182, 66, 0, 90.83, 0 );

this should give a good value for sunrise, very early in the morning.

Now try
   
php_sunrise_sunset( 182, 67, 0, 90.83, 0 );

this should give NaN.

The reason is obvious: above ca. 66.56 deg latitude in the summer (here
day 182) you have the midnight sun period: the sun doesn't set and/or
rise.

However, this function isn't used anywhere -- is it?

--bjd

[EMAIL PROTECTED]







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


#29205 [Asn]: NaN in php_sunrise_sunset()

2004-09-21 Thread momo
 ID:   29205
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjdouma at xs4all dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: Linux 2.6.7
 PHP Version:  5.0.0
 Assigned To:  momo
 New Comment:

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.


Previous Comments:


[2004-09-21 08:32:41] [EMAIL PROTECTED]

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.



[2004-09-21 08:32:41] [EMAIL PROTECTED]

date_sunrise(gmmktime(1,1,1,7,21,2004),SUNFUNCS_RET_STRING, 67, 0,
90.83);

returns 03:42 but yes i need to activate the check.



[2004-07-16 11:54:17] bjdouma at xs4all dot nl

Description:

Good morning,

Re. php-5.0.0   

I noticed in sunfuncs.c/php_sunrise_sunset() there's this commented out
snippet:

  /* XXX: What's the use of this block.. ?
   * if (!calc_sunset  cosH  1 || calc_sunset  cosH  -1) {
   *throw doesnthappen(); 
   * }
   */ 

What the 'if' clause actually would detect is cases where you have no
sunrise or sunset, i.e. during the midnight sun period, on the Northern
hemisphere around June 21st, above ca. 66.5 deg latitude.

For instance, try:

php_sunrise_sunset( 182, 66, 0, 90.83, 0 );

this should give a good value for sunrise, very early in the morning.

Now try
   
php_sunrise_sunset( 182, 67, 0, 90.83, 0 );

this should give NaN.

The reason is obvious: above ca. 66.56 deg latitude in the summer (here
day 182) you have the midnight sun period: the sun doesn't set and/or
rise.

However, this function isn't used anywhere -- is it?

--bjd

[EMAIL PROTECTED]







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


#26860 [Com]: virtual and ob_handler conflict

2004-09-21 Thread mitya at alesh dot ru
 ID:   26860
 Comment by:   mitya at alesh dot ru
 Reported By:  stanislas dot removethis dot renan at volcane dot fr
 Status:   Bogus
 Bug Type: Output Control
 Operating System: linux 2.4
 PHP Version:  4.3.4
 New Comment:

PHP Version 4.3.8, FreeBSD 4.10-STABLE, Same Error!


Previous Comments:


[2004-01-10 20:19:08] [EMAIL PROTECTED]

4.1.2 is too old. Works fine with latest release.




[2004-01-10 10:54:39] stanislas dot removethis dot renan at volcane dot
fr

Description:

[tested with php 4.1.2 only because my providers disabled virtual() on
their 4.3.4 version]

It seems that when using both ob_start() and virtual() does not work.
Contents of the virtual-ly included file is not parsed through the
ob_start() handler function.
Even worse : handler of ob_start() is no more used after the call of
virtual().





Reproduce code:
---
===
?php
function f($buffer)
{
  return (str_replace('1', '2', $buffer));
}

ob_start('f');
 ?
111
?php
virtual('afile.html');
?
111
===

afile.html :
===
111
===


Expected result:

222
222
222


Actual result:
--
222
111
111





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


#28654 [Opn-Bgs]: Possible bug in utf8_encode (bit operations)

2004-09-21 Thread momo
 ID:   28654
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *Languages/Translation
 Operating System: WinXP
 PHP Version:  4.3.4
 Assigned To:  moriyoshi
 New Comment:

the first bug you reported is not a bug, if you have problems with
iconv fill new bug report (feeding uft8_encode with iconv output is not
what moriyoshi suggest you, he suggest you don't use utf8_encode
function at all)


Previous Comments:


[2004-07-14 10:25:44] [EMAIL PROTECTED]

Sorry, but even the iconv() function doesn't do the job. Maybe someone
else (german guy?) can make some tests to furnish proof to my problem.



[2004-07-12 18:51:24] [EMAIL PROTECTED]

Most likely not a bug in PHP. The reporter better check 
out things I pointed out.




[2004-07-11 21:34:21] [EMAIL PROTECTED]

Moriyoshi: Was that last comment a statement of this being a bug in PHP
or what? Is this verified bug? Can you fix it if it is? (if it's not bug
- bogus..)




[2004-06-14 21:00:29] [EMAIL PROTECTED]

Looks like you are trying to do the conversion between 
the code page 1252 and UTF-8.

http://www.microsoft.com/globaldev/reference/sbcs/
1252.htm

Let alone mbstring, most of iconv() implementations 
support CP1252 (a.k.a. IBM1252).

HTH




[2004-06-10 00:11:14] [EMAIL PROTECTED]

Hm, what ISO standard do I use (german, Win32) when I pastecopy Word
text into a textarea and post it to a PHP script?
Is it possible to solve my problem by converting my character encoding
to iso-8859-1 with the mb-functions?



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

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


#28456 [Com]: upload php vulnerability

2004-09-21 Thread NetVicious at gmail dot com
 ID:  28456
 Comment by:  NetVicious at gmail dot com
 Reported By: overflow at neuf dot fr
 Status:  Closed
 Bug Type:Unknown/Other Function
 PHP Version: 4.3.4
 New Comment:

Hi! toni2001 do could post the changes to the source code for manual
patching ?


Previous Comments:


[2004-05-21 10:25:12] [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.





[2004-05-20 18:30:14] overflow at neuf dot fr

$_FILES['userfile']['type'] can be fake by the client with raw http :
Content-Type: text/plain



[2004-05-20 17:49:38] mail at young dot org dot ua

Oh, yes.
I have try to analyze this question, and got following result:

If Post data looks like this:
Content-Disposition: form-data; name=userfile;
filename=../test.html

Variable $_FILES['userfile']['name'] initializes with value
../test.html

And one more example code taken from PHP manual:

$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . $_FILES['userfile']['name'];

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{


Trying to copy file into '/var/www/uploads/../test.html

And in opinien this situation potential dangerous.



[2004-05-20 17:03:17] overflow at neuf dot fr

Description:

upload php vulnerability for $_FILES['userfile']['name'] can contain
string ../ if the name start with a . with a fake raw http :
Content-Disposition: form-data; name=userfile;
filename=../../../test.html



Reproduce code:
---
http://slythers.tcpteam.org/uploadphpvuln.txt

Expected result:

security vulnerability in upload script






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


#29568 [Com]: GD causes an segmentation fault

2004-09-21 Thread reg_php at nilsson dot tv
 ID:   29568
 Comment by:   reg_php at nilsson dot tv
 Reported By:  bram at x-plose dot be
 Status:   Open
 Bug Type: GD related
 Operating System: debian
 PHP Version:  4.3.8
 New Comment:

pdflib uses a bundled version of png (old version), which makes php
(using newer png) crash. Either remove --with-pdf when compling PHP, or
compile pdflib with --with-pnglib --with-zlib to make pdflib use the
newer png version.


Previous Comments:


[2004-08-16 14:00:43] bram at x-plose dot be

i'm using version libpng-1.2.5 
 
How can i fix the problem?



[2004-08-16 08:40:48] [EMAIL PROTECTED]

SOunds like the famous libpng 1.0/libpng 1.2 incompatibility. Which
version are you using?



[2004-08-14 03:56:31] bram at x-plose dot be

I tried the cvs version and when i start the program with 
gdb and run -X this happens when i call a the script:

GNU gdb 6.1-debian
This GDB was configured as i386-linux...Using host libthread_db
library /lib/libthread_db.so.1.

(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread 1024 (LWP 2163)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 2163)]
0x0019 in ?? ()

the bt shows this:

(gdb) bt
#0  0x0019 in ?? ()
#1  0x405a4302 in png_create_struct_2 (type=2, malloc_fn=0x19,
mem_ptr=0x5a5a5a5a) at pngmem.c:351
#2  0x4063c168 in png_create_info_struct () from
/usr/local/lib/libpng.so.3
#3  0x40388faf in gdImageCreateFromPngCtx (infile=0x82814ac)
at
/var/src/webserv/php4-STABLE-200408132230/ext/gd/libgd/gd_png.c:149
#4  0x40388e44 in gdImageCreateFromPng (inFile=0x82819f8)
at
/var/src/webserv/php4-STABLE-200408132230/ext/gd/libgd/gd_png.c:90
#5  0x403706bc in _php_image_create_from (ht=1, return_value=0x8281824,
this_ptr=0x0, return_value_used=1, image_type=2,
tn=0x404e74c7 PNG, func_p=0x40388e10 gdImageCreateFromPng,
ioctx_func_p=0x40388ed0 gdImageCreateFromPngCtx)
at /var/src/webserv/php4-STABLE-200408132230/ext/gd/gd.c:1470
#6  0x4037083d in zif_imagecreatefrompng (ht=1, return_value=0x8281824,
this_ptr=0x0, return_value_used=1)
at /var/src/webserv/php4-STABLE-200408132230/ext/gd/gd.c:1516
#7  0x404d4ab2 in execute (op_array=0x82cea34) at
/var/src/webserv/php4-STABLE-200408132230/Zend/zend_execute.c:1640
#8  0x404c15d4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /var/src/webserv/php4-STABLE-200408132230/Zend/zend.c:891
#9  0x4048578c in php_execute_script (primary_file=0xb79c) at
/var/src/webserv/php4-STABLE-200408132230/main/main.c:1734
#10 0x404db4bc in php_handler (r=0x82e1b70)
at
/var/src/webserv/php4-STABLE-200408132230/sapi/apache2handler/sapi_apache2.c:540
#11 0x080ae589 in ap_run_handler (r=0x82e1b70) at config.c:151
#12 0x080aead3 in ap_invoke_handler (r=0x82e1b70) at config.c:358
#13 0x08096ae6 in ap_process_request (r=0x82e1b70) at
http_request.c:246
#14 0x08092a6a in ap_process_http_connection (c=0x8264510) at
http_core.c:250
#15 0x080b7a98 in ap_run_process_connection (c=0x8264510) at
connection.c:42
#16 0x080b7d5c in ap_process_connection (c=0x8264510, csd=0x8264438) at
connection.c:175
#17 0x080ad210 in child_main (child_num_arg=0) at prefork.c:609
#18 0x080ad2cc in make_child (s=0x81d1500, slot=0) at prefork.c:649
#19 0x080ad3c1 in startup_children (number_to_start=40) at
prefork.c:721
#20 0x080ad6c3 in ap_mpm_run (_pconf=0x8193e90, plog=0x81cbf70,
s=0x81d1500) at prefork.c:940
#21 0x080b2e7e in main (argc=2, argv=0xbb84) at main.c:617



[2004-08-08 22:59:01] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-08-08 04:29:32] bram at x-plose dot be

Description:

When i open an php script that uses GD it shows an segmentation fault
in error.log 

Server software: Apache/1.3.26 (deb package) (Unix) Debian GNU/Linux
PHP/4.3.8 

The script is comming from php.net so i dont supose there's an error in
it.

I included /usr/local/lib/php in php.ini and i added extension = gd.so

'./configure' '--with-jpeg-dir=../jpeg-6b/' '--with-pdflib'
'--with-tiff-dir=../tiff-v3.6.1/' '--with-png-dir=../libpng-1.2.5/'
'--with-zlib-dir=../zlib-1.1.4/' '--enable-static-pdflib'
'--enable-gd-imgstrttf' '--with-gd' '--with-mysql' '--with-apxs'
'--enable-fast-cgi-redirect'
'--with-freetype-dir=/usr/local/freetype2/' '--with-iconv'
'--with-gettext' 



Reproduce code:
---
?php
   header(Content-type: image/png);
   $string = $_GET['text'];
   $im= 

#30165 [Com]: SOAP FAULT upgrading from PEAR::SOAP to php5

2004-09-21 Thread ante dot dfg at moj dot net
 ID:   30165
 Comment by:   ante dot dfg at moj dot net
 Reported By:  s dot tabacchiera at gruppocsf dot com
 Status:   Open
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.0.1
 New Comment:

YesI have the same problem...nothing related to SOAP works in php
5.0.1..I tried some examples from zend.com(for php5) and all the time
php 5.0.1 crasches with the Uncaught SoapFault exception..Im on WinXP
sp1, Apache 1.3.31, php 5.0.1


Previous Comments:


[2004-09-20 12:51:55] s dot tabacchiera at gruppocsf dot com

Description:

Hi all, my server is running php4 and PEAR::SOAP 0.8RC2, whilst client
is running php5.

This code generates an error:
-
?php
$wsdl1=http://blablabla.com/soap_server.php?wsdl;;
$client1 = new SoapClient($wsdl1);
var_dump($client1-__getFunctions());
?


The error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL:PHP-SOAP doesn't support transport
'http://schemas.xmlsoap.org/soap/http/' in/root/soap.php:3
Stack trace:
#0 {main} thrown in /root/soap.php on line 3

Any clue?







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


#29292 [Opn-Bgs]: Single space character returned instead of empty string

2004-09-21 Thread momo
 ID:   29292
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jmelville at selectaustralasia dot com dot au
-Status:   Open
+Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Windows 2000 Server SP4
 PHP Version:  4.3.8
 New Comment:

ilia introduced this bug on 1.86.2.25 fixing #25777.

all the meaning was discussed there. in the bottom line make sure php
use updated ntwdblib.dll file.


Previous Comments:


[2004-09-17 17:30:20] dcrignon at adequasys dot com

I confirm this problem, under Windows 2003 Server, with Apache 2 or 1.3
and PHP 4.3.8 or 5.0.

The only way is to go back to PHP 4.3.3 ...
Not the good solution for me.
Do you know if someone is working on this bug to fix it?

We can adapt our product and trim() any variable to recover good
values, but is it the good solution?..

Thank you for your help!

David



[2004-08-30 17:41:45] vikinoha at yahoo dot com

PHP 4.3.8

I am experiencing the same problem with non-empty string returned by a
query that should return an empty string.

I have tried to replace the php_mssql.dll file in version 4.3.8 with
the one from 4.3.3, but the problem remains with no change
whatsoever:(

If there is someone familiar with PHP sources, does the php_mssql.c
1.138 revision changes deal with this bug, or it is something
completely unrelated? And also, if the 'illia_0' change (pointed out by
richard dot quadling at bandvulc dot co dot uk) effectively removes this
bug (does it?), why is it then if'd out?

Thanks,
Viktor



[2004-08-13 12:22:27] richard dot quadling at bandvulc dot co dot uk

Hi.

If the column contains NULL (using Enterprise Manager to enter CTRL+0),
then the output is correct.

But having to convert all '' to NULLs is not right.

Richard.



[2004-08-13 09:48:32] richard dot quadling at bandvulc dot co dot uk

Hi.

Following script ...

?php

$rConn = mssql_connect('localhost','PHPBB_User','PHPBB_User');
$rResults = mssql_query('SELECT user_icq,LEN(user_icq) AS user_icq_len
FROM PHPBB_User.phpbb_users');
while ($row = mssql_fetch_assoc($rResults))
{
var_export($row);
echo 'br /Length of user_icq = ' . strlen($row['user_icq']) . 'br
/br /br /';
}
mssql_free_result($rResults);
mssql_close($rConn);
?


produces output of ...

array ( 'user_icq' = ' ', 'user_icq_len' = 0, )
Length of user_icq = 1


array ( 'user_icq' = '1711757', 'user_icq_len' = 7, )
Length of user_icq = 7


array ( 'user_icq' = ' ', 'user_icq_len' = 0, )
Length of user_icq = 1


Which is clearly wrong! The length being returned by SQL is 0, the data
being returned by PHP is ' '. The data via enterprise manager is ''.

I'm using Sambar Server V6.1 Beta 3, PHP V5.0.0 (about to upgrade to
V5.0.1). MS SQL 2000 SP3 Developer Edition all on a Windows XP Pro. But
none of this seems to be making any difference. According to all the
comments made, this was broken a LONG time ago.

It seems that a small patch HAS been applied to the source (php_mssql.c
line 793-797), but is under a compiler directive of ilia_0. (Is this
Ilia Alshanetsky? If so, great article in PHP|Architect about
contexts!!!).

The code is in the php_mssql_get_column_content_with_type() function.

...
case SQLTEXT: {
int length;
char *data = charcol(offset);

length=dbdatlen(mssql_ptr-link,offset);
#if ilia_0
while (length0  data[length-1] == ' ') { /* nuke trailing
whitespace */
length--;
}
#endif
ZVAL_STRINGL(result, data, length, 1); 
break;
}
...

The macro ZVAL_STRINGL is ...

#define ZVAL_STRINGL(z, s, l, duplicate) {  \
char *__s=(s); int __l=l;   \
(z)-value.str.len = __l;   \
(z)-value.str.val = (duplicate?estrndup(__s, __l):__s);\
(z)-type = IS_STRING;  \
}


If someone can recompile the code, can they do so WITHOUT the directive
first but put in some debugs (forget thread safeness, only testing) and
show what the value of length in the assignment from
dbdatlen(mssql_ptr-link,offset) and what happens if the macro is
called with a 0 rather than a 1.



[2004-08-10 18:22:55] chris at fjmercedes dot com

I'm experiencing the same problem with the latest CVS of PHP5 and no
php_mssql.dll extensions from older versions are compatable with PHP5.



The remainder of the 

#10411 [Com]: number_format returns wrong values

2004-09-21 Thread yossi_shelli at cso dot co dot il
 ID:   10411
 Comment by:   yossi_shelli at cso dot co dot il
 Reported By:  mark at artshouse dot com
 Status:   Closed
 Bug Type: Unknown/Other Function
 Operating System: Solaris 8, Slackware 7.0
 PHP Version:  4.0.4pl1
 New Comment:

I have the same problem here.
Running on windows 2000 , php version 4.3.7, Apache/2.0.49.

Tryed everything and every vriable with a number smaller then 1000
return a normal result. but a vriable with a number greater then 1000
return 1.00 as a result.

If i put a constant number instaed of vriable in the first parameter of
number_format (e.g. number_format (1099,2)) then the result will be ok.

My shop is also running on linux, tryed it on it, and the same results
:(

if anyone of u got answer to this problem, or a way to byepass it
please respond to this.

Yossi shelli


Previous Comments:


[2001-04-20 15:14:01] mark at artshouse dot com

That was just a typo on my part entering the information 
here.  The bug still exists, and I think it specifically 
has to do with values set as float,2 from MySQL. It doesn't 
happen every time, but I have seen this on at least 5 
occasions now (in 5 different sets of code).

I can recreate it within my code, but you don't want me to 
paste my code (its all intermingled in a 600 lines of 
script)

check it out specifically using values pulled from MySQL 
with a type of float,2.

Here's the kicker, if I do something like 
$total=number_format($totals,2); print $total; the bug 
exists...if I do print number_format($totals,2) it works 
normally.



[2001-04-19 17:53:57] [EMAIL PROTECTED]

Try changing:
$total = number_format($calcs_a + calcs_b,2);
to
$total = number_format($calcs_a + $calcs_b,2);
(Note the missing $)

Works just fine here with that small adjustment.



[2001-04-19 17:35:01] mark at artshouse dot com

number_format returns wrong values in certain situations, 
here is a code example...

$value = 504;
$calcs_a = number_format($value,2);

$othervalue = 504;
$calcs_b = number_format($othervalue,2);

$total = number_format($calcs_a + calcs_b,2);

this returns:
$calcs_a is 504.00
$calcs_b is 504.00
$total is 1.00  (should be 1008.00)

I have seen this on several occasions now on multiple 
machines/setups/Oses







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


#30177 [NEW]: Change for const

2004-09-21 Thread guth at fiifo dot u-psud dot fr
From: guth at fiifo dot u-psud dot fr
Operating system: Linux (mandrake 10)
PHP version:  5.0.1
PHP Bug Type: Feature/Change Request
Bug description:  Change for const

Description:

hello,

const is too restrictive in PHP.

I think it could be a good idea that the following code worked as
expected.

If the constant is not defined, PHP could print a NOTICE and use the name
of the constant instead.

Reproduce code:
---
?

define(ROOT, $_SERVER['DOCUMENT_ROOT']);

class FIIFO {

const PATH = ROOT./path/to/this/class;



}
?

Expected result:

As PATH is a constant,

(FIIFO::PATH == /www/path/to/this/class) for example.



Actual result:
--
A parse error...

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


#27620 [Com]: Apache Child Segfaults Using OCI8 and PutEnv

2004-09-21 Thread paul dot g dot smith at cantos dot com
 ID:   27620
 Comment by:   paul dot g dot smith at cantos dot com
 Reported By:  bmuller at milchstrasse dot de
 Status:   Feedback
 Bug Type: OCI8 related
 Operating System: RedHat ES 3
 PHP Version:  5CVS-2004-03-17 (dev)
 New Comment:

This is a production system. I'm not in a position to install a debug
build on it unfortunately. We have to backtrack to PHP 4.3.6 for the
time being on that server, can't leave it faulty, as it's a live
webserver!

We'll endeavour to find a sacrificial system and install and reproduce
the problem on that - then we can do a backtrace - please bear with us
while we pull the bits together to do that.

FYI, the segfault is reproducible from PHP 4.3.8 through 4.3.9RC3 up to
and including 5.0.1. We're using Oracle client 9.2.0.1.0 on RH ES3.


Previous Comments:


[2004-09-20 00:22:18] [EMAIL PROTECTED]

Again, please provide a backtrace of that segfault.
http://bugs.php.net/bugs-generating-backtrace.php



[2004-09-19 22:34:47] paul dot g dot smith at cantos dot com

We upgraded our PHP installation (running on RH 3.0ES) from 4.3.6 to
4.3.8 today.

Code previously working fine is now segfaulting 99% of the time inside
OCILogin(). Absolutely reproducible.

PHP was built from source both times. With 4.3.6 it worked fine. With
4.3.8 the segfault is solid and reproducible.

No other changes eg to the Oracle client installation.

Viz it can't be blamed on Oracle, the only thing that changed was the
PHP version, therefore suspicion is that it points at something broken
in the new version of PHP.



[2004-03-17 04:11:35] [EMAIL PROTECTED]

5$ that it crashes inside the Oracle library ;-)



[2004-03-17 03:37:16] [EMAIL PROTECTED]

You're right, ocilogon() doesn't connect, but it should generate
'ORA-12154: TNS:could not resolve service name' error as it does for
me.
It shouldn't segfault anyway.



[2004-03-17 03:23:24] [EMAIL PROTECTED]

Since when does putenv work? The libraries are initialized before the
script runs...



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

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


#30178 [NEW]: COM Object EnumNetworkDrives

2004-09-21 Thread e dot vandeoudeweetering at marcanti dot esprit-sg dot nl
From: e dot vandeoudeweetering at marcanti dot esprit-sg dot nl
Operating system: Windows 2000 SP4 5.00.2195
PHP version:  5.0.1
PHP Bug Type: COM related
Bug description:  COM Object EnumNetworkDrives

Description:

To enumerate network drives or printer connections, a COM function
'EnumNetworkDrives()' or 
'EnumPrinterConnections()'is used.
When I run my script with 'EnumNetworkDrives()' as an example, an
exception is thrown. This exception is also thrown when using the function
'EnumPrinterConnections()'.


Reproduce code:
---
?php

$network = new COM(WScript.Network);
$nd = $network - EnumNetworkDrives();
for($i = 0; $nd - Count(); $i += 2) {
  print $nd - Item($i) .   . $nd - Item($i +1) . \n;
}

?

Expected result:

G: \\%SERVER%\%SHARE%
I: \\%SERVER%\%SHARE%
J: \\%SERVER%\%SHARE%
K: \\%SERVER%\%SHARE%
L: \\%SERVER%\%SHARE%
M: \\%SERVER%\%SHARE%

Actual result:
--
G: \\%SERVER%\%SHARE%
I: \\%SERVER%\%SHARE%
J: \\%SERVER%\%SHARE%
K: \\%SERVER%\%SHARE%
L: \\%SERVER%\%SHARE%
M: \\%SERVER%\%SHARE%
PHP Fatal error:  Uncaught exception 'com_exception' with message 'Source:
Unknown
Description: Unknown' in C:\Scripts\php\drives.php:6
Stack trace:
#0 {main}
  thrown in C:\Scripts\php\drives.php on line 6

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


#29110 [Opn-Csd]: ftp_rawlist problem 'php_connect_nonb() failed: Connection refused'

2004-09-21 Thread fcurra at tecnonexo dot com
 ID:   29110
 User updated by:  fcurra at tecnonexo dot com
 Reported By:  fcurra at tecnonexo dot com
-Status:   Open
+Status:   Closed
 Bug Type: FTP related
 Operating System: Linux 2.4.25
 PHP Version:  4.3.7
 New Comment:

I finally found the solution of my problem. It wasn't a PHP Bug, but a
firewall miss configuration. I enabled 'accept connection' rule on high
ports (1024 to 65535) for that server, and that worked out. 

More about in : http://shorewall.net/FTP.html


Previous Comments:


[2004-07-12 20:17:23] fcurra at tecnonexo dot com

I'm not sure if IPv6 is involved. I don't see any reference in
phpinfo(), and PHP is not compiled with '--disable-ipv6'. By the way,
i'm passing an IP address.

Thanks



[2004-07-12 20:10:44] fcurra at tecnonexo dot com

result of var_dump(ftp_pasv($conn_id, true));
is bool(true)



[2004-07-12 19:16:54] [EMAIL PROTECTED]

Oh, and is there any IPv6 involved here?  (Take a look at phpinfo() to
see if it says IPv6 enabled)  Does the remote server support IPv6?  Are
you passing a hostname or an IP address?

If both ends are IPv6 capable, try connecting with an IPv4 address
(1.2.3.4 as opposed to ftp.foo.com) to see if it behaves properly.  



[2004-07-12 19:08:23] [EMAIL PROTECTED]

What is the return value of ftp_pasv()?

  var_dump(ftp_pasv($conn_id, true));



[2004-07-12 18:27:31] fcurra at tecnonexo dot com

Comment about behavior. If you don't use passive mode (comment line
ftp_pasv) then the warning doesn't appear. Any ideas?



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29110

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


#30083 [Opn]: call to undefine class method exit php without yell

2004-09-21 Thread momo
 ID:   30083
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: CGI related
 Operating System: winxp
 PHP Version:  5.0.1
 New Comment:

btw, calling to undefine function e.g stelen(), produce the same bug.


Previous Comments:


[2004-09-19 09:37:29] [EMAIL PROTECTED]

the output is just before in both cgi via httpd and cgi via the
shell.



[2004-09-14 19:57:38] [EMAIL PROTECTED]

What happens when you set error_mode to 0?



[2004-09-14 11:16:02] [EMAIL PROTECTED]

Description:

the following code works nice when runing php-cli and php-cgi from the
shell but with apache 1.3.x(cgi) the script exit without yell.



Reproduce code:
---
?
error_reporting(E_ALL);
class d {}
$d=new d();
echo before;
$d-nf();
echo after;
?

Expected result:

before
Fatal error: Call to undefined method d::nf() in c:\php\test.php on
line 6

Actual result:
--
before





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


#30179 [NEW]: unset deletes array entries and its copied entries

2004-09-21 Thread oliver at teqneers dot de
From: oliver at teqneers dot de
Operating system: Suse 9.0
PHP version:  4.3.8
PHP Bug Type: Arrays related
Bug description:  unset deletes array entries and its copied entries

Description:

When I copy an array with a normal = the copy is not a real copy, but a
reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---
$arr= array( 'in' = array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)



Actual result:
--
Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[2] = 3
)

)



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


#27406 [Com]: php_check_syntax executes code

2004-09-21 Thread de_bruut at hotmail dot com
 ID:   27406
 Comment by:   de_bruut at hotmail dot com
 Reported By:  thomas at stauntons dot org
 Status:   Assigned
 Bug Type: Unknown/Other Function
 Operating System: OS X
 PHP Version:  5.0.2-dev
 Assigned To:  iliaa
 New Comment:

How should the docs be changed? This misfeature hasn't been dealt with
yet...maybe we should just remove the docs :)

What misfeature? IMO a function that can check the syntax of a PHP file
before it's included has real benefits for development and testing (as
it can be used to avoid parse and fatal errors etc). And the
documentation of php_check_syntax perfectly describes such a function.
The only problem here is the fact that php_check_syntax not only checks
the code, but executes it as well. I'd say that this is unexpected,
undesirable behavior (a bug). The documentation is just fine the way it
is now...


Previous Comments:


[2004-09-20 21:36:57] [EMAIL PROTECTED]

How should the docs be changed? This misfeature hasn't been dealt with
yet...maybe we should just remove the docs :)



[2004-09-16 18:19:12] didou at keliglia dot com

So should this function actually execute the code (like an include())
or
should it be a simple lint check (identical to php -l)

It should do only a lint check, otherway we don't need this function as
we already have include..

Anyway, we should really change the docs philip.



[2004-08-26 18:20:05] [EMAIL PROTECTED]

Tested latest CVS on a Win32 machine, same problem.  Here's a very
simple test:

randominclude.php
?php
function foobar() {
echo HI;
}
?

checksyntax.php
?php 
if (php_check_syntax('randominclude.php')) {
echo passed; 
foobar(); 
}
?

Calling checksyntax.php via Module/CLI/CGI results in:

passedHI

As opposed to:

passed
Fatal error: Call to undefined function foobar() in ...




[2004-08-09 05:10:33] [EMAIL PROTECTED]

So should this function actually execute the code (like an include())
or should it be a simple lint check (identical to php -l).  The doc
team assumed the later.  Please advise with specific information on how
this should be documented or if this is indeed a bug, say so.

http://cvs.php.net/co.php/phpdoc/en/reference/misc/functions/php-check-syntax.xml




[2004-08-08 18:59:20] phpbug at bigredspark dot com

Bogus? Could someone document this function so we know what the
proper usage is? Is this funtion meant to load the file into the
current scope as it's syntax is checked? If so, please say so in the
documentation. Otherwise, I have another bug report to file.

original.php
?php
$bool = php_check_syntax('checkme.php');
foo();
$bar = new Bar;
$bar-foo();
?

checkme.php
?php
function foo()
{ echo checkme::foo\n; }
class Bar {
function foo()
{ echo checkme::bar::foo\n; }
}
?

results in

checkme::foo
checkme::bar::foo

for example, when my assumption of how the function works should have
the code results in undefined function and class errors.



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

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


#21409 [Com]: PHP_NORMAL_READ parameter in socket_read function gives error

2004-09-21 Thread tracid at zappmobile dot ro
 ID:   21409
 Comment by:   tracid at zappmobile dot ro
 Reported By:  teemu dot tormanen at funmedia dot fi
 Status:   Bogus
 Bug Type: Sockets related
 Operating System: Windows 2000
 PHP Version:  4.3.0
 New Comment:

I've got the same problem with php 4.3.8 on windows xp. And I would
really need the php_normal_read part, so it reads till \n or \r...


Previous Comments:


[2003-01-04 16:11:03] [EMAIL PROTECTED]

Duplicate of #21197



[2003-01-04 11:11:41] teemu dot tormanen at funmedia dot fi

?php
error_reporting (E_ALL);

/* Allow the script to hang around waiting for connections. */
set_time_limit (0);

/* Turn on implicit output flushing so we see what we're getting
 * as it comes in. */
ob_implicit_flush ();

$address = '190.23.198.28';
$port = 1;

if (($sock = socket_create (AF_INET, SOCK_STREAM, 0))  0) {
echo socket_create() failed: reason:  . socket_strerror ($sock) .
\n;
}

if (($ret = socket_bind ($sock, $address, $port))  0) {
echo socket_bind() failed: reason:  . socket_strerror ($ret) .
\n;
}

if (($ret = socket_listen ($sock, 5))  0) {
echo socket_listen() failed: reason:  . socket_strerror ($ret) .
\n;
}

do {
if (($msgsock = socket_accept($sock))  0) {
echo socket_accept() failed: reason:  . socket_strerror ($msgsock)
. \n;
break;
}
/* Send instructions. */
$msg = \nWelcome to the PHP Test Server. \n .
To quit, type 'quit'. To shut down the server type 'shutdown'.\n;
socket_write($msgsock, $msg, strlen($msg));

do {

if (FALSE === ($buf = socket_read ($msgsock, 2048, PHP_NORMAL_READ)))
{
echo socket_read() failed: reason:  . socket_strerror ($ret) 
.
\n;
break 2;
}

/*
while(($tmpbuf = socket_read($msgsock, 512)) !== false) {
$buf .= $tmpbuf;
if(preg_match('\r\n\r\n$'s, $buf))
break;
}
*/
if (!$buf = trim ($buf)) {
continue;
}
if ($buf == 'quit') {
break;
}
if ($buf == 'shutdown') {
socket_close ($msgsock);
break 2;
}
$talkback = PHP: You said '$buf'.\n;
socket_write ($msgsock, $talkback, strlen ($talkback));
echo $buf\n;
} while (true);
socket_close ($msgsock);
} while (true);

socket_close ($sock);
?

this socket example script dies when ran from command line.
but only if i use PHP_NORMAL_READ parameter in socket_read function. it
gives this error:
PHP Warning:  socket_read() unable to read from socket [0]: The
operation comple
ted successfully.
 in C:\php43\serv.php on line 38
socket_read() failed: reason: Incorrect function.
if PHP_NORMAL_READ parameter isn't used, it works beautifully.




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


#30180 [NEW]: PHP_NORMAL_READ and socket_read() error

2004-09-21 Thread tracid at zappmobile dot ro
From: tracid at zappmobile dot ro
Operating system: Windows XP
PHP version:  4.3.8
PHP Bug Type: Sockets related
Bug description:  PHP_NORMAL_READ and socket_read() error

Description:

Hello.

At the socket_read() function if you specify PHP_NORMAL_READ, it results
in an error:
socket_read() failed: reason: Incorrect function.

It was already reported almost a year ago, but no fix since then...

Take care


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


#30181 [NEW]: domxml functions missing

2004-09-21 Thread abramov at fromru dot com
From: abramov at fromru dot com
Operating system: Linux
PHP version:  5.0.1
PHP Bug Type: *Configuration Issues
Bug description:  domxml functions missing

Description:

I tried to compile php 5.0.1 with domxml support. Compilation was
successful, but domxml - functions are missing! The only dom function is
dom_import_simplexml:

[php-5.0.1]# sapi/cli/php |egrep -i '(xml|dom)'
?
phpinfo();
print_r(get_defined_functions());
?

Configure Command =  './configure' '--with-dom=/usr/local'
'--with-dom-xslt'
xmlrpc_error_number = 0 = 0
xmlrpc_errors = Off = Off
dom
DOM/XML = enabled
DOM/XML API Version = 20031129
libxml Version = 2.6.11
libxml
libXML support = active
libXML Version = 2.6.11
libXML streams = enabled
session.cookie_domain = no value = no value
SimpleXML
Simplexml support = enabled
Classes = ArrayObject, ArrayIterator, CachingIterator,
CachingRecursiveIterator, DirectoryIterator, FilterIterator,
LimitIterator, ParentIterator, RecursiveDirectoryIterator,
RecursiveIteratorIterator, SimpleXMLIterator
xml
XML Support = active
XML Namespace Support = active
libxml2 Version = 2.6.11
OLDPWD = /usr/src/libxml2-2.6.11
_SERVER[OLDPWD] = /usr/src/libxml2-2.6.11
_ENV[OLDPWD] = /usr/src/libxml2-2.6.11
[43] = xml_parser_create
[44] = xml_parser_create_ns
[45] = xml_set_object
[46] = xml_set_element_handler
[47] = xml_set_character_data_handler
[48] = xml_set_processing_instruction_handler
[49] = xml_set_default_handler
[50] = xml_set_unparsed_entity_decl_handler
[51] = xml_set_notation_decl_handler
[52] = xml_set_external_entity_ref_handler
[53] = xml_set_start_namespace_decl_handler
[54] = xml_set_end_namespace_decl_handler
[55] = xml_parse
[56] = xml_parse_into_struct
[57] = xml_get_error_code
[58] = xml_error_string
[59] = xml_get_current_line_number
[60] = xml_get_current_column_number
[61] = xml_get_current_byte_index
[62] = xml_parser_free
[63] = xml_parser_set_option
[64] = xml_parser_get_option
[611] = simplexml_load_file
[612] = simplexml_load_string
[613] = simplexml_import_dom
[685] = dom_import_simplexml
[697] = libxml_set_streams_context




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


#30182 [NEW]: SOAP module processing WSDL file dumps core

2004-09-21 Thread dmiller at sparks dot net
From: dmiller at sparks dot net
Operating system: FreeBSD 4.10
PHP version:  5CVS-2004-09-21 (dev)
PHP Bug Type: Reproducible crash
Bug description:  SOAP module processing WSDL file dumps core

Description:

$client = new SoapClient($wsdl); dumps core with a WSDL file 
given by a .NET server.

Core is not dumped on all wsdl's, it appears to not handle something in
this particular file.

# ./configure  --enable-versioning --enable-memory-limit --with-layout=GNU
--with-config-file-scan-dir=/usr/local/etc/php --disable-all
--enable-libxml --with-libxml-dir=/usr/local --enable-spl --with-openssl
--with-curl --with-regex=php --with-apxs=/usr/local/sbin/apxs
--enable-debug --disable-ipv6 --prefix=/usr/local i386-portbld-freebsd4.10
--enable-soap


Reproduce code:
---
?php

 $wsdl_url = './x';

$wsdl = '';
$wsdl_file = fopen($wsdl_url, r);

while (!feof($wsdl_file)) {
$wsdl .= fread($wsdl_file, 4096);
}
fclose ($wsdl_file);

$client = new SoapClient($wsdl);

print (Created new soap client:\n);

?

wsdl, phpinfo, and sample code available at
http://search.sparks.net/php-wsdl-bug/

Expected result:

I expected to have a SOAP object created

Actual result:
--
Segmentation fault (core dumped)

new:php$ which php
/usr/local/bin/php
new:php$ gdb /usr/local/bin/php php.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-unknown-freebsd...Deprecated bfd_read
called at /usr/src
nu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in
elfstab_build_p
mtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gd
dbxread.c line 933 in fill_symbuf
 
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/local/lib/libcurl.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Reading symbols from /usr/local/lib/libssl.so.3...done.
Reading symbols from /usr/local/lib/libcrypto.so.3...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libssl.so.3...done.
Reading symbols from /usr/lib/libcrypto.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x20202020 in ?? ()
(gdb) bt
#0  0x20202020 in ?? ()
Cannot access memory at address 0x20202020.
(gdb) new:php$
new:php$ 


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


#30183 [NEW]: Error building php with jpeg support

2004-09-21 Thread info at lab37 dot com
From: info at lab37 dot com
Operating system: Linux Slackware
PHP version:  4.3.8
PHP Bug Type: GD related
Bug description:  Error building php with jpeg support

Description:

I configure php with no errors, then when it builds i'm getting errors
shown at Actual result.
I have latest GD library (2.028) with enabled jpeg support.

Path to jpeg library in --with-jpeg-dir php configure parameter is also
correct.

p.s. Also i installed php 5.01 today and everything there were all right.

Actual result:
--
ext/gd/libgd/gd_jpeg.lo(.text+0x33): In function `fatal_jpeg_error':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:61: undefined reference to
`jpeg_destroy'
ext/gd/libgd/gd_jpeg.lo(.text+0x15f): In function `gdImageJpegCtx':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:117: undefined reference to
`jpeg_std_error'
ext/gd/libgd/gd_jpeg.lo(.text+0x1c8):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:129:
undefined reference to `jpeg_CreateCompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x1f9):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:135:
undefined reference to `jpeg_set_defaults'
ext/gd/libgd/gd_jpeg.lo(.text+0x210):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:137:
undefined reference to `jpeg_set_quality'
ext/gd/libgd/gd_jpeg.lo(.text+0x286):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:151:
undefined reference to `jpeg_start_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x311):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:158:
undefined reference to `jpeg_write_marker'
ext/gd/libgd/gd_jpeg.lo(.text+0x3aa):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:175:
undefined reference to `jpeg_write_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x3ec):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:209:
undefined reference to `jpeg_finish_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x3f4):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:210:
undefined reference to `jpeg_destroy_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x494):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:202:
undefined reference to `jpeg_write_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x4ec):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:142:
undefined reference to `jpeg_simple_progression'
ext/gd/libgd/gd_jpeg.lo(.text+0x5e3): In function
`gdImageCreateFromJpegCtx':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:260: undefined reference to
`jpeg_std_error'
ext/gd/libgd/gd_jpeg.lo(.text+0x62a):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:275:
undefined reference to `jpeg_CreateDecompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x649):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:280:
undefined reference to `jpeg_save_markers'
ext/gd/libgd/gd_jpeg.lo(.text+0x653):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:282:
undefined reference to `jpeg_read_header'
ext/gd/libgd/gd_jpeg.lo(.text+0x6db):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:310:
undefined reference to `jpeg_start_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x7ee):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:390:
undefined reference to `jpeg_finish_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x822):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:405:
undefined reference to `jpeg_destroy_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x874):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:399:
undefined reference to `jpeg_destroy_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x8bd):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:379:
undefined reference to `jpeg_read_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x98e):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:366:
undefined reference to `jpeg_read_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0xd2c): In function `jpeg_gdIOCtx_src':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:644: undefined reference to
`jpeg_resync_to_restart'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


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

#30183 [Opn]: Error building php with jpeg support

2004-09-21 Thread info at lab37 dot com
 ID:   30183
 User updated by:  info at lab37 dot com
 Reported By:  info at lab37 dot com
 Status:   Open
 Bug Type: GD related
-Operating System: Linux Slackware
+Operating System: Linux Slackware 10.0
 PHP Version:  4.3.8
 New Comment:

slackware version added


Previous Comments:


[2004-09-21 17:45:04] info at lab37 dot com

Description:

I configure php with no errors, then when it builds i'm getting errors
shown at Actual result.
I have latest GD library (2.028) with enabled jpeg support.

Path to jpeg library in --with-jpeg-dir php configure parameter is also
correct.

p.s. Also i installed php 5.01 today and everything there were all
right.

Actual result:
--
ext/gd/libgd/gd_jpeg.lo(.text+0x33): In function `fatal_jpeg_error':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:61: undefined reference to
`jpeg_destroy'
ext/gd/libgd/gd_jpeg.lo(.text+0x15f): In function `gdImageJpegCtx':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:117: undefined reference to
`jpeg_std_error'
ext/gd/libgd/gd_jpeg.lo(.text+0x1c8):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:129:
undefined reference to `jpeg_CreateCompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x1f9):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:135:
undefined reference to `jpeg_set_defaults'
ext/gd/libgd/gd_jpeg.lo(.text+0x210):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:137:
undefined reference to `jpeg_set_quality'
ext/gd/libgd/gd_jpeg.lo(.text+0x286):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:151:
undefined reference to `jpeg_start_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x311):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:158:
undefined reference to `jpeg_write_marker'
ext/gd/libgd/gd_jpeg.lo(.text+0x3aa):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:175:
undefined reference to `jpeg_write_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x3ec):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:209:
undefined reference to `jpeg_finish_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x3f4):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:210:
undefined reference to `jpeg_destroy_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x494):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:202:
undefined reference to `jpeg_write_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x4ec):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:142:
undefined reference to `jpeg_simple_progression'
ext/gd/libgd/gd_jpeg.lo(.text+0x5e3): In function
`gdImageCreateFromJpegCtx':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:260: undefined reference to
`jpeg_std_error'
ext/gd/libgd/gd_jpeg.lo(.text+0x62a):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:275:
undefined reference to `jpeg_CreateDecompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x649):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:280:
undefined reference to `jpeg_save_markers'
ext/gd/libgd/gd_jpeg.lo(.text+0x653):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:282:
undefined reference to `jpeg_read_header'
ext/gd/libgd/gd_jpeg.lo(.text+0x6db):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:310:
undefined reference to `jpeg_start_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x7ee):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:390:
undefined reference to `jpeg_finish_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x822):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:405:
undefined reference to `jpeg_destroy_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x874):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:399:
undefined reference to `jpeg_destroy_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x8bd):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:379:
undefined reference to `jpeg_read_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x98e):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:366:
undefined reference to `jpeg_read_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0xd2c): In function `jpeg_gdIOCtx_src':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:644: undefined reference to
`jpeg_resync_to_restart'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1






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


#30181 [Opn-Bgs]: domxml functions missing

2004-09-21 Thread chregu
 ID:   30181
 Updated by:   [EMAIL PROTECTED]
 Reported By:  abramov at fromru dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Configuration Issues
 Operating System: Linux
 PHP Version:  5.0.1
 New Comment:

Not a bug. 
Please check ./configure --help
the domxml extension isn't anymore, it's dom now



Previous Comments:


[2004-09-21 16:47:17] abramov at fromru dot com

Description:

I tried to compile php 5.0.1 with domxml support. Compilation was
successful, but domxml - functions are missing! The only dom function
is dom_import_simplexml:

[php-5.0.1]# sapi/cli/php |egrep -i '(xml|dom)'
?
phpinfo();
print_r(get_defined_functions());
?

Configure Command =  './configure' '--with-dom=/usr/local'
'--with-dom-xslt'
xmlrpc_error_number = 0 = 0
xmlrpc_errors = Off = Off
dom
DOM/XML = enabled
DOM/XML API Version = 20031129
libxml Version = 2.6.11
libxml
libXML support = active
libXML Version = 2.6.11
libXML streams = enabled
session.cookie_domain = no value = no value
SimpleXML
Simplexml support = enabled
Classes = ArrayObject, ArrayIterator, CachingIterator,
CachingRecursiveIterator, DirectoryIterator, FilterIterator,
LimitIterator, ParentIterator, RecursiveDirectoryIterator,
RecursiveIteratorIterator, SimpleXMLIterator
xml
XML Support = active
XML Namespace Support = active
libxml2 Version = 2.6.11
OLDPWD = /usr/src/libxml2-2.6.11
_SERVER[OLDPWD] = /usr/src/libxml2-2.6.11
_ENV[OLDPWD] = /usr/src/libxml2-2.6.11
[43] = xml_parser_create
[44] = xml_parser_create_ns
[45] = xml_set_object
[46] = xml_set_element_handler
[47] = xml_set_character_data_handler
[48] = xml_set_processing_instruction_handler
[49] = xml_set_default_handler
[50] = xml_set_unparsed_entity_decl_handler
[51] = xml_set_notation_decl_handler
[52] = xml_set_external_entity_ref_handler
[53] = xml_set_start_namespace_decl_handler
[54] = xml_set_end_namespace_decl_handler
[55] = xml_parse
[56] = xml_parse_into_struct
[57] = xml_get_error_code
[58] = xml_error_string
[59] = xml_get_current_line_number
[60] = xml_get_current_column_number
[61] = xml_get_current_byte_index
[62] = xml_parser_free
[63] = xml_parser_set_option
[64] = xml_parser_get_option
[611] = simplexml_load_file
[612] = simplexml_load_string
[613] = simplexml_import_dom
[685] = dom_import_simplexml
[697] = libxml_set_streams_context








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


#30184 [NEW]: run-tests error_reporting / ~E_STRICT ignored in phpt files

2004-09-21 Thread danielc at analysisandsolutions dot com
From: danielc at analysisandsolutions dot com
Operating system: Win 2000
PHP version:  5CVS-2004-09-21 (dev)
PHP Bug Type: Unknown/Other Function
Bug description:  run-tests error_reporting / ~E_STRICT ignored in phpt files

Description:

Using:
* PHP 5.0.2RC1 (cli) (built: Sep 21 2004 10:29:26)
* run-tests.php version 1.195.2.1 or HEAD

When error_reporting is set to E_ALL in a .phpt file, E_STRICT warnings
still come up for code in the .phpt file.  The notice isn't generated for
code in included files.

Reproduce code:
---
NOTE: two files...

=== s.phpt =
--TEST--
error_reporting ignored for code in phpt
--SKIPIF--
--FILE--
?php

/*
 * error_reporting(E_ALL) is ignored for the code
 * in this file but not the included file.
 */
error_reporting(E_ALL);

include './s.inc';

class phpt {
var $phpt_var;
}

?
--EXPECT--


=== s.inc =
?php

class inc {
var $inc_var;
}


Expected result:

Test to pass.

Actual result:
--
If error_reporting(E_ALL)
-
Strict Standards: var: Deprecated. Please use the public/private/protected
modifiers in s.php on line 12


If error_reporting(E_ALL) commented out
---
Strict Standards: var: Deprecated. Please use the public/private/protected
modifiers in s.php on line 12

Strict Standards: var: Deprecated. Please use the public/private/protected
modifiers in s.inc on line 4


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


#30186 [NEW]: passing empty string to xml_parser_create causes 100% CPU utilization

2004-09-21 Thread johnkarl at nbnet dot nb dot ca
From: johnkarl at nbnet dot nb dot ca
Operating system: Windows 2000 Professional SP4
PHP version:  5.0.1
PHP Bug Type: XML related
Bug description:  passing empty string to xml_parser_create causes 100% CPU utilization

Description:

In PHP5, if xml_parser_create is called with an empty string as the
character encoding parameter, a server will utilize 100% of the CPU.
Restarting Apache will sometimes cause the system to revert to normal, but
usually a reboot is needed.

In PHP4, calling xml_parser_create() will cause Expat to autodetect the
character encoding. In the user comments of www.php.net, this is
purportedly true of PHP5 as well; however this is not the case.

This problem has been reproduced on a number of other machines as well.
I'm not sure if the same happens with IIS.

Reproduce code:
---
$parser = xml_parser_create();

Expected result:

a reference to the parser should be returned

Actual result:
--
Apache stalls, 100% CPU usage

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


#29110 [Csd-Bgs]: ftp_rawlist problem 'php_connect_nonb() failed: Connection refused'

2004-09-21 Thread pollita
 ID:   29110
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fcurra at tecnonexo dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: FTP related
 Operating System: Linux 2.4.25
 PHP Version:  4.3.7
 New Comment:

Not Bug = Bogus


Previous Comments:


[2004-09-21 14:27:26] fcurra at tecnonexo dot com

I finally found the solution of my problem. It wasn't a PHP Bug, but a
firewall miss configuration. I enabled 'accept connection' rule on high
ports (1024 to 65535) for that server, and that worked out. 

More about in : http://shorewall.net/FTP.html



[2004-07-12 20:17:23] fcurra at tecnonexo dot com

I'm not sure if IPv6 is involved. I don't see any reference in
phpinfo(), and PHP is not compiled with '--disable-ipv6'. By the way,
i'm passing an IP address.

Thanks



[2004-07-12 20:10:44] fcurra at tecnonexo dot com

result of var_dump(ftp_pasv($conn_id, true));
is bool(true)



[2004-07-12 19:16:54] [EMAIL PROTECTED]

Oh, and is there any IPv6 involved here?  (Take a look at phpinfo() to
see if it says IPv6 enabled)  Does the remote server support IPv6?  Are
you passing a hostname or an IP address?

If both ends are IPv6 capable, try connecting with an IPv4 address
(1.2.3.4 as opposed to ftp.foo.com) to see if it behaves properly.  



[2004-07-12 19:08:23] [EMAIL PROTECTED]

What is the return value of ftp_pasv()?

  var_dump(ftp_pasv($conn_id, true));



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

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


#30027 [Com]: segmentation fault in ftp_get/memchr()

2004-09-21 Thread cfield at affinitysolutions dot com
 ID:   30027
 Comment by:   cfield at affinitysolutions dot com
 Reported By:  sbrown at truckstuffusa dot com
 Status:   Open
 Bug Type: FTP related
 Operating System: Redhat 9
 PHP Version:  4.3.8
 New Comment:

I have the same problem on an SMP redhat 9 system, i can get it to stop
the segmentation faults by adding ((e-ptr)0)  to the while loop
condition on line 732 of ftp.c, however now i am getting sporadic extra
newlines (always in the same places in the file,see below for line
numbers etc. ) however, if i slowly step through the interaction it
does not put the extra new line in

line number written bytes   total bytes
504 126475  126475
689 46333   172808
2589474698  647506
3088105999  753505
3766145320  898825
5005304503  1203328
516340804   1244132
522112232   1256364
558791208   1347572
7454424119  1771691
779080126   1851817
10501   686879  2538696
10680   42243   2580939
12103   361663  2942602
13382   311479  3254081
13921   137267  3391348
16803   724748  4116096
18468   414953  4531049
18654   43412   4574461
18934   63798   4638259
18988   13696   4651955
20429   349357  5001312
21981   390490  5391802
25524   906947  6298749
27445   448641  6747390
29239   497920  7245310
30083   220342  7465652
30274   46327   7511979
31340   270732  7782711
32882   353352  8136063
33421   123803  8259866
34365   224338  8484204
36254   449849  8934053


Previous Comments:


[2004-09-17 16:25:50] sbrown at truckstuffusa dot com

Downloaded CVS last night, still get the seg fault:

# php --version
PHP 4.3.9RC4-dev (cgi) (built: Sep 17 2004 09:19:39) (DEBUG)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

# gdb php
(gdb) run script-backup
Starting program: /usr/local/bin/php script-backup
...
 
Program received signal SIGSEGV, Segmentation fault.
0x4207bb01 in memchr () from /lib/tls/libc.so.6
(gdb) bt
#0  0x4207bb01 in memchr () from /lib/tls/libc.so.6
#1  0x0805eaa8 in ftp_get (ftp=0x81828ac, outstream=0x81a6afc,
path=0x81a6604 /x-stuff/php/dashboard_projectmgmt.php,
type=FTPTYPE_ASCII, resumepos=0)
at /usr/local/src/php-src/ext/ftp/ftp.c:730
#2  0x0805c141 in zif_ftp_get (ht=4, return_value=0x81a6184,
this_ptr=0x0, return_value_used=1) at
/usr/local/src/php-src/ext/ftp/php_ftp.c:637
#3  0x0811cb8f in execute (op_array=0x81885b8) at
/usr/local/src/php-src/Zend/zend_execute.c:1640
#4  0x0811cdbb in execute (op_array=0x8189310) at
/usr/local/src/php-src/Zend/zend_execute.c:1684
#5  0x0811cdbb in execute (op_array=0x81827d4) at
/usr/local/src/php-src/Zend/zend_execute.c:1684
#6  0x0810ac19 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/local/src/php-src/Zend/zend.c:891
#7  0x080d6795 in php_execute_script (primary_file=0xb0e0) at
/usr/local/src/php-src/main/main.c:1735
#8  0x081238cc in main (argc=2, argv=0xb184) at
/usr/local/src/php-src/sapi/cgi/cgi_main.c:1592
(gdb) up
#1  0x0805eaa8 in ftp_get (ftp=0x81828ac, outstream=0x81a6afc,
path=0x81a6604 /x-stuff/php/dashboard_projectmgmt.php,
type=FTPTYPE_ASCII, resumepos=0)
at /usr/local/src/php-src/ext/ftp/ftp.c:730
730 while ((s = memchr(ptr, '\r', (e -
ptr {
(gdb) p s
$1 = 0x81a6e57 \n var contacts_win = 
(gdb) p ptr
$2 = 0x81a6e58  var contacts_win = 
(gdb) p e
$3 = 0x81a6c4a \ntcus();\r\n}\r\n--\r\n/script\r\n?\r\nif
(isset($_GET['publisher']))\r\n   echo 'form name=\frm_deleteprj\
action=\'.$_SERVER['PHP_SELF'].'?publisher='.$publisher.'\
method=POST';\r\n elseif (isset($_GET['s...
(gdb)



[2004-09-16 10:48:10] [EMAIL PROTECTED]

Get the latest stable CVS snapshot of PHP 4 and configure it with this
line:

# ./configure --disable-all --enable-ftp --enable-debug

Run your script in command line instead and try to generate the gdb
backtrace with it.




[2004-09-08 18:11:30] sbrown at truckstuffusa dot com

And just in case, here's the bt:

(gdb) bt
#0  0x4207bae0 in memchr () from /lib/tls/libc.so.6
#1  0x0807ebb0 in ftp_get (ftp=0x8366c4c, outstream=0x83a0fdc,
path=0x83991cc /x-stuff/mir_libraries/lib-htmlMimeMail.php,
type=FTPTYPE_ASCII, resumepos=0)
at /usr/local/src/php-4.3.8/ext/ftp/ftp.c:730
#2  0x0807bf69 in zif_ftp_get (ht=4, return_value=0x83a0f9c,
this_ptr=0x0, return_value_used=1) at
/usr/local/src/php-4.3.8/ext/ftp/php_ftp.c:637
#3  0x081ecfb0 in execute (op_array=0x836c920) at
/usr/local/src/php-4.3.8/Zend/zend_execute.c:1635
#4  0x081ed22b in execute (op_array=0x836d648) at
/usr/local/src/php-4.3.8/Zend/zend_execute.c:1679
#5  0x081ed22b in execute (op_array=0x8366b74) at
/usr/local/src/php-4.3.8/Zend/zend_execute.c:1679
#6  0x081d9783 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at 

#30184 [Opn]: run-tests error_reporting / ~E_STRICT ignored in phpt files

2004-09-21 Thread danielc at analysisandsolutions dot com
 ID:   30184
 User updated by:  danielc at analysisandsolutions dot com
 Reported By:  danielc at analysisandsolutions dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Win 2000
 PHP Version:  5CVS-2004-09-21 (dev)
 New Comment:

Something else to take into consideration is run-tests.php is
overriding the error_reporting settings from php.ini.  This is causing
tests to fail even though the same tests worked fine under development
versions of PHP 5.

Here's a new set of test scripts...

=== s.phpt 
--TEST--
error_reporting ignored for code in phpt
--SKIPIF--
--FILE--
?php

echo 'Default error_reporting in s.phpt: ' . error_reporting() . \n;

/*
 * RESULT:
 *   Strict Standards: var: Deprecated. Please use the
 *   public/private/protected modifiers in s.php on line 28
 *   Default error_reporting in s.phpt: 4095
 *   The error_reporting in s.inc: 2047
 *   Subsequent error_reporting in s.phpt: 2047
 *
 * RESULT if error_reporting(E_ALL) is commented out:
 *   Strict Standards: var: Deprecated. Please use the
 *   public/private/protected modifiers in s.php on line 28
 *   Default error_reporting in s.phpt: 4095
 *   Strict Standards: var: Deprecated. Please use the
 *   public/private/protected modifiers in s.inc on line 6
 *   The error_reporting in s.inc: 4095
 *   Subsequent error_reporting in s.phpt: 4095
 */
error_reporting(E_ALL);

include './s.inc';

class phpt {
var $phpt_var;
}

echo 'Subsequent error_reporting in s.phpt: ' . error_reporting() .
\n;

?
--EXPECT--
Default error_reporting in s.phpt: 2047
The error_reporting in s.inc: 2047
Subsequent error_reporting in s.phpt: 2047



=== s.inc 
?php

echo 'The error_reporting in s.inc: ' . error_reporting() . \n;

class inc {
var $inc_var;
}


Previous Comments:


[2004-09-21 19:39:19] danielc at analysisandsolutions dot com

Description:

Using:
* PHP 5.0.2RC1 (cli) (built: Sep 21 2004 10:29:26)
* run-tests.php version 1.195.2.1 or HEAD

When error_reporting is set to E_ALL in a .phpt file, E_STRICT warnings
still come up for code in the .phpt file.  The notice isn't generated
for code in included files.

Reproduce code:
---
NOTE: two files...

=== s.phpt =
--TEST--
error_reporting ignored for code in phpt
--SKIPIF--
--FILE--
?php

/*
 * error_reporting(E_ALL) is ignored for the code
 * in this file but not the included file.
 */
error_reporting(E_ALL);

include './s.inc';

class phpt {
var $phpt_var;
}

?
--EXPECT--


=== s.inc =
?php

class inc {
var $inc_var;
}


Expected result:

Test to pass.

Actual result:
--
If error_reporting(E_ALL)
-
Strict Standards: var: Deprecated. Please use the
public/private/protected modifiers in s.php on line 12


If error_reporting(E_ALL) commented out
---
Strict Standards: var: Deprecated. Please use the
public/private/protected modifiers in s.php on line 12

Strict Standards: var: Deprecated. Please use the
public/private/protected modifiers in s.inc on line 4






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


#29074 [Com]: mssql_connect fails under heavy load

2004-09-21 Thread phpbugreport at workboy dot com
 ID:   29074
 Comment by:   phpbugreport at workboy dot com
 Reported By:  david dot blair at nsi1 dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: MS 2003
 PHP Version:  4.3.7
 New Comment:

This bug should probably be closed.  The problem is on the MSSQL end
and ban be resolved by changing the value of the winsocklistenbacklog
registry entry.  For those who are experiencing this problem, please
see http://support.microsoft.com/default.aspx?kbid=328476

I don't know why this also affects mssql_select_db, but they do appear
to go together.


Previous Comments:


[2004-09-13 00:42:39] phpbugreport at workboy dot com

Upgrading seems to make things worse.  I upgraded to freetds-0.62.4,
php-4.3.9RC2 (4.3.8 has a compile issue with freetds-0.62.4 according
to bug reports), and apache 1.3.31.

Now in addition to mssql_connect failures I also get mssql_select_db
failures for one of our busier databases.

Could it be that php/freetds is getting too fast and giving up before a
response is received from SQL 2000?

Charles Bennigton
Oddcast, Inc.



[2004-09-11 22:13:08] phpbugreport at workboy dot com

We are currently running apache_1.3.28, freetds-0.61.2 and php-4.3.3 on
linux 2.4.x kernels and experiencing the same problem connecting to a
SQL 2000E SP3 database.  Modifying our PHP db connection classes to
immediately try mssql_connect again when it fails produces the desired
results most of the time.  However not always.

I will be upgrading to the latest and greatest in the current major
version for all of the components on the Linux side and testing more. 
I will post a follow up then.

Charles Bennington
Oddcast, Inc.



[2004-08-31 16:13:34] david dot blair at nsi1 dot com

I've never had Apache hang before but I'm also not running through
TDS.

I just tried upgrading the production server to 5.0.1 last night. I've
been running 5.0.0 on the development server and 5.0.1 on my laptop for
two weeks/one week with no problems.

The database connection failed 6 times last night after we brought
everything back up. After 2 more failures this morning I rolled
everything back. 

Oh hell, I just remembered I left php_mssql.dll from the 5.0.1 build in
the windows directory...I think I'm going to leave it in there and see
what happens...two of us have tested the system with no crashes so
far...

More info as it comes in...



[2004-08-27 01:43:36] jochen dot daum at cabletalk dot co dot nz

Hi,

I have the same experience with mssql_select_db. I use PHP 4.3.2 as a
module with FreeTDS. The mssql extension is patched though with a
datetime extension that reads the milliseconds as well (as mentioned in
some early bugs)

The problem does not seem to occur with heavy load, but after a certain
amount of mssql_select_db. According to the documentation:

In case a second call is made to mssql_connect() with the same
arguments, no new link will be established, but instead, the link
identifier of the already opened link will be returned.
(mssql_connect) and Every subsequent call to mssql_query() will be
made on the active database. (mssql_select_db)

I have modified my database access layer to call mssql_select_db()
before each mssql_query().

After a number of mssql_select_db, I get an instant failure. Retrying
helps for some more queries, but then the process hangs with Apache
running at 100%.

HTH, Jochen



[2004-07-26 16:14:25] david dot blair at nsi1 dot com

I should probably note that fmk and I have exchanged 2 emails outside
of this bug report (just so it's part of this paper trail). 

He brought me up to speed on the thread safety issues of the dblib
library.

This next part can be taken with a grain of salt. I'm not sure if it's
a seperate issue or something that will help fmk in debugging...I
upgraded our development server to PHP 5. It's still showing the
intermittent problems of the failed connection, but it's not happening
at mssql_connect. It happens at mssql_select_db. The error that's
returned is:

Warning: mssql_select_db() [function.mssql-select-db]: Unable to select
database: blah blah blah...

I dunno fmk if you made a fix in the 5 version that's not present in
the 4.3.7 version? Wondering if you created some magic code that fixes
the mssql_connect issue that needs to be applied to the other mssql
functions...

DB



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

-- 
Edit this bug report at 

#30159 [Opn-Bgs]: format_string does not use LC_NUMERIC

2004-09-21 Thread derick
 ID:   30159
 Updated by:   [EMAIL PROTECTED]
 Reported By:  richard at hirner dot at
-Status:   Open
+Status:   Bogus
 Bug Type: *Languages/Translation
 Operating System: FreeBSD 5.2.1
 PHP Version:  4.3.7
 New Comment:

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

Check the return value of setlocale(), I bet it's false because you
simply don't have the de locale.


Previous Comments:


[2004-09-19 22:53:45] richard at hirner dot at

Description:

One may expect number_format to behave localised and to use
mon_thousands_sep and mon_decimal_point from localeconv().

See bug 12647, but not only for decimal points but also for thousands
seperators.

Reproduce code:
---
setlocale(LC_ALL, de);
print number_format(10);

Expected result:

100.000

Actual result:
--
100,000





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


#30188 [NEW]: open_basedir check is badly performed under some circumstances

2004-09-21 Thread lists+php at box dot cz
From: lists+php at box dot cz
Operating system: Linux (Gentoo, latest)
PHP version:  5.0.1
PHP Bug Type: Filesystem function related
Bug description:  open_basedir check is badly performed under some circumstances

Description:

My setup:
document root is: /home/wejn/x/docs/html/.

While /home/wejn/x/docs/html/ is symlink to:
/home/wejn/x/docs1/html/.

I have safe_mode enabled and open_basedir set to
/home/wejn/x/docs/html:/home/wejn/x/docs1/html.

With this setup I'm unable to perform:

copy(/home/wejn/x/docs/html/x, /home/wejn/x/docs/html/y);

when y doesn't exist. If I touch y prior running the
script, everything runs just fine.

IMO, there is problem with symlink resolving code somewhere under 
php_check_specific_open_basedir().

It seems to me that more precise location of the bug is somewhere in
virtual_file_ex() regarding the realpath() call.

Maybe it would be better to perform open_basedir check just on dirs
instead of files (in various filesystem functions)?

Btw, this problem exists also in 4.3.8, which makes me think that it's
there for a LONG time ... unnoticed.

W.

Reproduce code:
---
// when all conditions described above are met, this fails:
copy('/home/wejn/x/docs/html/x', '/home/wejn/x/docs/html/y');

Expected result:

no error.

Actual result:
--
Warning: copy() [function.copy]: open_basedir restriction in effect.
File(/home/wejn/x/docs/html/y) is not within the allowed path(s):
(/home/wejn/x/docs/html:/home/wejn/x/docs1/html) in
/home/wejn/x/docs1/html/index.html on line 2

Warning: copy(/home/wejn/x/docs/html/y) [function.copy]: failed to open
stream: Operation not permitted in /home/wejn/x/docs1/html/index.html on
line 2

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


#30167 [Fbk-Bgs]: session variables are lost

2004-09-21 Thread derick
 ID:   30167
 Updated by:   [EMAIL PROTECTED]
 Reported By:  motion_4u at hotmail dot com
-Status:   Feedback
+Status:   Bogus
 Bug Type: Session related
 Operating System: win2k advanced server
 PHP Version:  5.0.1
 New Comment:

bogus != feedback


Previous Comments:


[2004-09-20 15:42:24] [EMAIL PROTECTED]

SUB.PHP has no session_start() call in it.  Without a session_start()
call $_SESSION cannot possibly be populated so your code is bogus.



[2004-09-20 14:32:39] motion_4u at hotmail dot com

You can test these pages directly on my server too:

http://motion4u.sytes.net/phptest/index.php



[2004-09-20 13:22:53] motion_4u at hotmail dot com

Description:

Below, you will find the code for 2 pages.

One registers a session and the other one should read it.

You can test it with or without session_start(); function but you will
get the same result.

Any call to session_start() produces a new session loosing the old
one.
This bug is an old one that was once solved on version 4.3.4 I believe,
but please donÂ’t take me by words.

You are fighting with this function more that one and half years with
no results.
I hope that you forgive me for the above comments.
 By my opinion the function session_start(); should not create a new
session automatically and the user should create one by using a new
function presumably called create_session(); 
That would solve lots of problems with sessions.

Best Regards 
Sam


Reproduce code:
---
PAGE 1--- save as INDEX.PHP
html
headtitlephp 5.0.1 bug/title/head
body bgcolor=#FF
?
session_start();
$_SESSION['var']=1;
session_write_close();
echo The session variable ist set to . $_SESSION['var'] ./br;
?
pa href=sub.php target=_blankTest the session function by
calling the sub.php file, which reads  the session variable
quot;varquot; with the value of 1:/a
?// PHP 5.0.1 doesn't find sessions!?

/body
/html

PAGE 2 save as SUB.PHP
?
if (isset($_SESSION['var'])$_SESSION['var']==1)
{
$text=You have opened the sub.php file, receiving a session variable
'var', which shuld carry the value of 1 and it works!
_SESSION['var']=. $_SESSION['var'];
}else
{
$text=You have opened the sub.php file, receiving a session variable
'var', which shuld carry the value of 1 but _SESSION['var']=.
$_SESSION['var'];

}
echo $text;
?


Expected result:

Just call the index.php and find out








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


#30115 [Opn-WFx]: The wrong link is shown for __destruct() when using phpmanual

2004-09-21 Thread derick
 ID:   30115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  richard dot quadling at bandvulc dot co dot uk
-Status:   Open
+Status:   Wont fix
 Bug Type: Unknown/Other Function
 Operating System: n/a
 PHP Version:  all
 New Comment:

Perhaps the PHP developers can also fix the code for the people? If
destruct is generated as link, then the doc system should handle it.


Previous Comments:


[2004-09-20 22:32:47] [EMAIL PROTECTED]

Special methods need special handling. I guess PHP developers would not
like the docs to have the __destruct() function(!) documented with a
dumb page, so the error reporting code should be able to detect if it
is about a special OO function, and should direct to the right doc page
IMHO.



[2004-09-20 18:50:25] [EMAIL PROTECTED]

The problem is that we don't have a function ID for the __destruct()
method (and won't have this).
PHP will generate valid links for almost every function, but it won't
work for OOP methods, as they are documented in a different place
(language reference chapter).

As PHP can't imagine where every single function is documented, this
won't be fixed (any other php member speak if is against!).



[2004-09-20 09:10:21] richard dot quadling at bandvulc dot co dot uk

What criteria is used to ID a bug report as bogus?

I said Documentation problem.

You say it IS documented, but not with regards to the phpmanual
facility activated within PHP.INI?

I'm using the latest HTML manuals available (28-8-2004).

There is no page called function.--destuct.html in the archive
available from www.php.net.

I do not see how this is bogus?

Richard Quadling.



[2004-09-18 12:51:09] [EMAIL PROTECTED]

The __destruct() method is documented.



[2004-09-16 15:15:47] richard dot quadling at bandvulc dot co dot uk

Description:

I use the phpmanual facility so that I can get links to the function
that fails, when it fails.

My code failed showing ...

Warning: FormMaint::__destruct() [function.--destruct.html]: message:
Cannot insert duplicate key row in object 'kpi_element_types' with
unique index 'IX_element_types_ElementTypeExecutionSequence'. (severity
14) in C:\WebSites\PHP\Includes\class_FormMaint.inc on line 239

The important bit is [function.--destruct.html] which points to url
...

http://dev.kpi.bandvulc/phpmanual/function.--destruct.html

which doesn't exist.


Reproduce code:
---
Generating the error was VERY hard work (i.e. 1 line in the wrong
place), but is not relevant to the problem. The problem is that there
is no documentation for function.--desctruct.html








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


#30189 [NEW]: Compile with IBM DB2 don't work

2004-09-21 Thread cseader at idahopower dot com
From: cseader at idahopower dot com
Operating system: SuSE SLES 8 zSeries 64bit
PHP version:  4.3.8
PHP Bug Type: Compile Warning
Bug description:  Compile with IBM DB2 don't work

Description:

I am compileing PHP with IBM DB2 support on SuSE SLES 8 zSeries 64bit
platform. 

I am useing the following configure options.
./configure --with-apxs --enable-track-vars
--with-ibm-db2=/opt/IBM/db2/V8.1 --enable-bcmath --with-zlib=yes 

While doing the compile i get some warnings that are spit out and the
compile completes successfully, but ODBC for IBM DB2 does not work
properly, and i think it has to do with these warnings. Here are the
warnings listed below.

In file included from /opt/IBM/db2/V8.1/include/sqlcli1.h:42,
 from
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc_includes.h:176,
 from
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:37:
/opt/IBM/db2/V8.1/include/sqlcli.h:772:1: warning: ODBCVER redefined
In file included from
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:37:
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc_includes.h:28:1:
warning: this is the location of the previous definition
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `safe_odbc_disconnect':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:201:
warning: passing arg 1 of `SQLDisconnect' makes integer from pointer
without a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:204:
warning: passing arg 1 of `SQLTransact' makes integer from pointer without
a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:204:
warning: passing arg 2 of `SQLTransact' makes integer from pointer without
a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:205:
warning: passing arg 1 of `SQLDisconnect' makes integer from pointer
without a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `_close_odbc_conn':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:231:
warning: passing arg 1 of `safe_odbc_disconnect' makes pointer from
integer without a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `_close_odbc_pconn':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:259:
warning: passing arg 1 of `safe_odbc_disconnect' makes pointer from
integer without a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `odbc_bindcols':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:676:
warning: passing arg 6 of `SQLBindCol' from incompatible pointer type
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `zif_odbc_execute':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1042:
warning: cast to pointer from integer of different size
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `zif_odbc_data_source':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1223:
warning: passing arg 2 of `odbc_sql_error' makes integer from pointer
without a cast
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `php_odbc_fetch_hash':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1434:
warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `zif_odbc_fetch_into':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1594:
warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `zif_odbc_result':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1825:
warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1868:
warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `zif_odbc_result_all':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:1972:
warning: passing arg 6 of `SQLGetData' from incompatible pointer type
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c: In
function `odbc_do_connect':
/usr/src/packages/BUILD/php4-STABLE-200409201630/ext/odbc/php_odbc.c:2302:
warning: cast from pointer to integer of different size

Can anyone shed some light on this particular problem im having? Am i
doing something wrong here.
Thanks,
Cameron Seader



-- 
Edit bug report at http://bugs.php.net/?id=30189edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30189r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30189r=trysnapshot50
Try 

#29074 [Opn]: mssql_connect fails under heavy load

2004-09-21 Thread david dot blair at nsi1 dot com
 ID:   29074
 User updated by:  david dot blair at nsi1 dot com
 Reported By:  david dot blair at nsi1 dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: MS 2003
 PHP Version:  4.3.7
 New Comment:

Charles, this doesn't explain why newer versions of PHP cause the error
more frequently than older versions, when everything else about our
systems remains the same. This also doesn't explain why PHP is the only
thing having issues that contacts my SQL server.

I'll try your work-around tomorrow and monitor the server for a few
weeks to see what happens. It's a step in the right direction to
finding a solution if it does help, but I still see it as a
work-around, not a solution.


Previous Comments:


[2004-09-21 23:36:13] phpbugreport at workboy dot com

This bug should probably be closed.  The problem is on the MSSQL end
and ban be resolved by changing the value of the winsocklistenbacklog
registry entry.  For those who are experiencing this problem, please
see http://support.microsoft.com/default.aspx?kbid=328476

I don't know why this also affects mssql_select_db, but they do appear
to go together.



[2004-09-13 00:42:39] phpbugreport at workboy dot com

Upgrading seems to make things worse.  I upgraded to freetds-0.62.4,
php-4.3.9RC2 (4.3.8 has a compile issue with freetds-0.62.4 according
to bug reports), and apache 1.3.31.

Now in addition to mssql_connect failures I also get mssql_select_db
failures for one of our busier databases.

Could it be that php/freetds is getting too fast and giving up before a
response is received from SQL 2000?

Charles Bennigton
Oddcast, Inc.



[2004-09-11 22:13:08] phpbugreport at workboy dot com

We are currently running apache_1.3.28, freetds-0.61.2 and php-4.3.3 on
linux 2.4.x kernels and experiencing the same problem connecting to a
SQL 2000E SP3 database.  Modifying our PHP db connection classes to
immediately try mssql_connect again when it fails produces the desired
results most of the time.  However not always.

I will be upgrading to the latest and greatest in the current major
version for all of the components on the Linux side and testing more. 
I will post a follow up then.

Charles Bennington
Oddcast, Inc.



[2004-08-31 16:13:34] david dot blair at nsi1 dot com

I've never had Apache hang before but I'm also not running through
TDS.

I just tried upgrading the production server to 5.0.1 last night. I've
been running 5.0.0 on the development server and 5.0.1 on my laptop for
two weeks/one week with no problems.

The database connection failed 6 times last night after we brought
everything back up. After 2 more failures this morning I rolled
everything back. 

Oh hell, I just remembered I left php_mssql.dll from the 5.0.1 build in
the windows directory...I think I'm going to leave it in there and see
what happens...two of us have tested the system with no crashes so
far...

More info as it comes in...



[2004-08-27 01:43:36] jochen dot daum at cabletalk dot co dot nz

Hi,

I have the same experience with mssql_select_db. I use PHP 4.3.2 as a
module with FreeTDS. The mssql extension is patched though with a
datetime extension that reads the milliseconds as well (as mentioned in
some early bugs)

The problem does not seem to occur with heavy load, but after a certain
amount of mssql_select_db. According to the documentation:

In case a second call is made to mssql_connect() with the same
arguments, no new link will be established, but instead, the link
identifier of the already opened link will be returned.
(mssql_connect) and Every subsequent call to mssql_query() will be
made on the active database. (mssql_select_db)

I have modified my database access layer to call mssql_select_db()
before each mssql_query().

After a number of mssql_select_db, I get an instant failure. Retrying
helps for some more queries, but then the process hangs with Apache
running at 100%.

HTH, Jochen



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

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


#29568 [Opn-Bgs]: GD causes an segmentation fault

2004-09-21 Thread derick
 ID:   29568
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bram at x-plose dot be
-Status:   Open
+Status:   Bogus
 Bug Type: GD related
 Operating System: debian
 PHP Version:  4.3.8
 New Comment:

Sounds plausible, and not a bug then.


Previous Comments:


[2004-09-21 10:27:19] reg_php at nilsson dot tv

pdflib uses a bundled version of png (old version), which makes php
(using newer png) crash. Either remove --with-pdf when compling PHP, or
compile pdflib with --with-pnglib --with-zlib to make pdflib use the
newer png version.



[2004-08-16 14:00:43] bram at x-plose dot be

i'm using version libpng-1.2.5 
 
How can i fix the problem?



[2004-08-16 08:40:48] [EMAIL PROTECTED]

SOunds like the famous libpng 1.0/libpng 1.2 incompatibility. Which
version are you using?



[2004-08-14 03:56:31] bram at x-plose dot be

I tried the cvs version and when i start the program with 
gdb and run -X this happens when i call a the script:

GNU gdb 6.1-debian
This GDB was configured as i386-linux...Using host libthread_db
library /lib/libthread_db.so.1.

(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread 1024 (LWP 2163)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 2163)]
0x0019 in ?? ()

the bt shows this:

(gdb) bt
#0  0x0019 in ?? ()
#1  0x405a4302 in png_create_struct_2 (type=2, malloc_fn=0x19,
mem_ptr=0x5a5a5a5a) at pngmem.c:351
#2  0x4063c168 in png_create_info_struct () from
/usr/local/lib/libpng.so.3
#3  0x40388faf in gdImageCreateFromPngCtx (infile=0x82814ac)
at
/var/src/webserv/php4-STABLE-200408132230/ext/gd/libgd/gd_png.c:149
#4  0x40388e44 in gdImageCreateFromPng (inFile=0x82819f8)
at
/var/src/webserv/php4-STABLE-200408132230/ext/gd/libgd/gd_png.c:90
#5  0x403706bc in _php_image_create_from (ht=1, return_value=0x8281824,
this_ptr=0x0, return_value_used=1, image_type=2,
tn=0x404e74c7 PNG, func_p=0x40388e10 gdImageCreateFromPng,
ioctx_func_p=0x40388ed0 gdImageCreateFromPngCtx)
at /var/src/webserv/php4-STABLE-200408132230/ext/gd/gd.c:1470
#6  0x4037083d in zif_imagecreatefrompng (ht=1, return_value=0x8281824,
this_ptr=0x0, return_value_used=1)
at /var/src/webserv/php4-STABLE-200408132230/ext/gd/gd.c:1516
#7  0x404d4ab2 in execute (op_array=0x82cea34) at
/var/src/webserv/php4-STABLE-200408132230/Zend/zend_execute.c:1640
#8  0x404c15d4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /var/src/webserv/php4-STABLE-200408132230/Zend/zend.c:891
#9  0x4048578c in php_execute_script (primary_file=0xb79c) at
/var/src/webserv/php4-STABLE-200408132230/main/main.c:1734
#10 0x404db4bc in php_handler (r=0x82e1b70)
at
/var/src/webserv/php4-STABLE-200408132230/sapi/apache2handler/sapi_apache2.c:540
#11 0x080ae589 in ap_run_handler (r=0x82e1b70) at config.c:151
#12 0x080aead3 in ap_invoke_handler (r=0x82e1b70) at config.c:358
#13 0x08096ae6 in ap_process_request (r=0x82e1b70) at
http_request.c:246
#14 0x08092a6a in ap_process_http_connection (c=0x8264510) at
http_core.c:250
#15 0x080b7a98 in ap_run_process_connection (c=0x8264510) at
connection.c:42
#16 0x080b7d5c in ap_process_connection (c=0x8264510, csd=0x8264438) at
connection.c:175
#17 0x080ad210 in child_main (child_num_arg=0) at prefork.c:609
#18 0x080ad2cc in make_child (s=0x81d1500, slot=0) at prefork.c:649
#19 0x080ad3c1 in startup_children (number_to_start=40) at
prefork.c:721
#20 0x080ad6c3 in ap_mpm_run (_pconf=0x8193e90, plog=0x81cbf70,
s=0x81d1500) at prefork.c:940
#21 0x080b2e7e in main (argc=2, argv=0xbb84) at main.c:617



[2004-08-08 22:59:01] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29568

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


#29805 [Fbk]: HTTP Authentication Issues

2004-09-21 Thread thetaphi
 ID:   29805
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Feedback
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 New Comment:

Please try using this CVS snapshot:

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

Snapshots with this patch are available now.


Previous Comments:


[2004-09-15 23:55:58] [EMAIL PROTECTED]

Sorry, you cannot take the PHP4 latest stable snapshot now, because it
is frozen (release of 4.3.9) and this bug is not critical. After
release of 4.3.9 this is fixed in CVS.



[2004-09-15 23:33:11] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For newer servers (SunONE 6.0) leave out the php4_auth_trans directive
in *.obj.conf, it works without!



[2004-09-14 03:59:41] michaelw at webcentral dot com dot au

Hi,

Just wondering if you've found time to look at this ?

Regards,
Michael Ward.



[2004-08-30 01:19:31] michaelw at webcentral dot com dot au

Any progress with this ?



[2004-08-25 11:10:22] michaelw at webcentral dot com dot au

Currently, it is the ONLY AuthTrans directive.



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

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


#30179 [Opn-Bgs]: unset deletes array entries and its copied entries

2004-09-21 Thread derick
 ID:   30179
 Updated by:   [EMAIL PROTECTED]
 Reported By:  oliver at teqneers dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Suse 9.0
 PHP Version:  4.3.8
 New Comment:

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.


Previous Comments:


[2004-09-21 15:50:47] oliver at teqneers dot de

Description:

When I copy an array with a normal = the copy is not a real copy, but
a reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---
$arr= array( 'in' = array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)



Actual result:
--
Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[2] = 3
)

)







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


#30182 [Opn-Asn]: SOAP module processing WSDL file dumps core

2004-09-21 Thread derick
 ID:   30182
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmiller at sparks dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: FreeBSD 4.10
 PHP Version:  5CVS-2004-09-21 (dev)
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2004-09-21 16:48:51] dmiller at sparks dot net

Description:

$client = new SoapClient($wsdl); dumps core with a WSDL file 
given by a .NET server.

Core is not dumped on all wsdl's, it appears to not handle something in
this particular file.

# ./configure  --enable-versioning --enable-memory-limit
--with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php
--disable-all --enable-libxml --with-libxml-dir=/usr/local --enable-spl
--with-openssl --with-curl --with-regex=php
--with-apxs=/usr/local/sbin/apxs --enable-debug --disable-ipv6
--prefix=/usr/local i386-portbld-freebsd4.10 --enable-soap


Reproduce code:
---
?php

 $wsdl_url = './x';

$wsdl = '';
$wsdl_file = fopen($wsdl_url, r);

while (!feof($wsdl_file)) {
$wsdl .= fread($wsdl_file, 4096);
}
fclose ($wsdl_file);

$client = new SoapClient($wsdl);

print (Created new soap client:\n);

?

wsdl, phpinfo, and sample code available at
http://search.sparks.net/php-wsdl-bug/

Expected result:

I expected to have a SOAP object created

Actual result:
--
Segmentation fault (core dumped)

new:php$ which php
/usr/local/bin/php
new:php$ gdb /usr/local/bin/php php.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-unknown-freebsd...Deprecated bfd_read
called at /usr/src
nu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627
in elfstab_build_p
mtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gd
dbxread.c line 933 in fill_symbuf
 
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/local/lib/libcurl.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Reading symbols from /usr/local/lib/libssl.so.3...done.
Reading symbols from /usr/local/lib/libcrypto.so.3...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libssl.so.3...done.
Reading symbols from /usr/lib/libcrypto.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x20202020 in ?? ()
(gdb) bt
#0  0x20202020 in ?? ()
Cannot access memory at address 0x20202020.
(gdb) new:php$
new:php$ 






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


#30180 [Opn-Bgs]: PHP_NORMAL_READ and socket_read() error

2004-09-21 Thread derick
 ID:   30180
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tracid at zappmobile dot ro
-Status:   Open
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  4.3.8
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Dup of #21409


Previous Comments:


[2004-09-21 16:17:49] tracid at zappmobile dot ro

Description:

Hello.

At the socket_read() function if you specify PHP_NORMAL_READ, it
results in an error:
socket_read() failed: reason: Incorrect function.

It was already reported almost a year ago, but no fix since then...

Take care






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


#30183 [Opn-Fbk]: Error building php with jpeg support

2004-09-21 Thread derick
 ID:   30183
 Updated by:   [EMAIL PROTECTED]
 Reported By:  info at lab37 dot com
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Linux Slackware 10.0
 PHP Version:  4.3.8
 New Comment:

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

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

Thank you for your interest in PHP.



Previous Comments:


[2004-09-21 17:50:51] info at lab37 dot com

slackware version added



[2004-09-21 17:45:04] info at lab37 dot com

Description:

I configure php with no errors, then when it builds i'm getting errors
shown at Actual result.
I have latest GD library (2.028) with enabled jpeg support.

Path to jpeg library in --with-jpeg-dir php configure parameter is also
correct.

p.s. Also i installed php 5.01 today and everything there were all
right.

Actual result:
--
ext/gd/libgd/gd_jpeg.lo(.text+0x33): In function `fatal_jpeg_error':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:61: undefined reference to
`jpeg_destroy'
ext/gd/libgd/gd_jpeg.lo(.text+0x15f): In function `gdImageJpegCtx':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:117: undefined reference to
`jpeg_std_error'
ext/gd/libgd/gd_jpeg.lo(.text+0x1c8):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:129:
undefined reference to `jpeg_CreateCompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x1f9):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:135:
undefined reference to `jpeg_set_defaults'
ext/gd/libgd/gd_jpeg.lo(.text+0x210):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:137:
undefined reference to `jpeg_set_quality'
ext/gd/libgd/gd_jpeg.lo(.text+0x286):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:151:
undefined reference to `jpeg_start_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x311):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:158:
undefined reference to `jpeg_write_marker'
ext/gd/libgd/gd_jpeg.lo(.text+0x3aa):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:175:
undefined reference to `jpeg_write_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x3ec):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:209:
undefined reference to `jpeg_finish_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x3f4):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:210:
undefined reference to `jpeg_destroy_compress'
ext/gd/libgd/gd_jpeg.lo(.text+0x494):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:202:
undefined reference to `jpeg_write_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x4ec):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:142:
undefined reference to `jpeg_simple_progression'
ext/gd/libgd/gd_jpeg.lo(.text+0x5e3): In function
`gdImageCreateFromJpegCtx':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:260: undefined reference to
`jpeg_std_error'
ext/gd/libgd/gd_jpeg.lo(.text+0x62a):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:275:
undefined reference to `jpeg_CreateDecompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x649):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:280:
undefined reference to `jpeg_save_markers'
ext/gd/libgd/gd_jpeg.lo(.text+0x653):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:282:
undefined reference to `jpeg_read_header'
ext/gd/libgd/gd_jpeg.lo(.text+0x6db):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:310:
undefined reference to `jpeg_start_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x7ee):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:390:
undefined reference to `jpeg_finish_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x822):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:405:
undefined reference to `jpeg_destroy_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x874):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:399:
undefined reference to `jpeg_destroy_decompress'
ext/gd/libgd/gd_jpeg.lo(.text+0x8bd):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:379:
undefined reference to `jpeg_read_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0x98e):/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:366:
undefined reference to `jpeg_read_scanlines'
ext/gd/libgd/gd_jpeg.lo(.text+0xd2c): In function `jpeg_gdIOCtx_src':
/usr/src/php-4.3.8/ext/gd/libgd/gd_jpeg.c:644: undefined reference to
`jpeg_resync_to_restart'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1






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


#30159 [Bgs]: format_string does not use LC_NUMERIC

2004-09-21 Thread richard at hirner dot at
 ID:   30159
 User updated by:  richard at hirner dot at
 Reported By:  richard at hirner dot at
 Status:   Bogus
 Bug Type: *Languages/Translation
 Operating System: FreeBSD 5.2.1
 PHP Version:  4.3.7
 New Comment:

That's strange because all other locale things I use are working 
return expected results, including localeconv.
I do not know whether number_format SHOULD use locale settings or not,
can you give me a hint?


Previous Comments:


[2004-09-21 23:46:21] [EMAIL PROTECTED]

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

Check the return value of setlocale(), I bet it\'s false because you
simply don\'t have the \de\ locale.



[2004-09-19 22:53:45] richard at hirner dot at

Description:

One may expect number_format to behave localised and to use
mon_thousands_sep and mon_decimal_point from localeconv().

See bug 12647, but not only for decimal points but also for thousands
seperators.

Reproduce code:
---
setlocale(LC_ALL, de);
print number_format(10);

Expected result:

100.000

Actual result:
--
100,000





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


#29707 [Asn]: When execute the global requisition bellow the thread crashes

2004-09-21 Thread andi
 ID:   29707
 Updated by:   [EMAIL PROTECTED]
 Reported By:  edernucci at hotmail dot com
 Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: Windows XP Professional SP1
 PHP Version:  4.* and 5.*
 Assigned To:  andi
 New Comment:

Please check latest version of PHP 5 CVS (Latest CVS (5.1.x-dev) at
snaps.php.net).
Not sure about PHP 4.3.x and PHP 5.0.x yet because we might want to run
this patch for a while before we merge into them.


Previous Comments:


[2004-08-17 08:01:58] [EMAIL PROTECTED]

Confirmed with both PHP 4 and PHP 5:

valgrind:
==12558== Invalid read of size 4
==12558==at 0x8305A91: zend_pzval_unlock_func (zend_execute.c:65)
==12558==by 0x8305B94: _get_zval_ptr (zend_execute.c:100)
==12558==by 0x82FBF85: zend_fetch_var_address (zend_execute.c:737)
==12558==by 0x82FECBF: zend_fetch_w_handler (zend_execute.c:2004)
==12558==  Address 0x9 is not stack'd, malloc'd or (recently) free'd
==12558==
==12558== Process terminating with default action of signal 11
(SIGSEGV)
==12558==  Access not within mapped region at address 0x9
==12558==at 0x8305A91: zend_pzval_unlock_func (zend_execute.c:65)
==12558==by 0x8305B94: _get_zval_ptr (zend_execute.c:100)
==12558==by 0x82FBF85: zend_fetch_var_address (zend_execute.c:737)
==12558==by 0x82FECBF: zend_fetch_w_handler (zend_execute.c:2004)
==12558==

gdb trace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12626)]
0x08305a91 in zend_pzval_unlock_func (z=0x1)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65
65  z-refcount--;
(gdb) bt
#0  0x08305a91 in zend_pzval_unlock_func (z=0x1)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65
#1  0x08305b95 in _get_zval_ptr (node=0x85bec78, Ts=0x85bd704,
should_free=0xbfffd31c) at
/dat/dev/php/php-5.0dev/Zend/zend_execute.c:100
#2  0x082fbf86 in zend_fetch_var_address (opline=0x85bec60,
Ts=0x85bd704,
type=1) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:737
#3  0x082fecc0 in zend_fetch_w_handler (execute_data=0xbfffd380,
opline=0x85bec60, op_array=0x85bede8)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2004
#4  0x082fd8f1 in execute (op_array=0x85bede8)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391
#5  0x408c7318 in xdebug_execute (op_array=0x85bede8)
at /dat/dev/php/xdebug/xdebug.c:1041
#6  0x08301078 in zend_do_fcall_common_helper
(execute_data=0xbfffd4d0,
opline=0x85bd254, op_array=0x85b8de4)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2728
#7  0x083015fb in zend_do_fcall_handler (execute_data=0xbfffd4d0,
opline=0x85bd254, op_array=0x85b8de4)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2828
#8  0x082fd8f1 in execute (op_array=0x85b8de4)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391
#9  0x408c7318 in xdebug_execute (op_array=0x85b8de4)
at /dat/dev/php/xdebug/xdebug.c:1041

(And yes, it also segfaults without Xdebug at the same place)

Derick



[2004-08-16 18:06:15] edernucci at hotmail dot com

Description:

I know this is a erroneous code, but the thread hangs on the server
(Apache 1.3.29 / Windows XP Professional SP1).
I don't know how to solve this.

Reproduce code:
---
?php

/**
 * @return FatalError
 * @desc This function kills the PHP thread on the server.
 */
function boom()
{
$foo = one.simple.dot.tokenized.string;
$bar = strtok($foo,'.');
global $$bar[0]; //--- The script dies here :P
}

boom(); //--- Here you will tell the server to go sleep :D

?

Expected result:

Just trying to hang the webserver.
Any user can do this in my shared enviroment.






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


#29707 [Asn]: When execute the global requisition bellow the thread crashes

2004-09-21 Thread andi
 ID:   29707
 Updated by:   [EMAIL PROTECTED]
 Reported By:  edernucci at hotmail dot com
 Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: Windows XP Professional SP1
 PHP Version:  4.* and 5.*
 Assigned To:  andi
 New Comment:

Please check latest version of PHP 5 CVS (Latest CVS (5.1.x-dev) at
snaps.php.net).
Not sure about PHP 4.3.x and PHP 5.0.x yet because we might want to run
this patch for a while before we merge into them.


Previous Comments:


[2004-09-22 00:21:11] [EMAIL PROTECTED]

Please check latest version of PHP 5 CVS (Latest CVS (5.1.x-dev) at
snaps.php.net).
Not sure about PHP 4.3.x and PHP 5.0.x yet because we might want to run
this patch for a while before we merge into them.



[2004-08-17 08:01:58] [EMAIL PROTECTED]

Confirmed with both PHP 4 and PHP 5:

valgrind:
==12558== Invalid read of size 4
==12558==at 0x8305A91: zend_pzval_unlock_func (zend_execute.c:65)
==12558==by 0x8305B94: _get_zval_ptr (zend_execute.c:100)
==12558==by 0x82FBF85: zend_fetch_var_address (zend_execute.c:737)
==12558==by 0x82FECBF: zend_fetch_w_handler (zend_execute.c:2004)
==12558==  Address 0x9 is not stack'd, malloc'd or (recently) free'd
==12558==
==12558== Process terminating with default action of signal 11
(SIGSEGV)
==12558==  Access not within mapped region at address 0x9
==12558==at 0x8305A91: zend_pzval_unlock_func (zend_execute.c:65)
==12558==by 0x8305B94: _get_zval_ptr (zend_execute.c:100)
==12558==by 0x82FBF85: zend_fetch_var_address (zend_execute.c:737)
==12558==by 0x82FECBF: zend_fetch_w_handler (zend_execute.c:2004)
==12558==

gdb trace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12626)]
0x08305a91 in zend_pzval_unlock_func (z=0x1)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65
65  z-refcount--;
(gdb) bt
#0  0x08305a91 in zend_pzval_unlock_func (z=0x1)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:65
#1  0x08305b95 in _get_zval_ptr (node=0x85bec78, Ts=0x85bd704,
should_free=0xbfffd31c) at
/dat/dev/php/php-5.0dev/Zend/zend_execute.c:100
#2  0x082fbf86 in zend_fetch_var_address (opline=0x85bec60,
Ts=0x85bd704,
type=1) at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:737
#3  0x082fecc0 in zend_fetch_w_handler (execute_data=0xbfffd380,
opline=0x85bec60, op_array=0x85bede8)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2004
#4  0x082fd8f1 in execute (op_array=0x85bede8)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391
#5  0x408c7318 in xdebug_execute (op_array=0x85bede8)
at /dat/dev/php/xdebug/xdebug.c:1041
#6  0x08301078 in zend_do_fcall_common_helper
(execute_data=0xbfffd4d0,
opline=0x85bd254, op_array=0x85b8de4)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2728
#7  0x083015fb in zend_do_fcall_handler (execute_data=0xbfffd4d0,
opline=0x85bd254, op_array=0x85b8de4)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:2828
#8  0x082fd8f1 in execute (op_array=0x85b8de4)
at /dat/dev/php/php-5.0dev/Zend/zend_execute.c:1391
#9  0x408c7318 in xdebug_execute (op_array=0x85b8de4)
at /dat/dev/php/xdebug/xdebug.c:1041

(And yes, it also segfaults without Xdebug at the same place)

Derick



[2004-08-16 18:06:15] edernucci at hotmail dot com

Description:

I know this is a erroneous code, but the thread hangs on the server
(Apache 1.3.29 / Windows XP Professional SP1).
I don't know how to solve this.

Reproduce code:
---
?php

/**
 * @return FatalError
 * @desc This function kills the PHP thread on the server.
 */
function boom()
{
$foo = one.simple.dot.tokenized.string;
$bar = strtok($foo,'.');
global $$bar[0]; //--- The script dies here :P
}

boom(); //--- Here you will tell the server to go sleep :D

?

Expected result:

Just trying to hang the webserver.
Any user can do this in my shared enviroment.






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


#30159 [Bgs]: format_string does not use LC_NUMERIC

2004-09-21 Thread derick
 ID:   30159
 Updated by:   [EMAIL PROTECTED]
 Reported By:  richard at hirner dot at
 Status:   Bogus
 Bug Type: *Languages/Translation
 Operating System: FreeBSD 5.2.1
 PHP Version:  4.3.7
 New Comment:

Actually, it should not use it now that you ask. See the following
example on how to use it:

http://talks.php.net/show/wereldveroverend-phpworks04/23

Derick
(and still not a bug :)


Previous Comments:


[2004-09-22 00:17:11] richard at hirner dot at

That's strange because all other locale things I use are working 
return expected results, including localeconv.
I do not know whether number_format SHOULD use locale settings or not,
can you give me a hint?



[2004-09-21 23:46:21] [EMAIL PROTECTED]

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

Check the return value of setlocale(), I bet it\'s false because you
simply don\'t have the \de\ locale.



[2004-09-19 22:53:45] richard at hirner dot at

Description:

One may expect number_format to behave localised and to use
mon_thousands_sep and mon_decimal_point from localeconv().

See bug 12647, but not only for decimal points but also for thousands
seperators.

Reproduce code:
---
setlocale(LC_ALL, de);
print number_format(10);

Expected result:

100.000

Actual result:
--
100,000





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


#30179 [Bgs]: unset deletes array entries and its copied entries

2004-09-21 Thread oliver at teqneers dot de
 ID:   30179
 User updated by:  oliver at teqneers dot de
 Reported By:  oliver at teqneers dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Suse 9.0
 PHP Version:  4.3.8
 New Comment:

This is definately no BOGUS. If you like i can send you 
screenshots or the output of the phpinfo(). You can ask 
Hartmut Holzgraefe about me. I used to work with him and 
I am programming PHP for years. This is a bug and it 
does happen everytime I execute this tiny script.
I sent in live output data.


Previous Comments:


[2004-09-22 00:04:44] [EMAIL PROTECTED]

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.



[2004-09-21 15:50:47] oliver at teqneers dot de

Description:

When I copy an array with a normal = the copy is not a real copy, but
a reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---
$arr= array( 'in' = array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)



Actual result:
--
Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[2] = 3
)

)







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


#30179 [Bgs]: unset deletes array entries and its copied entries

2004-09-21 Thread derick
 ID:   30179
 Updated by:   [EMAIL PROTECTED]
 Reported By:  oliver at teqneers dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Suse 9.0
 PHP Version:  4.3.8
 New Comment:

It still works fine here, and it works fine with every PHP version that
I have on my system.


Previous Comments:


[2004-09-22 00:30:01] oliver at teqneers dot de

This is definately no BOGUS. If you like i can send you 
screenshots or the output of the phpinfo(). You can ask 
Hartmut Holzgraefe about me. I used to work with him and 
I am programming PHP for years. This is a bug and it 
does happen everytime I execute this tiny script.
I sent in live output data.



[2004-09-22 00:04:44] [EMAIL PROTECTED]

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.



[2004-09-21 15:50:47] oliver at teqneers dot de

Description:

When I copy an array with a normal = the copy is not a real copy, but
a reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---
$arr= array( 'in' = array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)



Actual result:
--
Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[2] = 3
)

)







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


#30179 [Bgs]: unset deletes array entries and its copied entries

2004-09-21 Thread oliver at teqneers dot de
 ID:   30179
 User updated by:  oliver at teqneers dot de
 Reported By:  oliver at teqneers dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Suse 9.0
 PHP Version:  4.3.8
 New Comment:

But is there any way I can show it to you? because it 
really happens. I haven't seen it before. I already 
tried to d/l and install the 4.3.9RC3 but had the same 
results. Is it possible, that there is a library 
dependency, which might be responsible for that? I can't 
tell the exact point of time, when it occured the first 
time, but it might happen with the last SuSE update.


Previous Comments:


[2004-09-22 00:36:27] [EMAIL PROTECTED]

It still works fine here, and it works fine with every PHP version that
I have on my system.



[2004-09-22 00:30:01] oliver at teqneers dot de

This is definately no BOGUS. If you like i can send you 
screenshots or the output of the phpinfo(). You can ask 
Hartmut Holzgraefe about me. I used to work with him and 
I am programming PHP for years. This is a bug and it 
does happen everytime I execute this tiny script.
I sent in live output data.



[2004-09-22 00:04:44] [EMAIL PROTECTED]

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.



[2004-09-21 15:50:47] oliver at teqneers dot de

Description:

When I copy an array with a normal = the copy is not a real copy, but
a reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---
$arr= array( 'in' = array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)



Actual result:
--
Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[2] = 3
)

)







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


#30179 [Bgs]: unset deletes array entries and its copied entries

2004-09-21 Thread derick
 ID:   30179
 Updated by:   [EMAIL PROTECTED]
 Reported By:  oliver at teqneers dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Suse 9.0
 PHP Version:  4.3.8
 New Comment:

Provide a shell account? And did you compile from OUR sources, and not
the Suse ones?


Previous Comments:


[2004-09-22 00:42:08] oliver at teqneers dot de

But is there any way I can show it to you? because it 
really happens. I haven't seen it before. I already 
tried to d/l and install the 4.3.9RC3 but had the same 
results. Is it possible, that there is a library 
dependency, which might be responsible for that? I can't 
tell the exact point of time, when it occured the first 
time, but it might happen with the last SuSE update.



[2004-09-22 00:36:27] [EMAIL PROTECTED]

It still works fine here, and it works fine with every PHP version that
I have on my system.



[2004-09-22 00:30:01] oliver at teqneers dot de

This is definately no BOGUS. If you like i can send you 
screenshots or the output of the phpinfo(). You can ask 
Hartmut Holzgraefe about me. I used to work with him and 
I am programming PHP for years. This is a bug and it 
does happen everytime I execute this tiny script.
I sent in live output data.



[2004-09-22 00:04:44] [EMAIL PROTECTED]

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.



[2004-09-21 15:50:47] oliver at teqneers dot de

Description:

When I copy an array with a normal = the copy is not a real copy, but
a reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---
$arr= array( 'in' = array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)



Actual result:
--
Array
(
[in] = Array
(
[0] = 1
[1] = 2
[2] = 3
)

)

Array
(
[in] = Array
(
[0] = 1
[2] = 3
)

)







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


#30179 [Bgs]: unset deletes array entries and its copied entries

2004-09-21 Thread oliver at teqneers dot de
 ID:   30179
 User updated by:  oliver at teqneers dot de
 Reported By:  oliver at teqneers dot de
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Suse 9.0
 PHP Version:  4.3.8
 New Comment:

Hi,the shell account is not that easy, because it is a 
company server. But I did not use the SuSE binaries. I 
installed it from the sources. If you like, I could send 
you the compile options tomorrow? does that help?


Previous Comments:


[2004-09-22 00:52:12] [EMAIL PROTECTED]

Provide a shell account? And did you compile from OUR sources, and not
the Suse ones?



[2004-09-22 00:42:08] oliver at teqneers dot de

But is there any way I can show it to you? because it 
really happens. I haven't seen it before. I already 
tried to d/l and install the 4.3.9RC3 but had the same 
results. Is it possible, that there is a library 
dependency, which might be responsible for that? I can't 
tell the exact point of time, when it occured the first 
time, but it might happen with the last SuSE update.



[2004-09-22 00:36:27] [EMAIL PROTECTED]

It still works fine here, and it works fine with every PHP version that
I have on my system.



[2004-09-22 00:30:01] oliver at teqneers dot de

This is definately no BOGUS. If you like i can send you 
screenshots or the output of the phpinfo(). You can ask 
Hartmut Holzgraefe about me. I used to work with him and 
I am programming PHP for years. This is a bug and it 
does happen everytime I execute this tiny script.
I sent in live output data.



[2004-09-22 00:04:44] [EMAIL PROTECTED]

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.



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

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


#29292 [Bgs]: Single space character returned instead of empty string

2004-09-21 Thread jmelville at selectaustralasia dot com dot au
 ID:   29292
 User updated by:  jmelville at selectaustralasia dot com dot au
 Reported By:  jmelville at selectaustralasia dot com dot au
 Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Windows 2000 Server SP4
 PHP Version:  4.3.8
 New Comment:

 in the bottom line make sure php
 use updated ntwdblib.dll file.

Thanks momo. I've read #25777 and I understand that there are problems
with PHP using older libraries to talk to SQL Server. 

I have ntwdblib.dll versions 7.00.839 (this is the one that ships with
PHP including 4.3.9RC3) and 8.00.194 (which comes with SQL 2000) and
the problem described in this bug shows up with both those libs. Is
there an even newer version that I should be using?


Previous Comments:


[2004-09-21 11:21:48] [EMAIL PROTECTED]

ilia introduced this bug on 1.86.2.25 fixing #25777.

all the meaning was discussed there. in the bottom line make sure php
use updated ntwdblib.dll file.



[2004-09-17 17:30:20] dcrignon at adequasys dot com

I confirm this problem, under Windows 2003 Server, with Apache 2 or 1.3
and PHP 4.3.8 or 5.0.

The only way is to go back to PHP 4.3.3 ...
Not the good solution for me.
Do you know if someone is working on this bug to fix it?

We can adapt our product and trim() any variable to recover good
values, but is it the good solution?..

Thank you for your help!

David



[2004-08-30 17:41:45] vikinoha at yahoo dot com

PHP 4.3.8

I am experiencing the same problem with non-empty string returned by a
query that should return an empty string.

I have tried to replace the php_mssql.dll file in version 4.3.8 with
the one from 4.3.3, but the problem remains with no change
whatsoever:(

If there is someone familiar with PHP sources, does the php_mssql.c
1.138 revision changes deal with this bug, or it is something
completely unrelated? And also, if the 'illia_0' change (pointed out by
richard dot quadling at bandvulc dot co dot uk) effectively removes this
bug (does it?), why is it then if'd out?

Thanks,
Viktor



[2004-08-13 12:22:27] richard dot quadling at bandvulc dot co dot uk

Hi.

If the column contains NULL (using Enterprise Manager to enter CTRL+0),
then the output is correct.

But having to convert all '' to NULLs is not right.

Richard.



[2004-08-13 09:48:32] richard dot quadling at bandvulc dot co dot uk

Hi.

Following script ...

?php

$rConn = mssql_connect('localhost','PHPBB_User','PHPBB_User');
$rResults = mssql_query('SELECT user_icq,LEN(user_icq) AS user_icq_len
FROM PHPBB_User.phpbb_users');
while ($row = mssql_fetch_assoc($rResults))
{
var_export($row);
echo 'br /Length of user_icq = ' . strlen($row['user_icq']) . 'br
/br /br /';
}
mssql_free_result($rResults);
mssql_close($rConn);
?


produces output of ...

array ( 'user_icq' = ' ', 'user_icq_len' = 0, )
Length of user_icq = 1


array ( 'user_icq' = '1711757', 'user_icq_len' = 7, )
Length of user_icq = 7


array ( 'user_icq' = ' ', 'user_icq_len' = 0, )
Length of user_icq = 1


Which is clearly wrong! The length being returned by SQL is 0, the data
being returned by PHP is ' '. The data via enterprise manager is ''.

I'm using Sambar Server V6.1 Beta 3, PHP V5.0.0 (about to upgrade to
V5.0.1). MS SQL 2000 SP3 Developer Edition all on a Windows XP Pro. But
none of this seems to be making any difference. According to all the
comments made, this was broken a LONG time ago.

It seems that a small patch HAS been applied to the source (php_mssql.c
line 793-797), but is under a compiler directive of ilia_0. (Is this
Ilia Alshanetsky? If so, great article in PHP|Architect about
contexts!!!).

The code is in the php_mssql_get_column_content_with_type() function.

...
case SQLTEXT: {
int length;
char *data = charcol(offset);

length=dbdatlen(mssql_ptr-link,offset);
#if ilia_0
while (length0  data[length-1] == ' ') { /* nuke trailing
whitespace */
length--;
}
#endif
ZVAL_STRINGL(result, data, length, 1); 
break;
}
...

The macro ZVAL_STRINGL is ...

#define ZVAL_STRINGL(z, s, l, duplicate) {  \
char *__s=(s); int __l=l;   \
(z)-value.str.len = __l;   \
(z)-value.str.val = (duplicate?estrndup(__s, __l):__s);\
(z)-type = IS_STRING;  \
}


If someone can recompile the code, can they do so WITHOUT the directive
first but put 

#29383 [Opn]: A SELECT statement returns instead of an empty value, a value containing space

2004-09-21 Thread gunther at ultraconsulting dot com
 ID:   29383
 User updated by:  gunther at ultraconsulting dot com
 Reported By:  gunther at ultraconsulting dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Windows 2000
 PHP Version:  4.3.7, 5.0.0
 New Comment:

It seems this problem is a long term problem as it was first reported a
year ago. Not quite sure why the developers are tagging these reports as
'Bogus'. Everybody using PHP 4.3.3 and higher and MSSQL is affected. The
problem is definetely in the php_mssql.dll as the version 4.3.2 dll is
working fine, even with PHP 4.3.8.
There is no way to upgrade to PHP 5.0.x as the functioning dll doesn't
work with 5.0.
Any clues if and when this bug will be fixed? 
Or at least a workaround for this bug without changing thousands of
lines of code withing the application.


Previous Comments:


[2004-07-26 14:25:18] gunther at ultraconsulting dot com

This is the same as Bug #29292 .. didn't find that one before ...



[2004-07-26 04:49:49] gunther at ultraconsulting dot com

php_mssql.dll up to PHP 4.3.3 is working fine, problem first started
with PHP 4.3.4



[2004-07-26 03:46:00] gunther at ultraconsulting dot com

Description:

A SELECT statement returns instead of an empty value for a varchar
field, a value containing a single space. Therefore using the empty()
directive will not work anymore.
Problem only happens with php_mssql.dll from year 2004 for PHP version
4.3.7 and 5.0.0. Using a previous dll from 3/13/03 (4.3.2-RC1) for
instance solves the problem ... but might cause others.


Reproduce code:
---
?php
$db_host = 'localhost';
$db_user = 'sa';
$db_pass = '';

if ($dbh = mssql_connect($db_host, $db_user, $db_pass)) {
print ('brbrDB: '.$db_name.' connected');
} else {
print (brDB NOK );
exit;
} 


 $query = 'SELECT * FROM mydb WHERE id = 1';

  $result = mssql_query($query, $dbh);
  {
  if ($row = mssql_fetch_array($result, MSSQL_ASSOC)) {
  print_r($row);
  print(\nbr( . $row['id'] . ')');
  }
  }
?

Expected result:

...
()

Actual result:
--
...
( )






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


#30190 [NEW]: strtotime doesn't return -1 from 0000-00-00

2004-09-21 Thread mike dot deeks at equest dot com
From: mike dot deeks at equest dot com
Operating system: Debian, Linux
PHP version:  4.3.8
PHP Bug Type: Date/time related
Bug description:  strtotime doesn't return -1 from -00-00

Description:

strtotime returns the date 1999-11-31 (Timestamp: 943948800) instead of -1
when I pass it -00-00.

From what I can tell, it assumes  is the year 2000. Then the 00 month
and 00 day refer to the previous month and the previous day from the year
2000. i.e. 2000-01-01 minus one month, and one day.

Should it not return a -1 because that is an invalid time?

-00-00 is what MySQL defaults invalid DATE values to by the way.

Reproduce code:
---
echo strtotime(2000-01-01) . /n;
echo strtotime(2000-01-00) . /n;
echo strtotime(2000-00-00) . /n;
echo strtotime(-00-00) . /n;

Expected result:

946713600
946627200
-1
-1

Actual result:
--
946713600
946627200
943948800
943948800

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


#30190 [Opn]: strtotime doesn't return -1 from 0000-00-00

2004-09-21 Thread mike dot deeks at equest dot com
 ID:   30190
 User updated by:  mike dot deeks at equest dot com
 Reported By:  mike dot deeks at equest dot com
 Status:   Open
 Bug Type: Date/time related
 Operating System: Debian, Linux
 PHP Version:  4.3.8
 New Comment:

Correction. Expected Results should read:

Expected result:

946713600
946627200
943948800
-1


Previous Comments:


[2004-09-22 03:18:54] mike dot deeks at equest dot com

Description:

strtotime returns the date 1999-11-31 (Timestamp: 943948800) instead of
-1 when I pass it -00-00.

From what I can tell, it assumes  is the year 2000. Then the 00
month and 00 day refer to the previous month and the previous day from
the year 2000. i.e. 2000-01-01 minus one month, and one day.

Should it not return a -1 because that is an invalid time?

-00-00 is what MySQL defaults invalid DATE values to by the way.

Reproduce code:
---
echo strtotime(2000-01-01) . /n;
echo strtotime(2000-01-00) . /n;
echo strtotime(2000-00-00) . /n;
echo strtotime(-00-00) . /n;

Expected result:

946713600
946627200
-1
-1

Actual result:
--
946713600
946627200
943948800
943948800





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


#30159 [Bgs]: format_string does not use LC_NUMERIC

2004-09-21 Thread richard at hirner dot at
 ID:   30159
 User updated by:  richard at hirner dot at
 Reported By:  richard at hirner dot at
 Status:   Bogus
 Bug Type: *Languages/Translation
 Operating System: FreeBSD 5.2.1
 PHP Version:  4.3.7
 New Comment:

Ok thanks. And you're sure that this behaviour shouldn't be changed? =)


Previous Comments:


[2004-09-22 00:27:44] [EMAIL PROTECTED]

Actually, it should not use it now that you ask. See the following
example on how to use it:

http://talks.php.net/show/wereldveroverend-phpworks04/23

Derick
(and still not a bug :)



[2004-09-22 00:17:11] richard at hirner dot at

That's strange because all other locale things I use are working 
return expected results, including localeconv.
I do not know whether number_format SHOULD use locale settings or not,
can you give me a hint?



[2004-09-21 23:46:21] [EMAIL PROTECTED]

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

Check the return value of setlocale(), I bet it\'s false because you
simply don\'t have the \de\ locale.



[2004-09-19 22:53:45] richard at hirner dot at

Description:

One may expect number_format to behave localised and to use
mon_thousands_sep and mon_decimal_point from localeconv().

See bug 12647, but not only for decimal points but also for thousands
seperators.

Reproduce code:
---
setlocale(LC_ALL, de);
print number_format(10);

Expected result:

100.000

Actual result:
--
100,000





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


#30191 [NEW]: sum error

2004-09-21 Thread roberto at spadim dot com dot br
From: roberto at spadim dot com dot br
Operating system: linux, windows xp
PHP version:  5.0.1
PHP Bug Type: *Math Functions
Bug description:  sum error

Description:

sum error: 
590-589.99!=0.01 
 

Reproduce code:
---
?php
echo 590-589.99;
echo \n;
echo (double)(590)-(double)(589.99);
?

Expected result:

0.01 
0.01 

Actual result:
--
0.0009 
0.0009 

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


#28456 [Csd]: upload php vulnerability

2004-09-21 Thread tony2001
 ID:  28456
 Updated by:  [EMAIL PROTECTED]
 Reported By: overflow at neuf dot fr
 Status:  Closed
 Bug Type:Unknown/Other Function
 PHP Version: 4.3.4
 New Comment:

http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.122.2.18r2=1.122.2.19ty=u
http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.155r2=1.156ty=u


Previous Comments:


[2004-09-21 09:06:01] NetVicious at gmail dot com

Hi! toni2001 do could post the changes to the source code for manual
patching ?



[2004-05-21 10:25:12] [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.





[2004-05-20 18:30:14] overflow at neuf dot fr

$_FILES['userfile']['type'] can be fake by the client with raw http :
Content-Type: text/plain



[2004-05-20 17:49:38] mail at young dot org dot ua

Oh, yes.
I have try to analyze this question, and got following result:

If Post data looks like this:
Content-Disposition: form-data; name=userfile;
filename=../test.html

Variable $_FILES['userfile']['name'] initializes with value
../test.html

And one more example code taken from PHP manual:

$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . $_FILES['userfile']['name'];

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{


Trying to copy file into '/var/www/uploads/../test.html

And in opinien this situation potential dangerous.



[2004-05-20 17:03:17] overflow at neuf dot fr

Description:

upload php vulnerability for $_FILES['userfile']['name'] can contain
string ../ if the name start with a . with a fake raw http :
Content-Disposition: form-data; name=userfile;
filename=../../../test.html



Reproduce code:
---
http://slythers.tcpteam.org/uploadphpvuln.txt

Expected result:

security vulnerability in upload script






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


#29074 [Com]: mssql_connect fails under heavy load

2004-09-21 Thread pretenda at pretenda dot com
 ID:   29074
 Comment by:   pretenda at pretenda dot com
 Reported By:  david dot blair at nsi1 dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: MS 2003
 PHP Version:  4.3.7
 New Comment:

I am also having the same problem. I have been searching high and low
for an answer, but have found none. I ended up creating a loop in my
PHP connect code too, and it has attempted to connect more than once,
27 times on my development server in the past week.

I am running the following:
Windows 2003 Server
IIS6
PHP 5.01
SQL Server 2000 SP3

A also previously had the issue on 4.3.8, which didn't fail as often.
Unfortunately I need some of the features of PHP5 on my new website.

Cheers,
Matt


Previous Comments:


[2004-09-21 23:57:14] david dot blair at nsi1 dot com

Charles, this doesn't explain why newer versions of PHP cause the error
more frequently than older versions, when everything else about our
systems remains the same. This also doesn't explain why PHP is the only
thing having issues that contacts my SQL server.

I'll try your work-around tomorrow and monitor the server for a few
weeks to see what happens. It's a step in the right direction to
finding a solution if it does help, but I still see it as a
work-around, not a solution.



[2004-09-21 23:36:13] phpbugreport at workboy dot com

This bug should probably be closed.  The problem is on the MSSQL end
and ban be resolved by changing the value of the winsocklistenbacklog
registry entry.  For those who are experiencing this problem, please
see http://support.microsoft.com/default.aspx?kbid=328476

I don't know why this also affects mssql_select_db, but they do appear
to go together.



[2004-09-13 00:42:39] phpbugreport at workboy dot com

Upgrading seems to make things worse.  I upgraded to freetds-0.62.4,
php-4.3.9RC2 (4.3.8 has a compile issue with freetds-0.62.4 according
to bug reports), and apache 1.3.31.

Now in addition to mssql_connect failures I also get mssql_select_db
failures for one of our busier databases.

Could it be that php/freetds is getting too fast and giving up before a
response is received from SQL 2000?

Charles Bennigton
Oddcast, Inc.



[2004-09-11 22:13:08] phpbugreport at workboy dot com

We are currently running apache_1.3.28, freetds-0.61.2 and php-4.3.3 on
linux 2.4.x kernels and experiencing the same problem connecting to a
SQL 2000E SP3 database.  Modifying our PHP db connection classes to
immediately try mssql_connect again when it fails produces the desired
results most of the time.  However not always.

I will be upgrading to the latest and greatest in the current major
version for all of the components on the Linux side and testing more. 
I will post a follow up then.

Charles Bennington
Oddcast, Inc.



[2004-08-31 16:13:34] david dot blair at nsi1 dot com

I've never had Apache hang before but I'm also not running through
TDS.

I just tried upgrading the production server to 5.0.1 last night. I've
been running 5.0.0 on the development server and 5.0.1 on my laptop for
two weeks/one week with no problems.

The database connection failed 6 times last night after we brought
everything back up. After 2 more failures this morning I rolled
everything back. 

Oh hell, I just remembered I left php_mssql.dll from the 5.0.1 build in
the windows directory...I think I'm going to leave it in there and see
what happens...two of us have tested the system with no crashes so
far...

More info as it comes in...



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

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


#30182 [Asn-Csd]: SOAP module processing WSDL file dumps core

2004-09-21 Thread dmitry
 ID:   30182
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmiller at sparks dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: FreeBSD 4.10
 PHP Version:  5CVS-2004-09-21 (dev)
 Assigned To:  dmitry
 New Comment:

At first your code is wrong. You should use URL as first parameter to
SoapClient constructor.

?php
$wsdl_url = './x';
$client = new SoapClient($wsdl_url);
print (Created new soap client:\n);
?

Crash is fixed in CVS HEAD and PHP_5_0


Previous Comments:


[2004-09-21 16:48:51] dmiller at sparks dot net

Description:

$client = new SoapClient($wsdl); dumps core with a WSDL file 
given by a .NET server.

Core is not dumped on all wsdl's, it appears to not handle something in
this particular file.

# ./configure  --enable-versioning --enable-memory-limit
--with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php
--disable-all --enable-libxml --with-libxml-dir=/usr/local --enable-spl
--with-openssl --with-curl --with-regex=php
--with-apxs=/usr/local/sbin/apxs --enable-debug --disable-ipv6
--prefix=/usr/local i386-portbld-freebsd4.10 --enable-soap


Reproduce code:
---
?php

 $wsdl_url = './x';

$wsdl = '';
$wsdl_file = fopen($wsdl_url, r);

while (!feof($wsdl_file)) {
$wsdl .= fread($wsdl_file, 4096);
}
fclose ($wsdl_file);

$client = new SoapClient($wsdl);

print (Created new soap client:\n);

?

wsdl, phpinfo, and sample code available at
http://search.sparks.net/php-wsdl-bug/

Expected result:

I expected to have a SOAP object created

Actual result:
--
Segmentation fault (core dumped)

new:php$ which php
/usr/local/bin/php
new:php$ gdb /usr/local/bin/php php.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-unknown-freebsd...Deprecated bfd_read
called at /usr/src
nu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627
in elfstab_build_p
mtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gd
dbxread.c line 933 in fill_symbuf
 
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/local/lib/libcurl.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Reading symbols from /usr/local/lib/libssl.so.3...done.
Reading symbols from /usr/local/lib/libcrypto.so.3...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libssl.so.3...done.
Reading symbols from /usr/lib/libcrypto.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x20202020 in ?? ()
(gdb) bt
#0  0x20202020 in ?? ()
Cannot access memory at address 0x20202020.
(gdb) new:php$
new:php$ 






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