#43311 [Com]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread yoy dot noneoff at dfgh dot net
 ID:   43311
 Comment by:   yoy dot noneoff at dfgh dot net
 Reported By:  crrodriguez at suse dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
 New Comment:

http://www.faqs.org/rfcs/rfc2109
http://www.faqs.org/rfcs/rfc2965

RFCS linked from the setcookie function docs


...
 *  at least 300 cookies

  *  at least 4096 bytes per cookie (as measured by the characters
 that comprise the cookie non-terminal in the syntax
description
 of the Set-Cookie2 header, and as received in the Set-Cookie2
 header)
...


keyword:at least 

so basicly php should not limit cookie length, it up to the
client/browser how to handle it.


Previous Comments:


[2007-11-16 03:26:53] judas dot iscariote at gmail dot com

corrected/working patch is here now (previuos had errors ..I should
test patches before submitting them :) ) 

http://www.flyspray.org/patches/setcookie-4096btyesonly.patch



[2007-11-16 01:30:40] crrodriguez at suse dot de

Description:

The following report caught my attention 

http://www.securityfocus.com/archive/1/483705

That is indeed a bug in Konqueror, but if you look the reproduce code
it says.

Reproduce code:
---
?php

ini_set(memory_limit,200M);

setcookie(hi_fox, str_repeat(A,1999));

?

Expected result:

PHP limiting the cookie size to what both the spec says and other
browsers do, that is name_len + value_len not larger than 4096 bytes.

http://www.15seconds.com/faq/Cookies/388.htm

http://wp.netscape.com/newsref/std/cookie_spec.html


E-Warning Cookie cannot store more than %d bytes of data

Actual result:
--
PHP setting a 200MB cookie anyway.


patch here : http://rafb.net/p/zs0ojA57.html





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


#43311 [Com]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread judas dot iscariote at gmail dot com
 ID:   43311
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  crrodriguez at suse dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
 New Comment:

PHP implements the netscape spec, **not** the RFC one

When a cookie larger than 4 kilobytes is encountered the cookie should
be trimmed to fit, but the name should remain intact as long as it is
less than 4 kilobytes

Servers should not expect clients to be able to exceed these limits


In the case of PHP, sending a cookie bigger than 4kb is useless because
no browser will use it correctly, and truncating it without emitting any
warning just makes debugging  harder.


Previous Comments:


[2007-11-16 08:17:45] yoy dot noneoff at dfgh dot net

http://www.faqs.org/rfcs/rfc2109
http://www.faqs.org/rfcs/rfc2965

RFCS linked from the setcookie function docs


...
 *  at least 300 cookies

  *  at least 4096 bytes per cookie (as measured by the characters
 that comprise the cookie non-terminal in the syntax
description
 of the Set-Cookie2 header, and as received in the Set-Cookie2
 header)
...


keyword:at least 

so basicly php should not limit cookie length, it up to the
client/browser how to handle it.



[2007-11-16 03:26:53] judas dot iscariote at gmail dot com

corrected/working patch is here now (previuos had errors ..I should
test patches before submitting them :) ) 

http://www.flyspray.org/patches/setcookie-4096btyesonly.patch



[2007-11-16 01:30:40] crrodriguez at suse dot de

Description:

The following report caught my attention 

http://www.securityfocus.com/archive/1/483705

That is indeed a bug in Konqueror, but if you look the reproduce code
it says.

Reproduce code:
---
?php

ini_set(memory_limit,200M);

setcookie(hi_fox, str_repeat(A,1999));

?

Expected result:

PHP limiting the cookie size to what both the spec says and other
browsers do, that is name_len + value_len not larger than 4096 bytes.

http://www.15seconds.com/faq/Cookies/388.htm

http://wp.netscape.com/newsref/std/cookie_spec.html


E-Warning Cookie cannot store more than %d bytes of data

Actual result:
--
PHP setting a 200MB cookie anyway.


patch here : http://rafb.net/p/zs0ojA57.html





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


#43305 [Fbk-Opn]: SQLite.dll not loading

2007-11-16 Thread ivaplace at yahoo dot co dot uk
 ID:   43305
 User updated by:  ivaplace at yahoo dot co dot uk
 Reported By:  ivaplace at yahoo dot co dot uk
-Status:   Feedback
+Status:   Open
 Bug Type: Dynamic loading
 Operating System: Windows 2003
 PHP Version:  5.2.5
 New Comment:

Could you please tell me which are the 'extra dlls'?  The other dlls I
uncommented in php.ini all loaded fine.


Previous Comments:


[2007-11-15 22:48:32] [EMAIL PROTECTED]

And exactly what did you put in php.ini?



[2007-11-15 22:47:38] [EMAIL PROTECTED]

Did you install the extra dlls too? (and if you upgraded, you upgraded
those as well?)



[2007-11-15 16:28:22] ivaplace at yahoo dot co dot uk

Description:

pdo_sqlite.dll and sqlite.dll not loading although uncommented in
php.ini.  Error message suggests files not found in the ext directory
where they clearly exist






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


#43305 [Opn-Fbk]: SQLite.dll not loading

2007-11-16 Thread jani
 ID:   43305
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ivaplace at yahoo dot co dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Dynamic loading
 Operating System: Windows 2003
 PHP Version:  5.2.5
 New Comment:

Extra dlls are the ones that need to be installed as those are required
 by PHP core and several extensions. They're found in the zip package
you installed PHP from (or if you used the installer, that should do it
for you..).

But what exactly did you put in php.ini to load the sqlite extension?


Previous Comments:


[2007-11-16 09:31:19] ivaplace at yahoo dot co dot uk

Could you please tell me which are the 'extra dlls'?  The other dlls I
uncommented in php.ini all loaded fine.



[2007-11-15 22:48:32] [EMAIL PROTECTED]

And exactly what did you put in php.ini?



[2007-11-15 22:47:38] [EMAIL PROTECTED]

Did you install the extra dlls too? (and if you upgraded, you upgraded
those as well?)



[2007-11-15 16:28:22] ivaplace at yahoo dot co dot uk

Description:

pdo_sqlite.dll and sqlite.dll not loading although uncommented in
php.ini.  Error message suggests files not found in the ext directory
where they clearly exist






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


#41201 [Com]: fgets($stdin) does not return after newline if $stdin is filtered

2007-11-16 Thread tvdijen at planet dot nl
 ID:   41201
 Comment by:   tvdijen at planet dot nl
 Reported By:  rganogork at gmail dot com
 Status:   Assigned
 Bug Type: Streams related
 Operating System: Gentoo Linux
 PHP Version:  5.2.1
 Assigned To:  pollita
 New Comment:

I have the exact same problem on Windows XP, PHP 5.2.4
The same thing seems to happen with fread()...


Previous Comments:


[2007-04-26 13:24:55] rganogork at gmail dot com

Description:

If the input stream is filtered then fgets($stdin) does not return when
newline is typed.

Reproduce code:
---
?php
class test_filter extends php_user_filter {
  public function filter($in, $out, $consumed, $closing) {
while ($bucket = stream_bucket_make_writeable($in)) {
  $bucket-data = strtoupper($bucket-data);
  $consumed += $bucket-datalen;
  stream_bucket_append($out, $bucket);
}

return PSFS_PASS_ON;
  }
}

$stdin = fopen(php://stdin, r);
stream_filter_register(test.23, test_filter);
stream_filter_append($stdin, test.23);
fgets($stdin);
?

Expected result:

Should return after newline. It does return if you comment the 2
stream... lines.

Actual result:
--
It hangs, probably waiting for more input.





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


#34636 [Com]: cannot find -lgcrypt

2007-11-16 Thread gigipthta at yahoo dot com
 ID:   34636
 Comment by:   gigipthta at yahoo dot com
 Reported By:  webmaster at sunshinearcade dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Fedora Core 3
 PHP Version:  5.0.5
 New Comment:

Got this error while compiling php5.0 on fedora core 4
Please help

-lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto
-lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl
-lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -lidn -lssl -lcrypto
-lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl
-lz -lz -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxslt
-lxml2 -lz -lm -lcrypt  -o sapi/cli/php
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Previous Comments:


[2007-02-13 11:56:35] ben at qolc dot net

I hit this bug too, building 5.2.1 on RHEL 4. I think the configure
script should test for that library if --with-xsl is specified; many
distributions have separate packages for the runtime and compiletime
parts of libraries.



[2005-10-12 17:03:08] phpbugrep-20050921 at pgregg dot com

This is due to an unresolved dependency in RHEL 4 and FC.

resolve with:
root/pts/3-/mnt/RedHat/RPMS-178#-rpm -i
libgpg-error-devel-1.0-1.i386.rpm libgcrypt-devel-1.2.0-3.i386.rpm

Or whatever versions came with your RedHat CDs

PHP will then make cleanly.

Paul Gregg



[2005-10-04 01:00:03] php-bugs at lists dot php dot net

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



[2005-09-26 08:49:45] [EMAIL PROTECTED]

Something you're building against needs libgcrypt (no idea why, but
this
seems to be a rather common FC problem). Try running this:

up2date libgcrypt-devel

(if this doesn't work, you may need to fetch an RPM of libgcrypt from
www.rpmfind.net).

And then compile again.



[2005-09-26 01:26:45] webmaster at sunshinearcade dot com

Description:

make and make install produce error stating ld could not find lgcrypt

PHP 5.0.5
Fedora Core 3
Apache 2.0.54
MySQL 4.1.14

Reproduce code:
---
 ./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-mysqli=/usr/local/mysql/bin --with-xsl=/usr/lib


Actual result:
--
Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lcrypt -lexslt -lcrypt -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lmysqlclient -lz -lcrypt -lnsl -lm
-lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt  -o
sapi/cli/php
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1






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


#43311 [Com]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread judas dot iscariote at gmail dot com
 ID:   43311
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  crrodriguez at suse dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
 New Comment:

corrected/working patch is here now (previuos had errors ..I should
test patches before submitting them :) ) 

http://www.flyspray.org/patches/setcookie-4096btyesonly.patch


Previous Comments:


[2007-11-16 01:30:40] crrodriguez at suse dot de

Description:

The following report caught my attention 

http://www.securityfocus.com/archive/1/483705

That is indeed a bug in Konqueror, but if you look the reproduce code
it says.

Reproduce code:
---
?php

ini_set(memory_limit,200M);

setcookie(hi_fox, str_repeat(A,1999));

?

Expected result:

PHP limiting the cookie size to what both the spec says and other
browsers do, that is name_len + value_len not larger than 4096 bytes.

http://www.15seconds.com/faq/Cookies/388.htm

http://wp.netscape.com/newsref/std/cookie_spec.html


E-Warning Cookie cannot store more than %d bytes of data

Actual result:
--
PHP setting a 200MB cookie anyway.


patch here : http://rafb.net/p/zs0ojA57.html





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


#43307 [Opn-Bgs]: compiled php CLI does not show interactive prompt

2007-11-16 Thread johannes
 ID:   43307
 Updated by:   [EMAIL PROTECTED]
 Reported By:  keith at karsites dot net
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Fedora 8
 PHP Version:  5.2.5
 New Comment:

As said before: You ave to use --witreadlien to get the interative
shell mode.


Previous Comments:


[2007-11-16 15:52:28] keith at karsites dot net

#! /bin/sh
#
# Created by configure

'./configure' \
'--with-apxs2=/usr/local/apache-2.2.6/bin/apxs' \
'--prefix=/usr/local/php-5.2.5' \
'--bindir=/usr/local/bin' \
'--enable-shared=all' \
'--with-pear=/usr/local/PEAR' \
'--with-mysql=shared' \
'--with-mysql-sock=/var/lib/databases/mysql/mysql.sock' \
'--with-mysqli=shared' \
'--with-pgsql=/usr/local/postgresql-8.2.5/bin' \
'--with-xsl' \
'--with-zlib-dir=/usr/include' \
$@

What error message did you get when trying to access the URL's?

I checked from my laptop, but that is allowed to access my web 
server in httpd.conf



[2007-11-16 13:06:49] [EMAIL PROTECTED]

You have to compile PHP with --with-readline configure switch for the
interactive mode.



[2007-11-16 11:38:25] [EMAIL PROTECTED]

Those urls don't work. What was the configure line you used?
(I tested and php -a works just fine for me)



[2007-11-15 21:10:09] keith at karsites dot net

New URL for the same bug report:

http://www.karsites.net/bug-reports-php/php-5.2.5-bug-43307.tar.gz



[2007-11-15 21:05:13] keith at karsites dot net

Description:

$ php -a does not show a command prompt

