[PHP-BUG] Bug #53633 [NEW]: SimpleXML incorrectly gives NULL for attributes() with XPath value expression

2010-12-29 Thread barry at 091labs dot com
From: 
Operating system: Windows XP
PHP version:  5.3SVN-2010-12-30 (SVN)
Package:  XML related
Bug Type: Bug
Bug description:SimpleXML incorrectly gives NULL for attributes() with XPath 
value expression

Description:

Apologies but I'm not running the SVN version as I only have hosting access
to 

PHP, but I've searched through the bugs and have found nothing. Using
5.3.0, sorry 

if this has already been fixed.



When using an XPath expression "/test/@attr1" to select one attribute, 

attributes() returns NULL when it should return the single attribute

Test script:
---
");



$result = $xml->xpath("/test");



var_dump ($result[0]); //Prints attributes, all fine

var_dump ($result[0]->attributes()); //Works fine



$result = $xml->xpath("/test/@attr1");



var_dump ($result[0]); //Prints attribute "attr1", all fine

var_dump ($result[0]->attributes()); //Should print same as above but
returns null



?>

Expected result:

The last var_dump should have printed the same as the previous var_dump

Actual result:
--
The last var_dump printed null

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



[PHP-BUG] Bug #53632 [NEW]: PHP hangs on numeric value 2.2250738585072011e-308

2010-12-29 Thread exploringbinary at gmail dot com
From: 
Operating system: Windows
PHP version:  5.3.4
Package:  Math related
Bug Type: Bug
Bug description:PHP hangs on numeric value 2.2250738585072011e-308

Description:

If I assign the value 2.2250738585072011e-308 to a variable, e.g. $d =
2.2250738585072011e-308, PHP hangs (loops). I am using PHP 5.3.1 XAMPP
1.7.3 on Windows.



2.2250738585072011e-308 represents the largest subnormal double-precision
floating-point number,
0. x 2^-1022.
Interestingly, nearby decimal literals 2.2250738585072008e-308,
2.2250738585072009e-308, 2.2250738585072010e-308 and
2.2250738585072012e-308 -- which all convert to the same floating-point
value -- do not cause this problem.







Test script:
---


Expected result:

No Hang.

Actual result:
--
Hang.

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



Bug #53630 [Opn->Ver]: optional prompt argument is treated as non-optional

2010-12-29 Thread dtajchreber
Edit report at http://bugs.php.net/bug.php?id=53630&edit=1

 ID: 53630
 Updated by: dtajchre...@php.net
 Reported by:jo at feuersee dot de
 Summary:optional prompt argument is treated as non-optional
-Status: Open
+Status: Verified
 Type:   Bug
 Package:Readline related
 Operating System:   Linux
 PHP Version:5.3.4
 Block user comment: N
 Private report: N



Previous Comments:

[2010-12-30 00:38:08] jo at feuersee dot de

Description:

The readline functions prompt argument is supposed to be optional. But
omitting it raises a PHP warning.

Test script:
---
php -r 'printf("%s\n", readline());'



Replace single and double quotes vice versa for Win platform

Actual result:
--
PHP Warning:  readline() expects exactly 1 parameter, 0 given in Command
line code on line 1








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


Bug #53631 [Opn->Bgs]: http_build_query return incorrect null query variable php 5.3.3

2010-12-29 Thread dtajchreber
Edit report at http://bugs.php.net/bug.php?id=53631&edit=1

 ID: 53631
 Updated by: dtajchre...@php.net
 Reported by:grade1000 at gmail dot com
 Summary:http_build_query return incorrect null query
 variable php 5.3.3
-Status: Open
+Status: Bogus
 Type:   Bug
 Package:*URL Functions
 Operating System:   windows 7 64bit
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

The equals sign is a reserved character under RFC 1738 and
http_build_query 

encodes it properly. 



[1] http://tools.ietf.org/html/rfc1738

[2] http://lxr.php.net/opengrok/xref/PHP_5_3/ext/standard/url.c#441


Previous Comments:

[2010-12-30 02:50:46] grade1000 at gmail dot com

Description:

http_build_query return incorrect...



php version is 5.3.3

Test script:
---
$link='http://www.domain.com.br/pt/quadrinhos/index.php?pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM=&atual=0';



$tplnk=parse_url($link);parse_str($tplnk[query],$tpq);$tpq[atual]=0;$tpq=http_build_query($tpq);



echo $tpq;

Expected result:

pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM=&atual=0

Actual result:
--
pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM%3D&atual=0






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


[PHP-BUG] Bug #53631 [NEW]: http_build_query return incorrect null query variable php 5.3.3

2010-12-29 Thread grade1000 at gmail dot com
From: 
Operating system: windows 7 64bit
PHP version:  5.3.4
Package:  *URL Functions
Bug Type: Bug
Bug description:http_build_query return incorrect null query variable php 5.3.3

Description:

http_build_query return incorrect...



php version is 5.3.3

Test script:
---
$link='http://www.domain.com.br/pt/quadrinhos/index.php?pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM=&atual=0';



$tplnk=parse_url($link);parse_str($tplnk[query],$tpq);$tpq[atual]=0;$tpq=http_build_query($tpq);



echo $tpq;

Expected result:

pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM=&atual=0

Actual result:
--
pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM%3D&atual=0

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



Req #49852 [Com]: Please Add an spl_autoload_case_sensitivity() Function

2010-12-29 Thread chris at cmbuckley dot co dot uk
Edit report at http://bugs.php.net/bug.php?id=49852&edit=1

 ID: 49852
 Comment by: chris at cmbuckley dot co dot uk
 Reported by:rahlentertainment at gmail dot com
 Summary:Please Add an spl_autoload_case_sensitivity()
 Function
 Status: Open
 Type:   Feature/Change Request
 Package:SPL related
 Operating System:   Ubuntu Server 8.10/9.04
 PHP Version:5.2.11
 Block user comment: N
 Private report: N

 New Comment:

