Bug #51527 [Com]: is_callable() returning true for non-static callbacks

2010-05-04 Thread philduby at phriendly dot net
Edit report at http://bugs.php.net/bug.php?id=51527&edit=1

 ID:   51527
 Comment by:   philduby at phriendly dot net
 Reported by:  weierophin...@php.net
 Summary:  is_callable() returning true for non-static callbacks
 Status:   Open
 Type: Bug
 Package:  Class/Object related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

Another variation that actually (unexpectedly) works:

Calling is_callable and call_user_func from inside an instance
(non-static) method using any of: 'self::otherInstanceMethod',
array('self','otherInstanceMethod'), array(self,'otherInstanceMethod')
succeed.  It appears that (the context for) '$this' is carried over from
the original method, even though the calls are being done statically.



Calling self::otherInstanceMethod() directly also succeeds.  It appears
that methods called from an instance method 'inherit' the context for
$this.  A bit unexpected, but *reasonable*.

Win XP SP3

PHP 5.3.1 (xampp)


Previous Comments:

[2010-04-12 11:50:33] paj...@php.net

I don't like the optional flag idea. You can disable strictness using
error_reporting already.



However I would like to see this change in trunk, can you come up with a
RFC pls?


[2010-04-10 20:19:45] weierophin...@php.net

@johannes Perhaps an optional "strict" flag to is_callable() would
address this? 

That would keep BC, while allowing for better checking for >= PHP-5
apps. Usage 

would be:



$callback = array('Foo', 'bar');



if (is_callable($callback, true)) {

// Passed strict check

} else {

// failed strict check

}



Thoughts?


[2010-04-10 17:55:25] johan...@php.net

The method can always be called statically. The access to $this might be
forbidden but the method itself can be called. is_callable() doesn't
mean it will execute properly. (the $this error is basically the same as
a call to an undefined funciton in there or such)



To change this the only way would be to forbid calling non-static
methods statically. Maybe this can be done nowadays (we needed the
behavior for PHP 4 compatibility) but that's no bug but requires a RFC
and discussion on internals as this might break quite a few applications
(many PEAR-based things, many legacy applications not fully "converted"
to PHP 5 )


[2010-04-10 16:43:31] weierophin...@php.net

@pajoye: Yes, this particular example was callable. However, if the
method is 

actually an instance method, and has references to $this, is_callable()
still 

returns true -- making it an invalid test to use to determine whether or
not it's 

safe to then call call_user_func(). Instead, to really determine if the
callback 

is valid, you have to start doing a bunch of reflection -- checking to
see if the 

method is defined and static, or if there is a __callStatic defined that
would 

intercept the call.



That's the more serious implication of the behavior, and why it needs to
be 

fixed.


[2010-04-10 16:29:12] paj...@php.net

It is actually callable. But calling it statically breaks the strict
standards, but the strict standards will break BC in many situations.



I would suggest to make this change in trunk only.




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/bug.php?id=51527


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


[PHP-BUG] Req #51743 [NEW]: An improvement to control blocks, `else` on loop

2010-05-04 Thread petepostma at gmail dot com
From: 
Operating system: ALL
PHP version:  Irrelevant
Package:  Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:An improvement to control blocks, `else` on loop

Description:

It would be totally kickin' if we could have 'ELSE' on a loop control.

for example, my current code:

---

$results = mysql_query($sql);

if(!$results || mysql_errno())

  die("gaaah!");



if(mysql_num_rows()<1)

  echo "No results found";

else {

  while($row = mysql_fetch_assoc($result)) {

//echo rows of a table or something...

  }

}

--

could be:

--

$results = mysql_query($sql);

if(!$results || mysql_errno())

  die("gaaah!");



while($row = mysql_fetch_assoc($result)) {

  //echo rows of a table or something...

} ELSE {

  echo "No results found";

}

--



The definition of an else on a loop would be "If the initial loop condition
fails in such a way that the loop never iterates (once or more), then the
ELSE block will be executed instead. Loops supported would be while, for,
and foreach



This would be great for debugging as well, when you're trying to figure out
why things never executed, if there was an 'ELSE { echo " -DEGUB: never
entered lool"; } on loops that must be entered it would tip programmer's
off right away.



just think about it:

foreach($items as $item) {

   echo "Item: $item\r\n";

} else {

   echo "No items found.\r\n";

}


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



[PHP-BUG] Bug #51742 [NEW]: A non well formed numeric value encountered

2010-05-04 Thread mike at mikegerwitz dot com
From: 
Operating system: All
PHP version:  5.3.2
Package:  PDO related
Bug Type: Bug
Bug description:A non well formed numeric value encountered

Description:

PDOException extends RuntimeException which in turn extends Exception. The


Exception class has the following constructor:



public __construct ([ string $message = "" [, int $code = 0 [, Exception 

$previous = NULL ]]] )



The $code parameter is to be of type integer. However, when using pdo_odbc
or 

pdo_dblib, the error code returned by the server may be a string, rather
than an 

integer. So, for example, calling $e->getCode() may yield a value of
"12X34". 

This is inconsistent with the method definition as well:



final public int getCode ( void )



PHP's own internal library should not produce outcomes that are in conflict
with 

PHP's definitions.

Test script:
---
try

{

$pdo->query( 'BAD QUERY' );

}

catch ( PDOException $e )

{

throw new Exception( $e->getMessage(), $e->getCode() );

}

Expected result:

// Just a thrown exception, nothing important

Actual result:
--
PHP Notice:  A non well formed numeric value encountered in [...] on line 7

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



Bug #51663 [Bgs]: PHP preg_match doesn't match string which should match

2010-05-04 Thread jordi dot salvat dot i dot alabart at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51663&edit=1

 ID:   51663
 User updated by:  jordi dot salvat dot i dot alabart at gmail dot com
 Reported by:  jordi dot salvat dot i dot alabart at gmail dot com
 Summary:  PHP preg_match doesn't match string which should match
 Status:   Bogus
 Type: Bug
 Package:  PCRE related
 Operating System: Ubuntu
 PHP Version:  5.3.2

 New Comment:

Thanks a lot for diagnosing this one.



Clearly I should avoid excessive backtracking by using the likes of
/([^:]+)+:/ instead of /(.+)+/.



I've filed a report for the incorrect return value in
http://bugs.php.net/bug.php?id=51741


Previous Comments:

[2010-04-30 00:03:36] fel...@php.net

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

Change the pcre.backtrack_limit directive value. [1]



Tested on 5.3SVN:

http://docs.php.net/manual/en/pcre.configuration.php


[2010-04-28 17:48:13] jordi dot salvat dot i dot alabart at gmail dot
com

No, I didn't try it myself. A colleague (Diego Campoy) with more time
available downloaded, compiled, and tested my first steps-to-reproduce
in 5.3.2, thus confirming the bug.



Diego confirms that he tested with the bundled PCRE library, version
7.8.


[2010-04-28 11:45:56] paj...@php.net

Only to be sure:



did you actually try using 5.3.2 and the bundled PCRE? You can test it
without having to install PHP on your system. You only have to compile
php. The same applies for php 5.2.13.


[2010-04-28 11:31:07] adconrad at ubuntu dot com

Given that Ubuntu builds PHP against the system libpcre, and pcretest
(by definition, but also a quick visual check with ldd) also uses the
system libpcre, it seems unlikely this is a problem with libpcre itself,
since pcretest works and PHP doesn't.


[2010-04-26 12:18:53] johan...@php.net

Are you using the bundled PCRE lib or your system's one? - Default is
the bundled one. currently bundled is 8.02. i assume  this is  a PCRE
and no PHP issue.




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/bug.php?id=51663


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


[PHP-BUG] Bug #51741 [NEW]: preg_match returns zero if it hits backtracking limit

2010-05-04 Thread jordi dot salvat dot i dot alabart at gmail dot com
From: 
Operating system: Ubuntu
PHP version:  5.3SVN-2010-05-04 (SVN)
Package:  PCRE related
Bug Type: Bug
Bug description:preg_match returns zero if it hits backtracking limit

Description:

According to the documentation, pcre_match should return FALSE on error:



>From http://docs.php.net/manual/en/function.preg-match.php :

<<

Return Values



preg_match() returns the number of times pattern matches. That will be
either 0 times (no match) or 1 time because preg_match() will stop
searching after the first match. preg_match_all() on the contrary will
continue until it reaches the end of subject. preg_match() returns FALSE if
an error occurred.

>>



Instead, it returns 0 (integer zero) -- see Felipe's comment on
http://bugs.php.net/bug.php?id=51663&edit=2 for a check.



Note that pcretest does report an error in this same case:

$ pcretest

PCRE version 7.8 2008-09-05



  re> /(.+)+:/

data> \q10a:bbb

Error -8

data> 



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



Bug #48898 [Opn->Bgs]: readOuterXML() doesn't work on DTDs

2010-05-04 Thread rrichards
Edit report at http://bugs.php.net/bug.php?id=48898&edit=1

 ID:   48898
 Updated by:   rricha...@php.net
 Reported by:  boen dot robot at gmail dot com
 Summary:  readOuterXML() doesn't work on DTDs
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  XML Reader
 Operating System: Windows Vista Ultimate x64 SP2
 PHP Version:  5.3.0

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The problem lies within libxml2. Bug is being handled there.


Previous Comments:

[2009-07-12 21:41:35] boen dot robot at gmail dot com

Description:

When reading an XML document with XMLReader, you can't use
readOuterXML() to read the value of some node types, DTD being the most
noticeable and disturbing one.



While for readInnerXML(), the "inner" part may be hard to define in
those node types, the "outer" is always clearly the whole node, and all
of its descendants.



If the root of the problem is in libxml, may I ask the maintainers of
this extension to forward this to libxml's authors? I'm not a C user of
libxml, so coming in with a runnable test case for libxml's authors
would be hard.



PHP runs on Apache 2.2.9 as CGI, and is the VC6 x86 Thread-safe build
(just in case it matters).