Reproduce code:
---
Here is a url to a tar.gz file containing the php executable, my
config.nice file, a screenshoot of what php -a does (or doesn't do), and
the full output from php -i saved to a text file.

http://www.karsites.net/bug-reports-php/php-5.2.5-bug.tar.gz


Expected result:

I expect php -a to output a command prompt so I can use php 
interactively in a shell.


Actual result:
--
Please see the screenshot in the .png file inside the 
php-5.2.5-bug.tar.gz file






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


#43307 [Bgs]: compiled php CLI does not show interactive prompt

2007-11-16 Thread johannes
 ID:   43307
 Updated by:   [EMAIL PROTECTED]
 Reported By:  keith at karsites dot net
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: Fedora 8
 PHP Version:  5.2.5
 New Comment:

--with-readline that was (hm, my keyboard seems to be broken)


Previous Comments:


[2007-11-16 17:01:49] [EMAIL PROTECTED]

As said before: You ave to use --witreadlien to get the interative
shell mode.



[2007-11-16 15:52:28] keith at karsites dot net

#! /bin/sh
#
# Created by configure

'./configure' \
'--with-apxs2=/usr/local/apache-2.2.6/bin/apxs' \
'--prefix=/usr/local/php-5.2.5' \
'--bindir=/usr/local/bin' \
'--enable-shared=all' \
'--with-pear=/usr/local/PEAR' \
'--with-mysql=shared' \
'--with-mysql-sock=/var/lib/databases/mysql/mysql.sock' \
'--with-mysqli=shared' \
'--with-pgsql=/usr/local/postgresql-8.2.5/bin' \
'--with-xsl' \
'--with-zlib-dir=/usr/include' \
$@

What error message did you get when trying to access the URL's?

I checked from my laptop, but that is allowed to access my web 
server in httpd.conf



[2007-11-16 13:06:49] [EMAIL PROTECTED]

You have to compile PHP with --with-readline configure switch for the
interactive mode.



[2007-11-16 11:38:25] [EMAIL PROTECTED]

Those urls don't work. What was the configure line you used?
(I tested and php -a works just fine for me)



[2007-11-15 21:10:09] keith at karsites dot net

New URL for the same bug report:

http://www.karsites.net/bug-reports-php/php-5.2.5-bug-43307.tar.gz



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

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


#42531 [Opn-Fbk]: Too many curl_copy_handle() calls causes a crash

2007-11-16 Thread jani
 ID:   42531
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nicolac76 at yahoo dot fr
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I fixed a related bug in curl_copy_handle(), please try the snapshot to
see if it caused this bug too.


Previous Comments:


[2007-09-03 13:46:36] nicolac76 at yahoo dot fr

I change only the post options...
I need too read many time the same page with different post...



[2007-09-03 13:29:19] [EMAIL PROTECTED]

I just have to ask: WHY do you do something like this anyway?!



[2007-09-03 13:06:58] nicolac76 at yahoo dot fr

Description:

If we doing a for on a curl_multi_add_handle, Apache shut down without
reason...
We can do 127 time, but no 128 (0111 111b)...
The problem come from the function not from the variable $i !

Reproduce code:
---
?
$mh=curl_multi_init();
$ch = curl_init('http://www.example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
for($i = 1; $i = 128; $i++)
{
 $conn[$i] = curl_copy_handle($ch);
 curl_multi_add_handle ($mh,$conn[$i]);
}
...
?

Expected result:

No error

Actual result:
--
An error





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


#43301 [Opn-Csd]: mb_ereg*_replace() crashes when replacement string is invalid PHP expression

2007-11-16 Thread jani
 ID:   43301
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yoy dot noneoff at dfgh dot net
-Status:   Open
+Status:   Closed
 Bug Type: mbstring related
 Operating System: win xp sp2
 PHP Version:  5.3CVS-2007-11-15 (CVS)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-11-16 11:55:15] [EMAIL PROTECTED]

Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE
or '$' in /home/jani/t.php(8) : mbregex replace on line 1

Program received signal SIGSEGV, Segmentation fault.
0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
#1  0x082ee134 in _zval_dtor (zvalue=0xbfe4782c,
__zend_filename=0x85d6198
/home/jani/src/php-5.3/Zend/zend_operators.c, __zend_lineno=599)
at /home/jani/src/php-5.3/Zend/zend_variables.h:35
#2  0x082eed13 in _convert_to_string (op=0xbfe4782c,
__zend_filename=0x85858cc
/home/jani/src/php-5.3/ext/mbstring/php_mbregex.c, __zend_lineno=742)
at /home/jani/src/php-5.3/Zend/zend_operators.c:599
#3  0x081a569a in _php_mb_regex_ereg_replace_exec (ht=4,
return_value=0x8ae35c0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, options=0)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:742
#4  0x081a5deb in zif_mb_ereg_replace (ht=4, return_value=0x8ae35c0,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:788
#5  0x0831ea96 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:194
#6  0x083241f3 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:1439
#7  0x0831e59a in execute (op_array=0x8ae2e7c) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:87
#8  0x082f76c6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/jani/src/php-5.3/Zend/zend.c:1139
#9  0x082a0049 in php_execute_script (primary_file=0xbfe49e40) at
/home/jani/src/php-5.3/main/main.c:2007
#10 0x0837ef60 in main (argc=2, argv=0xbfe49f94) at
/home/jani/src/php-5.3/sapi/cli/php_cli.c:1140




[2007-11-16 04:18:39] yoy dot noneoff at dfgh dot net

Function Arg 1 Arg 2 Arg 3   Source 
php_mbstring!_php_mb_regex_ereg_replace_exec+5e5 0004
0112c838 
php_mbstring!zif_mb_ereg_replace+25 0004 0112c838

php5ts!zend_do_fcall_common_helper_SPEC+85b 00c0fbf0 00033f50  
  0112c28b
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+12f  00033f50  
  00033f50
php5ts!execute+1b7 0112c298 00033f50 
php5ts!zend_execute_scripts+107 0008 00033f50  
  
php5ts!php_execute_script+20d 00c0fec8 00033f50 ed13662e   

php!main+c0e 0002 00032cc0 00032f38
php!mainCRTStartup+e3 ed13662e 01c827f6 7ffd4000
kernel32!RegisterWaitForInputIdle+49 00402c12 




[2007-11-15 20:03:45] yoy dot noneoff at dfgh dot net

correct Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo mb_ereg_replace($ptr,'$1',$txt,'e');
?



[2007-11-15 01:35:30] yoy dot noneoff at dfgh dot net

Description:

php crash on mbstring(php_mbstring.dll) when runnign as CGI.
'e' flag/option

and $replacement parameter contian php-expression with syntax error.

problem not present when php loaded as module(Apache) Parse error is
thrown.



applay on the latest php 5.3
and also on php 5.2


Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo C($ptr,'$1',$txt,'e');
?

Expected result:

see Parse Error, similer to php loaded as module.


Actual result:
--
crash error 

AppName: php-cgi.exe AppVer: 5.3.0.0 ModName: php_mbstring.dll
ModVer: 5.3.0.0  Offset: 00031595







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


#43311 [Opn]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread jani
 ID:   43311
 Updated by:   [EMAIL PROTECTED]
 Reported By:  crrodriguez at suse dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
 New Comment:

In my opinion it's up to the coder to decide what he allows to be put
in cookies set. If he/she does't bother doing any filtering or such for
and inserts blindly input data there, it's his/her fault..


Previous Comments:


[2007-11-16 09:54:58] yoy dot noneoff at dfgh dot net

ie7 increased the number of cookies per domain from 20 to 50, like
other browsers.

so why not limiting php to set max 20 cookies per domain like NS
mention?

Netscape also follow these rfc

if the client ignore part of the cookie it's not PHP concern.
what if I built an application follow the rfc and php artificially
limiting me?



[2007-11-16 08:51:31] crrodriguez+php at suse dot de

also imagine the following code

setcookie (foo, $_GET['reallybigdata']) 

it can also exausts the PHP process or system memory(dependding on the
memory limit)for no gain because the browser will truncate it anyway.



[2007-11-16 08:23:38] judas dot iscariote at gmail dot com

PHP implements the netscape spec, **not** the RFC one

When a cookie larger than 4 kilobytes is encountered the cookie should
be trimmed to fit, but the name should remain intact as long as it is
less than 4 kilobytes

Servers should not expect clients to be able to exceed these limits


In the case of PHP, sending a cookie bigger than 4kb is useless because
no browser will use it correctly, and truncating it without emitting any
warning just makes debugging  harder.



[2007-11-16 08:17:45] yoy dot noneoff at dfgh dot net

http://www.faqs.org/rfcs/rfc2109
http://www.faqs.org/rfcs/rfc2965

RFCS linked from the setcookie function docs


...
 *  at least 300 cookies

  *  at least 4096 bytes per cookie (as measured by the characters
 that comprise the cookie non-terminal in the syntax
description
 of the Set-Cookie2 header, and as received in the Set-Cookie2
 header)
...


keyword:at least 

so basicly php should not limit cookie length, it up to the
client/browser how to handle it.



[2007-11-16 03:26:53] judas dot iscariote at gmail dot com

corrected/working patch is here now (previuos had errors ..I should
test patches before submitting them :) ) 

http://www.flyspray.org/patches/setcookie-4096btyesonly.patch



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

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


#43256 [Opn-Fbk]: wrong behaviour with header()

2007-11-16 Thread jani
 ID:   43256
 Updated by:   [EMAIL PROTECTED]
 Reported By:  carsten_sttgt at gmx dot de
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows_NT
 PHP Version:  5.2.5
 New Comment:

what is this set in your php.ini:
cgi.rfc2616_headers = 0

(look in the phpinfo() output!)



Previous Comments:


[2007-11-12 17:59:53] carsten_sttgt at gmx dot de

 What are you using exactly with IIS?
 PHP FastCGI binary or ISAPI module?

As you can see in the examples: both. Or in other words: I can't know,
if a script is used with ISAPI or CGI on a customer installation.


 note: Only former is really useful/working properly)

But this is only true for PHP. Why? With other scripting languages, I
have no problem to set this header via ISAPI.

And with PHP/ISAPI there is only one problem:
I must use first a header() call to set the status, and then I can use
header() with location.
| header('HTTP/1.0 303 See Other');
| header('Location: http://www.example.com/');
(The first header() call is normaly only necessary, if I want change
the default reason phrase)

But what ever happens in the PHP core during the first header call,
should also done from PHP, if I use the status parameter in header()
(like it works with Apache):
| header('Location: http://www.example.com/', true, 303);


Regarding PHP/CGI:
A CGI which want set/use it't own headers (not parsed from the server),
must have a script name which starts with nph- (that's not only true
for IIS, also for other webservers). But if the name from a PHP script
is e.g. nph-test.php, there is no correct output at all.
(as before, with other scripting languages, this works without
problems.)

(Or all together: With other scripting languages I use the same
documented command(s) to set the header on all webservers in the same
way. Only with CGI I must rename the script. With PHP the same command
does work different on different webserver and nph-CGI does't work at
all.)

Regards,
Carsten



[2007-11-12 11:23:51] [EMAIL PROTECTED]

What are you using exactly with IIS? PHP FastCGI binary or ISAPI
module? (note: Only former is really useful/working properly)



[2007-11-12 00:19:03] carsten_sttgt at gmx dot de

Description:

Hallo,

in addition to Bug #42969 I've done some more tests. Tere is really
something wrong with header() together with IIS.

The behaviour is different, if I use the CGI or ISAPI.

First I must also say: I have no problem to set this header correct
with ASP, Perl or Phyton. Regardless if I use CGI or ISAPI. Of course
with CGI, the name of such a script must be prepend with nph-.

As you can see, the only way to set the correct header/code is:
Having PHP as ISAPI and using header() twice. First with the status and
second with the location.

This is totally different to Apache, where I must use only one header()
with location and status as parameter (Testscript 2).

Especially with IIS/ISAPI, Testscript 2 should also work. Or remove the
status parameter at all: No different behaviour on different platforms.

For IIS/CGI the actual result is acceptable.

For IIS/NPH-CGI: It's not working in no way at the moment!

Regards,
Carsten



Reproduce code:
---
Testscript 1 (test.php):

?php
header('HTTP/1.0 303 See Other');
header('Location: http://www.example.com/');
?

Testscript 2 (test.php):

?php
header('Location: http://www.example.com/', true, 303);
?

Testscript 3 (nph-test.php):

?php
echo HTTP/1.0 303 See Other\r\n;
echo Location: http://www.example.com/\r\n\r\n;;
?


Expected result:

D:\PHPpear-request -r 0 -S http://localhost/test.php
GET http://localhost/test.php -- 303 See Other


Actual result:
--
Testscript 1, 2 and 3 with nph-cgi:
| D:\PHPpear-request -r 0 -S http://localhost/nph-test.php
| GET http://localhost/nph-test.php -- ERROR: Malformed response

Testscript 1 with ISAPI:
| D:\PHPpear-request -r 0 -S http://localhost/test.php
| GET http://localhost/test.php -- 303 See Other

Testscript 1 with CGI:
| D:\PHPpear-request -r 0 -S http://localhost/test.php
| GET http://localhost/test.php -- 302 Object Moved

Testscript 2 with ISAPI:
| D:\PHPpear-request -r 0 -S http://localhost/test.php
| GET http://localhost/test.php -- 303 Undescribed

Testscript 2 with CGI:
| D:\PHPpear-request -r 0 -S http://localhost/test.php
| GET http://localhost/test.php -- 302 Object Moved






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


#42826 [Csd-Opn]: Random problem with accessing file by php runtime

2007-11-16 Thread sesser
 ID:   42826
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lahcim at fajne dot com
-Status:   Closed
+Status:   Open
 Bug Type: Apache related
 Operating System: FreeBSD 6.2-STABLE
 PHP Version:  5.2.4
 New Comment:

I am reopening this bug because it is nonsense that this bug is caused
by the Suhosin Patch.

It is more likely that some 64 bit issue in PHP exists that is hidden
by some obscure struct size but when Suhosin is activated it is suddenly
visible.



Previous Comments:


[2007-10-02 12:31:21] lahcim at fajne dot com

I removed the suhoshin patch.