Backporting proposed patch by Marc Easen (Bug #53065) to PHP_5_2 branch


Previous Comments:

[2009-10-12 23:11:04] rahlentertainment at gmail dot com

Description:

Bug #48129, "spl_autoload and case sensitive" was marked as closed/won't
fix because changing the behaviour of spl_autoload would break backwards
compatibility.



As an alternative, to allow case sensitivity in the future, without
breaking existing code, why not add a an spl_autoload_case_sensitivity()
function?



The function could take a Boolean value, which enables/disables case
sensitivity for spl_autoload, with the default being disabled.



Developers who DO want case-sensitivity can simply call:



spl_autoload_case_sensitivity(true);

spl_autoload("MyClass");









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


[PHP-BUG] Bug #53630 [NEW]: optional prompt argument is treated as non-optional

2010-12-29 Thread jo at feuersee dot de
From: 
Operating system: Linux
PHP version:  5.3.4
Package:  Readline related
Bug Type: Bug
Bug description:optional prompt argument is treated as non-optional

Description:

The readline functions prompt argument is supposed to be optional. But
omitting it raises a PHP warning.

Test script:
---
php -r 'printf("%s\n", readline());'



Replace single and double quotes vice versa for Win platform

Actual result:
--
PHP Warning:  readline() expects exactly 1 parameter, 0 given in Command
line code on line 1



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



Bug #53628 [Opn->Bgs]: Lack of support for character references

2010-12-29 Thread rrichards
Edit report at http://bugs.php.net/bug.php?id=53628&edit=1

 ID: 53628
 Updated by: rricha...@php.net
 Reported by:alexander dot grimalovsky at gmail dot com
 Summary:Lack of support for character references
-Status: Open
+Status: Bogus
 Type:   Bug
 Package:DOM XML related
 Operating System:   All
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

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

createEntityReference works per spec. It is only supposed to support
entity 

references - not character references. You typically use a text node
with escaped 

data to add characters.


Previous Comments:

[2010-12-29 17:58:21] alexander dot grimalovsky at gmail dot com

Description:

DOM extension for PHP supports XML entity references by implementing
DOMEntityReference class. However due to incorrect entity name
validation this class only allows working with named entity references,
not character references.



libxml2, which is used as backend implementation for DOM XML operations
have 2 functions for creating entity references:

xmlNewReference() - for entity references, it is used by DOM extension

xmlNewCharRef() - for character references, it is not used by DOM
extension and hence causes extension to lack support for this kind of
entities.



Moreover, implementation of DOMEntityReference::__construct() in
ext/dom/entityreference.c uses libxml2 function xmlValidateName() for
validating entity name which checks for Name (see
http://www.w3.org/TR/REC-xml/#NT-EntityRef). Of course this check is
failed on character references ( see
http://www.w3.org/TR/REC-xml/#NT-CharRef) and hence causes exception or
warning error to be thrown.



Correct implementation should check for "#" character at a first
position of given entity name and call xmlNewReference() or
xmlNewCharRef() depending on test result.



PHP 5.2.x is also affected by this problem.

Test script:
---
createElement('test');

$xml->appendChild($node);

$named = $xml->createEntityReference('entity'); // Create named
entity, works

$node->appendChild($named);

$char = $xml->createEntityReference('#xAA');// Create character
reference, doesn't work

$node->appendChild($char);

echo $xml->saveXML();

Expected result:



&entity;ª

Actual result:
--
Fatal error: Uncaught exception 'DOMException' with message 'Invalid
Character Error' in test.php:7

Stack trace:

#0 test.php(7): DOMDocument->createEntityReference('#xAA')

#1 {main}

  thrown in test.php on line 7






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


Bug #52212 [Opn]: ImageCreateFromJPEG crashes web server when incorrect image format provided

2010-12-29 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=52212&edit=1

 ID: 52212
 Updated by: paj...@php.net
 Reported by:phpbug at cano dot sk
 Summary:ImageCreateFromJPEG crashes web server when
 incorrect image format provided
 Status: Open
 Type:   Bug
 Package:GD related
 Operating System:   Windows XP
 PHP Version:5.3.2
 Block user comment: N
 Private report: N

 New Comment:

@alex at phpguide dot co dot il



Use VC9 builds.


Previous Comments:

[2010-12-29 18:10:58] alex at phpguide dot co dot il

Applies to PHP 5.3.4 & Apache 2.2.17

Appears critical, especially on virtual hosts.


[2010-06-30 23:28:49] paj...@php.net

For an immediate fix you can use the VC9 version of apache and php.
Fetch Apache at http://apachelounge.com.


[2010-06-30 22:50:49] phpbug at cano dot sk

Apache/2.2.11 (Win32) PHP/5.3.2 



apache2handler


[2010-06-30 22:35:39] paj...@php.net

Sounds like it happens only with the 5.3 VC6 versions of our builds.
Which webserver and SAPI do you use?


[2010-06-30 16:44:52] phpbug at cano dot sk

Description:

Call ImageCreateFromJPEG crashes web server when provided with invalid
image.

In this test scenario http://dl.dropbox.com/u/2807353/phpbugreport.zip
image provided is in PNG format. Image size is 300x300x24. My
memory_limit = 256M ImageCreateFromJPEG should return FALSE when called
with invalid data, instead it crashes web server.



Unhandled exception at 0x7c90108d in httpd.exe: 0xC005: Access
violation writing location 0x01547104.

Test script:
---
http://dl.dropbox.com/u/2807353/phpbugreport.zip



$moo = ImageCreateFromJPEG('img.jpg');



?>

Expected result:

ImageCreateFromJPEG() should return FALSE not crash webserver

Actual result:
--
Web server crashes



Unhandled exception at 0x7c90108d in httpd.exe: 0xC005: Access
violation writing location 0x01547104.






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


Req #53594 [Fbk]: php-snmp rewrite

2010-12-29 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1

 ID: 53594
 Updated by: paj...@php.net
 Reported by:lytboris at gmail dot com
 Summary:php-snmp rewrite
 Status: Feedback
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   irrelevant
 PHP Version:trunk
 Block user comment: N
 Private report: N

 New Comment:

No need to deprecate it, but tell anyone asking for a feature for the
legacy API to migrate to the new shiny one :)


Previous Comments:

[2010-12-29 18:21:57] paj...@php.net

It is much easier and cleaner to simply go straight to OO then, without
procedural API, and keep the old for legacy apps.


[2010-12-29 18:17:11] lytboris at gmail dot com

You have guessed my next target - OO interface. :-)



If you apply new patch you'll see there is very small piece of code
making SNMPv1 functions be polymorphic - dozen of lines, not more.

My thoughts are that old API should be deprecated sometime, so there
will be session-only support: both OO and non-OO.


[2010-12-29 18:02:23] paj...@php.net

What do you think about keeping the old APIs as it is, froze it and add
a much nicer and flexible OO one instead? For any new improvements?
That's what I did for zip and brings much more rooms for new stuff while
reducing the maintenance work load.


[2010-12-29 17:56:28] lytboris at gmail dot com

Reuploaded patches (to be allied against trunk)



+ session-like workflow:

   $session = snmp_session_open(...);

   $result = snmpget($oid);

   ...

   snmp_session_close($session);

+ support for SNMPv3 contextName & contextEngineID properties in new
syntax style



+ tests for new features



snmp(real)?{get,walk,set} functions are now polymorphic - they accepts
both old (SNMPv1) arguments and new session-like. All version protocols
are handled by the since protocol version is now set using
snmp_session_open.


[2010-12-23 09:03:38] lytboris at gmail dot com

This patch covers bugs

#44193

#45893

#51336




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=53594


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


Req #53594 [Fbk]: php-snmp rewrite

2010-12-29 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1

 ID: 53594
 Updated by: paj...@php.net
 Reported by:lytboris at gmail dot com
 Summary:php-snmp rewrite
 Status: Feedback
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   irrelevant
 PHP Version:trunk
 Block user comment: N
 Private report: N

 New Comment:

It is much easier and cleaner to simply go straight to OO then, without
procedural API, and keep the old for legacy apps.


Previous Comments:

[2010-12-29 18:17:11] lytboris at gmail dot com

You have guessed my next target - OO interface. :-)



If you apply new patch you'll see there is very small piece of code
making SNMPv1 functions be polymorphic - dozen of lines, not more.

My thoughts are that old API should be deprecated sometime, so there
will be session-only support: both OO and non-OO.


