#42552 [Fbk->Opn]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-29 Thread weisz at vcpc dot univie dot ac dot at
 ID:   42552
 User updated by:  weisz at vcpc dot univie dot ac dot at
 Reported By:  weisz at vcpc dot univie dot ac dot at
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

No it's definitley not a PHP bug. It just popped up with the PHP
function apache_getenv().

Your answer citing the discussion entry lead me to the right culprit,
even so the patch proposed there is too short sighted for a real
solution. My patch submitted to Apache takes care of all single DN
components with potentially multiple entries (_DN_x_n, x any DN
component, n integer).


Previous Comments:


[2008-09-28 22:59:07] [EMAIL PROTECTED]

So it is actually not a php bug?



[2008-09-28 19:46:42] weisz at vcpc dot univie dot ac dot at

The problem is solved by a patch I submitted for Apache bug #45875 (see
).



[2008-09-24 14:06:05] weisz at vcpc dot univie dot ac dot at

After a digging through the sources pertinent to the functions
apache_getenv() and the related Apache sources the problem picture Bug
45875 appears as follows:
apache_getenv relies on the function apr_table_get() which retrieves
the values of entries into a table generated by the Apache function
ssl_hook_Fixeup(). The latter doesn't take care of DN component entries
that may occur multiple times.

I've thus submitted bug report #45875 to Apache. But please don't yet
close this present bug since an outcome could be a reply from Apache
indicating a different way to access the certificate components made
accessible since Apache HTTP 2.1 that could provide a solution on the
PHP side. I'll turn back to PHP after getting a reply from Apache.



[2008-09-23 18:23:39] weisz at vcpc dot univie dot ac dot at

The proposed patch is only a dirty one (it restricts the number of OUs
to 2 and the DN members with multiplicity to OU), and it unnecessarily
puts the check in the wrong place. I checked the relevant code in
ssl_engine_kernel.c and especially ssl_engine_vars.c.

The function ssl_var_lookup_ssl_cert_dn() in ssl_engine_vars.c takes
care of the retrieving of the DN subentries and I couldn't find a flaw
when analysing its code (Apache 2.2.8 and 2.2.9 which I've tried both
and got the same result). Where in the PHP code is the connection to the
top level function ssl_var_lookup() that descends in multiple steps to
ssl_var_lookup_ssl_cert_dn()?



[2008-09-23 00:13:30] [EMAIL PROTECTED]

I do not see why PHP would not fetch these vars if apache made them
available.

Have you tried:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg17637.html



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

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



#42552 [Opn->Bgs]: apache_getenv() doesn't return value of SSL_CLIENT_S_DN_OU_n

2008-09-29 Thread pajoye
 ID:   42552
 Updated by:   [EMAIL PROTECTED]
 Reported By:  weisz at vcpc dot univie dot ac dot at
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Thanks for having kept us informed :)

Not a PHP bug > closed (Bogus).


Previous Comments:


[2008-09-29 07:25:26] weisz at vcpc dot univie dot ac dot at

No it's definitley not a PHP bug. It just popped up with the PHP
function apache_getenv().

Your answer citing the discussion entry lead me to the right culprit,
even so the patch proposed there is too short sighted for a real
solution. My patch submitted to Apache takes care of all single DN
components with potentially multiple entries (_DN_x_n, x any DN
component, n integer).



[2008-09-28 22:59:07] [EMAIL PROTECTED]

So it is actually not a php bug?



[2008-09-28 19:46:42] weisz at vcpc dot univie dot ac dot at

The problem is solved by a patch I submitted for Apache bug #45875 (see
).



[2008-09-24 14:06:05] weisz at vcpc dot univie dot ac dot at

After a digging through the sources pertinent to the functions
apache_getenv() and the related Apache sources the problem picture Bug
45875 appears as follows:
apache_getenv relies on the function apr_table_get() which retrieves
the values of entries into a table generated by the Apache function
ssl_hook_Fixeup(). The latter doesn't take care of DN component entries
that may occur multiple times.

I've thus submitted bug report #45875 to Apache. But please don't yet
close this present bug since an outcome could be a reply from Apache
indicating a different way to access the certificate components made
accessible since Apache HTTP 2.1 that could provide a solution on the
PHP side. I'll turn back to PHP after getting a reply from Apache.



[2008-09-23 18:23:39] weisz at vcpc dot univie dot ac dot at

The proposed patch is only a dirty one (it restricts the number of OUs
to 2 and the DN members with multiplicity to OU), and it unnecessarily
puts the check in the wrong place. I checked the relevant code in
ssl_engine_kernel.c and especially ssl_engine_vars.c.

The function ssl_var_lookup_ssl_cert_dn() in ssl_engine_vars.c takes
care of the retrieving of the DN subentries and I couldn't find a flaw
when analysing its code (Apache 2.2.8 and 2.2.9 which I've tried both
and got the same result). Where in the PHP code is the connection to the
top level function ssl_var_lookup() that descends in multiple steps to
ssl_var_lookup_ssl_cert_dn()?



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

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



#45522 [Asn->Fbk]: FCGI_GET_VALUES request does not return supplied values

2008-09-29 Thread dmitry
 ID:   45522
 Updated by:   [EMAIL PROTECTED]
 Reported By:  arnaud dot lb at gmail dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: CGI related
 Operating System: *
 PHP Version:  5.3CVS-2008-07-15 (CVS)
 Assigned To:  dmitry
 New Comment:

The PHP/FastCGI execution model doesn't allow to identify the real
value of FCGI_MAX_CONNS, as it depends on number of running php-cgi
backends. FastCGI manager may decide to run more or less backend
processes depending on load, but these processes don't communicate each
other and can't know how many processes run in the moment.

FCGI_MAX_REQS must be equal to FCGI_MAX_CONNS.

Currently FCGI_MAX_CONNS and FCGI_MAX_REQS return 1 that mean the
process can serve only one connection and one request in a moment.

I don't like to fix the issue as it can't be fixed in general without
significant complication (shared memory ...)


Previous Comments:


[2008-07-15 16:02:09] arnaud dot lb at gmail dot com

Description:

FastCGI specifies that a FastCGI application may return the values
supplied by a FCGI_GET_VALUES request.

Actually the FastCGI SAPI returns all standard values (FCGI_MAX_CONNS,
FCGI_MAX_REQS, FCGI_MPXS_CONNS), *except* those supplied.

Also, it seems that the returns values does not reflect the actual
configuration (e.g. FCGI_MAX_CONNS and FCGI_MAX_REQS are always 1).

Reproduce code:
---
Requesting the FCGI_MAX_CONN value using a FCGI_GET_VALUES record in
the FastCGI protocol.


Expected result:

Requesting the FCGI_MAX_CONN returns FCGI_MAX_CONN value.

Actual result:
--
Requesting the FCGI_MAX_CONN returns FCGI_MAX_REQS and FCGI_MPXS_CONNS
values but not FCGI_MAX_CONN.





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



#46193 [Bgs]: str_replace() generates unexpected results

2008-09-29 Thread tularis
 ID:   46193
 Updated by:   [EMAIL PROTECTED]
 Reported By:  muqtada at hotmail dot com
 Status:   Bogus
 Bug Type: Strings related
 Operating System: windows
 PHP Version:  5.2.6
 New Comment:

Please stop using the bugs system for these kinds of problems. that's
NOT what it is for. If you need help understanding what you're doing
wrong, check out the php.general mailinglist or any other of the links
here: http://www.php.net/support.php


Previous Comments:


[2008-09-28 22:10:36] muqtada at hotmail dot com

Ok, but when i use
echo addslashes("wwwroot\test\wp");
it still prints wwwroot est\\wp

so even if use following 
$url= addslashes("wwwroot\test\wp");
echo str_replace("\\","/",$url);

I would have put an exta slash if knew the string always :), since it
is variable, i am be having problem at undersating, but i am getting my
expected results using str_replace();

Thanks



[2008-09-28 21:57:22] muqtada at hotmail dot com

I guess it becuase of escape sequence,
as wwwroot\test\wp has \t in it, I also tried other strings like
wwwroot\nest\wp, it also produce same result
and when i put an extra slash wwwroot\\test\wp then it gives me good
result



[2008-09-28 21:52:46] [EMAIL PROTECTED]

It's still bogus. do an 
echo "wwwroot\test\wp2";

and you'll see why (\t is a , you need to escape it properly if
you don't want to have a tab there. If you do, your replace will work as
you expect it.). str_replace works correctly and as intended. The bug is
in your understanding, not the engine.



[2008-09-28 21:41:28] muqtada at hotmail dot com

oops, i am sorry, yes i know it takes three arguments, i used following
script

print str_replace('\\',"/","wwwroot\test\wp2");



[2008-09-28 21:32:36] [EMAIL PROTECTED]

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use "\\" and not
"\".




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

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



#45522 [Fbk->Opn]: FCGI_GET_VALUES request does not return supplied values