Currently running on:
PHP 5.2.4 (cli) (built: Oct  2 2007 14:20:20) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

It seems that the bug is fixed.

I am closing the bug. I will reopen if it starts to happen with the
current configuration, but it seems that the suhoshin patch caused the
problem.



[2007-10-02 11:14:03] [EMAIL PROTECTED]

First of all get rid of any 3rd party patches / extensions / zend
extension in your PHP build, such as any optimizers, caches and that
suhosin patch.



[2007-10-02 10:21:25] lahcim at fajne dot com

Description:

I found similar bug here: #41476

It is exactly the same problem.

Randomly I am getting error:

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Fatal error: Unknown: Failed opening required
'/home/www/main/wybranski.com/wybranski.com/data/photos/2006.04
FoodExplorer/slides/IMG_0366.html'
(include_path='.:/usr/local/share/pear') in Unknown on line 0

While the path is 100% correct and the file exists!
After refreshing the same webpage it works.

You can see that I have associated also .html files to be parsed as php
but it also happens for pure php files.

I remove the php.ini completly, so it runs with default configuration.

The only extensions I have are:
extension=gd.so
extension=imap.so
extension=mysql.so
extension=ldap.so

but the bug also happens when there are no extensions loaded, so it is
php apache module bug.

I could not repro this bug on CLI, it happens only with apache module.



Reproduce code:
---
It seems that it happens on this particular configuration:

PHP 5.2.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct  2 2007
12:01:40) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Server version: Apache/1.3.37 (Unix)
Server built:   Sep 24 2007 20:07:19

FreeBSD plustech.pl 6.2-STABLE FreeBSD 6.2-STABLE #1: Mon Aug 20
14:53:07 UTC 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GTT  amd64

I have the same configuration on a different server, but on x86 machine
and the problem does NOT happen on x86.

It seems that it can be a bug with php apache module compiled for amd64
architecture in particulary.

The bug happens randomly. I do not know on which it depends.

To experience the bug please go to:
http://www.wybranski.com/photos/

and start reviewing the pictures one after another.

After some time the error will appear. Than after refreshing the same
webpage it will be all ok.

But than when you continue reviewing other pages the bug will happen
again.


Expected result:

The page that the bug is reporting as Failed opening required exists!
So it should load it without saying that it has a problem.


Actual result:
--
It reports 'Failed opening required' error on a file that is present
and available:

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Fatal error: Unknown: Failed opening required
'/home/www/main/wybranski.com/wybranski.com/data/photos/2006.04
FoodExplorer/slides/IMG_0366.html'
(include_path='.:/usr/local/share/pear') in Unknown on line 0

(I enabled php for .html extensions but it also work /the bug happens
also/ for pure .php files)







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


#43313 [NEW]: getopt doesn't handle unknown parameters.

2007-11-16 Thread RQuadling at GMail dot com
From: RQuadling at GMail dot com
Operating system: Windows XP SP2
PHP version:  5.3CVS-2007-11-16 (snap)
PHP Bug Type: CGI related
Bug description:  getopt doesn't handle unknown parameters.

Description:

getopt() stops processing at the first unknown parameter.

I'm not sure if this is ...

a php bug - getopt should return them as is

or ...

a doc bug - getopt() will cease operation at the first hurdle.



My preference is to return them as is. Maybe a third param to the function
to collect unknown parameters. This would provide backward compatibility if
the function didn't die when an unknown parameter was reached.




The code is a simple test to examine the command line.

Run this with this parameter

-a 1

and then with these

broken -a 1


Reproduce code:
---
?php
var_dump($_SERVER['argv'], getopt('a:b', array('apple=', 'bag')));
?

Expected result:

array(3) {
  [0]=
  string(17) C:\phpargtest.php
  [1]=
  string(2) -a
  [2]=
  string(1) 1
}
array(1) {
  [a]=
  string(1) 1
}

array(4) {
  [0]=
  string(17) C:\phpargtest.php
  [1]=
  string(6) broken
  [2]=
  string(2) -a
  [3]=
  string(1) 1
}
array(1) {
  [0]=
  string(6) broken
  [a]=
  string(1) 1
}


Actual result:
--
array(3) {
  [0]=
  string(17) C:\phpargtest.php
  [1]=
  string(2) -a
  [2]=
  string(1) 1
}
array(1) {
  [a]=
  string(1) 1
}

array(4) {
  [0]=
  string(17) C:\phpargtest.php
  [1]=
  string(6) broken
  [2]=
  string(2) -a
  [3]=
  string(1) 1
}
array(0) {
}

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


#43307 [Opn-Fbk]: compiled php CLI does not show interactive prompt

2007-11-16 Thread jani
 ID:   43307
 Updated by:   [EMAIL PROTECTED]
 Reported By:  keith at karsites dot net
-Status:   Open
+Status:   Feedback
-Bug Type: Output Control
+Bug Type: *General Issues
 Operating System: Fedora 8
 PHP Version:  5.2.5
 New Comment:

Those urls don't work. What was the configure line you used?
(I tested and php -a works just fine for me)


Previous Comments:


[2007-11-15 21:10:09] keith at karsites dot net

New URL for the same bug report:

http://www.karsites.net/bug-reports-php/php-5.2.5-bug-43307.tar.gz



[2007-11-15 21:05:13] keith at karsites dot net

Description:

$ php -a does not show a command prompt

Reproduce code:
---
Here is a url to a tar.gz file containing the php executable, my
config.nice file, a screenshoot of what php -a does (or doesn't do), and
the full output from php -i saved to a text file.

http://www.karsites.net/bug-reports-php/php-5.2.5-bug.tar.gz


Expected result:

I expect php -a to output a command prompt so I can use php 
interactively in a shell.


Actual result:
--
Please see the screenshot in the .png file inside the 
php-5.2.5-bug.tar.gz file






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


#43311 [Com]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread yoy dot noneoff at dfgh dot net
 ID:   43311
 Comment by:   yoy dot noneoff at dfgh dot net
 Reported By:  crrodriguez at suse dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
 New Comment:

ie7 increased the number of cookies per domain from 20 to 50, like
other browsers.

so why not limiting php to set max 20 cookies per domain like NS
mention?

Netscape also follow these rfc

if the client ignore part of the cookie it's not PHP concern.
what if I built an application follow the rfc and php artificially
limiting me?


Previous Comments:


[2007-11-16 08:51:31] crrodriguez+php at suse dot de

also imagine the following code

setcookie (foo, $_GET['reallybigdata']) 

it can also exausts the PHP process or system memory(dependding on the
memory limit)for no gain because the browser will truncate it anyway.



[2007-11-16 08:23:38] judas dot iscariote at gmail dot com

PHP implements the netscape spec, **not** the RFC one

When a cookie larger than 4 kilobytes is encountered the cookie should
be trimmed to fit, but the name should remain intact as long as it is
less than 4 kilobytes

Servers should not expect clients to be able to exceed these limits


In the case of PHP, sending a cookie bigger than 4kb is useless because
no browser will use it correctly, and truncating it without emitting any
warning just makes debugging  harder.



[2007-11-16 08:17:45] yoy dot noneoff at dfgh dot net

http://www.faqs.org/rfcs/rfc2109
http://www.faqs.org/rfcs/rfc2965

RFCS linked from the setcookie function docs


...
 *  at least 300 cookies

  *  at least 4096 bytes per cookie (as measured by the characters
 that comprise the cookie non-terminal in the syntax
description
 of the Set-Cookie2 header, and as received in the Set-Cookie2
 header)
...


keyword:at least 

so basicly php should not limit cookie length, it up to the
client/browser how to handle it.



[2007-11-16 03:26:53] judas dot iscariote at gmail dot com

corrected/working patch is here now (previuos had errors ..I should
test patches before submitting them :) ) 

http://www.flyspray.org/patches/setcookie-4096btyesonly.patch



[2007-11-16 01:30:40] crrodriguez at suse dot de

Description:

The following report caught my attention 

http://www.securityfocus.com/archive/1/483705

That is indeed a bug in Konqueror, but if you look the reproduce code
it says.

Reproduce code:
---
?php

ini_set(memory_limit,200M);

setcookie(hi_fox, str_repeat(A,1999));

?

Expected result:

PHP limiting the cookie size to what both the spec says and other
browsers do, that is name_len + value_len not larger than 4096 bytes.

http://www.15seconds.com/faq/Cookies/388.htm

http://wp.netscape.com/newsref/std/cookie_spec.html


E-Warning Cookie cannot store more than %d bytes of data

Actual result:
--
PHP setting a 200MB cookie anyway.


patch here : http://rafb.net/p/zs0ojA57.html





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


#43307 [Fbk]: compiled php CLI does not show interactive prompt

2007-11-16 Thread johannes
 ID:   43307
 Updated by:   [EMAIL PROTECTED]
 Reported By:  keith at karsites dot net
 Status:   Feedback
 Bug Type: *General Issues
 Operating System: Fedora 8
 PHP Version:  5.2.5
 New Comment:

You have to compile PHP with --with-readline configure switch for the
interactive mode.


Previous Comments:


[2007-11-16 11:38:25] [EMAIL PROTECTED]

Those urls don't work. What was the configure line you used?
(I tested and php -a works just fine for me)



[2007-11-15 21:10:09] keith at karsites dot net

New URL for the same bug report:

http://www.karsites.net/bug-reports-php/php-5.2.5-bug-43307.tar.gz



[2007-11-15 21:05:13] keith at karsites dot net

Description:

$ php -a does not show a command prompt