[2010-12-29 18:02:23] paj...@php.net

What do you think about keeping the old APIs as it is, froze it and add
a much nicer and flexible OO one instead? For any new improvements?
That's what I did for zip and brings much more rooms for new stuff while
reducing the maintenance work load.


[2010-12-29 17:56:28] lytboris at gmail dot com

Reuploaded patches (to be allied against trunk)



+ session-like workflow:

   $session = snmp_session_open(...);

   $result = snmpget($oid);

   ...

   snmp_session_close($session);

+ support for SNMPv3 contextName & contextEngineID properties in new
syntax style



+ tests for new features



snmp(real)?{get,walk,set} functions are now polymorphic - they accepts
both old (SNMPv1) arguments and new session-like. All version protocols
are handled by the since protocol version is now set using
snmp_session_open.


[2010-12-23 09:03:38] lytboris at gmail dot com

This patch covers bugs

#44193

#45893

#51336


[2010-12-23 07:20:18] lytboris at gmail dot com

I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs
on 5.2 branch.



Here you are patch for trunk. There is no difference between 5.3 and
trunk for now so this patch may be appied to 5.3 branch too.




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=53594


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


Req #53594 [Com]: php-snmp rewrite

2010-12-29 Thread lytboris at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1

 ID: 53594
 Comment by: lytboris at gmail dot com
 Reported by:lytboris at gmail dot com
 Summary:php-snmp rewrite
 Status: Feedback
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   irrelevant
 PHP Version:trunk
 Block user comment: N
 Private report: N

 New Comment:

You have guessed my next target - OO interface. :-)



If you apply new patch you'll see there is very small piece of code
making SNMPv1 functions be polymorphic - dozen of lines, not more.

My thoughts are that old API should be deprecated sometime, so there
will be session-only support: both OO and non-OO.


Previous Comments:

[2010-12-29 18:02:23] paj...@php.net

What do you think about keeping the old APIs as it is, froze it and add
a much nicer and flexible OO one instead? For any new improvements?
That's what I did for zip and brings much more rooms for new stuff while
reducing the maintenance work load.


[2010-12-29 17:56:28] lytboris at gmail dot com

Reuploaded patches (to be allied against trunk)



+ session-like workflow:

   $session = snmp_session_open(...);

   $result = snmpget($oid);

   ...

   snmp_session_close($session);

+ support for SNMPv3 contextName & contextEngineID properties in new
syntax style



+ tests for new features



snmp(real)?{get,walk,set} functions are now polymorphic - they accepts
both old (SNMPv1) arguments and new session-like. All version protocols
are handled by the since protocol version is now set using
snmp_session_open.


[2010-12-23 09:03:38] lytboris at gmail dot com

This patch covers bugs

#44193

#45893

#51336


[2010-12-23 07:20:18] lytboris at gmail dot com

I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs
on 5.2 branch.



Here you are patch for trunk. There is no difference between 5.3 and
trunk for now so this patch may be appied to 5.3 branch too.


[2010-12-22 22:07:14] paj...@php.net

Thanks for this great patch :)



However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide
a patch against trunk instead.




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=53594


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


Bug #52212 [Com]: ImageCreateFromJPEG crashes web server when incorrect image format provided

2010-12-29 Thread alex at phpguide dot co dot il
Edit report at http://bugs.php.net/bug.php?id=52212&edit=1

 ID: 52212
 Comment by: alex at phpguide dot co dot il
 Reported by:phpbug at cano dot sk
 Summary:ImageCreateFromJPEG crashes web server when
 incorrect image format provided
 Status: Open
 Type:   Bug
 Package:GD related
 Operating System:   Windows XP
 PHP Version:5.3.2
 Block user comment: N
 Private report: N

 New Comment:

Applies to PHP 5.3.4 & Apache 2.2.17

Appears critical, especially on virtual hosts.


Previous Comments:

[2010-06-30 23:28:49] paj...@php.net

For an immediate fix you can use the VC9 version of apache and php.
Fetch Apache at http://apachelounge.com.


[2010-06-30 22:50:49] phpbug at cano dot sk

Apache/2.2.11 (Win32) PHP/5.3.2 



apache2handler


[2010-06-30 22:35:39] paj...@php.net

Sounds like it happens only with the 5.3 VC6 versions of our builds.
Which webserver and SAPI do you use?


[2010-06-30 16:44:52] phpbug at cano dot sk

Description:

Call ImageCreateFromJPEG crashes web server when provided with invalid
image.

In this test scenario http://dl.dropbox.com/u/2807353/phpbugreport.zip
image provided is in PNG format. Image size is 300x300x24. My
memory_limit = 256M ImageCreateFromJPEG should return FALSE when called
with invalid data, instead it crashes web server.



Unhandled exception at 0x7c90108d in httpd.exe: 0xC005: Access
violation writing location 0x01547104.

Test script:
---
http://dl.dropbox.com/u/2807353/phpbugreport.zip



$moo = ImageCreateFromJPEG('img.jpg');



?>

Expected result:

ImageCreateFromJPEG() should return FALSE not crash webserver

Actual result:
--
Web server crashes



Unhandled exception at 0x7c90108d in httpd.exe: 0xC005: Access
violation writing location 0x01547104.






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


Bug #53629 [PATCH]: highlight_string() has leaks

2010-12-29 Thread bj...@php.net
Edit report at http://bugs.php.net/bug.php?id=53629&edit=1

 ID: 53629
 Patch added by: bj...@php.net
 Reported by:bj...@php.net
 Summary:highlight_string() has leaks
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Linux
 PHP Version:5.3SVN-2010-12-29 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: heredoc
Revision:   1293642611
URL:   
http://bugs.php.net/patch-display.php?bug=53629&patch=heredoc&revision=1293642611


Previous Comments:

[2010-12-29 18:02:41] bj...@php.net

Description:

memleak

Test script:
---


';

$str2 = '



';



highlight_string($str, true);

highlight_string($str2, true);



Actual result:
--
==26002== HEAP SUMMARY:

==26002== in use at exit: 2,228 bytes in 2 blocks

==26002==   total heap usage: 11,067 allocs, 11,065 frees, 2,819,307
bytes 

allocated

==26002== 

==26002== 4 bytes in 1 blocks are definitely lost in loss record 1 of 2

==26002==at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==26002==by 0x6D0B67: _emalloc (zend_alloc.c:2401)

==26002==by 0x6D1023: _estrndup (zend_alloc.c:2556)

==26002==by 0x6B8C07: lex_scan (zend_language_scanner.l:2093)

==26002==by 0x6F3146: zend_highlight (zend_highlight.c:96)

==26002==by 0x6B1C87: highlight_string
(zend_language_scanner.l:774)

==26002==by 0x5E1C4C: zif_highlight_string (basic_functions.c:5163)

==26002==by 0x7405DF: zend_do_fcall_common_helper_SPEC 

(zend_vm_execute.h:638)

==26002==by 0x746729: ZEND_DO_FCALL_SPEC_CONST_HANDLER 

(zend_vm_execute.h:1935)

==26002==by 0x73F0BF: execute (zend_vm_execute.h:410)

==26002==by 0x7039C5: zend_execute_scripts (zend.c:1212)