2008-09-29 Thread arnaud dot lb at gmail dot com
 ID:   45522
 User updated by:  arnaud dot lb at gmail dot com
 Reported By:  arnaud dot lb at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: *
 PHP Version:  5.3CVS-2008-07-15 (CVS)
 Assigned To:  dmitry
 New Comment:

PHP_FCGI_CHILDREN seems a good value for FCGI_MAX_CONNS and
FCGI_MAX_REQS. FCGI_MAX_REQS equals FCGI_MAX_CONNS as there is no
support for multiplexed connections.

I think these values are relevant only for the backend the request was
sent to (e.g. the manager runs 1 php-cgi backend process, asks it for
FCGI_MAX_CONNS and run other backend processes depending on that value).


Previous Comments:


[2008-09-29 08:35:00] [EMAIL PROTECTED]

The PHP/FastCGI execution model doesn't allow to identify the real
value of FCGI_MAX_CONNS, as it depends on number of running php-cgi
backends. FastCGI manager may decide to run more or less backend
processes depending on load, but these processes don't communicate each
other and can't know how many processes run in the moment.

FCGI_MAX_REQS must be equal to FCGI_MAX_CONNS.

Currently FCGI_MAX_CONNS and FCGI_MAX_REQS return 1 that mean the
process can serve only one connection and one request in a moment.

I don't like to fix the issue as it can't be fixed in general without
significant complication (shared memory ...)



[2008-07-15 16:02:09] arnaud dot lb at gmail dot com

Description:

FastCGI specifies that a FastCGI application may return the values
supplied by a FCGI_GET_VALUES request.

Actually the FastCGI SAPI returns all standard values (FCGI_MAX_CONNS,
FCGI_MAX_REQS, FCGI_MPXS_CONNS), *except* those supplied.

Also, it seems that the returns values does not reflect the actual
configuration (e.g. FCGI_MAX_CONNS and FCGI_MAX_REQS are always 1).

Reproduce code:
---
Requesting the FCGI_MAX_CONN value using a FCGI_GET_VALUES record in
the FastCGI protocol.


Expected result:

Requesting the FCGI_MAX_CONN returns FCGI_MAX_CONN value.

Actual result:
--
Requesting the FCGI_MAX_CONN returns FCGI_MAX_REQS and FCGI_MPXS_CONNS
values but not FCGI_MAX_CONN.





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



#45907 [NoF->Opn]: undefined reference to `PHP_SHA512Init'

2008-09-29 Thread olivier at ajeux dot com
 ID:   45907
 User updated by:  olivier at ajeux dot com
 Reported By:  olivier at ajeux dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: PHAR related
 Operating System: Linux i686 2.6.17
-PHP Version:  5.3CVS-2008-08-25 (snap)
+PHP Version:  5.3CVS-2008-09-29 (snap)
 New Comment:

Tested again with php5.3 200809290830

Same bug.

ext/phar/.libs/util.o: In function `phar_create_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:2047: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2050: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2053: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:2062: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2065: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2068: undefined reference
to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:1916: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1926: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1883: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1893: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1900: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:1933: undefined reference
to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1


Previous Comments:


[2008-09-06 01:00:00] php-bugs at lists dot php dot net

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



[2008-09-01 12:50:47] webmaster at ajeux dot com

Hello,

Same bug with php5.3-200809011230 (different line number though).

ext/phar/.libs/util.o: In function `phar_create_signature':
/source/php/php5.3-200809011230/ext/phar/util.c:2047: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200809011230/ext/phar/util.c:2050: undefined
reference to `PHP_SHA512Update'

[...]



[2008-08-29 13:27:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2008-08-25 10:13:30] olivier at ajeux dot com

Description:

When compiling php5.3-200808250830:

ext/phar/.libs/util.o: In function `phar_create_signature':
/source/php/php5.3-200808250830/ext/phar/util.c:2046: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200808250830/ext/phar/util.c:2049: undefined
reference to `PHP_SHA512Update'
/source/php/php5.3-200808250830/ext/phar/util.c:2052: undefined
reference to `PHP_SHA512Final'
/source/php/php5.3-200808250830/ext/phar/util.c:2061: undefined
reference to `PHP_SHA256Init'
/source/php/php5.3-200808250830/ext/phar/util.c:2064: undefined
reference to `PHP_SHA256Update'
/source/php/php5.3-200808250830/ext/phar/util.c:2067: undefined
reference to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/source/php/php5.3-200808250830/ext/phar/util.c:1915: undefined
reference to `PHP_SHA256Init'
/source/php/php5.3-200808250830/ext/phar/util.c:1925: undefined
reference to `PHP_SHA256Update'
/source/php/php5.3-200808250830/ext/phar/util.c:1882: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200808250830/ext/phar/util.c:1892: undefined
reference to `PHP_SHA512Update'
/source/php/php5.3-200808250830/ext/phar/util.c:1899: undefined
reference to `PHP_SHA512Final'
/source/php/php5.3-200808250830/ext/phar/util.c:1932: undefined
reference to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

Same result with php5.3-200808211030 and all releases since (don't know
if it happened before).


Configure line :
./configure  --prefix=/usr --sysconfdir=/etc/php53
--libdir=/usr/lib/php53 --mandir=/usr/share/man --program-suffix=53
--with-layout=GNU --enable-sigchild --disable-rpath --enable-libxml
--enable-bcmath=shared --enable-calendar=shared --enable-ctype=shared
--enable-dom=shared --enable-exif=shared --enable-filter
--enable-ftp=shared --enable-gd-native-ttf --enable-gd-jis-conv
--enable-hash=shared --enable-json=shared --enable-mbstring=shared
--enable-pcntl=shared --ena

#46194 [Opn->Ctl]: SIGSEGV when requested file is not found

2008-09-29 Thread jani
 ID:   46194
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xuefer at gmail dot com
-Status:   Open
+Status:   Critical
-Bug Type: CGI related
+Bug Type: PHAR related
 Operating System: linux
 PHP Version:  5.3CVS-2008-09-29 (CVS)
 New Comment:

Seems to be PHAR related issue (once again) so the quick fix: disable
phar. This is quite critical bug..


Previous Comments:


[2008-09-29 03:13:05] xuefer at gmail dot com

Description:

i have setup lighttpd + fastcgi + php, it used to work with old php but
not with 5.3 (not sure about 5.2)

  "localhost:1026" => (
"host" => "127.0.0.1", "port" => 2048,
"check-local" => "disable", "disable-time" => 1,
"broken-scriptfilename" => "enable",
),
be aware that it is check-local => disable, which mean lighttpd won't
check if the file is exists but will forward the request to php anyway
when i try to request a non existing file, php SIGSEGV

Program received signal SIGSEGV, Segmentation fault.
0x4b319f51 in strstr () from /lib/libc.so.6
(gdb) bt
#0  0x4b319f51 in strstr () from /lib/libc.so.6
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
#2  0x0849d9b2 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/xuefer/src/php/php5/Zend/zend.c:1189
#3  0x08433dbb in php_execute_script (primary_file=0xbfec434c) at
/home/xuefer/src/php/php5/main/main.c:2080
#4  0x0852e362 in main (argc=3, argv=0xbfec44b4) at
/home/xuefer/src/php/php5/sapi/cgi/cgi_main.c:1980
(gdb) up
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
3294if (strstr(file_handle->filename, ".phar") &&
!strstr(file_handle->filename, "://")) {
(gdb) p file_handle[0]
$2 = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0,
handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0,
  mmap = {len = 0, pos = 1, map = 0x83f, buf = 0xb7f14878
"j®\t\b\020ii\r", old_handle = 0xb7f15000, old_closer = 0x807ba17},
  reader = 0x4b2b9840, fsizer = 0x805f4a4, closer = 0x1}},
free_filename = 0 '\0'}







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



#45907 [Opn->Fbk]: undefined reference to `PHP_SHA512Init'

2008-09-29 Thread sfox
 ID:   45907
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olivier at ajeux dot com
-Status:   Open
+Status:   Feedback
 Bug Type: PHAR related
 Operating System: Linux i686 2.6.17
 PHP Version:  5.3CVS-2008-09-29 (snap)
 New Comment:

Can someone please confirm that this occurs only when ext/hash is built
as shared?


Previous Comments:


[2008-09-29 10:36:04] olivier at ajeux dot com

Tested again with php5.3 200809290830

Same bug.