Reproduce code:
---
Here is a url to a tar.gz file containing the php executable, my
config.nice file, a screenshoot of what php -a does (or doesn't do), and
the full output from php -i saved to a text file.

http://www.karsites.net/bug-reports-php/php-5.2.5-bug.tar.gz


Expected result:

I expect php -a to output a command prompt so I can use php 
interactively in a shell.


Actual result:
--
Please see the screenshot in the .png file inside the 
php-5.2.5-bug.tar.gz file






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


#43307 [Fbk-Opn]: compiled php CLI does not show interactive prompt

2007-11-16 Thread keith at karsites dot net
 ID:   43307
 User updated by:  keith at karsites dot net
 Reported By:  keith at karsites dot net
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Fedora 8
 PHP Version:  5.2.5
 New Comment:

#! /bin/sh
#
# Created by configure

'./configure' \
'--with-apxs2=/usr/local/apache-2.2.6/bin/apxs' \
'--prefix=/usr/local/php-5.2.5' \
'--bindir=/usr/local/bin' \
'--enable-shared=all' \
'--with-pear=/usr/local/PEAR' \
'--with-mysql=shared' \
'--with-mysql-sock=/var/lib/databases/mysql/mysql.sock' \
'--with-mysqli=shared' \
'--with-pgsql=/usr/local/postgresql-8.2.5/bin' \
'--with-xsl' \
'--with-zlib-dir=/usr/include' \
$@

What error message did you get when trying to access the URL's?

I checked from my laptop, but that is allowed to access my web 
server in httpd.conf


Previous Comments:


[2007-11-16 13:06:49] [EMAIL PROTECTED]

You have to compile PHP with --with-readline configure switch for the
interactive mode.



[2007-11-16 11:38:25] [EMAIL PROTECTED]

Those urls don't work. What was the configure line you used?
(I tested and php -a works just fine for me)



[2007-11-15 21:10:09] keith at karsites dot net

New URL for the same bug report:

http://www.karsites.net/bug-reports-php/php-5.2.5-bug-43307.tar.gz



[2007-11-15 21:05:13] keith at karsites dot net

Description:

$ php -a does not show a command prompt

Reproduce code:
---
Here is a url to a tar.gz file containing the php executable, my
config.nice file, a screenshoot of what php -a does (or doesn't do), and
the full output from php -i saved to a text file.

http://www.karsites.net/bug-reports-php/php-5.2.5-bug.tar.gz


Expected result:

I expect php -a to output a command prompt so I can use php 
interactively in a shell.


Actual result:
--
Please see the screenshot in the .png file inside the 
php-5.2.5-bug.tar.gz file






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


#43173 [Fbk-Opn]: FastCGI broken due to invalid descriptor

2007-11-16 Thread davidb at chelsea dot net
 ID:   43173
 User updated by:  davidb at chelsea dot net
 Reported By:  davidb at chelsea dot net
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Solaris 2.8
 PHP Version:  5.2.4
 Assigned To:  dmitry
 New Comment:

PHP under apache uses it's own process manager to spawn children.  I
believe you can disable that so Apache does it itself, but I prefer to
manage it in PHP so we can control the number of PHP works without
editing httpd.conf.

Here's the relevant configuration.  In httpd.conf, I set up the PHP
server as follows:

  AddHandler php-fastcgi .php
  Location /cgi-bin/php
SetHandler fastcgi-script
  /Location
  Action php-fastcgi /cgi-bin/php
  DirectoryIndex index.html index.shtml index.php
  AddType application/x-httpd-php   .php
  FastCgiServer /export/httpd/DOMAINS/fastcgi.com/cgi-bin/php
-processes 1

The FastCgiServer is a shell script that execs the PHP process.  We use
it to set shell variables that we might need:

#!/bin/sh

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php5

All of this has worked fine for PHP 4.X, 5.0.X, 5.1.X, and 5.2.0.  It
broke sometime after 5.2.0.

David.


Previous Comments:


[2007-11-16 13:23:48] [EMAIL PROTECTED]

What do you mean in Using the php proc manager to control children?
Could you show your configuration files.



[2007-11-15 23:28:25] davidb at chelsea dot net

I am absolutely, 100% certain that I'm using the right binary.  I've
gone back and forth multiple times, and it is reproducible.  Since this
is for http://www.fastcgi.com, I have added incentive to get it figured
out.

How can I help troubleshoot this?  How does php decide if it's running
as a CGI or a FastCGI?  How did that part of the code change?  I'm not a
C coder unfortunately (limited read-only knowledge) but from the truss()
I'm guessing that the check is failing and it's using the cgi interfaces
instead of the fastcgi interface when it wakes up.

The web server is running as follows:

-  apache 1.3.39
-  mod_fastcgi (previous versions, and also tried latest release of a
few days ago to see if it makes a difference)
-  Using the php proc manager to control children, NOT the apache
procmanager (this is the default mode of operation, or at least it was)
-  The only environment variable is PHP_FCGI_CHILDREN=2
-  suexec is spawning this

As I mentioned before, I have an identical configuration for 5.2.0 and
it works fine.

Thanks.



[2007-11-15 22:53:06] [EMAIL PROTECTED]

Are you sure you're loading the right php binary in your apache conf?
I can't reproduce this, everything works just fine (although I'm using
lighttpd..:)



[2007-11-15 14:02:38] davidb at chelsea dot net

Greetings.

I provided this input (or at least, I could swear I did).  Here it is
again.  I feel like a bit of a broken record, as this is clearly related
to the major FastCGI work that was done in 5.2.1'ish.

Here's the output:

  trtd class=eServer API /tdtd class=vCGI/FastCGI
/td/tr

The run_configure is IDENTICAL for 5.2.0 and 5.2.4.

Also, please note that php doesn't seem to be figuring out it's running
as a FastCGI application.

Please let me know if there's anything else I can do to help debug
this.



[2007-11-01 17:47:13] [EMAIL PROTECTED]

Was your php compiled with --enable-fastcgi?

Try the following command:

$ sapi/cgi/php-cgi -i | grep Server API

Do you see CGI/FastCGI?



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

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


#43312 [Opn-Asn]: php://filter URIs get mangled and make xinclude() fail

2007-11-16 Thread bs
 ID:  43312
 Updated by:  [EMAIL PROTECTED]
 Reported By: php at benjaminschulz dot com
-Status:  Open
+Status:  Assigned
 Bug Type:DOM XML related
 PHP Version: 5.3CVS-2007-11-16 (CVS)
-Assigned To: 
+Assigned To: chregu


Previous Comments:


[2007-11-16 13:42:49] php at benjaminschulz dot com

Description:

When using php://filter with xinclude an errornous file:// uri is 
generated and let's the xinclude fail. 

Reproduce code:
---
test.php

?php
echo 'pre';

class TestFilter extends PHP_User_Filter {
public function filter($in, $out, $consumed, $closing) {
while ($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register('testfilter', 'TestFilter');

$doc = new DomDocument;
$doc-load(php://filter/read=testfilter/resource=file://.dirname(__FILE__)./test1.xml);
$doc-xinclude();
echo works!;

test1.xml
-
?xml version=1.0 encoding=UTF-8?
foo
xi:include href=test2.xml
xmlns:xi=http://www.w3.org/2001/XInclude; /
/foo

test2.xml
-
?xml version=1.0 encoding=UTF-8?
barbaz/bar


Expected result:

works!

Actual result:
--
Warning: 
DOMDocument::xinclude(php://filter/read=testfilter/resource=file%3A/path
/to/test2.xml): failed to open stream: No such file or directory in 
/path/to/test.php on line 18
   
 
^- should be : and there are two slashes missing

Warning: DOMDocument::xinclude(): I/O warning : failed to load external

entity
php://filter/read=testfilter/resource=file%3A/path/to/test2.xml 
in /path/to/test.php on line 18

Warning: DOMDocument::xinclude(): could not load 
php://filter/read=testfilter/resource=file%3A/path/to/test2.xml, and no

fallback was found in /path/to/test.php on line 18





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


#43314 [NEW]: iconv_mime_encode(), broken Q scheme

2007-11-16 Thread wiela at centras dot lt
From: wiela at centras dot lt
Operating system: Windows XP HE
PHP version:  5.2.5
PHP Bug Type: ICONV related
Bug description:  iconv_mime_encode(), broken Q scheme

Description:

iconv_mime_encode(),'Q' encoding scheme isn't reliable and 
sometimes (for particular character and/or string length combination?)
returns: Notice: iconv_mime_encode(): Unknown error (7) in ...
*without any result*. 

This also applies to earlier php versions (tested with php 5.2.1).



Reproduce code:
---
$preferences = array(
input-charset = UTF-8,
output-charset = UTF-8,
line-length = 76,
line-break-chars = \n,
scheme = Q
);

// $str1 results error, it's utf-8 string, its base64_encode() is: 
//'xIXEjcSZxJfEr8WhxbPFviDEr8SZxI3FocWzxJnEr8SFIMSNxJnFs8SFxaHFs8Wr'
$str1 = #261;#269;#281;#279;#303;š#371;ž
#303;#281;#269;š#371;#281;#303;#261;
#269;#281;#371;#261;š#371;#363;; 

// $str2 doesn't result error, although it's only one character
// shorter. It's utf-8 string, its base64_encode() is: 
//'xIXEjcSZxJfEr8WhxbPFviDEr8SZxI3FocWzxJnEr8SFIMSNxJnFs8SFxaHFsw=='
$str2 = #261;#269;#281;#279;#303;š#371;ž
#303;#281;#269;š#371;#281;#303;#261;
#269;#281;#371;#261;š#371;;

echo iconv_mime_encode(Subject, $str1, $preferences);
echo iconv_mime_encode(Subject, $str2, $preferences);


Expected result:

Well, at least any (*some*) result is expected, without any 
errors and warnings. 

For $str1 is expected:
Subject: =?UTF-8?Q?=C4=85=C4=8D=C4=99=C4=97=C4=AF=C5=A1=C5=B3?=
 =?UTF-8?Q?=C5=BE=20=C4=AF=C4=99=C4=8D=C5=A1=C5=B3=C4=99=C4=AF?=
 =?UTF-8?Q?=C4=85=20=C4=8D=C4=99=C5=B3=C4=85=C5=A1=C5=B3=C5=AB?=

For $str2 is expected:
Subject: =?UTF-8?Q?=C4=85=C4=8D=C4=99=C4=97=C4=AF=C5=A1=C5=B3?=
 =?UTF-8?Q?=C5=BE=20=C4=AF=C4=99=C4=8D=C5=A1=C5=B3=C4=99=C4=AF?=
 =?UTF-8?Q?=C4=85=20=C4=8D=C4=99=C5=B3=C4=85=C5=A1=C5=B3?=

Actual result:
--
For $str1: 
FALSE with Notice: iconv_mime_encode(): Unknown error (7) in ...


For $str2:
Subject: =?UTF-8?Q?=C4=85=C4=8D=C4=99=C4=97=C4=AF=C5=A1=C5=B3?=
 =?UTF-8?Q?=C5=BE=20=C4=AF=C4=99=C4=8D=C5=A1=C5=B3=C4=99=C4=AF?=
 =?UTF-8?Q?=C4=85=20=C4=8D=C4=99=C5=B3=C4=85=C5=A1=C5=B3?=

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


#43315 [Opn-Bgs]: Additional Class inspection

2007-11-16 Thread johannes
 ID:   43315
 Updated by:   [EMAIL PROTECTED]
 Reported By:  artktec at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.5
 New Comment:

These functions are mainly legacy stuff from the time before we had
reflection, nowadays we try to have a better structure, this means that
reflection is the place for such stuff.


Previous Comments:


[2007-11-16 17:30:17] artktec at gmail dot com

Description:

There are four native php-functions for inspection of class/object
methods and variables. Those are:

get_class_vars()
get_class_methods()
get_object_vars()
get_object_methods()

I think you could round out this inspection by having native-functions
for getting class/object constants. Thus, I propose:

get_class_constants($class_name)
get_object_constants($object)

I understand that you can use reflection, but I still think it would be
a nice addition to round out the functions. It would also lead to
logical programming techniques.

Nick






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


#43301 [Csd-Opn]: mb_ereg*_replace() crashes when replacement string is invalid PHP expression

2007-11-16 Thread yoy dot noneoff at dfgh dot net
 ID:   43301
 User updated by:  yoy dot noneoff at dfgh dot net
 Reported By:  yoy dot noneoff at dfgh dot net
-Status:   Closed
+Status:   Open
 Bug Type: mbstring related
 Operating System: win xp sp2
 PHP Version:  5.3CVS-2007-11-15 (CVS)
 New Comment:

the crash issue is  indeed gone but two new problems appear

I download the latest package, and I notice that now there is  2 errors
raised

PHP Parse error 
and 
PHP Fatal  error

prob 1: the rest of script execution stop

I also think the PHP Fatal error is NOT required , in addition  its a
security risk.

for example

mb_ereg_replace('ptr','scriptalert(\'are you sure\')/script','text
with ptr','e')


return:

PHP Parse error:  syntax error, unexpected '' in test.php: mbregex
replace on line 1

PHP Fatal error:  mb_ereg_replace(): Failed evaluating code: 
scriptalert('are you sure')/script in test.php on line 3


Previous Comments:


[2007-11-16 12:29:42] [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.





[2007-11-16 11:55:15] [EMAIL PROTECTED]

Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE
or '$' in /home/jani/t.php(8) : mbregex replace on line 1

Program received signal SIGSEGV, Segmentation fault.
0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
#1  0x082ee134 in _zval_dtor (zvalue=0xbfe4782c,
__zend_filename=0x85d6198
/home/jani/src/php-5.3/Zend/zend_operators.c, __zend_lineno=599)
at /home/jani/src/php-5.3/Zend/zend_variables.h:35
#2  0x082eed13 in _convert_to_string (op=0xbfe4782c,
__zend_filename=0x85858cc
/home/jani/src/php-5.3/ext/mbstring/php_mbregex.c, __zend_lineno=742)
at /home/jani/src/php-5.3/Zend/zend_operators.c:599
#3  0x081a569a in _php_mb_regex_ereg_replace_exec (ht=4,
return_value=0x8ae35c0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, options=0)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:742
#4  0x081a5deb in zif_mb_ereg_replace (ht=4, return_value=0x8ae35c0,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:788
#5  0x0831ea96 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:194
#6  0x083241f3 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:1439
#7  0x0831e59a in execute (op_array=0x8ae2e7c) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:87
#8  0x082f76c6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/jani/src/php-5.3/Zend/zend.c:1139
#9  0x082a0049 in php_execute_script (primary_file=0xbfe49e40) at
/home/jani/src/php-5.3/main/main.c:2007
#10 0x0837ef60 in main (argc=2, argv=0xbfe49f94) at
/home/jani/src/php-5.3/sapi/cli/php_cli.c:1140




[2007-11-16 04:18:39] yoy dot noneoff at dfgh dot net

Function Arg 1 Arg 2 Arg 3   Source 
php_mbstring!_php_mb_regex_ereg_replace_exec+5e5 0004
0112c838 
php_mbstring!zif_mb_ereg_replace+25 0004 0112c838

php5ts!zend_do_fcall_common_helper_SPEC+85b 00c0fbf0 00033f50  
  0112c28b
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+12f  00033f50  
  00033f50
php5ts!execute+1b7 0112c298 00033f50 
php5ts!zend_execute_scripts+107 0008 00033f50  
  
php5ts!php_execute_script+20d 00c0fec8 00033f50 ed13662e   

php!main+c0e 0002 00032cc0 00032f38
php!mainCRTStartup+e3 ed13662e 01c827f6 7ffd4000
kernel32!RegisterWaitForInputIdle+49 00402c12 




[2007-11-15 20:03:45] yoy dot noneoff at dfgh dot net

correct Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo mb_ereg_replace($ptr,'$1',$txt,'e');
?



[2007-11-15 01:35:30] yoy dot noneoff at dfgh dot net

Description:

php crash on mbstring(php_mbstring.dll) when runnign as CGI.
'e' 

#43301 [Opn]: mbstring crash cgi

2007-11-16 Thread yoy dot noneoff at dfgh dot net
 ID:   43301
 User updated by:  yoy dot noneoff at dfgh dot net
 Reported By:  yoy dot noneoff at dfgh dot net
 Status:   Open
 Bug Type: mbstring related
 Operating System: win xp sp2
 PHP Version:  5.3CVS-2007-11-15 (CVS)
 New Comment:

correct Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo mb_ereg_replace($ptr,'$1',$txt,'e');
?


Previous Comments:


[2007-11-15 01:35:30] yoy dot noneoff at dfgh dot net

Description:

php crash on mbstring(php_mbstring.dll) when runnign as CGI.
'e' flag/option

and $replacement parameter contian php-expression with syntax error.

problem not present when php loaded as module(Apache) Parse error is
thrown.



applay on the latest php 5.3
and also on php 5.2


Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo C($ptr,'$1',$txt,'e');
?

Expected result:

see Parse Error, similer to php loaded as module.


Actual result:
--
crash error 

AppName: php-cgi.exe AppVer: 5.3.0.0 ModName: php_mbstring.dll
ModVer: 5.3.0.0  Offset: 00031595







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


#43271 [Opn-Csd]: firebird: closeCursor not implemented

2007-11-16 Thread lwe
 ID:   43271
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hp-php dot net at oeri dot ch
-Status:   Open
+Status:   Closed
 Bug Type: PDO related
 Operating System: Linux 2.6
 PHP Version:  5.3CVS-2007-11-12 (CVS)
 Assigned To:  lwe
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-11-15 08:52:40] hp-php dot net at oeri dot ch

The patch is/was faulty. To regain compileability:

diff -r1.18.2.1.2.5.2.6 firebird_statement.c
633c633
   if ((*S-name || S-cursor_open) 
isc_dsql_free_statement(H-isc_status, S-stmt, DSQL_close)) {
---
   if ((*S-name || S-cursor_open) 
isc_dsql_free_statement(S-H-isc_status, S-stmt, DSQL_close)) {



[2007-11-14 22:19:19] [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.

Actually there was a bug in execute(), which didn't close an open
cursor before attempting to execute the second time. This bug is fixed,
so it is now possible to make repeated calls to execute on one prepared
statement.
But added closecursor() anyway as it wouldn't do any harm, and it does
make sense, if one uses named cursors (set by set_attribute())

Fixed in PHP_5_3 branch.

/Lars



[2007-11-13 18:15:47] [EMAIL PROTECTED]

Lars, you recently spent some time on firebird issues, can you review
this report?



[2007-11-12 21:13:07] hp-php dot net at oeri dot ch

Description:

It seems that PDOStatement-closeCursor is not implemented for
pdo_firebird. I'm unable to re-use prepared statements...

I tried to implement a minimalistic version:

http://php.pastebin.com/f476261f8






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


#43311 [Com]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread crrodriguez+php at suse dot de
 ID:   43311
 Comment by:   crrodriguez+php at suse dot de
 Reported By:  crrodriguez at suse dot de
 Status:   Open
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
 New Comment:

also imagine the following code

setcookie (foo, $_GET['reallybigdata']) 

it can also exausts the PHP process or system memory(dependding on the
memory limit)for no gain because the browser will truncate it anyway.


Previous Comments:


[2007-11-16 08:23:38] judas dot iscariote at gmail dot com

PHP implements the netscape spec, **not** the RFC one

When a cookie larger than 4 kilobytes is encountered the cookie should
be trimmed to fit, but the name should remain intact as long as it is
less than 4 kilobytes

Servers should not expect clients to be able to exceed these limits


In the case of PHP, sending a cookie bigger than 4kb is useless because
no browser will use it correctly, and truncating it without emitting any
warning just makes debugging  harder.



[2007-11-16 08:17:45] yoy dot noneoff at dfgh dot net

http://www.faqs.org/rfcs/rfc2109
http://www.faqs.org/rfcs/rfc2965

RFCS linked from the setcookie function docs


...
 *  at least 300 cookies

  *  at least 4096 bytes per cookie (as measured by the characters
 that comprise the cookie non-terminal in the syntax
description
 of the Set-Cookie2 header, and as received in the Set-Cookie2
 header)
...


keyword:at least 

so basicly php should not limit cookie length, it up to the
client/browser how to handle it.



[2007-11-16 03:26:53] judas dot iscariote at gmail dot com

corrected/working patch is here now (previuos had errors ..I should
test patches before submitting them :) ) 

http://www.flyspray.org/patches/setcookie-4096btyesonly.patch



[2007-11-16 01:30:40] crrodriguez at suse dot de

Description:

The following report caught my attention 

http://www.securityfocus.com/archive/1/483705

That is indeed a bug in Konqueror, but if you look the reproduce code
it says.

Reproduce code:
---
?php

ini_set(memory_limit,200M);

setcookie(hi_fox, str_repeat(A,1999));

?

Expected result:

PHP limiting the cookie size to what both the spec says and other
browsers do, that is name_len + value_len not larger than 4096 bytes.

http://www.15seconds.com/faq/Cookies/388.htm

http://wp.netscape.com/newsref/std/cookie_spec.html


E-Warning Cookie cannot store more than %d bytes of data

Actual result:
--
PHP setting a 200MB cookie anyway.


patch here : http://rafb.net/p/zs0ojA57.html





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


#43301 [Opn]: mbstring crash cgi

2007-11-16 Thread jani
 ID:   43301
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yoy dot noneoff at dfgh dot net
 Status:   Open
 Bug Type: mbstring related
 Operating System: win xp sp2
 PHP Version:  5.3CVS-2007-11-15 (CVS)
 New Comment:

Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE
or '$' in /home/jani/t.php(8) : mbregex replace on line 1

Program received signal SIGSEGV, Segmentation fault.
0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
#1  0x082ee134 in _zval_dtor (zvalue=0xbfe4782c,
__zend_filename=0x85d6198
/home/jani/src/php-5.3/Zend/zend_operators.c, __zend_lineno=599)
at /home/jani/src/php-5.3/Zend/zend_variables.h:35
#2  0x082eed13 in _convert_to_string (op=0xbfe4782c,
__zend_filename=0x85858cc
/home/jani/src/php-5.3/ext/mbstring/php_mbregex.c, __zend_lineno=742)
at /home/jani/src/php-5.3/Zend/zend_operators.c:599
#3  0x081a569a in _php_mb_regex_ereg_replace_exec (ht=4,
return_value=0x8ae35c0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, options=0)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:742
#4  0x081a5deb in zif_mb_ereg_replace (ht=4, return_value=0x8ae35c0,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:788
#5  0x0831ea96 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:194
#6  0x083241f3 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:1439
#7  0x0831e59a in execute (op_array=0x8ae2e7c) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:87
#8  0x082f76c6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/jani/src/php-5.3/Zend/zend.c:1139
#9  0x082a0049 in php_execute_script (primary_file=0xbfe49e40) at
/home/jani/src/php-5.3/main/main.c:2007
#10 0x0837ef60 in main (argc=2, argv=0xbfe49f94) at
/home/jani/src/php-5.3/sapi/cli/php_cli.c:1140



Previous Comments:


[2007-11-16 04:18:39] yoy dot noneoff at dfgh dot net

Function Arg 1 Arg 2 Arg 3   Source 
php_mbstring!_php_mb_regex_ereg_replace_exec+5e5 0004
0112c838 
php_mbstring!zif_mb_ereg_replace+25 0004 0112c838

php5ts!zend_do_fcall_common_helper_SPEC+85b 00c0fbf0 00033f50  
  0112c28b
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+12f  00033f50  
  00033f50
php5ts!execute+1b7 0112c298 00033f50 
php5ts!zend_execute_scripts+107 0008 00033f50  
  
php5ts!php_execute_script+20d 00c0fec8 00033f50 ed13662e   

php!main+c0e 0002 00032cc0 00032f38
php!mainCRTStartup+e3 ed13662e 01c827f6 7ffd4000
kernel32!RegisterWaitForInputIdle+49 00402c12 




[2007-11-15 20:03:45] yoy dot noneoff at dfgh dot net

correct Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo mb_ereg_replace($ptr,'$1',$txt,'e');
?



[2007-11-15 01:35:30] yoy dot noneoff at dfgh dot net

Description:

php crash on mbstring(php_mbstring.dll) when runnign as CGI.
'e' flag/option

and $replacement parameter contian php-expression with syntax error.

problem not present when php loaded as module(Apache) Parse error is
thrown.



applay on the latest php 5.3
and also on php 5.2


Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo C($ptr,'$1',$txt,'e');
?

Expected result:

see Parse Error, similer to php loaded as module.


Actual result:
--
crash error 

AppName: php-cgi.exe AppVer: 5.3.0.0 ModName: php_mbstring.dll
ModVer: 5.3.0.0  Offset: 00031595







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


#43311 [Opn-Asn]: setcookie should not be able to set cookies larger than 4096 bytes

2007-11-16 Thread iliaa
 ID:   43311
 Updated by:   [EMAIL PROTECTED]
 Reported By:  crrodriguez at suse dot de
-Status:   Open
+Status:   Assigned
 Bug Type: *General Issues
 Operating System: Irrelevant
 PHP Version:  5.3CVS-2007-11-16 (CVS)
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2007-11-16 12:38:30] [EMAIL PROTECTED]

In my opinion it's up to the coder to decide what he allows to be put
in cookies set. If he/she does't bother doing any filtering or such for
and inserts blindly input data there, it's his/her fault..



[2007-11-16 09:54:58] yoy dot noneoff at dfgh dot net

ie7 increased the number of cookies per domain from 20 to 50, like
other browsers.

so why not limiting php to set max 20 cookies per domain like NS
mention?

Netscape also follow these rfc

if the client ignore part of the cookie it's not PHP concern.
what if I built an application follow the rfc and php artificially
limiting me?



[2007-11-16 08:51:31] crrodriguez+php at suse dot de

also imagine the following code

setcookie (foo, $_GET['reallybigdata']) 

it can also exausts the PHP process or system memory(dependding on the
memory limit)for no gain because the browser will truncate it anyway.



[2007-11-16 08:23:38] judas dot iscariote at gmail dot com

PHP implements the netscape spec, **not** the RFC one

When a cookie larger than 4 kilobytes is encountered the cookie should
be trimmed to fit, but the name should remain intact as long as it is
less than 4 kilobytes

Servers should not expect clients to be able to exceed these limits


In the case of PHP, sending a cookie bigger than 4kb is useless because
no browser will use it correctly, and truncating it without emitting any
warning just makes debugging  harder.



[2007-11-16 08:17:45] yoy dot noneoff at dfgh dot net

http://www.faqs.org/rfcs/rfc2109
http://www.faqs.org/rfcs/rfc2965

RFCS linked from the setcookie function docs


...
 *  at least 300 cookies

  *  at least 4096 bytes per cookie (as measured by the characters
 that comprise the cookie non-terminal in the syntax
description
 of the Set-Cookie2 header, and as received in the Set-Cookie2
 header)
...


keyword:at least 

so basicly php should not limit cookie length, it up to the
client/browser how to handle it.



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

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


#43173 [Asn-Fbk]: FastCGI broken due to invalid descriptor

2007-11-16 Thread dmitry
 ID:   43173
 Updated by:   [EMAIL PROTECTED]
 Reported By:  davidb at chelsea dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Solaris 2.8
 PHP Version:  5.2.4
 Assigned To:  dmitry
 New Comment:

What do you mean in Using the php proc manager to control children?
Could you show your configuration files.


Previous Comments:


[2007-11-15 23:28:25] davidb at chelsea dot net

I am absolutely, 100% certain that I'm using the right binary.  I've
gone back and forth multiple times, and it is reproducible.  Since this
is for http://www.fastcgi.com, I have added incentive to get it figured
out.

How can I help troubleshoot this?  How does php decide if it's running
as a CGI or a FastCGI?  How did that part of the code change?  I'm not a
C coder unfortunately (limited read-only knowledge) but from the truss()
I'm guessing that the check is failing and it's using the cgi interfaces
instead of the fastcgi interface when it wakes up.

The web server is running as follows:

-  apache 1.3.39
-  mod_fastcgi (previous versions, and also tried latest release of a
few days ago to see if it makes a difference)
-  Using the php proc manager to control children, NOT the apache
procmanager (this is the default mode of operation, or at least it was)
-  The only environment variable is PHP_FCGI_CHILDREN=2
-  suexec is spawning this

As I mentioned before, I have an identical configuration for 5.2.0 and
it works fine.

Thanks.



[2007-11-15 22:53:06] [EMAIL PROTECTED]

Are you sure you're loading the right php binary in your apache conf?
I can't reproduce this, everything works just fine (although I'm using
lighttpd..:)