==26002==by 0x67B45F: php_execute_script (main.c:2337)

==26002==by 0x83E3E9: main (php_cli.c:1254)

==26002== 

==26002== 2,224 bytes in 1 blocks are still reachable in loss record 2
of 2

==26002==at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==26002==by 0x6D11CD: alloc_globals_ctor (zend_alloc.c:2623)

==26002==by 0x6D1248: start_memory_manager (zend_alloc.c:2646)

==26002==by 0x7025CA: zend_startup (zend.c:642)

==26002==by 0x67A75A: php_module_startup (main.c:1889)

==26002==by 0x83CD04: php_cli_startup (php_cli.c:425)

==26002==by 0x83DB13: main (php_cli.c:802)

==26002== 

==26002== LEAK SUMMARY:

==26002==definitely lost: 4 bytes in 1 blocks

==26002==indirectly lost: 0 bytes in 0 blocks

==26002==  possibly lost: 0 bytes in 0 blocks

==26002==still reachable: 2,224 bytes in 1 blocks

==26002== suppressed: 0 bytes in 0 blocks

==26002== 








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


[PHP-BUG] Bug #53629 [NEW]: highlight_string() has leaks

2010-12-29 Thread bj...@php.net
From: bjori
Operating system: Linux
PHP version:  5.3SVN-2010-12-29 (SVN)
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:highlight_string() has leaks

Description:

memleak

Test script:
---


';

$str2 = '



';



highlight_string($str, true);

highlight_string($str2, true);



Actual result:
--
==26002== HEAP SUMMARY:

==26002== in use at exit: 2,228 bytes in 2 blocks

==26002==   total heap usage: 11,067 allocs, 11,065 frees, 2,819,307 bytes


allocated

==26002== 

==26002== 4 bytes in 1 blocks are definitely lost in loss record 1 of 2

==26002==at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==26002==by 0x6D0B67: _emalloc (zend_alloc.c:2401)

==26002==by 0x6D1023: _estrndup (zend_alloc.c:2556)

==26002==by 0x6B8C07: lex_scan (zend_language_scanner.l:2093)

==26002==by 0x6F3146: zend_highlight (zend_highlight.c:96)

==26002==by 0x6B1C87: highlight_string (zend_language_scanner.l:774)

==26002==by 0x5E1C4C: zif_highlight_string (basic_functions.c:5163)

==26002==by 0x7405DF: zend_do_fcall_common_helper_SPEC 

(zend_vm_execute.h:638)

==26002==by 0x746729: ZEND_DO_FCALL_SPEC_CONST_HANDLER 

(zend_vm_execute.h:1935)

==26002==by 0x73F0BF: execute (zend_vm_execute.h:410)

==26002==by 0x7039C5: zend_execute_scripts (zend.c:1212)

==26002==by 0x67B45F: php_execute_script (main.c:2337)

==26002==by 0x83E3E9: main (php_cli.c:1254)

==26002== 

==26002== 2,224 bytes in 1 blocks are still reachable in loss record 2 of
2

==26002==at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==26002==by 0x6D11CD: alloc_globals_ctor (zend_alloc.c:2623)

==26002==by 0x6D1248: start_memory_manager (zend_alloc.c:2646)

==26002==by 0x7025CA: zend_startup (zend.c:642)

==26002==by 0x67A75A: php_module_startup (main.c:1889)

==26002==by 0x83CD04: php_cli_startup (php_cli.c:425)

==26002==by 0x83DB13: main (php_cli.c:802)

==26002== 

==26002== LEAK SUMMARY:

==26002==definitely lost: 4 bytes in 1 blocks

==26002==indirectly lost: 0 bytes in 0 blocks

==26002==  possibly lost: 0 bytes in 0 blocks

==26002==still reachable: 2,224 bytes in 1 blocks

==26002== suppressed: 0 bytes in 0 blocks

==26002== 



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



Req #53594 [Fbk]: php-snmp rewrite

2010-12-29 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1

 ID: 53594
 Updated by: paj...@php.net
 Reported by:lytboris at gmail dot com
 Summary:php-snmp rewrite
 Status: Feedback
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   irrelevant
-PHP Version:5.2.16
+PHP Version:trunk
 Block user comment: N
 Private report: N

 New Comment:

What do you think about keeping the old APIs as it is, froze it and add
a much nicer and flexible OO one instead? For any new improvements?
That's what I did for zip and brings much more rooms for new stuff while
reducing the maintenance work load.


Previous Comments:

[2010-12-29 17:56:28] lytboris at gmail dot com

Reuploaded patches (to be allied against trunk)



+ session-like workflow:

   $session = snmp_session_open(...);

   $result = snmpget($oid);

   ...

   snmp_session_close($session);

+ support for SNMPv3 contextName & contextEngineID properties in new
syntax style



+ tests for new features



snmp(real)?{get,walk,set} functions are now polymorphic - they accepts
both old (SNMPv1) arguments and new session-like. All version protocols
are handled by the since protocol version is now set using
snmp_session_open.


[2010-12-23 09:03:38] lytboris at gmail dot com

This patch covers bugs

#44193

#45893

#51336


[2010-12-23 07:20:18] lytboris at gmail dot com

I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs
on 5.2 branch.



Here you are patch for trunk. There is no difference between 5.3 and
trunk for now so this patch may be appied to 5.3 branch too.


[2010-12-22 22:07:14] paj...@php.net

Thanks for this great patch :)



However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide
a patch against trunk instead.


[2010-12-22 20:05:04] lytboris at gmail dot com

Patch was created for 5.3 branch and then adopted to be used in 5.2
branch.




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=53594


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


[PHP-BUG] Bug #53628 [NEW]: Lack of support for character references

2010-12-29 Thread alexander dot grimalovsky at gmail dot com
From: 
Operating system: All
PHP version:  5.3.4
Package:  DOM XML related
Bug Type: Bug
Bug description:Lack of support for character references

Description:

DOM extension for PHP supports XML entity references by implementing
DOMEntityReference class. However due to incorrect entity name validation
this class only allows working with named entity references, not character
references.



libxml2, which is used as backend implementation for DOM XML operations
have 2 functions for creating entity references:

xmlNewReference() - for entity references, it is used by DOM extension

xmlNewCharRef() - for character references, it is not used by DOM extension
and hence causes extension to lack support for this kind of entities.