ext/phar/.libs/util.o: In function `phar_create_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:2047: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2050: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2053: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:2062: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2065: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2068: undefined reference
to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:1916: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1926: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1883: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1893: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1900: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:1933: undefined reference
to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1



[2008-09-06 01:00:00] php-bugs at lists dot php dot net

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



[2008-09-01 12:50:47] webmaster at ajeux dot com

Hello,

Same bug with php5.3-200809011230 (different line number though).

ext/phar/.libs/util.o: In function `phar_create_signature':
/source/php/php5.3-200809011230/ext/phar/util.c:2047: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200809011230/ext/phar/util.c:2050: undefined
reference to `PHP_SHA512Update'

[...]



[2008-08-29 13:27:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2008-08-25 10:13:30] olivier at ajeux dot com

Description:

When compiling php5.3-200808250830:

ext/phar/.libs/util.o: In function `phar_create_signature':
/source/php/php5.3-200808250830/ext/phar/util.c:2046: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200808250830/ext/phar/util.c:2049: undefined
reference to `PHP_SHA512Update'
/source/php/php5.3-200808250830/ext/phar/util.c:2052: undefined
reference to `PHP_SHA512Final'
/source/php/php5.3-200808250830/ext/phar/util.c:2061: undefined
reference to `PHP_SHA256Init'
/source/php/php5.3-200808250830/ext/phar/util.c:2064: undefined
reference to `PHP_SHA256Update'
/source/php/php5.3-200808250830/ext/phar/util.c:2067: undefined
reference to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/source/php/php5.3-200808250830/ext/phar/util.c:1915: undefined
reference to `PHP_SHA256Init'
/source/php/php5.3-200808250830/ext/phar/util.c:1925: undefined
reference to `PHP_SHA256Update'
/source/php/php5.3-200808250830/ext/phar/util.c:1882: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200808250830/ext/phar/util.c:1892: undefined
reference to `PHP_SHA512Update'
/source/php/php5.3-200808250830/ext/phar/util.c:1899: undefined
reference to `PHP_SHA512Final'
/source/php/php5.3-200808250830/ext/phar/util.c:1932: undefined
reference to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

Same result with php5.3-200808211030 and all releases since (don't know
if it happened before).


Configure line :
./configure  --prefix=/usr --sysconfdir=/etc/php53
--libdir=/usr/lib/php53 --mandir=/usr/share/man --program-suffix=53
--with-layout=GNU --enable-sigchild --disable-rpath --enable-libxml
--enable-bcmath=shared --enable-calendar=shared --enable-ctype=shared
--enable-dom=shared --enable-exif=shared --enable-filter
--enab

#46195 [NEW]: odbc_prepare use SQLNumResultCols

2008-09-29 Thread marcus dot kunze at syntela dot de
From: marcus dot kunze at syntela dot de
Operating system: Windows
PHP version:  5.2.6
PHP Bug Type: ODBC related
Bug description:  odbc_prepare use SQLNumResultCols

Description:

odbc_prepare use SQLNumResultCols to get the count and description of den
result column. The problem is a resultset the is depends on the paremeter
or a multiple resultset with differens column.
SQLNumResultCols return only the correct result after SQLExecute is call!
In odbc_execute is the same code, the code in odbc_prepare is needless.
Testet Solution on Windows, SQL Server 2005
php_odbc.c[908]
   result->numcols = 0;
/*
   SQLNumResultCols(result->stmt, &(result->numcols));
   if (result->numcols > 0) {
if (!odbc_bindcols(result TSRMLS_CC)) {
efree(result);
RETURN_FALSE;
}
   } else {
result->values = NULL;
   }
*/  
   zend_list_addref(conn->id);


Reproduce code:
---
$connstr = "Driver={SQL Server};SERVER=localhost;DATABASE=master";
$sql = "select 1 as col1 \n".
   "select 2 as col2, 3 as col3 \n".
   "select 4 as col4, 5 as col5, 6 as col6";

$conn = odbc_connect($connstr, $username, $password);
$result = odbc_prepare($conn, $sql );
odbc_execute( $result );
do {
odbc_result_all( $result );
} while ( odbc_next_result( $result ) );


Expected result:

col1
1

col2col3
2   3

col4col5col6
4   5   6