[2007-11-15 14:02:38] davidb at chelsea dot net

Greetings.

I provided this input (or at least, I could swear I did).  Here it is
again.  I feel like a bit of a broken record, as this is clearly related
to the major FastCGI work that was done in 5.2.1'ish.

Here's the output:

  trtd class=eServer API /tdtd class=vCGI/FastCGI
/td/tr

The run_configure is IDENTICAL for 5.2.0 and 5.2.4.

Also, please note that php doesn't seem to be figuring out it's running
as a FastCGI application.

Please let me know if there's anything else I can do to help debug
this.



[2007-11-01 17:47:13] [EMAIL PROTECTED]

Was your php compiled with --enable-fastcgi?

Try the following command:

$ sapi/cgi/php-cgi -i | grep Server API

Do you see CGI/FastCGI?



[2007-11-01 17:35:43] [EMAIL PROTECTED]

Dmitry, you know it best. :)



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

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


#43092 [Opn-Csd]: curl_copy_handle() crashes with 32 chars long URL

2007-11-16 Thread jani
 ID:   43092
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: cURL related
 Operating System: Windows Vista
 PHP Version:  5.2CVS-2007-10-24 (snap)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2007-11-12 21:24:55] [EMAIL PROTECTED]

It looks like the debug symbols weren't loaded. Here's an updated
version, also with a cleaner configuration:

Thread 0 - System ID 5576
Entry point   php!mainCRTStartup 
Create time   11/12/2007 4:22:10 PM 
Time spent in user mode   0 Days 0:0:0.15 
Time spent in kernel mode   0 Days 0:0:0.15 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!_zend_mm_alloc_int+49 0030 0027 100a07c8   