Moreover, implementation of DOMEntityReference::__construct() in
ext/dom/entityreference.c uses libxml2 function xmlValidateName() for
validating entity name which checks for Name (see
http://www.w3.org/TR/REC-xml/#NT-EntityRef). Of course this check is failed
on character references ( see http://www.w3.org/TR/REC-xml/#NT-CharRef) and
hence causes exception or warning error to be thrown.



Correct implementation should check for "#" character at a first position
of given entity name and call xmlNewReference() or xmlNewCharRef()
depending on test result.



PHP 5.2.x is also affected by this problem.

Test script:
---
createElement('test');

$xml->appendChild($node);

$named = $xml->createEntityReference('entity'); // Create named entity,
works

$node->appendChild($named);

$char = $xml->createEntityReference('#xAA');// Create character
reference, doesn't work

$node->appendChild($char);

echo $xml->saveXML();

Expected result:



&entity;ª

Actual result:
--
Fatal error: Uncaught exception 'DOMException' with message 'Invalid
Character Error' in test.php:7

Stack trace:

#0 test.php(7): DOMDocument->createEntityReference('#xAA')

#1 {main}

  thrown in test.php on line 7

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



Req #53594 [Com]: php-snmp rewrite

2010-12-29 Thread lytboris at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53594&edit=1

 ID: 53594
 Comment by: lytboris at gmail dot com
 Reported by:lytboris at gmail dot com
 Summary:php-snmp rewrite
 Status: Feedback
 Type:   Feature/Change Request
 Package:SNMP related
 Operating System:   irrelevant
 PHP Version:5.2.16
 Block user comment: N
 Private report: N

 New Comment:

Reuploaded patches (to be allied against trunk)



+ session-like workflow:

   $session = snmp_session_open(...);

   $result = snmpget($oid);

   ...

   snmp_session_close($session);

+ support for SNMPv3 contextName & contextEngineID properties in new
syntax style



+ tests for new features



snmp(real)?{get,walk,set} functions are now polymorphic - they accepts
both old (SNMPv1) arguments and new session-like. All version protocols
are handled by the since protocol version is now set using
snmp_session_open.


Previous Comments:

[2010-12-23 09:03:38] lytboris at gmail dot com

This patch covers bugs

#44193

#45893

#51336


[2010-12-23 07:20:18] lytboris at gmail dot com

I know about version lifecycle. But Cacti 087 (Larry mentioned it) runs
on 5.2 branch.



Here you are patch for trunk. There is no difference between 5.3 and
trunk for now so this patch may be appied to 5.3 branch too.


[2010-12-22 22:07:14] paj...@php.net

Thanks for this great patch :)



However 5.3 is in maintenance mode (and 5.2 is dead btw), please provide
a patch against trunk instead.


[2010-12-22 20:05:04] lytboris at gmail dot com

Patch was created for 5.3 branch and then adopted to be used in 5.2
branch.


[2010-12-22 19:49:37] lytboris at gmail dot com

Description:

The main new feature is multi OID get/getnext/set commands. Another

one - strong and simple return value logic: if command fails, return

nothing but FALSE. No empty strings, no SNMP error messages as values,

etc. Just FALSE.



Another effort was to cover source code with unit tests. Results: 100%

functions (-zm_info_snmp, but it is not actually snmp function), 94%

source code lines.







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


Req #20226 [Opn->Fbk]: can't do "foo.php/path.inf" via cgi (with patch)

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=20226&edit=1

 ID: 20226
 Updated by: j...@php.net
 Reported by:tom at tomclegg dot net
 Summary:can't do "foo.php/path.inf" via cgi (with patch)
-Status: Open
+Status: Feedback
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Unix
 PHP Version:4.2.3
 Block user comment: N
 Private report: N

 New Comment:

Please try using this snapshot:

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

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




Previous Comments:

[2002-11-03 05:36:42] tom at tomclegg dot net

I use php as a cgi usuing Apache's "Action" directive.  If I put a
script in /u/joe/pub/example.php and visit http://joe/example.php/foo
then Apache puts /example.php/foo in PATH_INFO, and PHP tries to open
/u/joe/pub/example.php/foo.  (Internal server error; premature end of
script headers)



This patch checks /u, /u/joe, /u/joe/pub, etc.; if one of them is a
regular file (in this case /u/joe/pub/example.php) then that file is
used as the script filename.  Now the script runs, with the entire
PATH_INFO passed to it.  (It's up to the script to figure out which part
to ignore.)



--- main/fopen_wrappers.c.orig  Fri Aug 23 01:00:49 2002

+++ main/fopen_wrappers.c   Sun Nov  3 02:54:26 2002

@@ -388,6 +388,23 @@

SG(request_info).path_translated = NULL;

return FAILURE;

}

+

+   /* check for /home/joe/public_html/example.php/pathinfo */

+   if (1) {

+   char *s;

+   for (s=filename+1; *s; s++) {

+   if (*s == PHP_DIR_SEPARATOR && *(s-1) != 
PHP_DIR_SEPARATOR) {

+   *s = 0;

+   if (0 == stat (filename, &st)) {

+   if (S_ISREG(st.st_mode)) {

+   break;

+   }

+   }

+   *s = PHP_DIR_SEPARATOR;

+   }

+   }

+   }

+

fp = VCWD_FOPEN(filename, "rb");

 

/* refuse to open anything that is not a regular file */







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


Req #49380 [Com]: HTML macros

2010-12-29 Thread tcjohans at riseup dot net
Edit report at http://bugs.php.net/bug.php?id=49380&edit=1

 ID: 49380
 Comment by: tcjohans at riseup dot net
 Reported by:tcjohans at riseup dot net
 Summary:HTML macros
 Status: Wont fix
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   Windows Vista
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

I have submitted several very good suggestions for development of PHP,
but each time I just receive these extremely defensive replies back; I
am giving up.


Previous Comments:

[2010-12-29 17:44:04] tcjohans at riseup dot net

Why do you tell me this? Either you are interested in implementing and
you implement or you don't. Why would I need an obscure reference to
some obscure discussion in some obscure place?


[2010-12-29 13:08:22] j...@php.net

Please refer to internals list for several discussions on macros.


[2009-08-27 02:08:12] tcjohans at riseup dot net

Description:

I propose the ability to create "macros" that can be used in the HTML
(outside of the PHP start and end tags, ).



This will facilitate using PHP in systems oriented to web site builders
who lack knowledge of PHP, but need to use certain interactive
features.



The below example creates a macro USERNAME which can be inserted into
HTML to reflect the current site user's name.

However, macros could perhaps also be used to create forms, e.g. by
defining a macro "FORM". 

Also, if macros could be defined so as to take arguments, they would be
even more powerful.

Reproduce code:
---




Hello!

Your name is USERNAME.

Bye!

Expected result:

Hello!

Your name is John.

Bye!







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


Req #21508 [Opn->Bgs]: Need a register_shutdown_function() that can send output after a timeout

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=21508&edit=1

 ID: 21508
 Updated by: j...@php.net
 Reported by:jc at mega-bucks dot co dot jp
 Summary:Need a register_shutdown_function() that can send
 output after a timeout
-Status: Open
+Status: Bogus
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Red Hat Linux 7.2
 PHP Version:4.3.0
 Block user comment: N
 Private report: N

 New Comment:

There is no way.


Previous Comments:

[2003-01-07 23:53:07] jc at mega-bucks dot co dot jp

I would like to be able to detect when my scripts timeout and send an
appropriate message to the browser. However it seems that even though
there is a way to detect a script execution timeout in PHP there is no
way to send something to the browser once a script has timed out.



The function register_shutdown_function() seems to be exactly what I
need. In conjunction with connection_status() I can find when a timeout
has occured and act on it.



However register_shutdown_function() will not allow one to send output
to the browser since it is called *after* all output has been sent.



Could someone implement a version of register_shutdown_function() that
would allow for output to be sent to the browser?



PS



I have already asked around and been told it cannot be done *but* If
there is already a way to do what I trying to achieve, please let me
know and sorry but the bogus request.





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