Reproduce code:
---
XML('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>





It works...





It works!



');

$reader->read();

echo $reader->readOuterXML();

?>

Expected result:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

Actual result:
--
An empty string.






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


Bug #51603 [Fbk->Opn]: excuting php script causes apache2 seg fault

2010-05-04 Thread phil at weballey dot com
Edit report at http://bugs.php.net/bug.php?id=51603&edit=1

 ID:   51603
 User updated by:  phil at weballey dot com
 Reported by:  phil at weballey dot com
 Summary:  excuting php script causes apache2 seg fault
-Status:   Feedback
+Status:   Open
 Type: Bug
 Package:  Apache2 related
 Operating System: FreeBSD 8.0
 PHP Version:  5.3.2

 New Comment:

Unfortunately I don't have a test box at hand to attempt to strip down
horde's test.php script to the problem area. I can include the whole
script if desired. (Its 390 lines).


Previous Comments:

[2010-05-04 11:02:13] paj...@php.net

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

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

Please avoid embedding huge scripts into the report.




[2010-04-19 20:48:12] phil at weballey dot com

Description:

Executing the horde test.php installation validation script causes httpd
to seg fault. I can execute a simple php script with the phpinfo()
inside.



This is one of the error messages. There is no other information I can
find in the sys logs (apache or otherwise);  



[Sat Apr 17 23:06:19 2010] [notice] Apache/2.2.14 (FreeBSD)
mod_ssl/2.2.14 OpenS

SL/0.9.8k DAV/2 PHP/5.3.2 with Suhosin-Patch configured -- resuming
normal opera

tions

[Sat Apr 17 23:06:35 2010] [notice] child pid 66799 exit signal
Segmentation fau

lt (11)



This is with eaccelerator disabled. Enabling eaccelerator 0.9.3 via
extensions.ini does not help. However, enabling eaccelerator via a
php.ini stanza (included below) makes the seg faults go away.



zend_extension="/usr/local/lib/php/20090626/eaccelerator.so"

eaccelerator.shm_size="32"

eaccelerator.cache_dir="/tmp/eaccelerator"

eaccelerator.enable="1"

eaccelerator.optimizer="1"

eaccelerator.check_mtime="1"

eaccelerator.debug="0"

eaccelerator.filter=""

eaccelerator.shm_max="0"

eaccelerator.shm_ttl="0"

eaccelerator.shm_prune_period="0"

eaccelerator.shm_only="0"

eaccelerator.compress="1"

eaccelerator.compress_level="2"



CONFIGURATION INFORMATION:



PHP 5.3.2 on FreeBSD 8.0 built via ports. Here is the configure line
from "php -i":

 

phpinfo()

PHP Version => 5.3.2



System => FreeBSD mail.sfflcc.org 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2
#0: Tue Jan  5 16:02:27 UTC 2010
r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

Build Date => Apr 17 2010 21:51:32

Configure Command =>  './configure'  '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--program-prefix='
'--with-apxs2=/usr/local/sbin/apxs' '--with-pcre-regex=/usr/local'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0'

Server API => Command Line Interface

Virtual Directory Support => disabled

Configuration File (php.ini) Path => /usr/local/etc

Loaded Configuration File => /usr/local/etc/php.ini

Scan this dir for additional .ini files => /usr/local/etc/php

Additional .ini files parsed => /usr/local/etc/php/extensions.ini



PHP API => 20090626

PHP Extension => 20090626

Zend Extension => 220090626

Zend Extension Build => API220090626,NTS

PHP Extension Build => API20090626,NTS

Debug Build => no

Thread Safety => disabled

Zend Memory Manager => enabled

Zend Multibyte Support => enabled

IPv6 Support => enabled

Registered PHP Streams => compress.bzip2, zip, https, ftps, php, file,
glob, data, http, ftp, compress.zlib  

Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3,
sslv2, tls

Registered Stream Filters => convert.iconv.*, bzip2.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
dechunk, zlib.*





This server is protected with the Suhosin Patch 0.9.9.1

Copyright (c) 2006-2007 Hardened-PHP Project

Copyright (c) 2007-2009 SektionEins GmbH





This program makes use of the Zend Scripting Language Engine:

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by
eAccelerator







Test script:
---
This is the preamble for the horde test.php script. I believe you can
get it from the horde organization. Otherwise I can send it - email me.



/**

 * $Horde: horde/test.php,v 1.122.6.31 2009-05-05 15:27:28 selsky Exp $

 *

 * Copyright 1999-2009 The Horde Project (http://www.horde.org/)

 *

 

Bug #38218 [Asn->Bgs]: php:functionString tries to access objects with their names in lowercase

2010-05-04 Thread rrichards
Edit report at http://bugs.php.net/bug.php?id=38218&edit=1

 ID:   38218
 Updated by:   rricha...@php.net
 Reported by:  moksinski at gmail dot com
 Summary:  php:functionString tries to access objects with their
   names in lowercase
-Status:   Assigned
+Status:   Bogus
 Type: Bug
 Package:  XSLT related
 Operating System: windows 2000
 PHP Version:  6CVS-2006-07-26 (snap)
 Assigned To:  tony2001

 New Comment:

No longer an issue with new trunk


Previous Comments:

[2006-07-26 11:59:22] tony2...@php.net

Obviously, the engine is not completely ready for Unicode.

I'll take a look at it.


[2006-07-26 11:48:36] chr...@php.net

zend_make_callable() does a lowercase in PHP 6, which it 

didn't before



don't know, which part has to be fixed for this...


[2006-07-26 11:27:39] moksinski at gmail dot com

php6.0-win32-200607260830 generates the same error

php5.2-win32-200607261030 - works fine


[2006-07-26 08:53:22] tony2...@php.net

Please try using this CVS snapshot:

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




[2006-07-26 08:47:20] moksinski at gmail dot com

Description:

php:functionString tries to access objects with their names in
lowercase. when you use autoloader to include your classes it generates
fatal error because it cannot find the proper php file.

Reproduce code:
---




http://www.w3.org/1999/XSL/Transform";
xmlns:php="http://php.net/xsl"; xsl:extension-element-prefixes="php">





EOSTRING;

$xml='';

function __autoload($className) {

echo $className."\n";

static $classes = array('AutoLoaded'=>'AutoLoaded.php');

require_once($classes[$className]);

}

$doc = new DOMDocument('1.0','utf-8'); $doc->loadxml($xml); $xslt = new
DOMDocument(); $xslt->loadxml($xsl);

$proc = new XSLTProcessor(); $proc->registerPHPFunctions();
$proc->importStyleSheet($xslt);

$proc->transformToXML($doc);

?>

Expected result:

AutoLoaded

Actual result:
--
autoloaded

Fatal error: require_once() [function.require]: Failed opening required







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


Bug #45155 [Com]: Constructors not called when using classmap option in SoapClient

2010-05-04 Thread philipp dot kempgen at amooma dot de
Edit report at http://bugs.php.net/bug.php?id=45155&edit=1

 ID:   45155
 Comment by:   philipp dot kempgen at amooma dot de
 Reported by:  david at globulebleu dot com
 Summary:  Constructors not called when using classmap option in
   SoapClient
 Status:   Open
 Type: Bug
 Package:  SOAP related
 Operating System: *
 PHP Version:  5.2.6

 New Comment:

Same thing applies to SoapServer as well.


Previous Comments:

[2010-05-04 18:03:36] philipp dot kempgen at amooma dot de

Bug still found in PHP 5.3.2.


[2009-10-29 14:20:32] grzegorz dot drozd at esky dot pl

__wakeup is not called before deserialization from session (if you store
object in session of course). Only __set is called when setting
properties.


[2009-07-28 13:53:51] b...@php.net

changed status because this bug still exists and is reproduced


[2009-06-22 13:20:31] b...@php.net

Hi Jani,



i strumbled over this issue and have the same bug here.

tested with latest 5.2snap. Results in a not called constructor or other
magic function.



the __destructor will be called but this is too late for handling
special stuff here.


[2009-05-06 01:00:01] php-bugs at lists dot php dot net

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




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


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


Bug #45155 [Com]: Constructors not called when using classmap option in SoapClient

2010-05-04 Thread philipp dot kempgen at amooma dot de
Edit report at http://bugs.php.net/bug.php?id=45155&edit=1

 ID:   45155
 Comment by:   philipp dot kempgen at amooma dot de
 Reported by:  david at globulebleu dot com
 Summary:  Constructors not called when using classmap option in
   SoapClient
 Status:   Open
 Type: Bug
 Package:  SOAP related
 Operating System: *
 PHP Version:  5.2.6

 New Comment:

Bug still found in PHP 5.3.2.


Previous Comments:

[2009-10-29 14:20:32] grzegorz dot drozd at esky dot pl

__wakeup is not called before deserialization from session (if you store
object in session of course). Only __set is called when setting
properties.


[2009-07-28 13:53:51] b...@php.net

changed status because this bug still exists and is reproduced


[2009-06-22 13:20:31] b...@php.net

Hi Jani,



i strumbled over this issue and have the same bug here.

tested with latest 5.2snap. Results in a not called constructor or other
magic function.



the __destructor will be called but this is too late for handling
special stuff here.


[2009-05-06 01:00:01] 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".


[2009-04-28 18:40:52] j...@php.net

Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/






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/bug.php?id=45155


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


Bug #49490 [Asn->Csd]: XPath namespace prefix conflict

2010-05-04 Thread rrichards
Edit report at http://bugs.php.net/bug.php?id=49490&edit=1

 ID:   49490
 Updated by:   rricha...@php.net
 Reported by:  olav dot morken at uninett dot no
 Summary:  XPath namespace prefix conflict
-Status:   Assigned
+Status:   Closed
 Type: Bug
 Package:  DOM XML related
 Operating System: Linux (Debian)
 PHP Version:  5.3.0
 Assigned To:  rrichards

 New Comment:

This bug has been fixed in SVN.

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.

Automatic namespace registration really wasn't a good idea from the get
go. 

Performance starts taking a hit the deeper in the tree a context node.
The patch 

in the bug report was not used; rather a new third argument has been
added to 

the query() and evalute() methods, which allows automatic registration
of the 

context node to be disabled. For BC reasons auto registration is enabled
by 

default. When auto registration is disabled and context nodes are used
XPath 

performance will be increased.



i.e.

echo($xp->query('//prefix:root', null, false)->length . "\n");


Previous Comments:

[2010-05-04 17:41:51] rricha...@php.net

Automatic comment from SVN on behalf of rrichards
Revision: http://svn.php.net/viewvc/?view=revision&revision=298974
Log: fix bug #49490 (XPath namespace prefix conflict)
add test


[2010-04-17 11:14:50] thomas at weinert dot info

It looks like DOMXPath->evaluate()/DOMXPath->query() registers the
namespace prefixes of the given context and overrides any definition
from DOMXPath->registerNamespace(). PHP should not register any
namespaces from the context or at least prefer manual registrations over
automatic.



Reproduce code:

---

$dom = new DOMDocument();

$dom->loadXML(

  ''.

  ''.

  ''

);

$xpath = new DOMXPath($dom);



//get context node and check "a:foo"

$context = $dom->documentElement->firstChild;

var_dump($context->tagName);



// try to override the context node

$xpath->registerNamespace('a', 'urn:b');

var_dump(

  $xpath->evaluate(

'descendant-or-self::a:*',

$context

  )->item(0)->tagName

);



// use a prefix not used in context

$xpath->registerNamespace('prefix', 'urn:b');

var_dump(

  $xpath->evaluate(

'descendant-or-self::prefix:*',

$context

  )->item(0)->tagName

);



Expected result:



string(5) "a:foo"

string(5) "b:bar"

string(5) "b:bar"



Actual result:



string(5) "a:foo"

string(5) "a:foo"

string(5) "b:bar"


[2009-09-07 08:41:26] olav dot morken at uninett dot no

Description:

When processing an XML document with namespaces, an XPath query for a
node with a different namespace but the same namespace prefix fails.



This appears to be a conflict between the XPath namespaces and the
document namespaces. It works if either:

- The prefix in the query is replaced with a prefix that doesn't

  exist in the document.

- If the prefix in the query matches the prefix in the document.



This was tested with:

- PHP 5.3 from debian experimental: 5.3.0-3

- libxml2 2.7.3.dfsg-2.1



Reproduce code:
---
$doc = new DOMDocument();

$doc->loadXML('');



$xp = new DOMXPath($doc);

$xp->registerNamespace('prefix', 'urn:b');



echo($xp->query('//prefix:root')->length . "\n");



Expected result:

It should not find the root node, since we ask for a node in a different
prefix. I.e. it should print '0'.





Actual result:
--
It finds the root node, i.e. it prints '1'.












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


Bug #51706 [Com]: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER'

2010-05-04 Thread keith at take88 dot com
Edit report at http://bugs.php.net/bug.php?id=51706&edit=1

 ID:   51706
 Comment by:   keith at take88 dot com
 Reported by:  keith at take88 dot com
 Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADER'
 Status:   Open
 Type: Bug
 Package:  Compile Failure
 Operating System: Mac OS X 10.6.3
 PHP Version:  5.3.2

 New Comment:

Wait a second. I'm seeing this when I run ./configure



checking build system type... Invalid configuration `/usr': machine
`/usr' not recognized



That's the --prefix=/usr part of my ./configure script. 



That sounds like it could be screwing up my dns host stuff.



Any ideas?


Previous Comments:

[2010-05-04 16:18:02] ras...@php.net

Works fine for me on Leopard here as well.  Both 5.3.2 and SVN.


[2010-05-04 15:47:14] keith at take88 dot com

I'm trying to build PHP from source using a fresh install of Snow
Leopard. No fink. No Macports.



When I try an SVN install I get other problems.


[2010-05-04 11:14:45] david dot zuelke at bitextender dot com

Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a
new 

install 

of Mac OS X 10.6.3.



Both with

  ./configure --disable-all

and

  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe
-no-cpp-

precomp" 

CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe"


LDFLAGS="-

arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure
--disable-all

it builds just fine,

  make test

shows nothing unusual (http://pastie.org/944860), gethostbyname() etc
work.



Maybe it's some sort of library conflict on your system? Or your
checkout is 

borked? 

Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.


[2010-05-01 22:41:36] scott...@php.net

Jani made the last changes to these :)


[2010-05-01 22:36:40] ka...@php.net

Scott, I remember you fixed some portability issues for the DNS
functions, namely on MAC could you look into this?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


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


Bug #49081 [Asn->Csd]: [PATCH] DateTime::diff() mistake if start in January and interval > 28 days

2010-05-04 Thread derick
Edit report at http://bugs.php.net/bug.php?id=49081&edit=1

 ID:   49081
 Updated by:   der...@php.net
 Reported by:  nate at frickenate dot com
 Summary:  [PATCH] DateTime::diff() mistake if start in January
   and interval > 28 days
-Status:   Assigned
+Status:   Closed
 Type: Bug
 Package:  Date/time related
 Operating System: *
 PHP Version:  5.3.0
 Assigned To:  derick

 New Comment:

This bug has been fixed in SVN.

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:

[2010-05-04 17:11:44] der...@php.net

Automatic comment from SVN on behalf of derick
Revision: http://svn.php.net/viewvc/?view=revision&revision=298973
Log: - Fixed bug #49081 (DateTime::diff() mistake if start in January
and interval >
  28 days). (Derick)


[2010-01-23 00:10:21] dani...@php.net

Here is an updated patch against PHP_5_3.  It removes all of the
"next_month" code in 



do_range_limit_days_relative().

http://www.analysisandsolutions.com/php/bug49081v2.53.diff



As with the earlier patch, PHP built fine with it and all of the
ext/date tests that passed under 



the unpached PHP_5_3 build continued to pass under the patched version.



Grepping the entire PHP_5_3 code base indicates the only place
do_range_limit_days_relative() gets 



called is in timelib_do_rel_normalize(), and the only place that gets
called is timelib_diff().



It is unclear what purpose the "next_month" functionality served. 
Perhaps it was there in case the 



"base_y" and "base_m" parameters were later than the "y"/"m"/"d"
parameters?  But that doesn't apply 



becausetimelib_diff() always passes the earlier date to
timelib_do_rel_normalize() as "one" and on to 



do_range_limit_days_relative() as "base_*".


[2010-01-06 16:19:14] dani...@php.net

Hmm... Isn't the whole days_next_month functionality in
do_range_limit_days_relative() unnecessary?


[2010-01-06 01:04:18] dani...@php.net

A better test file:

http://www.analysisandsolutions.com/php/bug49081v2.phpt



The scenarios it covers are more relevant and thorough, plus it improves
the context, making it easier see what the test is doing.


[2010-01-05 22:11:57] dani...@php.net

This bug continues to exist in 5.3.2RC2.



DateTime::diff() / date_diff() chokes on dates starting in January if
the interval is greater than 28 days (during non-leap years).



It is happening because of a bug in do_range_limit_days_relative() in
ext/date/lib/tm2unixtime.c.  At the end of the function if *d >
days_next_month, the code subtracts the days and adds a month.  So when
the starting month is January, the days_next_month is 28 or 29,
mistakenly triggering the month/day swapping behavior.



Patch:

http://www.analysisandsolutions.com/php/bug49081.diff



Test:

http://www.analysisandsolutions.com/php/bug49081.phpt




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/bug.php?id=49081


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


Bug #51706 [Opn]: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER'

2010-05-04 Thread rasmus
Edit report at http://bugs.php.net/bug.php?id=51706&edit=1

 ID:   51706
 Updated by:   ras...@php.net
 Reported by:  keith at take88 dot com
 Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADER'
 Status:   Open
 Type: Bug
 Package:  Compile Failure
 Operating System: Mac OS X 10.6.3
 PHP Version:  5.3.2

 New Comment:

Works fine for me on Leopard here as well.  Both 5.3.2 and SVN.


Previous Comments:

[2010-05-04 15:47:14] keith at take88 dot com

I'm trying to build PHP from source using a fresh install of Snow
Leopard. No fink. No Macports.



When I try an SVN install I get other problems.


[2010-05-04 11:14:45] david dot zuelke at bitextender dot com

Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a
new 

install 

of Mac OS X 10.6.3.



Both with

  ./configure --disable-all

and

  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe
-no-cpp-

precomp" 

CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe"


LDFLAGS="-

arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure
--disable-all

it builds just fine,

  make test

shows nothing unusual (http://pastie.org/944860), gethostbyname() etc
work.



Maybe it's some sort of library conflict on your system? Or your
checkout is 

borked? 

Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.


[2010-05-01 22:41:36] scott...@php.net

Jani made the last changes to these :)


[2010-05-01 22:36:40] ka...@php.net

Scott, I remember you fixed some portability issues for the DNS
functions, namely on MAC could you look into this?


[2010-04-30 15:47:53] keith at take88 dot com

Description:

Here's the error when running 'make'

/Users/keith/php/php-5.3.2/ext/standard/dns.c:305: error: expected
specifier-qualifier-list before ‘HEADER’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_check_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: ‘T_MX’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: (Each
undeclared identifier is reported only once

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: for each
function it appears in.)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:360: error: ‘T_A’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:393: error: ‘C_IN’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘php_parserr’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:428: error: ‘T_ANY’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_get_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘HEADER’
undeclared (first use in this function)

/Users/keith/php

Bug #51740 [Opn]: acinclude.m4 macro PHP_CHECK_SIZEOF is not properly quoted

2010-05-04 Thread dave dot mulford at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51740&edit=1

 ID:   51740
 User updated by:  dave dot mulford at gmail dot com
 Reported by:  dave dot mulford at gmail dot com
 Summary:  acinclude.m4 macro PHP_CHECK_SIZEOF is not properly
   quoted
 Status:   Open
 Type: Bug
 Package:  Compile Warning
 Operating System: gentoo linux 2.6.30
 PHP Version:  5.3SVN-2010-05-04 (snap)

 New Comment:

I could not get the system to allow me to upload my patch file, so here
it is, 

in plain text.



--- acinclude.m4.original   2010-05-04 13:48:26.0 +

+++ acinclude.m42010-05-04 13:48:37.0 +

@@ -1095,7 +1095,7 @@

 dnl

 dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)

 dnl

-AC_DEFUN(PHP_CHECK_SIZEOF, [

+AC_DEFUN([PHP_CHECK_SIZEOF], [

   AC_MSG_CHECKING([size of $1])

   _PHP_CHECK_SIZEOF($1, $2, $3, [

 AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_),
[$]php_cv_sizeof_[]$1, 

[Size of $1])


Previous Comments:

[2010-05-04 16:10:23] dave dot mulford at gmail dot com

Description:

When building an extension I've written, aclocal displays a warning that
the 

macro PHP_CHECK_SIZEOF is "underquoted." I have confirmed this by
checking line 

1098 of the acinclude.m4 file that gets copied after phpize is run. 



According to the autoconf documentation, all macros should be surrounded
by 

quotes.
http://www.gnu.org/software/autoconf/manual/autoconf.html#Macro-

Definitions

Expected result:

No warnings should be displayed when the aclocal command is executed.

Actual result:
--
acinclude.m4:1098: warning: underquoted definition of PHP_CHECK_SIZEOF

acinclude.m4:1098:   run info '(automake)Extending aclocal'

acinclude.m4:1098:   or see 

http://sources.redhat.com/automake/automake.html#Extending-aclocal






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


[PHP-BUG] Bug #51740 [NEW]: acinclude.m4 macro PHP_CHECK_SIZEOF is not properly quoted

2010-05-04 Thread dave dot mulford at gmail dot com
From: 
Operating system: gentoo linux 2.6.30
PHP version:  5.3SVN-2010-05-04 (snap)
Package:  Compile Warning
Bug Type: Bug
Bug description:acinclude.m4 macro PHP_CHECK_SIZEOF is not properly quoted

Description:

When building an extension I've written, aclocal displays a warning that
the 

macro PHP_CHECK_SIZEOF is "underquoted." I have confirmed this by checking
line 

1098 of the acinclude.m4 file that gets copied after phpize is run. 



According to the autoconf documentation, all macros should be surrounded by


quotes. http://www.gnu.org/software/autoconf/manual/autoconf.html#Macro-

Definitions

Expected result:

No warnings should be displayed when the aclocal command is executed.

Actual result:
--
acinclude.m4:1098: warning: underquoted definition of PHP_CHECK_SIZEOF

acinclude.m4:1098:   run info '(automake)Extending aclocal'

acinclude.m4:1098:   or see 

http://sources.redhat.com/automake/automake.html#Extending-aclocal

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



Bug #51706 [Com]: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER'

2010-05-04 Thread keith at take88 dot com
Edit report at http://bugs.php.net/bug.php?id=51706&edit=1

 ID:   51706
 Comment by:   keith at take88 dot com
 Reported by:  keith at take88 dot com
 Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADER'
 Status:   Open
 Type: Bug
 Package:  Compile Failure
 Operating System: Mac OS X 10.6.3
 PHP Version:  5.3.2

 New Comment:

I'm trying to build PHP from source using a fresh install of Snow
Leopard. No fink. No Macports.



When I try an SVN install I get other problems.


Previous Comments:

[2010-05-04 11:14:45] david dot zuelke at bitextender dot com

Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a
new 

install 

of Mac OS X 10.6.3.



Both with

  ./configure --disable-all

and

  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe
-no-cpp-

precomp" 

CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe"


LDFLAGS="-

arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure
--disable-all

it builds just fine,

  make test

shows nothing unusual (http://pastie.org/944860), gethostbyname() etc
work.



Maybe it's some sort of library conflict on your system? Or your
checkout is 

borked? 

Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.


[2010-05-01 22:41:36] scott...@php.net

Jani made the last changes to these :)


[2010-05-01 22:36:40] ka...@php.net

Scott, I remember you fixed some portability issues for the DNS
functions, namely on MAC could you look into this?


[2010-04-30 15:47:53] keith at take88 dot com

Description:

Here's the error when running 'make'

/Users/keith/php/php-5.3.2/ext/standard/dns.c:305: error: expected
specifier-qualifier-list before ‘HEADER’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_check_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: ‘T_MX’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: (Each
undeclared identifier is reported only once

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: for each
function it appears in.)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:360: error: ‘T_A’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:393: error: ‘C_IN’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘php_parserr’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:428: error: ‘T_ANY’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_get_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘HEADER’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘hp’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error: ‘C_IN’
und

Bug #51739 [Opn->Bgs]: tricky string to float conversion

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51739&edit=1

 ID:  51739
 Updated by:  ahar...@php.net
 Reported by: daniel dot buschke at nextiraone dot de
 Summary: tricky string to float conversion
-Status:  Open
+Status:  Bogus
 Type:Bug
 Package: *General Issues
 PHP Version: 5.2.13

 New Comment:

This is expected and documented behaviour: string to float conversions
will use any valid numeric data at the start of the string and ignore
anything thereafter. The e is being processed because it's being treated
as an exponent.



More information:

http://php.net/language.types.string#language.types.string.conversion


Previous Comments:

[2010-05-04 15:07:40] daniel dot buschke at nextiraone dot de

Description:

If you convert a string like 8315e839da08e2a7afe6dd12ec58245d into a
float the conversion results in float(INF). The conversion seems to use
only 8315e839 and throws anything else away.



$ php -r 'var_dump(time()+rand()+"8315e839da08e2a7afe6dd12ec58245d");'

float(INF)



Converting this string into a float is - of course - a bug of my PHP
script. But at least I would like to discuss about the conversion
behavior. It is fully correct to convert this string into a float if it
is just "8315e839" but throwing some data away is - from my point of
view - not a valid behavior.

Test script:
---
var_dump((float)"8315e839da08e2a7afe6dd12ec58245d");

Expected result:

false or null or some other invalid "floats" or a warning

Actual result:
--
float(INF)






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


[PHP-BUG] Bug #51739 [NEW]: tricky string to float conversion

2010-05-04 Thread daniel dot buschke at nextiraone dot de
From: 
Operating system: 
PHP version:  5.2.13
Package:  *General Issues
Bug Type: Bug
Bug description:tricky string to float conversion

Description:

If you convert a string like 8315e839da08e2a7afe6dd12ec58245d into a float
the conversion results in float(INF). The conversion seems to use only
8315e839 and throws anything else away.



$ php -r 'var_dump(time()+rand()+"8315e839da08e2a7afe6dd12ec58245d");'

float(INF)



Converting this string into a float is - of course - a bug of my PHP
script. But at least I would like to discuss about the conversion behavior.
It is fully correct to convert this string into a float if it is just
"8315e839" but throwing some data away is - from my point of view - not a
valid behavior.

Test script:
---
var_dump((float)"8315e839da08e2a7afe6dd12ec58245d");

Expected result:

false or null or some other invalid "floats" or a warning

Actual result:
--
float(INF)

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



Bug #51625 [Asn]: php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 && keynum < K5

2010-05-04 Thread Eduards dot Samersovs at inbox dot lv
Edit report at http://bugs.php.net/bug.php?id=51625&edit=1

 ID:   51625
 User updated by:  Eduards dot Samersovs at inbox dot lv
 Reported by:  Eduards dot Samersovs at inbox dot lv
 Summary:  php: threads.c:321: krb5int_key_register: Assertion
   `keynum >= 0 && keynum < K5
 Status:   Assigned
 Type: Bug
 Package:  OCI8 related
 Operating System: Ubuntu 9.10
 PHP Version:  5.3.2
 Assigned To:  sixd

 New Comment:

I trying compiling with “instantclient” and “shared” with OCI8 &
PDO_OCI and without – playing with the different kind of options the
result was the same! Now I installed latest Oracle database from 10gR2
series and everything compiles fine! Seems problem exist with Oracle
11g.


Previous Comments:

[2010-04-22 03:00:33] s...@php.net

I haven't been able to set up an enviroment to test your options.  One

thought is to build PHP without OCI8 & PDO_OCI, and then install them

later as shared extensions.



There are a couple of potential inconsistencies in the bug report.

Why install Instant Client if the DB libraries are available and used

by the configure options?  Were you using RPMs on Ubuntu, or the ZIP

files?  Some of the configuration options mentioned don't exist in PHP

5.3.  The syntax for --with-pdo-oci is missing the version number.


[2010-04-21 15:14:42] Eduards dot Samersovs at inbox dot lv

Description:

Installed last Oracle 11gR2 database + 

oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm

oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm

I try also previous version of oracle-instantclient from 10gR2 - the
result was ne same. 

Without "--with-oci8=/home/oracle/product/11.2.0/db_home1
--with-pdo-oci=/home/oracle/product/11.2.0/db_home1" options compilation
is successfull!

Compiling using "root" user with full access.



./configure \

--with-apxs2=$PREFIX/bin/apxs \

--with-openssl \

--with-bz2 \

--with-zlib=/usr/local/zlib \

--enable-sigchild \

--without-sqlite \

--without-pdo-sqlite \

--with-xml --with-dom \

--with-gettext \

--with-iconv \

--enable-mbstring=all \

--enable-mbregex \

--with-ftp \

--with-mysql \

--with-mcrypt=/usr \

--with-gd --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib \

--with-imap=/usr --with-kerberos=/usr --with-imap-ssl \

--with-oci8=/home/oracle/product/11.2.0/db_home1 \

--with-pdo-oci=/home/oracle/product/11.2.0/db_home1



Error:

php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 &&
keynum < K5_KEY_MAX' failed.

Actual result:
--
Generating phar.php

php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 &&
keynum < K5_KEY_MAX' failed.

/bin/sh: line 1: 26736 Aborted ` if test -x
"/home/www/www-config/resource/php-5.3.2/sapi/cli/php"; then
/home/www/www-config/resource/php-5.3.2/build/shtool echo -n --
"/home/www/www-config/resource/php-5.3.2/sapi/cli/php -n"; if test "x"
!= "x"; then /home/www/www-config/resource/php-5.3.2/build/shtool echo
-n -- " -d
extension_dir=/home/www/www-config/resource/php-5.3.2/modules"; for i in
bz2 zlib phar; do if test -f
"/home/www/www-config/resource/php-5.3.2/modules/$i.la"; then .
/home/www/www-config/resource/php-5.3.2/modules/$i.la;
/home/www/www-config/resource/php-5.3.2/build/shtool echo -n -- " -d
extension=$dlname"; fi; done; fi; else
/home/www/www-config/resource/php-5.3.2/build/shtool echo -n --
"/home/www/www-config/resource/php-5.3.2/sapi/cli/php"; fi;` -d
'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d
phar.readonly=0 -d 'safe_mode=0'
/home/www/www-config/resource/php-5.3.2/ext/phar/build_precommand.php >
ext/phar/phar.php

make: *** [ext/phar/phar.php] Error 134






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


Bug #50954 [Dup]: iconv_mime_encode fails in Q-encoding

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=50954&edit=1

 ID:  50954
 Updated by:  ahar...@php.net
 Reported by: hiroaki dot kawai at gmail dot com
 Summary: iconv_mime_encode fails in Q-encoding
 Status:  Duplicate
 Type:Bug
 Package: ICONV related
 PHP Version: 5.2.12

 New Comment:

The spaces aren't a bug; that's part of the folding behaviour specified
in section 2.2.3 of RFC 5322.



Also, even if they were a bug, they'd be a separate issue. This is now
closed. :)


Previous Comments:

[2010-05-04 14:34:53] softex at kaliningrad dot ru

This function add also space character to the each wrapped line


[2010-05-04 13:52:14] ahar...@php.net

It does indeed look like a dupe. Changing the status accordingly.


[2010-05-04 13:12:59] softex at kaliningrad dot ru

This function does not work in Base64 mode too using utf-8 charset.


[2010-04-29 20:58:39] softex at kaliningrad dot ru

I have the same problem using non-ascii characters in second argument of
the function. 



When to expect this patch to be included in new release?


[2010-02-08 00:22:34] hiroaki dot kawai at gmail dot com

I'm not sure this is a dup of #48289 because I could not reproduce the 

test case. So I created a separete report. If you are sure this is a dup


of #48289, please mark this as "Duplicate" not "Bogus". Bogus means "the


report was not a bug at last".




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/bug.php?id=50954


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


Req #51721 [Opn->Csd]: Patch: mark DOMNodeList and DOMNamedNodeMap as Traversable

2010-05-04 Thread rrichards
Edit report at http://bugs.php.net/bug.php?id=51721&edit=1

 ID:   51721
 Updated by:   rricha...@php.net
 Reported by:  david dot zuelke at bitextender dot com
 Summary:  Patch: mark DOMNodeList and DOMNamedNodeMap as
   Traversable
-Status:   Open
+Status:   Closed
 Type: Feature/Change Request
 Package:  DOM XML related
 Operating System: Mac OS X 10.5.8
 PHP Version:  5.3.2
-Assigned To:  
+Assigned To:  rrichards

 New Comment:

This bug has been fixed in SVN.

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:

[2010-05-04 14:55:28] rricha...@php.net

Automatic comment from SVN on behalf of rrichards
Revision: http://svn.php.net/viewvc/?view=revision&revision=298967
Log: fix bug #51721 (mark DOMNodeList and DOMNamedNodeMap as
Traversable)


[2010-05-02 13:03:27] david dot zuelke at bitextender dot com

Description:

DOMNodeList and DOMNamedNodeMap do not implement the interface
Traversable even 

though they can be iterated over just fine. Minor fix. Patch attached.

Test script:
---


Expected result:

bool(true)

bool(true)



Actual result:
--
bool(false)

bool(false)








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


Bug #50954 [Com]: iconv_mime_encode fails in Q-encoding

2010-05-04 Thread softex at kaliningrad dot ru
Edit report at http://bugs.php.net/bug.php?id=50954&edit=1

 ID:  50954
 Comment by:  softex at kaliningrad dot ru
 Reported by: hiroaki dot kawai at gmail dot com
 Summary: iconv_mime_encode fails in Q-encoding
 Status:  Duplicate
 Type:Bug
 Package: ICONV related
 PHP Version: 5.2.12

 New Comment:

This function add also space character to the each wrapped line


Previous Comments:

[2010-05-04 13:52:14] ahar...@php.net

It does indeed look like a dupe. Changing the status accordingly.


[2010-05-04 13:12:59] softex at kaliningrad dot ru

This function does not work in Base64 mode too using utf-8 charset.


[2010-04-29 20:58:39] softex at kaliningrad dot ru

I have the same problem using non-ascii characters in second argument of
the function. 



When to expect this patch to be included in new release?


[2010-02-08 00:22:34] hiroaki dot kawai at gmail dot com

I'm not sure this is a dup of #48289 because I could not reproduce the 

test case. So I created a separete report. If you are sure this is a dup


of #48289, please mark this as "Duplicate" not "Bogus". Bogus means "the


report was not a bug at last".


[2010-02-07 17:37:26] j...@php.net

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

Thank you for your interest in PHP.

See bug #48289




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/bug.php?id=50954


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


Bug #48289 [Asn->Csd]: iconv_mime_encode() quoted-printable scheme is broken

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=48289&edit=1

 ID:   48289
 Updated by:   ahar...@php.net
 Reported by:  astax dot t at gmail dot com
 Summary:  iconv_mime_encode() quoted-printable scheme is broken
-Status:   Assigned
+Status:   Closed
 Type: Bug
 Package:  ICONV related
 Operating System: *
 PHP Version:  5.*, 6
 Assigned To:  aharvey

 New Comment:

This bug has been fixed in SVN.

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:

[2010-05-04 13:57:01] ahar...@php.net

Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=298963
Log: Fix for bug #48289 (iconv_mime_encode() quoted-printable scheme is
broken).
Thanks to Hiroaki Kawai for the original patch.


[2010-02-08 03:55:49] astax dot t at gmail dot com

I'd like to test the patch described in #50954. Is it included into any
PHP build already? Sorry, I don't feel like compiling PHP from sources.





Here is one more reproduce code:



$str =
base64_decode("1Ojr6ODrICLH4O/g5O3uLdHo4ejw8ero6SIgzsDOICLR7uHo7eHg7eoiIPDg5CDv8OXk8fLg4ujy/A==");



$par = array(

'scheme' => 'Q',

'input-charset' => 'CP1251',

'output-charset' => 'CP1251',

'line-length' => 74,

);



$res = iconv_mime_encode('Subject', $str, $par);



$res = iconv_mime_decode($res, ICONV_MIME_DECODE_CONTINUE_ON_ERROR,
'CP1251');

echo 'Result: Length='.strlen($res)."  ".$res."\n";

$expected = "Subject: ".$str;

echo 'Expected: Length='.strlen($expected)."  ".$expected."\n";







It says result length is 74 chars and expected is 67.


[2010-02-07 17:38:40] j...@php.net

See also bug #50954 (has a patch too)


[2009-10-13 08:22:52] rosier at interstroom dot nl

// PHP version: 5.3.0

echo 'PHP version: ' . phpversion();



$subject =
base64_decode('VEVTVCDigJMg0KMg0L3QsNGBINC10YHRgtGMINGC0L4sINGH0YLQviDQktCw0Lwg0L3Rg9C20L3QviAtIFRFU1Q=');



$preferences = array(

'line-length' => 500,

'input-charset' => 'UTF-8',

'output-charset' => 'UTF-8',

'scheme' => 'Q'

);

$result = iconv_mime_encode('Subject', $subject, $preferences);

// OK: $result = string

var_dump($result);



$preferences = array(

'line-length' => 76,

'input-charset' => 'UTF-8',

'output-charset' => 'UTF-8',

'scheme' => 'Q'

);

$result = iconv_mime_encode('Subject', $subject, $preferences);

// WRONG: $result = FALSE

var_dump($result);


[2009-07-10 03:02:15] astax dot t at gmail dot com

dypa at bk dot ru: Please make sure you use Windows-1251 charset
everywhere when you copy and paste test content. Everywhere means in
browser and in text editor.

In your case I think iconv fails because you pasted the text in
ISO-8859-1 charset.




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/bug.php?id=48289


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


Bug #48289 [Opn->Asn]: iconv_mime_encode() quoted-printable scheme is broken

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=48289&edit=1

 ID:   48289
 Updated by:   ahar...@php.net
 Reported by:  astax dot t at gmail dot com
 Summary:  iconv_mime_encode() quoted-printable scheme is broken
-Status:   Open
+Status:   Assigned
 Type: Bug
 Package:  ICONV related
 Operating System: *
 PHP Version:  5.*, 6
-Assigned To:  
+Assigned To:  aharvey



Previous Comments:

[2010-02-08 03:55:49] astax dot t at gmail dot com

I'd like to test the patch described in #50954. Is it included into any
PHP build already? Sorry, I don't feel like compiling PHP from sources.





Here is one more reproduce code:



$str =
base64_decode("1Ojr6ODrICLH4O/g5O3uLdHo4ejw8ero6SIgzsDOICLR7uHo7eHg7eoiIPDg5CDv8OXk8fLg4ujy/A==");



$par = array(

'scheme' => 'Q',

'input-charset' => 'CP1251',

'output-charset' => 'CP1251',

'line-length' => 74,

);



$res = iconv_mime_encode('Subject', $str, $par);



$res = iconv_mime_decode($res, ICONV_MIME_DECODE_CONTINUE_ON_ERROR,
'CP1251');

echo 'Result: Length='.strlen($res)."  ".$res."\n";

$expected = "Subject: ".$str;

echo 'Expected: Length='.strlen($expected)."  ".$expected."\n";







It says result length is 74 chars and expected is 67.


[2010-02-07 17:38:40] j...@php.net

See also bug #50954 (has a patch too)


[2009-10-13 08:22:52] rosier at interstroom dot nl

// PHP version: 5.3.0

echo 'PHP version: ' . phpversion();



$subject =
base64_decode('VEVTVCDigJMg0KMg0L3QsNGBINC10YHRgtGMINGC0L4sINGH0YLQviDQktCw0Lwg0L3Rg9C20L3QviAtIFRFU1Q=');



$preferences = array(

'line-length' => 500,

'input-charset' => 'UTF-8',

'output-charset' => 'UTF-8',

'scheme' => 'Q'

);

$result = iconv_mime_encode('Subject', $subject, $preferences);

// OK: $result = string

var_dump($result);



$preferences = array(

'line-length' => 76,

'input-charset' => 'UTF-8',

'output-charset' => 'UTF-8',

'scheme' => 'Q'

);

$result = iconv_mime_encode('Subject', $subject, $preferences);

// WRONG: $result = FALSE

var_dump($result);


[2009-07-10 03:02:15] astax dot t at gmail dot com

dypa at bk dot ru: Please make sure you use Windows-1251 charset
everywhere when you copy and paste test content. Everywhere means in
browser and in text editor.

In your case I think iconv fails because you pasted the text in
ISO-8859-1 charset.


[2009-05-16 17:45:48] dypa at bk dot ru

all tests give error:

Notice: iconv_mime_encode() [function.iconv-mime-encode]: Unknown error
(7) in /var/www/def.php on line 12



u...@localhost:/rss$ php -v

PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23
2009 14:35:05) 

Copyright (c) 1997-2008 The PHP Group

Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies



iconv

iconv support   enabled 

iconv implementationglibc 

iconv library version   2.9




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/bug.php?id=48289


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


Bug #50954 [Bgs->Dup]: iconv_mime_encode fails in Q-encoding

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=50954&edit=1

 ID:  50954
 Updated by:  ahar...@php.net
 Reported by: hiroaki dot kawai at gmail dot com
 Summary: iconv_mime_encode fails in Q-encoding
-Status:  Bogus
+Status:  Duplicate
 Type:Bug
 Package: ICONV related
 PHP Version: 5.2.12

 New Comment:

It does indeed look like a dupe. Changing the status accordingly.


Previous Comments:

[2010-05-04 13:12:59] softex at kaliningrad dot ru

This function does not work in Base64 mode too using utf-8 charset.


[2010-04-29 20:58:39] softex at kaliningrad dot ru

I have the same problem using non-ascii characters in second argument of
the function. 



When to expect this patch to be included in new release?


[2010-02-08 00:22:34] hiroaki dot kawai at gmail dot com

I'm not sure this is a dup of #48289 because I could not reproduce the 

test case. So I created a separete report. If you are sure this is a dup


of #48289, please mark this as "Duplicate" not "Bogus". Bogus means "the


report was not a bug at last".


[2010-02-07 17:37:26] j...@php.net

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

Thank you for your interest in PHP.

See bug #48289


[2010-02-07 14:15:50] hiroaki dot kawai at gmail dot com

Description:

iconv_mime_encode fails Q-encoding when encoding non-ascii chars, 

which case is very common. This problem does not happen if line-length 

is long enough to hold the encoded string in a single line. 



The code use unsigned int to capture expected byte. In Q-encoding, the 

value is goes to negative value (at iconv.c line 1295), and fails 

separating the value into multiple lines.



Patch as following:

===

--- iconv.c.orig2008-12-31 20:17:49.0 +0900

+++ iconv.c 2010-02-07 11:01:54.43600 +0900

@@ -1217,7 +1217,7 @@

prev_in_left = ini_in_left = in_left;

ini_in_p = in_p;

 

-   for (out_size = char_cnt; out_size > 

0;) {

+   for (out_size = (char_cnt-2)/3; 

out_size > 0;) {

size_t prev_out_left;

 

nbytes_required = 0;



Reproduce code:
---
'UTF-8','input-charset'=>'UTF-8','scheme'=>'Q','line-length'=>30));



Expected result:

a: =?UTF-8?Q?=E3=83=86?=

 =?UTF-8?Q?=E3=82=B9?=

 =?UTF-8?Q?=E3=83=88?=

 =?UTF-8?Q?=E3=83=86?=

 =?UTF-8?Q?=E3=82=B9?=

 =?UTF-8?Q?=E3=83=88?=

Actual result:
--
Notice: iconv_mime_encode(): Unknown error (7) in /home/hawk/hoge.php on


line 3






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


Bug #50954 [Com]: iconv_mime_encode fails in Q-encoding

2010-05-04 Thread softex at kaliningrad dot ru
Edit report at http://bugs.php.net/bug.php?id=50954&edit=1

 ID:  50954
 Comment by:  softex at kaliningrad dot ru
 Reported by: hiroaki dot kawai at gmail dot com
 Summary: iconv_mime_encode fails in Q-encoding
 Status:  Bogus
 Type:Bug
 Package: ICONV related
 PHP Version: 5.2.12

 New Comment:

This function does not work in Base64 mode too using utf-8 charset.


Previous Comments:

[2010-04-29 20:58:39] softex at kaliningrad dot ru

I have the same problem using non-ascii characters in second argument of
the function. 



When to expect this patch to be included in new release?


[2010-02-08 00:22:34] hiroaki dot kawai at gmail dot com

I'm not sure this is a dup of #48289 because I could not reproduce the 

test case. So I created a separete report. If you are sure this is a dup


of #48289, please mark this as "Duplicate" not "Bogus". Bogus means "the


report was not a bug at last".


[2010-02-07 17:37:26] j...@php.net

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

Thank you for your interest in PHP.

See bug #48289


[2010-02-07 14:15:50] hiroaki dot kawai at gmail dot com

Description:

iconv_mime_encode fails Q-encoding when encoding non-ascii chars, 

which case is very common. This problem does not happen if line-length 

is long enough to hold the encoded string in a single line. 



The code use unsigned int to capture expected byte. In Q-encoding, the 

value is goes to negative value (at iconv.c line 1295), and fails 

separating the value into multiple lines.



Patch as following:

===

--- iconv.c.orig2008-12-31 20:17:49.0 +0900

+++ iconv.c 2010-02-07 11:01:54.43600 +0900

@@ -1217,7 +1217,7 @@

prev_in_left = ini_in_left = in_left;

ini_in_p = in_p;

 

-   for (out_size = char_cnt; out_size > 

0;) {

+   for (out_size = (char_cnt-2)/3; 

out_size > 0;) {

size_t prev_out_left;

 

nbytes_required = 0;



Reproduce code:
---
'UTF-8','input-charset'=>'UTF-8','scheme'=>'Q','line-length'=>30));



Expected result:

a: =?UTF-8?Q?=E3=83=86?=

 =?UTF-8?Q?=E3=82=B9?=

 =?UTF-8?Q?=E3=83=88?=

 =?UTF-8?Q?=E3=83=86?=

 =?UTF-8?Q?=E3=82=B9?=

 =?UTF-8?Q?=E3=83=88?=

Actual result:
--
Notice: iconv_mime_encode(): Unknown error (7) in /home/hawk/hoge.php on


line 3






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


Bug #51706 [Asn->Opn]: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER'

2010-05-04 Thread jani
Edit report at http://bugs.php.net/bug.php?id=51706&edit=1

 ID:   51706
 Updated by:   j...@php.net
 Reported by:  keith at take88 dot com
-Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADERï
+Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADER'
-Status:   Assigned
+Status:   Open
 Type: Bug
 Package:  Compile Failure
 Operating System: Mac OS X 10.6.3
 PHP Version:  5.3.2
-Assigned To:  jani
+Assigned To:  



Previous Comments:

[2010-05-04 11:14:45] david dot zuelke at bitextender dot com

Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a
new 

install 

of Mac OS X 10.6.3.



Both with

  ./configure --disable-all

and

  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe
-no-cpp-

precomp" 

CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe"


LDFLAGS="-

arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure
--disable-all

it builds just fine,

  make test

shows nothing unusual (http://pastie.org/944860), gethostbyname() etc
work.



Maybe it's some sort of library conflict on your system? Or your
checkout is 

borked? 

Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.


[2010-05-01 22:41:36] scott...@php.net

Jani made the last changes to these :)


[2010-05-01 22:36:40] ka...@php.net

Scott, I remember you fixed some portability issues for the DNS
functions, namely on MAC could you look into this?


[2010-04-30 15:47:53] keith at take88 dot com

Description:

Here's the error when running 'make'

/Users/keith/php/php-5.3.2/ext/standard/dns.c:305: error: expected
specifier-qualifier-list before ‘HEADER’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_check_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: ‘T_MX’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: (Each
undeclared identifier is reported only once

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: for each
function it appears in.)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:360: error: ‘T_A’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:393: error: ‘C_IN’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘php_parserr’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:428: error: ‘T_ANY’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_get_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘HEADER’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘hp’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error:

Bug #51706 [Asn->Opn]: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER�

2010-05-04 Thread jani
Edit report at http://bugs.php.net/bug.php?id=51706&edit=1

 ID:   51706
 Updated by:   j...@php.net
 Reported by:  keith at take88 dot com
-Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADERï
+Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADER�
-Status:   Assigned
+Status:   Open
 Type: Bug
 Package:  Compile Failure
 Operating System: Mac OS X 10.6.3
 PHP Version:  5.3.2
 Assigned To:  jani



Previous Comments:

[2010-05-04 11:14:45] david dot zuelke at bitextender dot com

Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a
new 

install 

of Mac OS X 10.6.3.



Both with

  ./configure --disable-all

and

  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe
-no-cpp-

precomp" 

CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe"


LDFLAGS="-

arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure
--disable-all

it builds just fine,

  make test

shows nothing unusual (http://pastie.org/944860), gethostbyname() etc
work.



Maybe it's some sort of library conflict on your system? Or your
checkout is 

borked? 

Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.


[2010-05-01 22:41:36] scott...@php.net

Jani made the last changes to these :)


[2010-05-01 22:36:40] ka...@php.net

Scott, I remember you fixed some portability issues for the DNS
functions, namely on MAC could you look into this?


[2010-04-30 15:47:53] keith at take88 dot com

Description:

Here's the error when running 'make'

/Users/keith/php/php-5.3.2/ext/standard/dns.c:305: error: expected
specifier-qualifier-list before ‘HEADER’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_check_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: ‘T_MX’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: (Each
undeclared identifier is reported only once

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: for each
function it appears in.)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:360: error: ‘T_A’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:393: error: ‘C_IN’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘php_parserr’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:428: error: ‘T_ANY’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_get_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘HEADER’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘hp’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error: ‘C_INâ€

Bug #51648 [Opn]: Memory leak in infinite loop

2010-05-04 Thread shooreek at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51648&edit=1

 ID:   51648
 User updated by:  shooreek at gmail dot com
 Reported by:  shooreek at gmail dot com
 Summary:  Memory leak in infinite loop
 Status:   Open
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: WinXP SP3
 PHP Version:  5.3.2

 New Comment:

cbandy, you are right: with UPDATE or SELECT queries mem usage remains
constant. But with INSERT queries mem usage grows up. I discovered some
way to free this memory: you should unlink SQLite DB file and create new
one, because $db->close() is _not_ enough! May be there are another ways
to do it, but I do not know about their existence. May be someone
knows?



I think it real bug and it should be fixed. So, it is SQLite extension
related bug.



There is no such problem in Mysqli.



P.S. I first post I wrote that Mysqli have the same problem as SQLite.
My fault. The problem was in multiple calls mysqli_init() function. With
SELECT, UPDATE, INSERT or UPDATE commands Mysqli do not have memory
leaks. If memory leaks related with multiple mysqli_init() calls is a
bug, I can report it in separate. Just let me know.



Thank you for your attention.


Previous Comments:

[2010-05-02 16:24:23] cbandy at jbandy dot com

Inserting an infinite number of rows could easily lead to mem usage
within SQLite (not PHP).



By executing only UPDATE in the loop, DB size should stay constant. Then
results should show PHP-SQLite execution leaks.


[2010-04-24 18:43:44] fel...@php.net

I can't reproduce it on Linux.


[2010-04-23 16:01:33] shooreek at gmail dot com

Description:

Run PHP script with infinite loop from command line. Call each loop
database function from extension (I tested SQLite and Mysqli). Open task
manager. You will see that memory use is growing up, while PHP function
memory_get_usege() reports that memory usage is constant. The memory
usage may grow up to 1,5Gb or even more (depends on script code size),
even if memory_limit is set to 8Mb.



How is this possible?!

Test script:
---
exec('CREATE TABLE foo (id INTEGER, bar varchar(30))');



$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')");



$i=0;

while(1)

{

$i++;

$db->exec("INSERT INTO foo (id, bar) VALUES ($i, 'This is a test')");

$db->exec("UPDATE foo SET bar='This is memory leak' WHERE id=$i");



echo "$i ".memory_get_usage()." ".memory_get_usage(true)."\r";

}



?>



Expected result:

Constant memory usage.

Actual result:
--
Memory usage grown up (script output):



iteration, memory_get_usage(), memory_get_usage(true), memory usage(from
taskmgr), virtual memory usage(from taskmgr)



2131 330384 524288 - 1068Kb 5356Kb

4661 330384 524288 - 1148Kb 5440Kb

10974 330384 524288 - 1336Kb 5652Kb

24985 330384 524288 - 1824Kb 6140Kb

43894 330384 524288 - 2516Kb 6828Kb



As you can see, memory usage is not constant. Why?!






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


Bug #51713 [Csd]: Test getmxrr must fail

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51713&edit=1

 ID:   51713
 Updated by:   ahar...@php.net
 Reported by:  post at wickenrode dot com
 Summary:  Test getmxrr must fail
 Status:   Closed
 Type: Bug
 Package:  Network related
 Operating System: Linux 2.6.18 i686
 PHP Version:  5.3.2
 Assigned To:  aharvey

 New Comment:

Bah, braino'd the commit message and forgot to include the bug number.
It's commit 298949, if anyone needs to look it up in the future.


Previous Comments:

[2010-05-04 11:42:27] ahar...@php.net

This bug has been fixed in SVN.

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.

Updated the test to use lists.php.net instead of ez.no.


[2010-05-01 03:25:42] post at wickenrode dot com

Description:

getmxrr.phpt expects domain "ez.no" to have 1 MX while it actually has
3:



$ dig MX ez.no



;; QUESTION SECTION:

;ez.no. IN  MX



;; ANSWER SECTION:

ez.no.  360 IN  MX  10 ASPMX.L.GOOGLE.COM.

ez.no.  360 IN  MX  20 ALT1.ASPMX.L.GOOGLE.COM.

ez.no.  360 IN  MX  30 ALT2.ASPMX.L.GOOGLE.COM.



Test should be adapted accordingly.







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


Bug #51713 [Asn->Csd]: Test getmxrr must fail

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51713&edit=1

 ID:   51713
 Updated by:   ahar...@php.net
 Reported by:  post at wickenrode dot com
 Summary:  Test getmxrr must fail
-Status:   Assigned
+Status:   Closed
 Type: Bug
-Package:  Unknown/Other Function
+Package:  Network related
 Operating System: Linux 2.6.18 i686
 PHP Version:  5.3.2
 Assigned To:  aharvey

 New Comment:

This bug has been fixed in SVN.

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.

Updated the test to use lists.php.net instead of ez.no.


Previous Comments:

[2010-05-01 03:25:42] post at wickenrode dot com

Description:

getmxrr.phpt expects domain "ez.no" to have 1 MX while it actually has
3:



$ dig MX ez.no



;; QUESTION SECTION:

;ez.no. IN  MX



;; ANSWER SECTION:

ez.no.  360 IN  MX  10 ASPMX.L.GOOGLE.COM.

ez.no.  360 IN  MX  20 ALT1.ASPMX.L.GOOGLE.COM.

ez.no.  360 IN  MX  30 ALT2.ASPMX.L.GOOGLE.COM.



Test should be adapted accordingly.







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


Bug #51706 [Com]: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER�

2010-05-04 Thread david dot zuelke at bitextender dot com
Edit report at http://bugs.php.net/bug.php?id=51706&edit=1

 ID:   51706
 Comment by:   david dot zuelke at bitextender dot com
 Reported by:  keith at take88 dot com
 Summary:  Make fails dns.c:305: error: expected
   specifier-qualifier-list before ‘HEADERï
 Status:   Assigned
 Type: Bug
 Package:  Compile Failure
 Operating System: Mac OS X 10.6.3
 PHP Version:  5.3.2
 Assigned To:  jani

 New Comment:

Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a
new 

install 

of Mac OS X 10.6.3.



Both with

  ./configure --disable-all

and

  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe
-no-cpp-

precomp" 

CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe"


LDFLAGS="-

arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure
--disable-all

it builds just fine,

  make test

shows nothing unusual (http://pastie.org/944860), gethostbyname() etc
work.



Maybe it's some sort of library conflict on your system? Or your
checkout is 

borked? 

Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.


Previous Comments:

[2010-05-01 22:41:36] scott...@php.net

Jani made the last changes to these :)


[2010-05-01 22:36:40] ka...@php.net

Scott, I remember you fixed some portability issues for the DNS
functions, namely on MAC could you look into this?


[2010-04-30 15:47:53] keith at take88 dot com

Description:

Here's the error when running 'make'

/Users/keith/php/php-5.3.2/ext/standard/dns.c:305: error: expected
specifier-qualifier-list before ‘HEADER’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_check_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: ‘T_MX’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: (Each
undeclared identifier is reported only once

/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: for each
function it appears in.)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:360: error: ‘T_A’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:393: error: ‘C_IN’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘php_parserr’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:428: error: ‘T_ANY’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function
‘zif_dns_get_record’:

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘HEADER’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘hp’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error: ‘C_IN’
undeclared (first use in this function)

/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error: ‘querybuf’
has no member named ‘qb2’

/Users/keith/php/php-5.3.2/ext/standard/dns.c:817: error: ‘querybuf’
has no 

Bug #51713 [Opn->Asn]: Test getmxrr must fail

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51713&edit=1

 ID:   51713
 Updated by:   ahar...@php.net
 Reported by:  post at wickenrode dot com
 Summary:  Test getmxrr must fail
-Status:   Open
+Status:   Assigned
 Type: Bug
 Package:  Unknown/Other Function
 Operating System: Linux 2.6.18 i686
 PHP Version:  5.3.2
-Assigned To:  
+Assigned To:  aharvey



Previous Comments:

[2010-05-01 03:25:42] post at wickenrode dot com

Description:

getmxrr.phpt expects domain "ez.no" to have 1 MX while it actually has
3:



$ dig MX ez.no



;; QUESTION SECTION:

;ez.no. IN  MX



;; ANSWER SECTION:

ez.no.  360 IN  MX  10 ASPMX.L.GOOGLE.COM.

ez.no.  360 IN  MX  20 ALT1.ASPMX.L.GOOGLE.COM.

ez.no.  360 IN  MX  30 ALT2.ASPMX.L.GOOGLE.COM.



Test should be adapted accordingly.







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


Bug #51737 [Fbk->Opn]: Having a bug when using date_diff($t1,$t2)

2010-05-04 Thread iggukk at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51737&edit=1

 ID:   51737
 User updated by:  iggukk at gmail dot com
 Reported by:  iggukk at gmail dot com
 Summary:  Having a bug when using date_diff($t1,$t2)
-Status:   Feedback
+Status:   Open
 Type: Bug
 Package:  Date/time related
 Operating System: Win XP
 PHP Version:  5.3.2

 New Comment:

Huh, sorry about that, and thanks for answering so quickly.



echo $interval->format('%R%d days');



simply from the example on php manual.



Just tried to feed the dates in different formats like 12.04.2010 and
12.03.2010, (instead of 2010-04-12) it seems to give the same result in
final.


Previous Comments:

[2010-05-04 10:57:43] ahar...@php.net

The test script you've provided doesn't work, since echoing a
DateInterval object isn't supported. How are you actually outputting
$interval?


[2010-05-04 10:33:23] iggukk at gmail dot com

Description:

Hi,

Sorry if not posting this bug in the correct section. I'm currently
having a bug when using date_diff().

Seems that when the "day" part of the dates is the same on both dates
compared, the function returns "0 Days" instead of 30 or some Days.

Test script:
---
$datetime1 = date_create('2010-03-08');

$datetime2 = date_create('2010-04-08');

$interval = date_diff($datetime1,$datetime2);

echo $interval;

//=> returns "+0 Days"

//

//Whereas

//

$datetime1 = date_create('2010-03-08');

$datetime2 = date_create('2010-04-07');

$interval = date_diff($datetime1,$datetime2);

echo $interval;

//Will return "+30 Days"

Expected result:

Should return "a whole month" interval like +31 Days in that particular
case.

Actual result:
--
returns +0 Days






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


Bug #51603 [Opn->Fbk]: excuting php script causes apache2 seg fault

2010-05-04 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51603&edit=1

 ID:   51603
 Updated by:   paj...@php.net
 Reported by:  phil at weballey dot com
 Summary:  excuting php script causes apache2 seg fault
-Status:   Open
+Status:   Feedback
 Type: Bug
 Package:  Apache2 related
 Operating System: FreeBSD 8.0
 PHP Version:  5.3.2

 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:

[2010-04-19 20:48:12] phil at weballey dot com

Description:

Executing the horde test.php installation validation script causes httpd
to seg fault. I can execute a simple php script with the phpinfo()
inside.



This is one of the error messages. There is no other information I can
find in the sys logs (apache or otherwise);  



[Sat Apr 17 23:06:19 2010] [notice] Apache/2.2.14 (FreeBSD)
mod_ssl/2.2.14 OpenS

SL/0.9.8k DAV/2 PHP/5.3.2 with Suhosin-Patch configured -- resuming
normal opera

tions

[Sat Apr 17 23:06:35 2010] [notice] child pid 66799 exit signal
Segmentation fau

lt (11)



This is with eaccelerator disabled. Enabling eaccelerator 0.9.3 via
extensions.ini does not help. However, enabling eaccelerator via a
php.ini stanza (included below) makes the seg faults go away.



zend_extension="/usr/local/lib/php/20090626/eaccelerator.so"

eaccelerator.shm_size="32"

eaccelerator.cache_dir="/tmp/eaccelerator"

eaccelerator.enable="1"

eaccelerator.optimizer="1"

eaccelerator.check_mtime="1"

eaccelerator.debug="0"

eaccelerator.filter=""

eaccelerator.shm_max="0"

eaccelerator.shm_ttl="0"

eaccelerator.shm_prune_period="0"

eaccelerator.shm_only="0"

eaccelerator.compress="1"

eaccelerator.compress_level="2"



CONFIGURATION INFORMATION:



PHP 5.3.2 on FreeBSD 8.0 built via ports. Here is the configure line
from "php -i":

 

phpinfo()

PHP Version => 5.3.2



System => FreeBSD mail.sfflcc.org 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2
#0: Tue Jan  5 16:02:27 UTC 2010
r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

Build Date => Apr 17 2010 21:51:32

Configure Command =>  './configure'  '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--program-prefix='
'--with-apxs2=/usr/local/sbin/apxs' '--with-pcre-regex=/usr/local'
'--with-regex=php' '--with-zend-vm=CALL' '--enable-zend-multibyte'
'--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0'

Server API => Command Line Interface

Virtual Directory Support => disabled

Configuration File (php.ini) Path => /usr/local/etc

Loaded Configuration File => /usr/local/etc/php.ini

Scan this dir for additional .ini files => /usr/local/etc/php

Additional .ini files parsed => /usr/local/etc/php/extensions.ini



PHP API => 20090626

PHP Extension => 20090626

Zend Extension => 220090626

Zend Extension Build => API220090626,NTS

PHP Extension Build => API20090626,NTS

Debug Build => no

Thread Safety => disabled

Zend Memory Manager => enabled

Zend Multibyte Support => enabled

IPv6 Support => enabled

Registered PHP Streams => compress.bzip2, zip, https, ftps, php, file,
glob, data, http, ftp, compress.zlib  

Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3,
sslv2, tls

Registered Stream Filters => convert.iconv.*, bzip2.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
dechunk, zlib.*





This server is protected with the Suhosin Patch 0.9.9.1

Copyright (c) 2006-2007 Hardened-PHP Project

Copyright (c) 2007-2009 SektionEins GmbH





This program makes use of the Zend Scripting Language Engine:

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by
eAccelerator







Test script:
---
This is the preamble for the horde test.php script. I believe you can
get it from the horde organization. Otherwise I can send it - email me.



/**

 * $Horde: horde/test.php,v 1.122.6.31 2009-05-05 15:27:28 selsky Exp $

 *

 * Copyright 1999-2009 The Horde Project (http://www.horde.org/)

 *

 * See the enclosed file COPYING for license information (LGPL). If you

 * did not receive this file, see
http://www.fsf.org/copyleft/lgpl.html.

 *

 * @author Brent J. Nordquist 

 * @author Chuck Hagenbuch 

 */









--

Bug #51737 [Opn->Fbk]: Having a bug when using date_diff($t1,$t2)

2010-05-04 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51737&edit=1

 ID:   51737
 Updated by:   ahar...@php.net
 Reported by:  iggukk at gmail dot com
 Summary:  Having a bug when using date_diff($t1,$t2)
-Status:   Open
+Status:   Feedback
 Type: Bug
-Package:  *General Issues
+Package:  Date/time related
 Operating System: Win XP
 PHP Version:  5.3.2

 New Comment:

The test script you've provided doesn't work, since echoing a
DateInterval object isn't supported. How are you actually outputting
$interval?


Previous Comments:

[2010-05-04 10:33:23] iggukk at gmail dot com

Description:

Hi,

Sorry if not posting this bug in the correct section. I'm currently
having a bug when using date_diff().

Seems that when the "day" part of the dates is the same on both dates
compared, the function returns "0 Days" instead of 30 or some Days.

Test script:
---
$datetime1 = date_create('2010-03-08');

$datetime2 = date_create('2010-04-08');

$interval = date_diff($datetime1,$datetime2);

echo $interval;

//=> returns "+0 Days"

//

//Whereas

//

$datetime1 = date_create('2010-03-08');

$datetime2 = date_create('2010-04-07');

$interval = date_diff($datetime1,$datetime2);

echo $interval;

//Will return "+30 Days"

Expected result:

Should return "a whole month" interval like +31 Days in that particular
case.

Actual result:
--
returns +0 Days






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


Bug #51382 [Opn]: session_start() blocks execution

2010-05-04 Thread info at lategoodbye dot de
Edit report at http://bugs.php.net/bug.php?id=51382&edit=1

 ID:   51382
 User updated by:  info at lategoodbye dot de
 Reported by:  info at lategoodbye dot de
 Summary:  session_start() blocks execution
 Status:   Open
 Type: Bug
 Package:  Session related
 Operating System: Linux 2.4.35.4 mips
 PHP Version:  5.3.2

 New Comment:

Looking at the strace, i can see that the garbage collector is invoked,
after the current session is locked.



Is it possible that the garbage collector hangs because of the locked
session?


Previous Comments:

[2010-03-31 16:29:40] info at lategoodbye dot de

I'm sorry, i didn't get gdb running on the Asus Router (Flash too
small).



But i've a strace for you, may be it helps:



accept(0, {sa_family=AF_FILE, NULL}, [2]) = 3

poll([{fd=3, events=POLLIN}], 1, 5000)  = 1 ([{fd=3, revents=POLLIN}])

read(3, "\1\1\0\1\0\10\0\0", 8) = 8

read(3, "\0\1\0\0\0\0\0\0", 8)  = 8

read(3, "\1\4\0\1\3H\0\0", 8)   = 8

read(3, "\17\17SERVER_SOFTWARElighttpd/1.4.25"..., 840) = 840

read(3, "\1\4\0\1\0\0\0\0", 8)  = 8

time(NULL)  = 946686768

lstat("/www/pc/power.php", {st_mode=S_IFREG|0644, st_size=8269, ...}) =
0

lstat("/www/pc", {st_mode=0, st_size=97, ...}) = 0

lstat("/www", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0

old_mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
0, 0) = 0x2afaa000

time(NULL)  = 946686768

stat("/www/.user.ini", 0x7fff46e8)  = -1 ENOENT (No such file or
directory)

stat("/www/pc/.user.ini", 0x7fff46e8)   = -1 ENOENT (No such file or
directory)

setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) =
0