php5ts!_emalloc+36 0027 0190fe28 01911328
php5ts!_zend_hash_quick_add_or_update+208 0006 01911288
0004
php5ts!ZEND_RECV_SPEC_HANDLER+76a 00c0fb2c 003e2950
0190fda0
php5ts!execute+1b7 019111f0 003e2950 0190dcdd
php5ts!zend_do_fcall_common_helper_SPEC+95b 00c0fc1c 003e2950  
  1001e207
php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fbd0 003e2950 
   003e2950
php5ts!execute+1b7 0190dd70 003e2950 
php5ts!zend_execute_scripts+107 0008 003e2950  
  
php5ts!php_execute_script+20d 00c0fea8 003e2950    

php!main+c0e 0005 003e28c8 003e1948
php!mainCRTStartup+e3 7ffdf000 00c0ffec 7796a9bd
kernel32!BaseThreadInitThunk+e 7ffdf000 00c0b59e   
 
ntdll!_RtlUserThreadStart+23 00402c12 7ffdf000    





PHP5TS!_ZEND_MM_ALLOC_INT+49In
php__PID__1000__Date__11_12_2007__Time_04_22_20PM__712__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!_zend_mm_alloc_int+49 in
C:\Software\PHP\versions\5.3.0-dev\php5ts.dll from The PHP Group has
caused an access violation exception (0xC005) when trying to read
from memory location 0x0010 on thread 0



[2007-11-12 21:19:09] [EMAIL PROTECTED]

I'm not sure if I did this correctly, but here goes. Crash analysis
using Debug Diagnostic on a PHP 5.3 snap:

Thread 0 - System ID 5952
Entry point   php+2c12 
Create time   11/12/2007 4:15:46 PM 
Time spent in user mode   0 Days 0:0:0.15 
Time spent in kernel mode   0 Days 0:0:0.140 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!zend_mm_shutdown+139 0030 0027 100a07c8
php5ts!emalloc+36   




PHP5TS!ZEND_MM_SHUTDOWN+139WARNING - DebugDiag was not able to locate
debug symbols for php5ts.dll, so the information below may be
incomplete.



In
php__PID__4492__Date__11_12_2007__Time_04_15_56PM__383__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!zend_mm_shutdown+139 in
C:\Software\PHP\versions\5.3.0-dev\php5ts.dll from The PHP Group has
caused an access violation exception (0xC005) when trying to read
from memory location 0x0010 on thread 0



[2007-10-24 22:33:59] [EMAIL PROTECTED]

Tested it on 5.2-dev and 6.0-dev snapshots, incorrect behavior is same
on both.



[2007-10-24 03:55:16] [EMAIL PROTECTED]

Description:

I don't know what to make of this behavior. When CURL creates a handle
with 32 characters or more to the local filesystem, duplicates it, and
then PHP attempts to create a new object while passing in a parameter
that is an array of values, PHP crashes. I could only produce this
behavior on Windows Vista.

Reproduce code:
---
?php
// for Windows Vista, PHP 5.2.4
class foo { function __construct($var) {} }
curl_copy_handle(curl_init('12345678901234567890123456789012')); // 32
or longer
new foo(array('foo'));
echo 'Yay!';

Expected result:

Output of 'Yay!'

Actual result:
--
PHP aborts prematurely





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


#43285 [Opn-Fbk]: Mac style line endings in source files

2007-11-16 Thread jani
 ID:   43285
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: DBM/DBA related
 Operating System: Windows Vista
 PHP Version:  5.2CVS-2007-11-14 (CVS)
 New Comment:

I can't find any mac style EOLs in any of those files..are you sure
you have clean sources?


Previous Comments:


[2007-11-14 20:02:48] [EMAIL PROTECTED]

Taking a look at the binary markup of the files, it looks like the
newlines are being represent as 0d 0d 0a (\r\r\n) which is not really
any type of newline at all. :-)



[2007-11-14 18:41:28] [EMAIL PROTECTED]

Microsoft Visual C++ 2005 Express fails when it encounters code with
Mac-style newlines. It specifically says Does not support Mac style
newlines, please convert to Windows / Unix style

Maybe a faulty CVS checkout?



[2007-11-14 11:47:27] [EMAIL PROTECTED]

Copied from the other report:

In the ext/pdo_odbc directory, odbc_driver.c, odbc_stmt.c and
php_pdo_odbc_int.h have Mac style newlines.




[2007-11-14 11:46:26] [EMAIL PROTECTED]

Exactly what compiler complains about it? Using any sane compiler
doesn't cause any complaints. Are they errors / warnings?



[2007-11-14 04:29:17] [EMAIL PROTECTED]

Description:

ext/dba/dba_db1.c has Mac style newlines, so the compiler complains.
Should be an easy fix.






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


#43312 [NEW]: php://filter URIs get mangled and make xinclude() fail

2007-11-16 Thread php at benjaminschulz dot com
From: php at benjaminschulz dot com
Operating system: 
PHP version:  5.3CVS-2007-11-16 (CVS)
PHP Bug Type: DOM XML related
Bug description:  php://filter URIs get mangled and make xinclude() fail

Description:

When using php://filter with xinclude an errornous file:// uri is 
generated and let's the xinclude fail. 

Reproduce code:
---
test.php

?php
echo 'pre';