Req #49380 [Wfx]: HTML macros

2010-12-29 Thread tcjohans at riseup dot net
Edit report at http://bugs.php.net/bug.php?id=49380&edit=1

 ID: 49380
 User updated by:tcjohans at riseup dot net
 Reported by:tcjohans at riseup dot net
 Summary:HTML macros
 Status: Wont fix
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   Windows Vista
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

Why do you tell me this? Either you are interested in implementing and
you implement or you don't. Why would I need an obscure reference to
some obscure discussion in some obscure place?


Previous Comments:

[2010-12-29 13:08:22] j...@php.net

Please refer to internals list for several discussions on macros.


[2009-08-27 02:08:12] tcjohans at riseup dot net

Description:

I propose the ability to create "macros" that can be used in the HTML
(outside of the PHP start and end tags, ).



This will facilitate using PHP in systems oriented to web site builders
who lack knowledge of PHP, but need to use certain interactive
features.



The below example creates a macro USERNAME which can be inserted into
HTML to reflect the current site user's name.

However, macros could perhaps also be used to create forms, e.g. by
defining a macro "FORM". 

Also, if macros could be defined so as to take arguments, they would be
even more powerful.

Reproduce code:
---




Hello!

Your name is USERNAME.

Bye!

Expected result:

Hello!

Your name is John.

Bye!







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


Req #15135 [Opn->Csd]: improving eval() with context

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=15135&edit=1

 ID: 15135
 Updated by: j...@php.net
 Reported by:tom dot polak at post dot sk
 Summary:improving eval() with context
-Status: Open
+Status: Closed
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Solaris
 PHP Version:4.1.0
-Assigned To:
+Assigned To:jani
 Block user comment: N
 Private report: N



Previous Comments:

[2002-01-21 03:15:52] tom dot polak at post dot sk

Hello,

this request is related to #15101.

Sample:



function a($like){

$id, $name array;

$val = "select ID, NAME from PEOPLE where NAME like\"{$like}\" into
$id, $name";

$x = getContext();

sql_fetch_array($val, $x);

show_result($id, $name);

}



function sql_fetch_array($query, $context){

...there we separate into part of query, 

run i.e.mysql_fetch_array into $result,

for each resulting row we run something 

like this:

eval("$id[".$index."] = ".$result[ID], $context);

}



The thing logic is, that we can change variables ouside its regular
scope.

In this example we do it by previously saved "context". I propose this
type 

of solution, because I have it already in my previous development tool.

Maybe exist any more possibilities, how to do that.

This is useful to write many of general functions for (in my case) high


quality SQL support.

If any other question about this, write me.

Best regards,

Tomas Polak





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


Req #15101 [Opn->Csd]: eval() in other context

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=15101&edit=1

 ID: 15101
 Updated by: j...@php.net
 Reported by:tom dot polak at post dot sk
 Summary:eval() in other context
-Status: Open
+Status: Closed
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Solaris
 PHP Version:4.1.0
-Assigned To:
+Assigned To:jani
 Block user comment: N
 Private report: N



Previous Comments:

[2009-12-18 21:58:55] codeslinger at compsalot dot com

this bug is really old, it can be closed now...  as FIXED.



php now has at least two ways that you can accomplish this.



1) in php 5.3+  you can create a name space and do the eval inside of
it.



2) On windows you can use ActiveScript PHP and it will behave exactly as
you described for the behavior of SQLWindows.



or you could just exec or even popen an instance of php...


[2002-01-18 09:45:05] tom dot polak at post dot sk

Hello,

my request is to improve function eval() to be possible evaluate given
string in other than current context.

In SQLWindows, where I have programming before, I have this feature and
was very useful.

It means, that on the some place in script we save "context" to be used
for evaluate and receive some "resource variable" to identify it.

Lately, we can call eval() with this additional parameter to be able
evaluate given string in previously saved context.

In SQLWindows I have used this to "bind" variables into dynamicaly
generated SQL statements, because they were generated inside some
functions library, where the current local variables are not in scope.

If it is not clear, I can give you more specification.



If you do not realize this feature, send me info, to be not waiting in
my project on it.



Looking forward to your answer.



Best regards,

Tomas Polak

mailto:tom.po...@post.sk





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


Bug #53627 [Opn->Csd]: ob_gzhandler don't gzip some JS file

2010-12-29 Thread dmaillefer at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53627&edit=1

 ID: 53627
 User updated by:dmaillefer at gmail dot com
 Reported by:dmaillefer at gmail dot com
 Summary:ob_gzhandler don't gzip some JS file
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Output Control
 Operating System:   windows
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

hello



I gzip the JS file directy in my folder and then I do 



$s = file_get_contents('mootools.js.gz');

header("Content-Encoding: gzip");

echo $s;





chrome show me the javascript

if I delete header("Content-Encoding: gzip"); I get unreadable
caractere.



But in chrome no information concerning the compression !!!


Previous Comments:

[2010-12-29 11:59:29] dmaillefer at gmail dot com

Description:

hello



when I try to create compression function on CSS and JS file I found a
strange 

issue



all my css file and JS file is correctly Gziped but not JQuery.js
(minimized or 

not) 



I try with a regulard PHP code (ob_start('ob_gzhandler') ) 

or directly in the php.ini (zlib.output_compression = On)  



the result is the same the Jquery JS will not be compressed 



If I delete some line in the file compression is done (but the file is 

incomplet)

If I add other file (to the JQuery JS) who are correctly compressed the
all file 

are not compressed



If I configure in Apache the mod_deflate all file are Gziped 





The JQuery file are here http://jquery.com/

I look if the compression is done with chrome (developement tools)

Here when the compression is done with PHP 

http://img709.imageshack.us/f/screenshot220t.jpg/

Here where the compression is done with Apache 

http://img52.imageshack.us/f/screenshot221q.jpg/

In the HTTP header response the GZIP is correctly set



the file I use is here http://www.megaupload.com/?d=AVY3LFQO



best regards

Test script:
---


Expected result:

I just want to andersted what's happen, and why the compression fail
with this JS 

file ?







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


Req #49380 [Opn->Wfx]: HTML macros

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=49380&edit=1

 ID: 49380
 Updated by: j...@php.net
 Reported by:tcjohans at riseup dot net
 Summary:HTML macros
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Windows Vista
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

Please refer to internals list for several discussions on macros.


Previous Comments:

[2009-08-27 02:08:12] tcjohans at riseup dot net

Description:

I propose the ability to create "macros" that can be used in the HTML
(outside of the PHP start and end tags, ).



This will facilitate using PHP in systems oriented to web site builders
who lack knowledge of PHP, but need to use certain interactive
features.



The below example creates a macro USERNAME which can be inserted into
HTML to reflect the current site user's name.

However, macros could perhaps also be used to create forms, e.g. by
defining a macro "FORM". 

Also, if macros could be defined so as to take arguments, they would be
even more powerful.

Reproduce code:
---




Hello!

Your name is USERNAME.

Bye!

Expected result:

Hello!

Your name is John.

Bye!







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