Actual result:
--
col4col5col6
1   ÷xÈøx4[úøx÷x4[ú

col2col3
2   3

col4col5col6
4   5   6

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



#46196 [NEW]: restore_error_handler ist broken

2008-09-29 Thread php at benjaminschulz dot com
From: php at benjaminschulz dot com
Operating system: 
PHP version:  5.3CVS-2008-09-29 (snap)
PHP Bug Type: *General Issues
Bug description:  restore_error_handler ist broken

Description:

restore_error_handler doesn't work anymore in PHP 5.3.0alpha3-dev (cli)
(built: Sep 29 2008 12:17:38)

Reproduce code:
---
function foo() { var_dump(__FUNCTION__); } 
set_error_handler("foo"); 
restore_error_handler(); 
trigger_error("foobar", E_USER_ERROR);'

Expected result:

A standard error message.

Actual result:
--
string(3) "foo"

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



#45907 [Fbk->Opn]: undefined reference to `PHP_SHA512Init'

2008-09-29 Thread olivier at ajeux dot com
 ID:   45907
 User updated by:  olivier at ajeux dot com
 Reported By:  olivier at ajeux dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PHAR related
 Operating System: Linux i686 2.6.17
 PHP Version:  5.3CVS-2008-09-29 (snap)
 New Comment:

New configure/make without "--enable-hash=shared" (replaced with
"--enable-hash"): OK
Build complete.


Previous Comments:


[2008-09-29 12:04:49] [EMAIL PROTECTED]

Can someone please confirm that this occurs only when ext/hash is built
as shared?



[2008-09-29 10:36:04] olivier at ajeux dot com

Tested again with php5.3 200809290830

Same bug.

ext/phar/.libs/util.o: In function `phar_create_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:2047: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2050: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2053: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:2062: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2065: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2068: undefined reference
to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:1916: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1926: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1883: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1893: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1900: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:1933: undefined reference
to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1



[2008-09-06 01:00:00] php-bugs at lists dot php dot net

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



[2008-09-01 12:50:47] webmaster at ajeux dot com

Hello,

Same bug with php5.3-200809011230 (different line number though).

ext/phar/.libs/util.o: In function `phar_create_signature':
/source/php/php5.3-200809011230/ext/phar/util.c:2047: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200809011230/ext/phar/util.c:2050: undefined
reference to `PHP_SHA512Update'

[...]



[2008-08-29 13:27:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





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

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



#46196 [Opn->Asn]: restore_error_handler ist broken

2008-09-29 Thread tony2001
 ID:  46196
 Updated by:  [EMAIL PROTECTED]
 Reported By: php at benjaminschulz dot com
-Status:  Open
+Status:  Assigned
-Bug Type:*General Issues
+Bug Type:Scripting Engine problem
 PHP Version: 5.3CVS-2008-09-29 (snap)
-Assigned To: 
+Assigned To: helly


Previous Comments:


[2008-09-29 12:37:14] php at benjaminschulz dot com

Description:

restore_error_handler doesn't work anymore in PHP 5.3.0alpha3-dev (cli)
(built: Sep 29 2008 12:17:38)

Reproduce code:
---
function foo() { var_dump(__FUNCTION__); } 
set_error_handler("foo"); 
restore_error_handler(); 
trigger_error("foobar", E_USER_ERROR);'

Expected result:

A standard error message.

Actual result:
--
string(3) "foo"





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



#46194 [Ctl->Fbk]: SIGSEGV when requested file is not found

2008-09-29 Thread cellog
 ID:   46194
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xuefer at gmail dot com
-Status:   Critical
+Status:   Feedback
 Bug Type: PHAR related
 Operating System: linux
 PHP Version:  5.3CVS-2008-09-29 (CVS)
-Assigned To:  
+Assigned To:  cellog
 New Comment:

Please try this simple patch found at
http://pear.php.net/~greg/fixbug46194.patch.txt

Index: ext/phar/phar.c
===
RCS file: /repository/php-src/ext/phar/phar.c,v
retrieving revision 1.370.2.45
diff -u -r1.370.2.45 phar.c
--- ext/phar/phar.c 13 Sep 2008 22:30:55 -  1.370.2.45
+++ ext/phar/phar.c 29 Sep 2008 13:00:22 -
@@ -3286,6 +3286,9 @@
int failed;
phar_archive_data *phar;

+   if (!file_handle || !file_handle->filename) {
+   return phar_orig_compile_file(file_handle, type
TSRMLS_CC);
+   }
if (strstr(file_handle->filename, ".phar") &&
!strstr(file_handle->filename, "://")) {
if (SUCCESS ==
phar_open_from_filename(file_handle->filename,
strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) {
if (phar->is_zip || phar->is_tar) {



Previous Comments:


[2008-09-29 11:13:16] [EMAIL PROTECTED]

Seems to be PHAR related issue (once again) so the quick fix: disable
phar. This is quite critical bug..



[2008-09-29 03:13:05] xuefer at gmail dot com

Description:

i have setup lighttpd + fastcgi + php, it used to work with old php but
not with 5.3 (not sure about 5.2)

  "localhost:1026" => (
"host" => "127.0.0.1", "port" => 2048,
"check-local" => "disable", "disable-time" => 1,
"broken-scriptfilename" => "enable",
),
be aware that it is check-local => disable, which mean lighttpd won't
check if the file is exists but will forward the request to php anyway
when i try to request a non existing file, php SIGSEGV

Program received signal SIGSEGV, Segmentation fault.
0x4b319f51 in strstr () from /lib/libc.so.6
(gdb) bt
#0  0x4b319f51 in strstr () from /lib/libc.so.6
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
#2  0x0849d9b2 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/xuefer/src/php/php5/Zend/zend.c:1189
#3  0x08433dbb in php_execute_script (primary_file=0xbfec434c) at
/home/xuefer/src/php/php5/main/main.c:2080
#4  0x0852e362 in main (argc=3, argv=0xbfec44b4) at
/home/xuefer/src/php/php5/sapi/cgi/cgi_main.c:1980
(gdb) up
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
3294if (strstr(file_handle->filename, ".phar") &&
!strstr(file_handle->filename, "://")) {
(gdb) p file_handle[0]
$2 = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0,
handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0,
  mmap = {len = 0, pos = 1, map = 0x83f, buf = 0xb7f14878
"j®\t\b\020ii\r", old_handle = 0xb7f15000, old_closer = 0x807ba17},
  reader = 0x4b2b9840, fsizer = 0x805f4a4, closer = 0x1}},
free_filename = 0 '\0'}







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



#40479 [Com]: zend_mm_heap corrupted

2008-09-29 Thread john dot glazebrook at gauva dot co dot uk
 ID:   40479
 Comment by:   john dot glazebrook at gauva dot co dot uk
 Reported By:  rrossi at maggioli dot it
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Suse Linux 9.0
 PHP Version:  5.2.1
 New Comment:

> For me it looks like a hardware problem (dead memory segments),
please
> use a memory testing tool (e.g. memtest86 [1]) or try to reproduce
the
> bug on an other computer. Dead memory segments can cause exactly
that
> sort of problems (corrupted memory, crashes, etc).

(See my previous messages posted above...)

I just tried my code on a brand new HP server, this time on CentOS 5.2,
PHP 5.2.0, MySQLI 5.0.45.

I still get seg faults in httpd error logs files.

So I don't see how this is a hardware fault. I see this error using the
same PHP code on 3 different servers, 2 different operating systems and
2 different MySQL versions. I also changed my tables from MyISAM to
InnoDB and *STILL* get seg faults.

I use Zend Framework and I have changed DB adapters from Mysqli to
PDO_MYSQL, but both cause seg faults. Does that cover everything apart
from the PHP version?

monk.e.boy


Previous Comments:


[2008-08-17 01:00:00] php-bugs at lists dot php dot net

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



[2008-08-09 16:31:38] [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.

Also, all problems reported here have different causes but seems to be
triggered when starting to use more memory, and the bug disappears
when using less memory, or by changing/commenting a random line in
your code.
 
For me it looks like a hardware problem (dead memory segments), please
use a memory testing tool (e.g. memtest86 [1]) or try to reproduce the
bug on an other computer. Dead memory segments can cause exactly that
sort of problems (corrupted memory, crashes, etc).

[1] memtest86 http://www.memtest.org/#downiso




[2008-08-09 09:02:24] tarraccas at burningmoth dot com

Concerning my previous statement: I was using output buffering in the
included files. I've removed the output buffering and I'm no longer
getting the error.



[2008-08-09 08:01:55] tarraccas at burningmoth dot com

I get this error when including files in a loop and trying to execute a
loop inside one of those included files.



[2008-07-23 16:30:15] jumpbackhack at gmail dot com

This happens no matter what version, 5.2.1, 5.2.6 and even 5.2.7-dev
(snap php5.2-200807220430)

How is it possible this many users have this bug, some even can
reproduce it consistently, and the developers need backtraces?  It seems
as though it is a common bug and my guess is many come here looking for
a solution, do not find one, figure the zend_mm_heap corrupted is
intermittent and hope for a solution soon (they do not post they too
have the issue).  

I will attempt to recompile with debug and get a trace, however, this
only occurs on production servers (indicating load/stress related issue
when using more memory) and will take a while to get the OK to execute. 
Running one of the scripts provided below to reproduce the crash does
not happen for us on development systems.

this bug is over 16 months old and when it happens, it is a whopper,
please do not ignore!

will be happy to provide any additional information that does not
require a recompile/waiting for clearance on production.



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

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



#45907 [Opn->Asn]: undefined reference to `PHP_SHA512Init'

2008-09-29 Thread johannes
 ID:   45907
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olivier at ajeux dot com
-Status:   Open
+Status:   Assigned
 Bug Type: PHAR related
 Operating System: Linux i686 2.6.17
 PHP Version:  5.3CVS-2008-09-29 (snap)
-Assigned To:  
+Assigned To:  cellog
 New Comment:

Greg, please have a look. Phar should properly check for the existence
of hash imo.


Previous Comments:


[2008-09-29 12:44:24] olivier at ajeux dot com

New configure/make without "--enable-hash=shared" (replaced with
"--enable-hash"): OK
Build complete.



[2008-09-29 12:04:49] [EMAIL PROTECTED]

Can someone please confirm that this occurs only when ext/hash is built
as shared?



[2008-09-29 10:36:04] olivier at ajeux dot com

Tested again with php5.3 200809290830

Same bug.

ext/phar/.libs/util.o: In function `phar_create_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:2047: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2050: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2053: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:2062: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2065: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2068: undefined reference
to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:1916: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1926: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1883: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1893: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1900: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:1933: undefined reference
to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1



[2008-09-06 01:00:00] php-bugs at lists dot php dot net

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



[2008-09-01 12:50:47] webmaster at ajeux dot com

Hello,

Same bug with php5.3-200809011230 (different line number though).

ext/phar/.libs/util.o: In function `phar_create_signature':
/source/php/php5.3-200809011230/ext/phar/util.c:2047: undefined
reference to `PHP_SHA512Init'
/source/php/php5.3-200809011230/ext/phar/util.c:2050: undefined
reference to `PHP_SHA512Update'

[...]



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

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



#46197 [NEW]: Problems with file_exists and multiple instances

2008-09-29 Thread henrique dot grolli at gmail dot com
From: henrique dot grolli at gmail dot com
Operating system: Slackware Linux
PHP version:  5.2.6
PHP Bug Type: Filesystem function related
Bug description:  Problems with file_exists and multiple instances

Description:

Well, better explained when seeing the code.

Not acting as expected via web browser as the both instances execute as
the lock file was not created by another instance but doing it well via
shell console.

Same problem using clearstatcache() function.

Reproduce code:
---
// LOCK_FILE was defined to /tmp/test.lock
// creating the lock file
if(file_exists(LOCK_FILE)) {
echo "ANOTHER INSTANCE RUNNING\n";
exit(1);
}
else {
touch(LOCK_FILE);
}

/* any action that takes time*/
echo "running\n";
sleep(5); // simulating slow scripts
echo "done\n";

if(file_exists(LOCK_FILE)) {
unlink(LOCK_FILE);
}
else {
echo "I think someone deleted the lock file\n";
}

Expected result:

To see "running\ndone\n" in one instance, and "ANOTHER INSTANCE RUNNING\n"
if another instance try to execute at the same time.

Actual result:
--
Via shell everything works as well but via web browser both instances run
as the lock file doesnt exist.

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



#45591 [Com]: Bus error on file_get_contents

2008-09-29 Thread rlucia at iscanet dot com
 ID:   45591
 Comment by:   rlucia at iscanet dot com
 Reported By:  rommer at active dot by
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: linux-2.6.x i386
 PHP Version:  5.2CVS-2008-07-22 (snap)
 New Comment:

# php -v
PHP 5.2.5 (cli) (built: Apr 16 2008 19:24:05) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator,
by eAccelerator
# php -m
[PHP Modules]
ctype
curl
date
dom
eAccelerator
ffmpeg
filter
gd
geoip
hash
iconv
json
libxml
magickwand
mcrypt
memcache
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
eAccelerator






Core was generated by `/usr/local/apache2//bin/httpd -k start'.
Program terminated with signal 7, Bus error.
#0  0xb7d09b35 in memcpy () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7d09b35 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7af3f4c in _php_stream_copy_to_mem (src=0xb6ed7db8,
buf=0xbff4f9bc, maxlen=4294967295, persistent=0)
at /usr/local/src/php-5.2.5/main/streams/streams.c:1223
#2  0xb7a83106 in zif_file_get_contents (ht=1, return_value=0xb2372fd4,
return_value_ptr=0x0, this_ptr=0x0, 
return_value_used=1) at
/usr/local/src/php-5.2.5/ext/standard/file.c:563
#3  0xb7b3cbb2 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff4fbd0)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:200
#4  0xb7b3bbe8 in execute (op_array=0xb23b6330) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#5  0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff4fe10)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#6  0xb7b3bbe8 in execute (op_array=0xb23b6330) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#7  0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff50050)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#8  0xb7b3bbe8 in execute (op_array=0xb23b6330) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#9  0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff50290)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#10 0xb7b3bbe8 in execute (op_array=0xb23b6330) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#11 0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff50740)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#12 0xb7b3bbe8 in execute (op_array=0xb23b5e9c) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#13 0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff50a40)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#14 0xb7b3bbe8 in execute (op_array=0xb23af4b8) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#15 0xb7b13df8 in zend_call_function (fci=0xbff50b88,
fci_cache=0xbff50bac)
at /usr/local/src/php-5.2.5/Zend/zend_execute_API.c:990
#16 0xb7a03ca5 in zim_reflection_method_invokeArgs (ht=2,
return_value=0xb236d4f8, return_value_ptr=0x0, 
this_ptr=0xb236cedc, return_value_used=1) at
/usr/local/src/php-5.2.5/ext/reflection/php_reflection.c:2479
#17 0xb7b3cbb2 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff50dc0)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:200
#18 0xb7b3bbe8 in execute (op_array=0xb23e9094) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#19 0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff51080)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#20 0xb7b3bbe8 in execute (op_array=0xb23e9160) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#21 0xb7b3c618 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff512d0)
at /usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:234
#22 0xb7b3bbe8 in execute (op_array=0xb6ed78ac) at
/usr/local/src/php-5.2.5/Zend/zend_vm_execute.h:92
#23 0xb7b1e574 in zend_execute_scripts (type=8, retval=, file_count=3)
at /usr/local/src/php-5.2.5/Zend/zend.c:1134
#24 0xb7adf3c0 in php_execute_script (primary_file=0xbff53578) at
/usr/local/src/php-5.2.5/main/main.c:2004
#25 0xb7b97561 in php_handler (r=0x8468fa0) at
/usr/local/src/php-5.2.5/sapi/apache2handler/sapi_apache2.c:631
#26 0x08074127 in ap_run_handler (r=0x8468fa0) at config.c:157
#27 0x08077217 in ap_invoke_handler (r=0x8468fa0) at config.c:372
#28 0x0808dd98 in ap_process_request (r=0x8468fa0) at
http_request.c:258
#29 0x0808affe in ap_process_http_connection (c=0x8462ed8) at
http_core.c:190
#30 0x0807b0b7 in ap_run_process_connection (c=0x8462ed8) at
connection.c:43
#31 0x080a1464 in child_main (child_num_arg=) at
prefork.c:640
#32 0x080a175a in make_child (s=, slot=48) at
prefork.c:736
#33 0x080a208e in ap_mpm_run (_pconf=0x80ec0a8, plog=0x812a1a0,
s=0x80f0ce0) at prefork.c:871
#34 0x08061b6f in main (argc=135176352, argv=0x8460d00) at main.c:730


Previous Comments:


[2

#46185 [Asn->Csd]: importNode changes the namespace of an XML element.

2008-09-29 Thread rrichards
 ID:   46185
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robin2008 at altruists dot org
-Status:   Assigned
+Status:   Closed
 Bug Type: DOM XML related
 Operating System: Ubuntu
 PHP Version:  5.2.6
 Assigned To:  rrichards
 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.

Fixed in 5_3


Previous Comments:


[2008-09-28 11:42:58] [EMAIL PROTECTED]

Assign to self



[2008-09-26 16:29:44] robin2008 at altruists dot org

Description:

The problem occurs when an element has an unused namespace node
xmlns:default which is hanging around, unused.

When imorting a node under certain conditions, the parent node sets an
xmlns:default which is intended to apply to the imported Node, but
doesn't because xmlns:default applies instead.

The net effect is that the imported node changes namespace.

Reproduce code:
---
loadXML('http://friend2friend.net"/>');
$a= $aDOM->firstChild;
echo 'DOM is add into is '.$aDOM->saveXML().chr(13);
$ok = new DOMDocument;
$ok->loadXML('http://friend2friend.net";
xmlns="REAL">');
$imported= $aDOM->importNode($ok->firstChild, true);
echo 'Node to import is '.$aDOM->saveXML($imported).chr(13).chr(13);
$a->appendChild($imported);
echo 'Result is '.$aDOM->saveXML();

?>


Expected result:

DOM is add into is 
http://friend2friend.net"/>

Node to import is http://friend2friend.net";
xmlns="REAL">

Result is 
http://friend2friend.net";>


Actual result:
--
DOM is add into is 
http://friend2friend.net"/>

Node to import is http://friend2friend.net";
xmlns="REAL">

Result is 
http://friend2friend.net";>






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



#46040 [Csd]: [PATCH] pcre_internal.h parse error during compilation

2008-09-29 Thread nlopess
 ID:   46040
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
 Status:   Closed
 Bug Type: Compile Failure
 Operating System: IBM AIX 5.3 5300-08-01-0819
 PHP Version:  5.3CVS-2008-09-10 (snap)
 New Comment:

we will fix it when upstream developers fix it. In general we do not
patch bundled libraries for non-critical issues (i.e. security bugs).


Previous Comments:


[2008-09-29 06:06:28] Bjorn dot Wiberg at its dot uu dot se

Hi again!

It seems that my patch has not (yet?) been included with
php5.3-200809290430. Will it be, or are you expecting the PCRE
developers to release a fix and include that with PHP 5.3 instead?
Should this bug really be closed until this has been resolved?

Thanks in advance!

Best regards,
Björn



[2008-09-28 20:48:08] [EMAIL PROTECTED]

forwarded upstream: http://bugs.exim.org/show_bug.cgi?id=761



[2008-09-16 11:29:20] Bjorn dot Wiberg at its dot uu dot se

Will you report this upstream?
And apply the fix in the meantime?

Many thanks in advance!

Best regards,
Björn



[2008-09-11 12:27:33] [EMAIL PROTECTED]

This really needs to go upstream to
http://bugs.exim.org/enter_bug.cgi?product=PCRE

We can fix it as well though.



[2008-09-11 11:39:10] Bjorn dot Wiberg at its dot uu dot se

Attaching patch below which solves the problem.


*** php5.3-200809100630/ext/pcre/pcrelib/pcre_internal.h.ORIGINAL  
2008-09-11 13:19:06.0 +0200
--- php5.3-200809100630-my/ext/pcre/pcrelib/pcre_internal.h
2008-09-11 13:19:46.0 +0200
***
*** 562,570 
  /* Miscellaneous definitions. The #ifndef is to pacify compiler
warnings in
  environments where these macros are defined elsewhere. */
  
! #ifndef FALSE
  typedef int BOOL;
  
  #define FALSE   0
  #define TRUE1
  #endif
--- 562,572 
  /* Miscellaneous definitions. The #ifndef is to pacify compiler
warnings in
  environments where these macros are defined elsewhere. */
  
! #ifndef BOOL
  typedef int BOOL;
+ #endif
  
+ #ifndef FALSE
  #define FALSE   0
  #define TRUE1
  #endif



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

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



#44250 [Com]: PHP CLI :: *** glibc detected *** realloc():

2008-09-29 Thread dbln at keerub dot ee
 ID:   44250
 Comment by:   dbln at keerub dot ee
 Reported By:  toni at igmweb dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Red Hat Enterprise Linux ES rele
 PHP Version:  5.2.5
 New Comment:

I still get the exact same result trying to compile php 5.2.6 on centos
4.7 (RHEL clone). Runing configure with or without --enable-dmalloc does
not change the outcome.

Bug #32001 (xml_parse*() goes into infinite loop when autodetection in
effect), using UTF-* [ext/xml/tests/bug32001.phpt]


Previous Comments:


[2008-03-19 01:00:00] php-bugs at lists dot php dot net

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



[2008-03-11 22:10:58] [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

And note: --enable-dmalloc is for debugging purposes only! Do not use
if you don't really need it.



[2008-02-26 14:35:37] toni at igmweb dot com

After some tests. I found that without "--enable-dmalloc" PHP CLI runs
OK.

No more realloc() errors on "make test". But appears a message saying
that it found a possible PHP error.

I pasted the text below.

--
=
FAILED TEST SUMMARY
-
Error message handling (with ZendOptimizer)
[tests/run-test/test008.phpt]
Convert warnings to exceptions [tests/lang/038.phpt]
Bug #32828 (Throwing exception in output_callback function with
ob_start and ob_end_clean leads to segfault) [tests/lang/bug32828.phpt]
Bug #32290 (calling call_user_func_array() ends in infinite loop within
child class) [Zend/tests/bug32290.phpt]
Bug #36268 (Object destructors called even after fatal errors)
[Zend/tests/bug36268.phpt]
Bug #41421 (Uncaught exception from a stream wrapper segfaults)
[Zend/tests/bug41421.phpt]
easter_date() [ext/calendar/tests/easter_date.phpt]
unixtojd() [ext/calendar/tests/unixtojd.phpt]
date OO cloning [ext/date/tests/oo_002.phpt]
Bug #38474 (getAttribute select attribute by order, even when prefixed)
(OK to fail with libxml2 < 2.6.2x) [ext/dom/tests/bug38474.phpt]
Bug #42082 (NodeList length zero should be empty)
[ext/dom/tests/bug42082.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Bug #41567 (json_encode() double conversion is inconsistent with PHP)
[ext/json/tests/bug41567.phpt]
SPL: spl_autoload() with methods [ext/spl/tests/spl_autoload_005.phpt]
SPL: spl_autoload() with inaccessible methods
[ext/spl/tests/spl_autoload_007.phpt]
SPL: spl_autoload() with exceptions
[ext/spl/tests/spl_autoload_008.phpt]
Test array_map() function [ext/standard/tests/array/array_map.phpt]
Test array_reverse() function : usage variations - assoc. array with
diff. value for 'array' argument
[ext/standard/tests/array/array_reverse_variation5.phpt]
Test array_unshift() function : usage variations - assoc. array with
diff values for 'array' argument
[ext/standard/tests/array/array_unshift_variation5.phpt]
Bug #35821 (array_map() segfaults when exception is throwed from the
callback) [ext/standard/tests/array/bug35821.phpt]
Bug #38450 (constructor is not called for classes used in userspace
stream wrappers) [ext/standard/tests/file/bug38450_2.phpt]
proc_open() regression test 1 (proc_open() leak)
[ext/standard/tests/file/proc_open01.phpt]
register_shutdown_function() & __call
[ext/standard/tests/general_functions/010.phpt]
Bug #32647 (Using register_shutdown_function() with invalid callback
can crash PHP) [ext/standard/tests/general_functions/bug32647.phpt]
Bug #40398 (parent and self callback functions erroneously called
statically) [ext/standard/tests/general_functions/bug40398.phpt]
Test is_callable() function
[ext/standard/tests/general_functions/is_callable.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15)
[ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly
braindead libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
[ext/standard/tests/strings/htmlentities04.phpt] (warn: possibly
braindead libc)
htmlentities() test 15 (setlocale / KOI8-R)
[ext/standard/tests/strings/htmlentities15.phpt] (warn: possibly
braindead libc)
Test vsprintf() function : usage variations - string formats with
non-string values [ext/standard/tests/strings/vsprintf_variation8.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in
effect), using UTF-* [ext/xml/t

#46198 [NEW]: string concatenation really slow

2008-09-29 Thread revealator at myrealbox dot com
From: revealator at myrealbox dot com
Operating system: Windows XP SP2
PHP version:  5.3CVS-2008-09-29 (snap)
PHP Bug Type: Performance problem
Bug description:  string concatenation really slow

Description:

inspired by bug #44069 (Huge memory usage with concatenation using .
instead of .=)
string concatenation with something like this is really slow:
$newstring = ($newstring . $string); // slow nearly 6 seconds on my
machine



Reproduce code:
---
$start_time = microtime(true);

$string = str_repeat('This is a teststring.', 50);

echo "Length: " .strlen($string)."\n";
echo "Memory Before:\n".memory_get_usage(true)."\n";
$newstring = "";

for($i = 1; $i <= 2000; $i++)
{
// $newstring .= $string; // fast 0.02 seconds
$newstring = ($newstring . $string); // slow nearly 6 seconds on my
machine
}
$end_time = microtime(true);
echo "start_time: $start_time\n";
echo "end_time: $end_time\n";

echo "Memory After:\n".memory_get_usage(true)."\n";
echo "Total Length of String:\n".strlen($newstring)."\n";
echo "\n=\n";
echo "seconds: " . ($end_time-$start_time) . "\n";
echo "\n";

Expected result:

Length: 1050
Memory Before:
524288
start_time: 1222714498.4688
end_time: 1222714498.4977
Memory After:
2883584
Total Length of String:
210

=
seconds: 0.028898954391479

Actual result:
--
Length: 1050
Memory Before:
524288
start_time: 1222714527.1094
end_time: 1222714532.8964
Memory After:
2883584
Total Length of String:
210

=
seconds: 5.7869839668274

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



#46199 [NEW]: Bug in xml_parser example

2008-09-29 Thread josef dot buk at volny dot cz
From: josef dot buk at volny dot cz
Operating system: Win XP Pro SP3
PHP version:  5.2.6
PHP Bug Type: *XML functions
Bug description:  Bug in xml_parser example

Description:

There is an error in the first example from 24-May-2008 05:30.


The result gives:




Reproduce code:
---
Try this:

just a copy of the class definition and
 
$xml=new xx_xml("aaa11aaa2ccc13","contents");
print_r($xml->data);

Expected result:

Array
(
[aa] => Array
(
[data] => Array
(
[0] => aaa1
[1] => aaa2
[2] => aaa3
)

)

[aa|bb] => Array
(
[databb] => xbxb
[data] => Array
(
[0] => 1
)

)

[aa|cc] => Array
(
[data] => Array
(
[0] => ccc1
)

)


Actual result:
--
Array
(
[aa] => Array
(
[data] => Array
(
[0] => aaa1
)

)

[aa|bb] => Array
(
[databb] => xbxb
[data] => Array
(
[0] => 1
[1] => aaa2
)

)

[aa|cc] => Array
(
[data] => Array
(
[0] => ccc13
)

)


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



#30075 [Com]: Cannot redeclare function/class

2008-09-29 Thread jherer at gmail dot com
 ID:   30075
 Comment by:   jherer at gmail dot com
 Reported By:  kj at legalizer dot dk
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: WinXP
 PHP Version:  5CVS-2004-09-13 (dev)
 New Comment:

Having the same problem with 5.1.0 on windows 2003. Is there a solution

for this problem?


Previous Comments:


[2008-02-11 01:55:34] wes at clevemail dot net

I am brand new to PHP. Here are my particulars with this problem. I am
running:

Windows XP 5.1.2600 Service Pack 2 Build 2600
IIS 5.1
PHP 5.2.5 installed from php-5.2.5-Win32.zip
  defined to IIS using php5isapi.dll
MySQL 5.0.51a Win32
phpMyAdmin 2.1.4

I built a test page that only contains phpinfo(). It loads fine.

When I load phpMyAdmin, I get the login page. After supplying my user
name and password, I get:

Fatal error: Cannot redeclare pma_ifsetor() (previously declared in
D:\My Web Sites\phpMyAdmin\libraries\core.lib.php:38) in D:\My Web
Sites\phpMyAdmin\libraries\core.lib.php on line 45

Notice that the previous declaration and the current declaration are in
the same file (including the same path) at different line numbers. The
fact is that in this file, line 38 is the PMA_ifSetOr() function
declaration, while line 45 is then end of the fPMA_ifSetOr function
(i.e. the ending "}"):

38 function PMA_ifSetOr(&$var, $default = null, $type = 'similar')
39 {
40 if (! PMA_isValid($var, $type, $default)) {
41 return $default;
42 }
43 
44 return $var;
45 }


One other interesting observation: If I restart IIS and then press F5,
the page then loads successfully. Once I get this error, pressing F5
returns the same error until I restart IIS. Then (at least every time so
far), the page loads fine.



[2007-11-27 18:53:39] brianleeholub at yahoo dot com

After trying apache 2.2.4 on the same machine/same php the content
flashes up and then firefox goes to an error page. In the event log I
get this:

Event Type: Error
Event Source:   Application Error
Event Category: (100)
Event ID:   1000
Date:   11/27/2007
Time:   10:47:14 AM
User:   N/A
Computer:   BH-DEV4
Description:
Faulting application httpd.exe, version 2.2.4.0, faulting module
php5ts.dll, version 5.2.5.5, fault address 0x000ce75a.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 68 74 74   ure  htt
0018: 70 64 2e 65 78 65 20 32   pd.exe 2
0020: 2e 32 2e 34 2e 30 20 69   .2.4.0 i
0028: 6e 20 70 68 70 35 74 73   n php5ts
0030: 2e 64 6c 6c 20 35 2e 32   .dll 5.2
0038: 2e 35 2e 35 20 61 74 20   .5.5 at 
0040: 6f 66 66 73 65 74 20 30   offset 0
0048: 30 30 63 65 37 35 61  00ce75a



[2007-11-27 18:34:44] brianleeholub at yahoo dot com

This is happening in 5.2.5 (also win2k3-sp2, iis6, isapi). Since most
of the pages in the application I'm testing are fairly complex, I
created a test script with a single function to do some basic math.
After browsing around a bit in the main application (and seeing the
"redeclare" bug, probably 15% of the page loads, with random functions
being the culprit even when reloading the same page), I pointed at my
test script and refreshed once or twice and got: PHP has encountered an
Access Violation at 01B09F7E

The main application is heavy in SOAP.



[2007-05-24 12:47:34] andized at gmx dot net

i got the same problem with php 5.1.2 on MS IIS 6.0 on a windows 2003
Server.
"Cannot redeclare ..." appears at random, but the file is only included
once.



[2004-12-06 01:00:07] php-bugs at lists dot php dot net

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



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

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



#46192 [Asn->Csd]: ArrayObject Serialization Problem

2008-09-29 Thread colder
 ID:   46192
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s dot tretter at szene1 dot at
-Status:   Assigned
+Status:   Closed
 Bug Type: SPL related
 Operating System: Linux
 PHP Version:  5.3.0alpha2
 Assigned To:  colder
 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:


[2008-09-28 10:40:42] s dot tretter at szene1 dot at

Description:

A ArrayObject containing a second ArrayObject cannot be unserialized.
The serialization differs from php5.2 to php5.3:
php5.3
C:11:"ArrayObject":180:{
x:i:0;C:11:"ArrayObject":140:{
x:i:0;a:5:{
s:4:"date";i:1222539347;
s:7:"session";s:13:"geF9ndWVzdF8w";
s:5:"style";i:1;
s:7:"friends";i:0;
s:12:"friends_list";a:0:{}
};
m:a:0:{}
};
m:a:0:{}}

php5.2
O:11:"ArrayObject":5:{
s:4:"date";i:1222539347;
s:7:"session";s:13:"geF9ndWVzdF8w";
s:5:"style";i:1;
s:7:"friends";
i:0;s:12:"friends_list";a:0:{}
}


Reproduce code:
---
$useronline = new ArrayObject(
new ArrayObject(
array('date'=>1222539347,
'session'=>'geF9ndWVzdF8w',
'style'=>1,
'friends'=>0,
'friends_list'=>array()
)
)
);

print_r($useronline);echo "\n";

$r = serialize($useronline);
echo $r."\n";

print_r(unserialize($r));

Expected result:

should work like in php 5.2

Actual result:
--
Fatal error: Uncaught exception 'UnexpectedValueException' with message
'Error at offset 6 of 180 bytes' in test.php:18
Stack trace:
#0 [internal function]: ArrayObject->unserialize('x:i:0;C:11:"Arr...')
#1 test.php(18): unserialize('C:11:"ArrayObje...')
#2 {main}
  thrown in test.php on line 18






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



#45907 [Asn]: undefined reference to `PHP_SHA512Init'

2008-09-29 Thread cellog
 ID:   45907
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olivier at ajeux dot com
 Status:   Assigned
 Bug Type: PHAR related
 Operating System: Linux i686 2.6.17
 PHP Version:  5.3CVS-2008-09-29 (snap)
 Assigned To:  cellog
 New Comment:

I think we can fix this by using php_hash_sha256_ops and
php_hash_sha512_ops to extract the actual address of PHP_SHA512Init and
company, will try a fix later if I have time, otherwise tomorrow. 
Unless Steph beats me to it (check php_hash.h and hash_sha.c, searching
for php_hash_sha256_ops to see what I'm talking about)


Previous Comments:


[2008-09-29 14:31:31] [EMAIL PROTECTED]

Greg, please have a look. Phar should properly check for the existence
of hash imo.



[2008-09-29 12:44:24] olivier at ajeux dot com

New configure/make without "--enable-hash=shared" (replaced with
"--enable-hash"): OK
Build complete.



[2008-09-29 12:04:49] [EMAIL PROTECTED]

Can someone please confirm that this occurs only when ext/hash is built
as shared?



[2008-09-29 10:36:04] olivier at ajeux dot com

Tested again with php5.3 200809290830

Same bug.

ext/phar/.libs/util.o: In function `phar_create_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:2047: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2050: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2053: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:2062: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2065: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2068: undefined reference
to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:1916: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1926: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1883: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1893: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1900: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:1933: undefined reference
to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1



[2008-09-06 01:00:00] php-bugs at lists dot php dot net

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



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

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



#45907 [Asn]: undefined reference to `PHP_SHA512Init'

2008-09-29 Thread cellog
 ID:   45907
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olivier at ajeux dot com
 Status:   Assigned
 Bug Type: PHAR related
 Operating System: Linux i686 2.6.17
 PHP Version:  5.3CVS-2008-09-29 (snap)
 Assigned To:  cellog
 New Comment:

another update: this should be completely unnecessary as we include
ext/hash/php_hash_sha.h which has:

PHP_HASH_API void PHP_SHA256Init(PHP_SHA256_CTX *);

all defined properly

I wonder if building hash shared prevents the proper export of this
function?


Previous Comments:


[2008-09-29 23:57:03] [EMAIL PROTECTED]

I think we can fix this by using php_hash_sha256_ops and
php_hash_sha512_ops to extract the actual address of PHP_SHA512Init and
company, will try a fix later if I have time, otherwise tomorrow. 
Unless Steph beats me to it (check php_hash.h and hash_sha.c, searching
for php_hash_sha256_ops to see what I'm talking about)



[2008-09-29 14:31:31] [EMAIL PROTECTED]

Greg, please have a look. Phar should properly check for the existence
of hash imo.



[2008-09-29 12:44:24] olivier at ajeux dot com

New configure/make without "--enable-hash=shared" (replaced with
"--enable-hash"): OK
Build complete.



[2008-09-29 12:04:49] [EMAIL PROTECTED]

Can someone please confirm that this occurs only when ext/hash is built
as shared?



[2008-09-29 10:36:04] olivier at ajeux dot com

Tested again with php5.3 200809290830

Same bug.

ext/phar/.libs/util.o: In function `phar_create_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:2047: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2050: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2053: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:2062: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:2065: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:2068: undefined reference
to `PHP_SHA256Final'
ext/phar/.libs/util.o: In function `phar_verify_signature':
/usr/src/php5.3-200809290830/ext/phar/util.c:1916: undefined reference
to `PHP_SHA256Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1926: undefined reference
to `PHP_SHA256Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1883: undefined reference
to `PHP_SHA512Init'
/usr/src/php5.3-200809290830/ext/phar/util.c:1893: undefined reference
to `PHP_SHA512Update'
/usr/src/php5.3-200809290830/ext/phar/util.c:1900: undefined reference
to `PHP_SHA512Final'
/usr/src/php5.3-200809290830/ext/phar/util.c:1933: undefined reference
to `PHP_SHA256Final'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 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/45907

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



#46194 [Fbk->Opn]: SIGSEGV when requested file is not found

2008-09-29 Thread xuefer at gmail dot com
 ID:   46194
 User updated by:  xuefer at gmail dot com
 Reported By:  xuefer at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PHAR related
 Operating System: linux
 PHP Version:  5.3CVS-2008-09-29 (CVS)
 Assigned To:  cellog
 New Comment:

ok, it seems fixed with your patch, but i don't think it right. why
filename can be NULL before it is past to compile file?
with php5.2-CVS cgi-fcgi:
No input file specified.
with php5.3-CVS and phar patch (or disable phar)
Fatal error: Unknown: Failed opening required '' (include_path='.:') in
Unknown on line 0

something changed in cgi, many zend extensions might be affected

$ diff ~/src/php/php5.2/sapi/cgi/cgi_main.c 
~/src/php/php5/sapi/cgi/cgi_main.c
yeah... there are big changes
$ diff -u ~/src/php/php5.2/sapi/cgi/cgi_main.c 
~/src/php/php5/sapi/cgi/cgi_main.c |grep 'No input file specified' -C 5
+   SG(sapi_headers).http_response_code = 403;
+   PUTS("Access denied.\n");
} else {
-   len += strlen(argv[i]);
+   SG(sapi_headers).http_response_code = 404;
+   PUTS("No input file specified.\n");
+   }
+   /* we want to serve more requests if this is
fastcgi
+  so cleanup and continue, request shutdown is
+  handled later */
+   if (fastcgi) {
--
-   if (errno == EACCES) {
-   SG(sapi_headers).http_response_code = 403;
-   PUTS("Access denied.\n");
-   } else {
-   SG(sapi_headers).http_response_code = 404;
-   PUTS("No input file specified.\n");
-   }
-#if PHP_FASTCGI
-   /* we want to serve more requests if this is fastcgi
-  so cleanup and continue, request shutdown is
-  handled later */


i'm not sure when will 5.3 cgi-fcgi prints out "No input file
specified" which used to be print by 5.2, are you?

summary:
1. "Fatal error" just does not make sense here. it should be legal to
pass any request including which might cause "404 File not found", from
the webserver to php cgi-fcgi backend, and php should issue 404 error
like 5.2 does

otherwise i have to set up
a. webserver(frontend) on server1 -> webserver + mod_php(backend) on
server2, or
b. webserver(frontend, check-local=disabled) on server 1 ->
webserver(backend, check-local=enabled to produce 404) -> php cgi-fcgi
(backend)

2. passing file_handle == NULL || file_handle->filename == NULL does
not make sense, it breaks zend extensions that hook zend_compile_file,
like phar, apc, ZendOptimizer, XCache, Xdebug, eaccelerator,
blahblah...

as you assigned it to phar category, i ask your advise


Previous Comments:


[2008-09-29 13:02:10] [EMAIL PROTECTED]

Please try this simple patch found at
http://pear.php.net/~greg/fixbug46194.patch.txt

Index: ext/phar/phar.c
===
RCS file: /repository/php-src/ext/phar/phar.c,v
retrieving revision 1.370.2.45
diff -u -r1.370.2.45 phar.c
--- ext/phar/phar.c 13 Sep 2008 22:30:55 -  1.370.2.45
+++ ext/phar/phar.c 29 Sep 2008 13:00:22 -
@@ -3286,6 +3286,9 @@
int failed;
phar_archive_data *phar;

+   if (!file_handle || !file_handle->filename) {
+   return phar_orig_compile_file(file_handle, type
TSRMLS_CC);
+   }
if (strstr(file_handle->filename, ".phar") &&
!strstr(file_handle->filename, "://")) {
if (SUCCESS ==
phar_open_from_filename(file_handle->filename,
strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) {
if (phar->is_zip || phar->is_tar) {




[2008-09-29 11:13:16] [EMAIL PROTECTED]

Seems to be PHAR related issue (once again) so the quick fix: disable
phar. This is quite critical bug..



[2008-09-29 03:13:05] xuefer at gmail dot com

Description:

i have setup lighttpd + fastcgi + php, it used to work with old php but
not with 5.3 (not sure about 5.2)

  "localhost:1026" => (
"host" => "127.0.0.1", "port" => 2048,
"check-local" => "disable", "disable-time" => 1,
"broken-scriptfilename" => "enable",
),
be aware that it is check-local => disable, which mean lighttpd won't
check if the file is exists but will forward the request to php anyway
when i try to request a non existing file, php SIGSEGV

Program received signal SIGSEGV, Segmentation fault.
0x4b319f51 in strstr () from /lib/libc.so.6
(gdb) bt
#0  0x4b319f51 in strstr () from /lib/libc.so.6
#1  0x082292c1 in phar_compile_file (file_handle=0xbfec434c, type=8) at
/home/xuefer/src/php/php5/ext/phar/phar.c:3294
#2  0x0849d9b2 in zend_

#46200 [NEW]: Create XLTProcessor properties for access libxslt stylesheet output properties

2008-09-29 Thread aragon at phat dot za dot net
From: aragon at phat dot za dot net
Operating system: 
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  Create XLTProcessor properties for access libxslt stylesheet 
output properties

Description:

When performing an XSLT transformation it is useful to read the attributes
of the  tag, most notably for me the media-type attribute. 
Libxslt provides an interface to these attributes in the xsltStylesheetPtr
object returned by xsltStylesheetDoc():

xmlChar *method;/* the output method */
xmlChar *methodURI; /* associated namespace if any */
xmlChar *version;   /* version string */
xmlChar *encoding;  /* encoding string */
int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */
int standalone; /* standalone = "yes" | "no" */
xmlChar *doctypePublic; /* doctype-public string */
xmlChar *doctypeSystem; /* doctype-system string */
int indent; /* should output being indented */
xmlChar *mediaType; /* media-type string */

The only way to access them in PHP is to process the stylesheet document
as an XML document.  It'd be really useful if PHP's XSLTProcessor had a
direct interface to these C properties. :)


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



#46201 [NEW]: Bug #44625 is NOT bogus!

2008-09-29 Thread jrhernandez05 at gmail dot com
From: jrhernandez05 at gmail dot com
Operating system: Windows Vista Home Premium
PHP version:  5.2.6
PHP Bug Type: Apache2 related
Bug description:  Bug #44625 is NOT bogus!

Description:

This is a duplicate of bug #44625, since I cannot add comments to "bogus"
bugs and cannot change the bug status.

I was able to confirm this bug. I set PHPIniDir correctly inside
httpd.conf to C:\Windows, and the Loaded Configuration File in phpinfo()
returned "C:\Windows\php.ini", yet my include_path still had an old value.
After many different attempts, I found out that if there is a php.ini
inside the directory where the php executable is, that file will be read
instead of what's specified in PHPIniDir.

My workaround was to remove the php.ini from C:\Windows and set PHPIniDir
to the php.ini inside the php executable directory.

P.S. This is NOT bogus, it's a real bug in Windows Vista (I am a ZCE, so
this is not a "n00b" error).


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



#46194 [Opn->Csd]: SIGSEGV when requested file is not found

2008-09-29 Thread cellog
 ID:   46194
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xuefer at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: PHAR related
 Operating System: linux
 PHP Version:  5.3CVS-2008-09-29 (CVS)
 Assigned To:  cellog
 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.

I'm marking this bug closed, as phar now handles stupid input
correctly.  Please open another bug in CGI/CLI related category for the
other problem.


Previous Comments:


[2008-09-30 02:10:56] xuefer at gmail dot com

ok, it seems fixed with your patch, but i don't think it right. why
filename can be NULL before it is past to compile file?
with php5.2-CVS cgi-fcgi:
No input file specified.
with php5.3-CVS and phar patch (or disable phar)
Fatal error: Unknown: Failed opening required '' (include_path='.:') in
Unknown on line 0

something changed in cgi, many zend extensions might be affected

$ diff ~/src/php/php5.2/sapi/cgi/cgi_main.c 
~/src/php/php5/sapi/cgi/cgi_main.c
yeah... there are big changes
$ diff -u ~/src/php/php5.2/sapi/cgi/cgi_main.c 
~/src/php/php5/sapi/cgi/cgi_main.c |grep 'No input file specified' -C 5
+   SG(sapi_headers).http_response_code = 403;
+   PUTS("Access denied.\n");
} else {
-   len += strlen(argv[i]);
+   SG(sapi_headers).http_response_code = 404;
+   PUTS("No input file specified.\n");
+   }
+   /* we want to serve more requests if this is
fastcgi
+  so cleanup and continue, request shutdown is
+  handled later */
+   if (fastcgi) {
--
-   if (errno == EACCES) {
-   SG(sapi_headers).http_response_code = 403;
-   PUTS("Access denied.\n");
-   } else {
-   SG(sapi_headers).http_response_code = 404;
-   PUTS("No input file specified.\n");
-   }
-#if PHP_FASTCGI
-   /* we want to serve more requests if this is fastcgi
-  so cleanup and continue, request shutdown is
-  handled later */


i'm not sure when will 5.3 cgi-fcgi prints out "No input file
specified" which used to be print by 5.2, are you?

summary:
1. "Fatal error" just does not make sense here. it should be legal to
pass any request including which might cause "404 File not found", from
the webserver to php cgi-fcgi backend, and php should issue 404 error
like 5.2 does

otherwise i have to set up
a. webserver(frontend) on server1 -> webserver + mod_php(backend) on
server2, or
b. webserver(frontend, check-local=disabled) on server 1 ->
webserver(backend, check-local=enabled to produce 404) -> php cgi-fcgi
(backend)

2. passing file_handle == NULL || file_handle->filename == NULL does
not make sense, it breaks zend extensions that hook zend_compile_file,
like phar, apc, ZendOptimizer, XCache, Xdebug, eaccelerator,
blahblah...

as you assigned it to phar category, i ask your advise



[2008-09-29 13:02:10] [EMAIL PROTECTED]

Please try this simple patch found at
http://pear.php.net/~greg/fixbug46194.patch.txt

Index: ext/phar/phar.c
===
RCS file: /repository/php-src/ext/phar/phar.c,v
retrieving revision 1.370.2.45
diff -u -r1.370.2.45 phar.c
--- ext/phar/phar.c 13 Sep 2008 22:30:55 -  1.370.2.45
+++ ext/phar/phar.c 29 Sep 2008 13:00:22 -
@@ -3286,6 +3286,9 @@
int failed;
phar_archive_data *phar;

+   if (!file_handle || !file_handle->filename) {
+   return phar_orig_compile_file(file_handle, type
TSRMLS_CC);
+   }
if (strstr(file_handle->filename, ".phar") &&
!strstr(file_handle->filename, "://")) {
if (SUCCESS ==
phar_open_from_filename(file_handle->filename,
strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) {
if (phar->is_zip || phar->is_tar) {




[2008-09-29 11:13:16] [EMAIL PROTECTED]

Seems to be PHAR related issue (once again) so the quick fix: disable
phar. This is quite critical bug..



[2008-09-29 03:13:05] xuefer at gmail dot com

Description:

i have setup lighttpd + fastcgi + php, it used to work with old php but
not with 5.3 (not sure about 5.2)

  "localhost:1026" => (
"host" => "127.0.0.1", "port" => 2048,
"check-local" => "disable", "disable-time" => 1,
"broken-scriptfilename" =