rt_sigaction(SIGPROF, {0x1000, [RT_68 RT_69 RT_76 RT_77 RT_79 RT_81
RT_82 RT_83 RT_84 RT_85 RT_86 RT_87 RT_88 RT_89 RT_90 RT_91 RT_92 RT_93
RT_94], SA_SIGINFO|0x66b990}, {SIG_DFL, [RT_65 RT_66], 0}, 16) = 0

rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 16) = 0

time(NULL)  = 946686768

open("/www/pc/power.php", O_RDONLY) = 4

ioctl(4, TIOCNXCL, 0x7fff5888)  = -1 ENOTTY (Inappropriate ioctl
for device)

brk(0x956000)   = 0x956000

fstat(4, {st_mode=S_IFREG|0644, st_size=2606, ...}) = 0

read(4, "From you description I traced back to the line 1475 in
./etc/session/session.c,

it is the only line which will be affect by the php.ini variable
session.gc_divisor you describe.



The line is show below:

nrand = (int) ((float) PS(gc_divisor) * php_combined_lcg(TSRMLS_C));



So, I think it may be a compiling error.


[2010-03-24 19:04:24] ras...@php.net

One way to figure that out is to attach gdb to a hanging fcgi process
and get a 

backtrace (bt) from gdb which should show where it is stuck.




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/bug.php?id=51382


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


[PHP-BUG] Bug #51737 [NEW]: Having a bug when using date_diff($t1,$t2)

2010-05-04 Thread iggukk at gmail dot com
From: 
Operating system: Win XP
PHP version:  5.3.2
Package:  *General Issues
Bug Type: Bug
Bug description:Having a bug when using date_diff($t1,$t2)

Description:

Hi,

Sorry if not posting this bug in the correct section. I'm currently having
a bug when using date_diff().

Seems that when the "day" part of the dates is the same on both dates
compared, the function returns "0 Days" instead of 30 or some Days.

Test script:
---
$datetime1 = date_create('2010-03-08');

$datetime2 = date_create('2010-04-08');

$interval = date_diff($datetime1,$datetime2);

echo $interval;

//=> returns "+0 Days"

//

//Whereas

//

$datetime1 = date_create('2010-03-08');

$datetime2 = date_create('2010-04-07');

$interval = date_diff($datetime1,$datetime2);

echo $interval;

//Will return "+30 Days"

Expected result:

Should return "a whole month" interval like +31 Days in that particular
case.

Actual result:
--
returns +0 Days

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



Bug #51516 [Fbk]: Apache 2.2 won't start after I install PHP (Using .MSI)

2010-05-04 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51516&edit=1

 ID:   51516
 Updated by:   paj...@php.net
 Reported by:  sfoulk526 at gmail dot com
 Summary:  Apache 2.2 won't start after I install PHP (Using
   .MSI)
 Status:   Feedback
 Type: Bug
 Package:  Apache2 related
 Operating System: Windows 7
 PHP Version:  5.2.13

 New Comment:

@sensui at sohu dot com



Are you sure that libmysql.dll is first in your PATH? The libmysql.dll
we provide with our releases, which is in the PHP installation dir.


Previous Comments:

[2010-05-04 04:59:53] sensui at sohu dot com

To paj...@php.net

In my case, when i installed php just with mysql entension, apache will
be unable to start.


[2010-04-30 23:23:31] paj...@php.net

Please check your error log.



Also disable the extensions in php.ini to figure out which could cause
problems.


[2010-04-30 23:06:37] nick at vastms dot com

I have this same problem, with the Windows .MSI.  Upgraded from 5.2.9
and got the same error as the reporter describes.  Tried reinstalling
Apache 2.2 and PHP 5.2.13 completely from scratch and still got the same
error.



I know that the problem isn't with setting up the httpd.conf
configuration, because I tried manually setting it up and got the same
error.



Also, the error doesn't leave any information in the Apache error logs. 
Just crashes Apache.



Downgraded to 5.2.10 and it Apache starts again.


[2010-04-09 01:35:28] sfoulk526 at gmail dot com

Description:

After running the downloaded file, php-5.2.13-win32-installer.msi, my
Apache no 

longer will start.  The error message I get is

"The requested operation has failed."



I have uninstalled PHP and Apache 2.2 works again.



???











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


[PHP-BUG] Bug #51736 [NEW]: configuration parsing problem

2010-05-04 Thread mauro dot stettler at gmail dot com
From: 
Operating system: suse linux (SLES11)
PHP version:  Irrelevant
Package:  FPM related
Bug Type: Bug
Bug description:configuration parsing problem

Description:

i tested the revision 298795 of php-fpm and i experienced that the config
value of 

min_spare_servers always gets copied into the config value of
max_spare_servers, 

which then means that start_servers will also have to be equal to this,

Test script:
---
; Sets the number of server processes created on startup.

; Used only with 'dynamic' pm.style

; default : min_spare + (max_spare - min_spare) / 2

;

pm.start_servers = 50



; Sets the desired minimum number of idle server processes.

; Used only with 'dynamic' pm.style

; It's mandatory when pm is set to dynamic

;

pm.min_spare_servers = 10

; Sets the desired maximum number of idle server processes.

; Used only with 'dynamic' pm.style

; It's mandatory when pm is set to dynamic

;

pm.max_spare_servers = 100



Expected result:

should be able to start php-fpm server

Actual result:
--
the result is that on start of php-fpm server, the fpm gives out a config
error if 

you use the above pasted configuration

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