Req #49485 [Opn->Wfx]: Allow & when passing parameters by reference

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=49485&edit=1

 ID: 49485
 Updated by: j...@php.net
 Reported by:mjomble at gmail dot com
 Summary:Allow & when passing parameters by reference
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Windows
 PHP Version:5.3.0
 Block user comment: N
 Private report: N



Previous Comments:

[2009-09-06 13:21:57] mjomble at gmail dot com

Description:

NB! I'm not asking for the un-deprecation of call-time
pass-by-reference.



The way I understand it, this could previously alter the behavior of a
function at call time. I agree that this can make things ugly and I can
see the reason for it being deprecated.



However, I would still like to be able to use the & for decorative
purposes.



When you see a call to a function without knowing/remembering/looking up
the function definition, there's no way of telling whether the call can
modify the variable or not.



In most cases, it is simply assumed that parameters are not passed by
reference and will have the exact same value after the call. Which can
cause problems when they're actually passed by reference.



Currently, to avoid such problems, I often add comments like this:



// $someParameter is passed by reference and may be modified by
someMethod()

$someObject->someMethod($someParameter);



It would make things much clearer if it could be called like in the
reproduce code, but ONLY if the function actually uses the first
parameter by reference.

Reproduce code:
---
$someObject->someMethod(&$someParameter);

Expected result:

If the definition of someMethod() does not use the first parameter by
reference, a warning should appear.



Otherwise, the code should execute normally.

Actual result:
--
A warning always appears, regardless of how the parameter is used.






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


Req #49431 [Opn->Bgs]: Cannot define class constant with constant value

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=49431&edit=1

 ID: 49431
 Updated by: j...@php.net
 Reported by:sweiss at stylesight dot com
 Summary:Cannot define class constant with constant value
-Status: Open
+Status: Bogus
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   Debian
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

Same as bug #30177


Previous Comments:

[2009-09-01 16:27:30] sweiss at stylesight dot com

Description:

In the PHP documentation it states:



"It is possible to define constant values on a per-class basis 

remaining the same and unchangeable. Constants differ from normal 

variables in that you don't use the $ symbol to declare or use them.



"The value must be a constant expression, not (for example) a 

variable, a class member, result of a mathematical operation or a 

function call."



This is however not entirely the case.



If you define a constant within a class based on another constant, it 

will not work, despite the fact that it is a constant value.



In the given example, X_CONST . "Y" is a constant composed of two 

other constants - no variables, class members, math expressions, or 

function calls.



And, in fact, for normal, non-class constants, this is totally 

possible:



define("Y_CONST", X_CONST . "Y");



is totally valid.



At the very least the documentation should be updated to reflect 

simply that a class constant may only be defined as a simple scalar 

value, and not just any constant expression.

Reproduce code:
---
define("X_CONST", "Const");

 

class TestClass {



const Y_CONST = X_CONST . "Y";



function test() {

return self::Y_CONST;

}

}



$a = new TestClass();

var_dump($a->test());

Expected result:

(string) "ConstY"

Actual result:
--
Parse error: syntax error, unexpected '.', expecting ',' or ';' in line


5






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


Req #14794 [Opn->Bgs]: xml_set_object() should take object by-reference

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=14794&edit=1

 ID: 14794
 Updated by: j...@php.net
 Reported by:vvo at geocities dot com
 Summary:xml_set_object() should take object by-reference
-Status: Open
+Status: Bogus
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:XML related
 Operating System:   Linux 2.4 / Apache 1.3
 PHP Version:4.1.1
 Block user comment: N
 Private report: N

 New Comment:

Works as expected.


Previous Comments:

[2002-01-02 03:28:52] vvo at geocities dot com

Ok, I am really embarassed now, because xml_set_object() does take
object by reference. 



The warning message is misleading though. It convinced me that the
parameter was passed by value. But rather, it should say '.. - argument
passed according to the function spec', which, in this case, is
by-reference.



Thanks!


[2002-01-02 02:19:32] vvo at geocities dot com

I am getting the following warning after I switched to
'php.ini-recommended':



Warning:  Call-time pass-by-reference has been deprecated - argument
passed by value;  If you would like to pass it by reference, modify the
declaration of xml_set_object()... 



Apparently, xml_set_object() takes an object by value, which renders
this functionality useless: The only way it's any good is when the
object is passed by reference, so that the event-receiving object is the
same instance that was passed as a parameter to xml_set_object() call.
Otherwise, there is no way for a copied object to pass parsed data out
to the caller of xml_set_object() (without global variables, of
course).



Please fix xml_set_object() to take an object by reference.



Thanks.





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


Req #14640 [Opn->Wfx]: Support "{...@$foo}" and "{...@$foo['bar']}" syntax

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=14640&edit=1

 ID: 14640
 Updated by: j...@php.net
 Reported by:mfischer at guru dot josefine dot at
 Summary:Support "{...@$foo}" and "{...@$foo['bar']}" syntax
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:Scripting Engine problem
 Operating System:   Any
 PHP Version:4.1.0
 Block user comment: N
 Private report: N

 New Comment:

Hell no, rather get rid of @ altogether.


Previous Comments:

[2003-08-11 16:10:48] destes at ix dot netcom dot com

what sorts of errors aren't being suppressed now?  If the variable
doesn't exist, nothing is output, and in a function context, FALSE is
returned.  I don't see the need... perhaps you could explain it?


[2001-12-21 08:21:43] mfischer at guru dot josefine dot at

$ php -q