class TestFilter extends PHP_User_Filter {
public function filter($in, $out, $consumed, $closing) {
while ($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register('testfilter', 'TestFilter');

$doc = new DomDocument;
$doc-load(php://filter/read=testfilter/resource=file://.dirname(__FILE__)./test1.xml);
$doc-xinclude();
echo works!;

test1.xml
-
?xml version=1.0 encoding=UTF-8?
foo
xi:include href=test2.xml
xmlns:xi=http://www.w3.org/2001/XInclude; /
/foo

test2.xml
-
?xml version=1.0 encoding=UTF-8?
barbaz/bar


Expected result:

works!

Actual result:
--
Warning: 
DOMDocument::xinclude(php://filter/read=testfilter/resource=file%3A/path
/to/test2.xml): failed to open stream: No such file or directory in 
/path/to/test.php on line 18
 
^- should be : and there are two slashes missing

Warning: DOMDocument::xinclude(): I/O warning : failed to load external 
entity php://filter/read=testfilter/resource=file%3A/path/to/test2.xml 
in /path/to/test.php on line 18

Warning: DOMDocument::xinclude(): could not load 
php://filter/read=testfilter/resource=file%3A/path/to/test2.xml, and no 
fallback was found in /path/to/test.php on line 18

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


#43310 [Com]: crash with References and unset

2007-11-16 Thread crrodriguez+php at suse dot de
 ID:   43310
 Comment by:   crrodriguez+php at suse dot de
 Reported By:  commander at graphicore dot de
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux, WinXp
 PHP Version:  5.2.5
 New Comment:

this is the deal


5_3 is fine
5_2 non-debug = Crashes
5_2 debug

Starting program: /home/cristian/5.2/sapi/cli/php ../crash.php
4 objects are loaded

Warning: array_keys(): The first argument should be an array in
/home/cristian/crash.php on line 18
3 objects are loaded
[Fri Nov 16 07:27:03 2007]  Script:  '../crash.php'
/home/cristian/5.2/Zend/zend_vm_execute.h(405) :  Freeing 0x0096A6A8
(24 bytes), script=../crash.php
Last leak repeated 2 times
[Fri Nov 16 07:27:03 2007]  Script:  '../crash.php'
/home/cristian/5.2/Zend/zend_execute.c(1009) :  Freeing 0x0096C890 (71
bytes), script=../crash.php
/home/cristian/5.2/Zend/zend_hash.c(388) : Actual location (location
was relayed)
Last leak repeated 2 times
[Fri Nov 16 07:27:03 2007]  Script:  '../crash.php'
/home/cristian/5.2/Zend/zend_execute.c(1061) :  Freeing 0x0096F748 (24
bytes), script=../crash.php
Last leak repeated 1 time
[Fri Nov 16 07:27:03 2007]  Script:  '../crash.php'
/home/cristian/5.2/Zend/zend_execute.c(1065) :  Freeing 0x0096F7B8 (72
bytes), script=../crash.php
/home/cristian/5.2/Zend/zend_API.c(821) : Actual location (location was
relayed)
Last leak repeated 3 times
[Fri Nov 16 07:27:03 2007]  Script:  '../crash.php'
/home/cristian/5.2/Zend/zend_hash.c(247) :  Freeing 0x0096FB38 (79
bytes), script=../crash.php
=== Total 13 memory leaks detected ===


Previous Comments:


[2007-11-16 00:51:03] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.





[2007-11-16 00:32:00] felipensp at gmail dot com

Works fine in PHP 5.3.0-dev (cli) (built: Nov 15 2007 18:47:59)



[2007-11-15 23:18:37] commander at graphicore dot de

Description:

The code crashes the Apache process immediately. The crash occurs with
other functions(array_values, print_r, gettype, ...) instead of
array_keys() as well.

To avoid the crash delete the reference in Line 7 to copy the array
that contains the references. That was intended anyway.
However, it took hours to find the problem. A Runtime-Error or
something like that would be nice.

Systems:
Linux(Ubuntu): Apache/2.2.4  PHP/5.2.3-1ubuntu6
Apache error.log:
[Thu Nov 15 23:18:48 2007] [notice] child pid 2874 exit signal
Segmentation fault (11)

WinXp: Apache/2.2.3 (Win32) PHP Version 4.4.4
Apache error.log:
[Thu Nov 15 23:43:43 2007] [notice] Parent: child process exited with
status 3221225477 -- Restarting.

best regards

Reproduce code:
---
?php
class aClass{
var $arr;
function makeObjects($load){
for($i = 1; $load = $i; $i++){
$this-arr['objects'][$i] = new aClass();
$this-arr['objects'][$i]-arr = $this-arr;//copying
$this-arr avoids the crash
}
echo count($this-arr['objects']).' objects are loaded'.\n;
}
}
$root = new aClass();
$objects[0] = $root;
$root-arr['objects'] = $objects;
$load = 3;
$root-makeObjects($load);
unset($objects[$load]);//unset the last object
array_keys($root-arr['objects']);//crash
echo count($objects).' objects are loaded';
?

Expected result:

4 objects are loaded
3 objects are loaded

Actual result:
--
the process crashes, no warning, no error





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


#43303 [Opn-Fbk]: IIS7 - function mysql_connect() PHP has encountered an Access Violation at

2007-11-16 Thread jani
 ID:   43303
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fcuadrado at estudioquadra dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows Vista (Windows 6.0.6000)
 PHP Version:  5.2.5
 New Comment:

Are you by any chance using ISAPI module with IIS? Are you aware that
there is much better FastCGI support for it nowadays? (And that's
preferred, any ISAPI related bugs will never get fixed..)


Previous Comments:


[2007-11-16 03:01:21] fcuadrado at estudioquadra dot com

Well, I can't get the debbug trace because when I execute the crass.php
script from the cmd (shell) php don't crash. Works fine.

When I go to browser and execute the same code, process php.exe don't
show in the process view and I can't create a rule on Dbgsvc.

- What process I need to follow in order to find the crash?

Thanks.



[2007-11-15 22:49:32] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.





[2007-11-15 04:31:55] fcuadrado at estudioquadra dot com

Description:

I Have this error when I try to connect with MySQL (v.5.1) (php 5.2,
IIS 7, Windows Vista)

PHP has encountered an Access Violation at 038FAB4A

Obviusly, I don't think that this number means something. It's a very
original mem address, I can't find it in Google-yahoo. =)

Here the code to reproduce this error:

===
?
$link = mysql_connect('localhost', 'root', 'password');
?
===

Important: Recently I uninstall MySQL Server, and I get the same
error.


Reproduce code:
---
===
?
$link = mysql_connect('localhost', 'root', 'password');
?
===

Expected result:

Connect to mysql.

Actual result:
--
Only: PHP has encountered an Access Violation at 038FAB4A





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


#43301 [Opn-Csd]: mb_ereg*_replace() crashes when replacement string is invalid PHP expression

2007-11-16 Thread jani
 ID:   43301
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yoy dot noneoff at dfgh dot net
-Status:   Open
+Status:   Closed
 Bug Type: mbstring related
 Operating System: win xp sp2
 PHP Version:  5.3CVS-2007-11-15 (CVS)
 New Comment:

Those are expected and unfortunate side-effects and happen also if you
do same using pcre.


Previous Comments:


[2007-11-16 19:14:29] yoy dot noneoff at dfgh dot net

the crash issue is  indeed gone but two new problems appear

I download the latest package, and I notice that now there is  2 errors
raised

PHP Parse error 
and 
PHP Fatal  error

prob 1: the rest of script execution stop

I also think the PHP Fatal error is NOT required , in addition  its a
security risk.

for example

mb_ereg_replace('ptr','scriptalert(\'are you sure\')/script','text
with ptr','e')


return:

PHP Parse error:  syntax error, unexpected '' in test.php: mbregex
replace on line 1

PHP Fatal error:  mb_ereg_replace(): Failed evaluating code: 
scriptalert('are you sure')/script in test.php on line 3



[2007-11-16 12:29:42] [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.





[2007-11-16 11:55:15] [EMAIL PROTECTED]

Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE
or '$' in /home/jani/t.php(8) : mbregex replace on line 1

Program received signal SIGSEGV, Segmentation fault.
0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
35  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x082f5175 in _zval_dtor_func (zvalue=0xbfe4782c,
__zend_filename=0x85d62c0
/home/jani/src/php-5.3/Zend/zend_variables.h, __zend_lineno=35)
at /home/jani/src/php-5.3/Zend/zend_variables.c:35
#1  0x082ee134 in _zval_dtor (zvalue=0xbfe4782c,
__zend_filename=0x85d6198
/home/jani/src/php-5.3/Zend/zend_operators.c, __zend_lineno=599)
at /home/jani/src/php-5.3/Zend/zend_variables.h:35
#2  0x082eed13 in _convert_to_string (op=0xbfe4782c,
__zend_filename=0x85858cc
/home/jani/src/php-5.3/ext/mbstring/php_mbregex.c, __zend_lineno=742)
at /home/jani/src/php-5.3/Zend/zend_operators.c:599
#3  0x081a569a in _php_mb_regex_ereg_replace_exec (ht=4,
return_value=0x8ae35c0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, options=0)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:742
#4  0x081a5deb in zif_mb_ereg_replace (ht=4, return_value=0x8ae35c0,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /home/jani/src/php-5.3/ext/mbstring/php_mbregex.c:788
#5  0x0831ea96 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:194
#6  0x083241f3 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfe47abc) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:1439
#7  0x0831e59a in execute (op_array=0x8ae2e7c) at
/home/jani/src/php-5.3/Zend/zend_vm_execute.h:87
#8  0x082f76c6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/jani/src/php-5.3/Zend/zend.c:1139
#9  0x082a0049 in php_execute_script (primary_file=0xbfe49e40) at
/home/jani/src/php-5.3/main/main.c:2007
#10 0x0837ef60 in main (argc=2, argv=0xbfe49f94) at
/home/jani/src/php-5.3/sapi/cli/php_cli.c:1140




[2007-11-16 04:18:39] yoy dot noneoff at dfgh dot net

Function Arg 1 Arg 2 Arg 3   Source 
php_mbstring!_php_mb_regex_ereg_replace_exec+5e5 0004
0112c838 
php_mbstring!zif_mb_ereg_replace+25 0004 0112c838

php5ts!zend_do_fcall_common_helper_SPEC+85b 00c0fbf0 00033f50  
  0112c28b
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+12f  00033f50  
  00033f50
php5ts!execute+1b7 0112c298 00033f50 
php5ts!zend_execute_scripts+107 0008 00033f50  
  
php5ts!php_execute_script+20d 00c0fec8 00033f50 ed13662e   

php!main+c0e 0002 00032cc0 00032f38
php!mainCRTStartup+e3 ed13662e 01c827f6 7ffd4000
kernel32!RegisterWaitForInputIdle+49 00402c12 




[2007-11-15 20:03:45] yoy dot noneoff at dfgh dot net

correct Reproduce code:
---
?php
$ptr = 'hello';

$txt = doc
hello, I have got a cr*sh on you
doc;

echo mb_ereg_replace($ptr,'$1',$txt,'e');
?


#34072 [Com]: MySQL module can't connect if port is not 3306

2007-11-16 Thread stratsnteles at wi dot rr dot com
 ID:   34072
 Comment by:   stratsnteles at wi dot rr dot com
 Reported By:  pash_ka at fonbet dot info
 Status:   No Feedback
 Bug Type: PDO related
 Operating System: Windows XP
 PHP Version:  5CVS-2005-08-30
 Assigned To:  wez
 New Comment:

I've installed Apache 2.2, PHP5 and mysql 5.0.45. I have verified that
Apache is running fine, along with PHP (running PHP test script). When I
use various sample php scripts to connect to mysql, I get nothing. nada.
zip. Not even 'die' error message. I'm suspecting it's a problem w/PHP
5. I am a PHP/MySql newbie, but an old PC pro. I am certain that I have
the servers configured properly, Can anyone help?


Previous Comments:


[2007-10-22 07:11:48] shanewaj at gmail dot com

Hi Friends 
I am trying to connect a mysql and php5 with Apache2
PHP is working ok 
I can show php files no problem 
but when i try to connect with mysql 
nothing is happending 
simply nothing as I have tried this script as well 
I have tried my old scripts as well 
not no response it does not show any thing 
not even error msg. 
any idea I am lost ...
Thanks 
Shanewaj



[2006-08-13 11:50:39] waruiinu at gmail dot com

I think there is some sort of bug in mysql client library. It just
doesn't want to use tcp connection if you connect to localhost. For
example if I add -P 3306 to mysql client binary, netstat will show the
unix connection, not the tcp. Only if i use -h 127.0.0.1 mysql will use
tcp (-h localhost doesn't solve anything).



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

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



[2005-08-31 06:07:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

try a new 5.1 snapshot please.  Your bug is only occurs when 
you use 'localhost' (and not 127.0.0.1), so please check that.

Thanks,

George



[2005-08-30 12:22:20] pash_ka at fonbet dot info

I've also checked it with version 5.1.0b3 (Jul 14 2005 20:32:24), and
it works fine for 127.0.0.1



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

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


#42300 [Opn-Fbk]: curl_copy_handle use curl_multi_exec get nothing.

2007-11-16 Thread jani
 ID:   42300
 Updated by:   [EMAIL PROTECTED]
 Reported By:  foxgoblin at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: windows xp
 PHP Version:  5CVS-2007-08-14 (snap)
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


[2007-10-18 17:38:27] foxgoblin at gmail dot com

I try php/5.2.0 , it's ok!

it build php_curl with libcurl/7.14.0

cURL Information = libcurl/7.14.0 OpenSSL/0.9.8d zlib/1.2.3



[2007-10-18 17:33:45] foxgoblin at gmail dot com

cURL Information = libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3

I use php.net distribute Windows Binaries php-5.2.4, it build php_curl
extension with libcurl/7.16.0 .



[2007-10-13 13:19:07] [EMAIL PROTECTED]

Your code works just fine for me with PHP 5.3-dev and libcurl 7.17.0. 
Which version of libcurl are you using?  Does upgrading the a more
recent version help?



[2007-08-14 18:57:22] foxgoblin at gmail dot com

Description:

use curl_copy_handle copy the curl handle, add in curl multi handle,
curl_multi_exec return nothing.

Reproduce code:
---
?
function getMultiCUrlContent($chs){
$contents = array();
$mh = curl_multi_init();
foreach($chs as $key = $ch){
curl_multi_add_handle($mh,$ch);
}
do {
  $mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
while ($active and $mrc == CURLM_OK) {
  // wait for network
  if (curl_multi_select($mh) != -1) {
   // pull in any new data, or at least handle timeouts
   do {
 $mrc = curl_multi_exec($mh, $active);
   } while ($mrc == CURLM_CALL_MULTI_PERFORM);
  }
}
if ($mrc != CURLM_OK) {
  echo [.date(Y-m-d H:i:s).]\t[getMultiCUrlContent
error]\t.$mrc.\n;
}
foreach($chs as $key = $ch){
if(curl_errno($ch) == CURLE_OK){
$contents[$key]= curl_multi_getcontent($ch);
}
else{
echo [.date(Y-m-d H:i:s).]\t[get content
error]\t.curl_error($ch).\n;
}
}
curl_multi_close($mh);
return $contents;
}

$chs = array();
$ch = curl_init(http://www.google.com/;);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
$chs[] = $ch;
$ch = curl_copy_handle($ch);
$chs[] = $ch;
$contents = getMultiCUrlContent($chs);
print_r($contents);
?

Expected result:

Array
(
[0] = htmlheadmeta http-equiv=content-type
content=text/html; charset=ISO-8859-1titleGoogle/title...
[1] = htmlheadmeta http-equiv=content-type
content=text/html; charset=ISO-8859-1titleGoogle/title...
)

Actual result:
--
Array
(
[0] = htmlheadmeta http-equiv=content-type
content=text/html; charset=ISO-8859-1titleGoogle/title...
[1] = 
)





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


#43315 [NEW]: Additional Class inspection

2007-11-16 Thread artktec at gmail dot com
From: artktec at gmail dot com
Operating system: Linux
PHP version:  5.2.5
PHP Bug Type: Feature/Change Request
Bug description:  Additional Class inspection

Description:

There are four native php-functions for inspection of class/object methods
and variables. Those are:

get_class_vars()
get_class_methods()
get_object_vars()
get_object_methods()

I think you could round out this inspection by having native-functions for
getting class/object constants. Thus, I propose:

get_class_constants($class_name)
get_object_constants($object)

I understand that you can use reflection, but I still think it would be a
nice addition to round out the functions. It would also lead to logical
programming techniques.

Nick


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


#43215 [Asn-Csd]: php5ts.dll is not installed using Windows Installer

2007-11-16 Thread zippy333 at hotmail dot com
 ID:   43215
 User updated by:  zippy333 at hotmail dot com
 Reported By:  zippy333 at hotmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Windows Server 2008 RC0
 PHP Version:  5.2.4
 Assigned To:  jmertic
 New Comment:

I've closed this bug because I was not able to reproduce it anymore.
The dll is now always installed.

One thing that could have caused the problem was the selection of a
certain extension. I can't remember which ones I selected exactly.
When the bug occured repairing/changing the installation didn't cause
the dll to be installed.

Maybe I downloaded a faulty package.


Previous Comments:


[2007-11-12 12:57:41] [EMAIL PROTECTED]

Could you run it in verbose logging mode and send the log file to
[EMAIL PROTECTED] To run in verbose logging mode issue the below command
from the command prompt ( from the same directory where the install
exists ):

msiexec /i php-5.2.4-win32-installer.msi /l*v error.log



[2007-11-11 18:45:30] [EMAIL PROTECTED]

Assigned to the installer maintainer.



[2007-11-08 00:32:27] zippy333 at hotmail dot com

Description:

When installing PHP using the Windows Installer (msi) file, php5ts.dll
is not installed.
My setup:
- Windows Server 2008 RC0 - x64
- IIS
- CGI enabled for installation with Fast CGI

Reproduce code:
---
- Download installer and run it.
- Select IIS/CGI configuration
- Notice that C:\Program Files(x86)\PHP\php5ts.dll doesn't exist.

Expected result:

php5ts.dll should be installed because it's the most needed file of
PHP.

Actual result:
--
php5ts.dll is not installed.





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


#43316 [NEW]: About the bug #42590

2007-11-16 Thread dagdamor at simps dot ru
From: dagdamor at simps dot ru
Operating system: 
PHP version:  5.2.5
PHP Bug Type: Strings related
Bug description:  About the bug #42590

Description:

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

I don't understand the issue... since when \v and \f are escape sequences?
According to the manual
(http://www.php.net/manual/en/language.types.string.php), those are just
regular character sequences, backslash followed with letter.


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


#43173 [Opn-Asn]: FastCGI broken due to invalid descriptor

2007-11-16 Thread jani
 ID:   43173
 Updated by:   [EMAIL PROTECTED]
 Reported By:  davidb at chelsea dot net
-Status:   Open
+Status:   Assigned
 Bug Type: CGI related
 Operating System: Solaris 2.8
 PHP Version:  5.2.4
 Assigned To:  dmitry


Previous Comments:


[2007-11-16 13:53:20] davidb at chelsea dot net

PHP under apache uses it's own process manager to spawn children.  I
believe you can disable that so Apache does it itself, but I prefer to
manage it in PHP so we can control the number of PHP works without
editing httpd.conf.

Here's the relevant configuration.  In httpd.conf, I set up the PHP
server as follows:

  AddHandler php-fastcgi .php
  Location /cgi-bin/php
SetHandler fastcgi-script
  /Location
  Action php-fastcgi /cgi-bin/php
  DirectoryIndex index.html index.shtml index.php
  AddType application/x-httpd-php   .php
  FastCgiServer /export/httpd/DOMAINS/fastcgi.com/cgi-bin/php
-processes 1

The FastCgiServer is a shell script that execs the PHP process.  We use
it to set shell variables that we might need:

#!/bin/sh

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
exec /usr/local/bin/php5

All of this has worked fine for PHP 4.X, 5.0.X, 5.1.X, and 5.2.0.  It
broke sometime after 5.2.0.

David.



[2007-11-16 13:23:48] [EMAIL PROTECTED]

What do you mean in Using the php proc manager to control children?
Could you show your configuration files.



[2007-11-15 23:28:25] davidb at chelsea dot net

I am absolutely, 100% certain that I'm using the right binary.  I've
gone back and forth multiple times, and it is reproducible.  Since this
is for http://www.fastcgi.com, I have added incentive to get it figured
out.

How can I help troubleshoot this?  How does php decide if it's running
as a CGI or a FastCGI?  How did that part of the code change?  I'm not a
C coder unfortunately (limited read-only knowledge) but from the truss()
I'm guessing that the check is failing and it's using the cgi interfaces
instead of the fastcgi interface when it wakes up.

The web server is running as follows:

-  apache 1.3.39
-  mod_fastcgi (previous versions, and also tried latest release of a
few days ago to see if it makes a difference)
-  Using the php proc manager to control children, NOT the apache
procmanager (this is the default mode of operation, or at least it was)
-  The only environment variable is PHP_FCGI_CHILDREN=2
-  suexec is spawning this

As I mentioned before, I have an identical configuration for 5.2.0 and
it works fine.

Thanks.



[2007-11-15 22:53:06] [EMAIL PROTECTED]

Are you sure you're loading the right php binary in your apache conf?
I can't reproduce this, everything works just fine (although I'm using
lighttpd..:)



[2007-11-15 14:02:38] davidb at chelsea dot net

Greetings.

I provided this input (or at least, I could swear I did).  Here it is
again.  I feel like a bit of a broken record, as this is clearly related
to the major FastCGI work that was done in 5.2.1'ish.

Here's the output:

  trtd class=eServer API /tdtd class=vCGI/FastCGI
/td/tr

The run_configure is IDENTICAL for 5.2.0 and 5.2.4.

Also, please note that php doesn't seem to be figuring out it's running
as a FastCGI application.

Please let me know if there's anything else I can do to help debug
this.



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

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


#42826 [Opn-Csd]: Random problem with accessing file by php runtime

2007-11-16 Thread jani
 ID:   42826
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lahcim at fajne dot com
-Status:   Open
+Status:   Closed
 Bug Type: Apache related
 Operating System: FreeBSD 6.2-STABLE
 PHP Version:  5.2.4
 New Comment:

It's also very likely that the patch itself has that issue. As long as
that not proved - closed.


Previous Comments:


[2007-11-16 08:36:32] [EMAIL PROTECTED]

I am reopening this bug because it is nonsense that this bug is caused
by the Suhosin Patch.

It is more likely that some 64 bit issue in PHP exists that is hidden
by some obscure struct size but when Suhosin is activated it is suddenly
visible.




[2007-10-02 12:31:21] lahcim at fajne dot com

I removed the suhoshin patch.

Currently running on:
PHP 5.2.4 (cli) (built: Oct  2 2007 14:20:20) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

It seems that the bug is fixed.

I am closing the bug. I will reopen if it starts to happen with the
current configuration, but it seems that the suhoshin patch caused the
problem.



[2007-10-02 11:14:03] [EMAIL PROTECTED]

First of all get rid of any 3rd party patches / extensions / zend
extension in your PHP build, such as any optimizers, caches and that
suhosin patch.



[2007-10-02 10:21:25] lahcim at fajne dot com

Description:

I found similar bug here: #41476

It is exactly the same problem.

Randomly I am getting error:

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Fatal error: Unknown: Failed opening required
'/home/www/main/wybranski.com/wybranski.com/data/photos/2006.04
FoodExplorer/slides/IMG_0366.html'
(include_path='.:/usr/local/share/pear') in Unknown on line 0

While the path is 100% correct and the file exists!
After refreshing the same webpage it works.

You can see that I have associated also .html files to be parsed as php
but it also happens for pure php files.

I remove the php.ini completly, so it runs with default configuration.

The only extensions I have are:
extension=gd.so
extension=imap.so
extension=mysql.so
extension=ldap.so

but the bug also happens when there are no extensions loaded, so it is
php apache module bug.

I could not repro this bug on CLI, it happens only with apache module.



Reproduce code:
---
It seems that it happens on this particular configuration:

PHP 5.2.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct  2 2007
12:01:40) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Server version: Apache/1.3.37 (Unix)
Server built:   Sep 24 2007 20:07:19

FreeBSD plustech.pl 6.2-STABLE FreeBSD 6.2-STABLE #1: Mon Aug 20
14:53:07 UTC 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GTT  amd64

I have the same configuration on a different server, but on x86 machine
and the problem does NOT happen on x86.

It seems that it can be a bug with php apache module compiled for amd64
architecture in particulary.

The bug happens randomly. I do not know on which it depends.

To experience the bug please go to:
http://www.wybranski.com/photos/

and start reviewing the pictures one after another.

After some time the error will appear. Than after refreshing the same
webpage it will be all ok.

But than when you continue reviewing other pages the bug will happen
again.


Expected result:

The page that the bug is reporting as Failed opening required exists!
So it should load it without saying that it has a problem.


Actual result:
--
It reports 'Failed opening required' error on a file that is present
and available:

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Fatal error: Unknown: Failed opening required
'/home/www/main/wybranski.com/wybranski.com/data/photos/2006.04
FoodExplorer/slides/IMG_0366.html'
(include_path='.:/usr/local/share/pear') in Unknown on line 0

(I enabled php for .html extensions but it also work /the bug happens
also/ for pure .php files)







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


#42893 [Opn-Fbk]: segfault on ia64 when working w/ constants

2007-11-16 Thread jani
 ID:   42893
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hoffie at gentoo dot org
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux on ia64
 PHP Version:  5.2.5
 New Comment:

Can you reproduce this with any linux distro on that machine?


Previous Comments:


[2007-11-12 19:26:18] hoffie at gentoo dot org

Still reproducable with gcc-4.2.2 and php-5.2.5 (final).



[2007-11-12 17:52:24] hoffie at gentoo dot org

We are not using gcc-3.x, but gcc-4.1(.2). Anyway, I've tried with
4.2.0 (as it was already installed) and it fails for the same reasons.
I'm going to try 4.2.2, I can probably give you results later.



[2007-11-12 10:32:57] [EMAIL PROTECTED]

This looks like a broken binary, I've seen similar problems on SPARC
with GCC 3.x unable to generate working PHP executable.
Try newer/other GCC version.



[2007-11-09 20:26:51] hoffie at gentoo dot org

Yes, I admit that above gdb output shows some strangeness, but well --
that's a gdb problem, not generally software being broken on that
system. Upgrading gdb resolved that problem and here goes the new
backtrace (using 5.2.5RC2 now):

(gdb) r -n -r 'var_dump(defined(foo));'

Starting program: /tmp/php-5.2.5RC2/sapi/cli/php -n -r
'var_dump(defined(foo));'

Program received signal SIGSEGV, Segmentation fault.
_zval_ptr_dtor (zval_ptr=0x6ff3ebd0)
at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:412
412 (*zval_ptr)-refcount--;
(gdb) bt
#0  _zval_ptr_dtor (zval_ptr=0x6ff3ebd0)
at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:412
#1  0x40298a80 in zend_do_fcall_common_helper_SPEC (
execute_data=0x6ff3ec50)
at /tmp/php-5.2.5RC2/Zend/zend_execute.h:155
#2  0x40297200 in execute (op_array=0x600c86e0)
at /tmp/php-5.2.5RC2/Zend/zend_vm_execute.h:92
#3  0x40228800 in zend_eval_string (str=value optimized out,

retval_ptr=0x0, string_name=0x4041fd10 Command line
code)
at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:1171
#4  0x40228c10 in zend_eval_string_ex (
str=0x6ff3f740 var_dump(defined(\foo\));,
retval_ptr=0x0, 
string_name=0x4041fd10 Command line code,
handle_exceptions=1)
at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:1205
#5  0x403a2130 in main (argc=Cannot access memory at address
0x10
)
at /tmp/php-5.2.5RC2/sapi/cli/php_cli.c:1179



[2007-11-08 15:02:52] mail at markus-ullmann dot de

erm...

[29 Oct 11:15pm UTC] [EMAIL PROTECTED] 
Not only PHP breaks but also GDB.

Tell me plz how you guessed that GDB is broken. Just valgrind is not 
available on ia64 architecture but gdb works fine.

[8 Oct 7:24pm UTC] hoffie at gentoo dot org
As soon as debugging symbols are enabled (CFLAGS=-g or
./configure --enable-debug) the problem disappears, that's why I'm
unable to provide a useful backtrace.

Notice that the _problem disappears_.



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

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


#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

2007-11-16 Thread rockyjl at gmail dot com
 ID:   38805
 Comment by:   rockyjl at gmail dot com
 Reported By:  gkrajci at arescorporation dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows NT PBMA-WB2 5.2 build 37
 PHP Version:  5.1.6
 Assigned To:  wez
 New Comment:

why can't fix in php 5.2.5  this is very importance for developer
!


Previous Comments:


[2007-09-11 08:36:42] rockyjl at gmail dot com

ini_set('mssql.textlimit', '65536');
ini_set('mssql.textsize', '65536'); 

it is work for php_mssql.dll

but not work for php_pdo_mssql.dll

how can i get more than 4096 byte in TEXT with php_pdo_mssql.dll ???



[2007-08-13 19:22:32] jagwire16 at hotmail dot com

http://us3.php.net/manual/en/function.mssql-query.php#64470 reports how
to make it work and that solution worked for me.



[2007-02-14 16:16:49] matt at educause dot edu

I too can reproduce this problem ... a critical hurdle for us.



[2006-12-06 14:50:17] frank at interlevel dot com

Seems I am not alone on this. I have also tried altering the PHP.ini
with no result. IS there an update to this PDO?



[2006-11-08 14:30:06] mark dot pearson at capita dot co dot uk

I have found the same problem with PHP 5.1.6 running on Windows XP Pro
SP2 and MS SQL Server 2000 (using the pdo_mssql driver).

I also tried to solve it by setting the mssql.textlimit and
mssql.textsize INI options, since that used to cause the same problem in
the mssql extension but it doesn't have any effect on the values
returned by PDO.



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

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


#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

2007-11-16 Thread rockyjl at gmail dot com
 ID:   38805
 Comment by:   rockyjl at gmail dot com
 Reported By:  gkrajci at arescorporation dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows NT PBMA-WB2 5.2 build 37
 PHP Version:  5.1.6
 Assigned To:  wez
 New Comment:

why can't fix in php 5.2.5  this is very importance for developer
!


Previous Comments:


[2007-11-17 03:15:08] rockyjl at gmail dot com

why can't fix in php 5.2.5  this is very importance for developer
!



[2007-09-11 08:36:42] rockyjl at gmail dot com

ini_set('mssql.textlimit', '65536');
ini_set('mssql.textsize', '65536'); 

it is work for php_mssql.dll

but not work for php_pdo_mssql.dll

how can i get more than 4096 byte in TEXT with php_pdo_mssql.dll ???



[2007-08-13 19:22:32] jagwire16 at hotmail dot com

http://us3.php.net/manual/en/function.mssql-query.php#64470 reports how
to make it work and that solution worked for me.



[2007-02-14 16:16:49] matt at educause dot edu

I too can reproduce this problem ... a critical hurdle for us.



[2006-12-06 14:50:17] frank at interlevel dot com

Seems I am not alone on this. I have also tried altering the PHP.ini
with no result. IS there an update to this PDO?



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

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


#43285 [Fbk-Opn]: Mac style line endings in source files

2007-11-16 Thread [EMAIL PROTECTED]
 ID:   43285
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: DBM/DBA related
 Operating System: Windows Vista
 PHP Version:  5.2CVS-2007-11-14 (CVS)
 New Comment:

The behavior only manifests when CVS auto-converts the files to Windows
style newlines (performing the checkout with Unix style newlines works
fine), but the behavior is consistent and reproduceable.


Previous Comments:


[2007-11-16 12:36:27] [EMAIL PROTECTED]

I can't find any mac style EOLs in any of those files..are you sure
you have clean sources?



[2007-11-14 20:02:48] [EMAIL PROTECTED]

Taking a look at the binary markup of the files, it looks like the
newlines are being represent as 0d 0d 0a (\r\r\n) which is not really
any type of newline at all. :-)



[2007-11-14 18:41:28] [EMAIL PROTECTED]

Microsoft Visual C++ 2005 Express fails when it encounters code with
Mac-style newlines. It specifically says Does not support Mac style
newlines, please convert to Windows / Unix style

Maybe a faulty CVS checkout?



[2007-11-14 11:47:27] [EMAIL PROTECTED]

Copied from the other report:

In the ext/pdo_odbc directory, odbc_driver.c, odbc_stmt.c and
php_pdo_odbc_int.h have Mac style newlines.




[2007-11-14 11:46:26] [EMAIL PROTECTED]

Exactly what compiler complains about it? Using any sane compiler
doesn't cause any complaints. Are they errors / warnings?



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

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


#40198 [NoF-Opn]: non-fix

2007-11-16 Thread chores at jp1 dot cx
 ID:   40198
 User updated by:  chores at jp1 dot cx
-Summary:  Column name is not double quoted
 Reported By:  chores at jp1 dot cx
-Status:   No Feedback
+Status:   Open
 Bug Type: PostgreSQL related
-Operating System: FreeBSD 4.7
+Operating System: FreeBSD 6.2
-PHP Version:  4.4.4
+PHP Version:  5.2.4
 Assigned To:  yohgaki
 New Comment:

non-fix v5.2.4


Previous Comments:


[2007-07-19 01:00:03] php-bugs at lists dot php dot net

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



[2007-07-11 12:54:37] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2007-01-23 00:26:25] chores at jp1 dot cx

Expected result (Correction):
-
INSERT INTO t_test (c1,C2) VALUES ('0','0');



[2007-01-22 18:53:33] chores at jp1 dot cx

Description:

Column name is not double quoted

% psql -U testuser testdb
testdb=# CREATE TABLE t_test (c1 char(10), C2 char(10));
testdb=# \q

% ./test.php
INSERT INTO t_test (c1,C2) VALUES ('0','0');

% psql -U testuser testdb
testdb=# INSERT INTO t_test (c1,C2) VALUES ('0','0');
ERROR:  column c2 of relation t_test does not exist

Reproduce code:
---
(test.php)
#!/usr/local/bin/php
?php
$db = pg_connect('dbname=testdb user=testuser');
$vals['c1'] = '0';
$vals['C2'] = '0';
echo pg_insert($db, 't_test', $vals, PGSQL_DML_STRING);
?

Expected result:

INSERT INTO t_test (c1,C2) VALUES ('0','0');

Actual result:
--
INSERT INTO t_test (c1,C2) VALUES ('0','0');





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