Parse error:  parse error, expecting `T_STRING' or `T_VARIABLE'
or `T_NUM_STRING' in - on line 2

-(2) : Parse error - parse error, expecting `T_STRING' or `T_VARIABLE'
or `T_NUM_STRING'



$ php -q





Warning:  Undefined variable:  foo in - on line
2

-(2) : Warning - Undefined variable:  foo

{...@}



Would be nice to support the @ operator in those cases too.





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


[PHP-BUG] Bug #53627 [NEW]: ob_gzhandler don't gzip some JS file

2010-12-29 Thread dmaillefer at gmail dot com
From: 
Operating system: windows
PHP version:  5.3.4
Package:  Output Control
Bug Type: Bug
Bug description:ob_gzhandler don't gzip some JS file

Description:

hello



when I try to create compression function on CSS and JS file I found a
strange 

issue



all my css file and JS file is correctly Gziped but not JQuery.js
(minimized or 

not) 



I try with a regulard PHP code (ob_start('ob_gzhandler') ) 

or directly in the php.ini (zlib.output_compression = On)  



the result is the same the Jquery JS will not be compressed 



If I delete some line in the file compression is done (but the file is 

incomplet)

If I add other file (to the JQuery JS) who are correctly compressed the all
file 

are not compressed



If I configure in Apache the mod_deflate all file are Gziped 





The JQuery file are here http://jquery.com/

I look if the compression is done with chrome (developement tools)

Here when the compression is done with PHP 

http://img709.imageshack.us/f/screenshot220t.jpg/

Here where the compression is done with Apache 

http://img52.imageshack.us/f/screenshot221q.jpg/

In the HTTP header response the GZIP is correctly set



the file I use is here http://www.megaupload.com/?d=AVY3LFQO



best regards

Test script:
---


Expected result:

I just want to andersted what's happen, and why the compression fail with
this JS 

file ?


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



Req #14613 [Opn->Asn]: Implement Function/Feature Conformity Tests

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=14613&edit=1

 ID: 14613
 Updated by: j...@php.net
 Reported by:z...@php.net
 Summary:Implement Function/Feature Conformity Tests
-Status: Open
+Status: Assigned
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
-Operating System:   
+Operating System:   *
-PHP Version:4.1.0
+PHP Version:*
 Assigned To:zak
 Block user comment: N
 Private report: N

 New Comment:

Ancient issue, will not close for now. Zak can do it himself..


Previous Comments:

[2001-12-20 02:14:56] z...@php.net

Assigning it to myself so that I don't forget. Now I just 

have to get to the other bug reports that are assigned to 

me. :)




[2001-12-20 02:14:02] z...@php.net

I strongly believe that PHP needs to continue evolving and 

improving. However, I also recognise the importance of 

maintaining backwards compatibility.



To help balance these two conflicting desires, I have been 

kicking around the idea of implementing a set of tests to 

help determine when the behavior of a function changes.



The basic idea is to run the tests against the various 

version of PHP, compare the output and flag when 

differences crop up. Users would be able to run these 

tests using a make target. The data from these tests could 

be used by a utility program that walks a directory 

structure, reading php files and looking for 

functions/features that have changed behavior.



I would like to call these 'Lemosian Conformity Tests' in 

honor of Manuel's consistent and vociferous work on 

preserving BC. :) While I don't like his approach, I agree 

that it is a valid concern. Personally, rather than being 

chained to BC, I would rather that we actively work to 

help users deal with changes more effectively.



Additionally, these changes would help developers and the 

QA team spot unintentional changes to function behavior.





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


Req #14404 [Opn->Csd]: scope notation

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=14404&edit=1

 ID: 14404
 Updated by: j...@php.net
 Reported by:foobardotcom at poczta dot onet dot pl
 Summary:scope notation
-Status: Open
+Status: Closed
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   all
 PHP Version:4.1.0
-Assigned To:
+Assigned To:jani
 Block user comment: N
 Private report: N

 New Comment:

Use Closures for such. Available since 5.3.0: 



  http://php.net/manual/en/functions.anonymous.php


Previous Comments:

[2001-12-10 10:32:00] foobardotcom at poczta dot onet dot pl

What are callbacks? I have created my callback system, and it is working
like that:



class Foo {

  function sum($a, $b) {

return $a + $b;

  }

}

$staticCB = new Callback("Foo", "sum");

echo $staticCB->execute(array(5, 3)); // should result '8'

$myFoo = new Foo();

$instanceCB = new Callback($myFoo, "sum");

echo $instanceCB->execute(array(2, 4)); // should result '6'

function mySum($a, $b) { return $a + $b;}

$funcCB = new Callback(null, "mySum");

echo $funcCB->execute(array(1, 2)); // should result '3'



I want, you make possible to specify SCOPES, without dummy walkarounds
like strings or variables, so make this possible:



$staticCB = new Callback(Foo::sum);

$instanceCB = new Callback($myFoo->sum);

$funcCB = new Callback(mySum);





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


Req #14405 [Opn->Wfx]: strict type control ability

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=14405&edit=1

 ID: 14405
 Updated by: j...@php.net
 Reported by:foobardotcom at poczta dot onet dot pl
 Summary:strict type control ability
-Status: Open
+Status: Wont fix
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:*General Issues
 Operating System:   all
 PHP Version:4.1.0
 Block user comment: N
 Private report: N

 New Comment:

See http://wiki.php.net/rfc/typechecking for more information.


Previous Comments:

[2001-12-10 10:38:35] foobardotcom at poczta dot onet dot pl

Now:



define("E_TYPE", "Invalid type of argument");

function dbexec($connObject, $query) {

  if (is_object($connObject)) {

if (get_class($connObject) == "dbconn") {

  if (is_string($query)) {

return $connObject->execute($query);

  } else {

trigger_error(E_TYPE, E_USER_ERROR);

  }

} else {

  trigger_error(E_TYPE, E_USER_ERROR);

}

  } else {

trigger_error(E_TYPE, E_USER_ERROR);

  }

}



I want to be:



function dbexec((dbconn) $connObject, (string) $query) {

  return $connObject->execute($query);

}





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


Req #41310 [Opn]: make extension_dir optional and use absolute paths in "extension = ..."

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=41310&edit=1

 ID: 41310
 Updated by: j...@php.net
 Reported by:mastamind at users dot sourceforge dot net
 Summary:make extension_dir optional and use absolute paths
 in "extension = ..."
 Status: Open
 Type:   Feature/Change Request
 Package:PHP options/info functions
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

See also bug #9095


Previous Comments:

[2007-05-07 00:44:27] mastamind at users dot sourceforge dot net

Description:

using



extension_dir = "/usr/local/lib/php"

extension = "../pgsql.so"



makes php search for pgsql.so in /usr/local/lib. It would be nice if 

php allows absolute paths for extension loading:



extension = /usr/local/lib/pgsql.so



as specifing it relative to the extension_dir is quite strange and 

probably makes extension_dir useless. specifing absolute paths with 

dl() may result in a security problem, but using it in php.ini may 

be ok.







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


Req #9095 [Opn]: Allow multiple directories in extension_dir

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=9095&edit=1

 ID: 9095
 Updated by: j...@php.net
 Reported by:leeym at caece dot net
-Summary:colon/semicolon delimitd extension_dir ?
+Summary:Allow multiple directories in extension_dir
 Status: Open
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:PHP options/info functions
-Operating System:   FreeBSD-4.2-STABLE
+Operating System:   *
-PHP Version:4.0.4pl1
+PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

See also bug #41310


Previous Comments:

[2001-02-03 21:11:04] leeym at caece dot net

Could you please make extension_dir become a colon/semicolon delimitd
string (just like include_path), because I wanna set more then one
extension_dir in php.ini .



For example, I want to set extension_dir =
".:/usr/local/lib/php/extensions" so that I can both put  user-specified
dymanic extensions in working directory and system-wide ones in
/usr/local/lib/php/extensions.



Thank you.



--

Yen-Ming Lee





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


Req #13462 [Opn]: Allow setting logging by error level

2010-12-29 Thread jani
Edit report at http://bugs.php.net/bug.php?id=13462&edit=1

 ID: 13462
 Updated by: j...@php.net
 Reported by:temp6453 at hotmail dot com
-Summary:Error Logging
+Summary:Allow setting logging by error level
 Status: Open
 Type:   Feature/Change Request
-Package:Feature/Change Request
+Package:PHP options/info functions
-Operating System:   N/A
+Operating System:   *
-PHP Version:4.0.6
+PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

It is possible to set different log file for each domain already, at
least with Apache and since 5.3 for CGI too. Log by level would be nice
improvement though.


Previous Comments:

[2001-09-26 21:03:12] temp6453 at hotmail dot com

Two feature requests- both dealing with logging:



  There should be a way to set log levels [E_ALL for example] different
for file logging and for screen [html] logging.  This allows serious
errors to be printed out and optimization warnings to be written to a
file



  There should be a way to set a different log file for each domain, so
that users on multi-user machines may receive their PHP errors.





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