[PHP-BUG] Bug #52153 [NEW]: Page can not displayed

2010-06-23 Thread abhay dot nakhate at topsource dot co dot uk
From: 
Operating system: WIN
PHP version:  5.2.14RC1
Package:  FTP related
Bug Type: Bug
Bug description:Page can not displayed

Description:

I am using ftp_put to upload 100 mb file. it takes around 1 hours. I have
set max_excution_time_limit  in the php.ini with largest number 10800. but
while processing after the 12 minuts. I will see the [PAGE CANNOT BE
DISPLAYED].



I HAVE TRIED MANY SETTING 



set_time_limit in the page itself. with 50

but not working.



please suggest me how to do it.



Thanks,

Abhay Nakhate



Test script:
---
I am using ftp_put to upload 100 mb file. it takes around 1 hours. I have
set max_excution_time_limit  in the php.ini with largest number 10800. but
while processing after the 12 minuts. I will see the [PAGE CANNOT BE
DISPLAYED].



I HAVE TRIED MANY SETTING 



set_time_limit in the page itself. with 50

but not working.



please suggest me how to do it.



Thanks,

Abhay Nakhate




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



Bug #52133 [Asn->Bgs]: Functions cannot return an argument passed by reference as reference

2010-06-23 Thread dmitry
Edit report at http://bugs.php.net/bug.php?id=52133&edit=1

 ID:   52133
 Updated by:   dmi...@php.net
 Reported by:  bschussek at gmail dot com
 Summary:  Functions cannot return an argument passed by
   reference as reference
-Status:   Assigned
+Status:   Bogus
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Linux Ubuntu 10.04
 PHP Version:  5.3.2
 Assigned To:  dmitry

 New Comment:

You forgot "&" in assignment.



$c =& ref($b);


Previous Comments:

[2010-06-23 00:51:13] bschussek at gmail dot com

In my last comment I dumped first $b and then $c, so the output hasn't
changed 

from PHP 5.3.2.


[2010-06-23 00:48:36] bschussek at gmail dot com

Sorry, but the test script produces still the wrong output for me.



$ php -v

PHP 5.3.3-dev (cli) (built: Jun 23 2010 00:45:57) 

Copyright (c) 1997-2010 The PHP Group

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

with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans



$ php test.php

string(6) "foobar"

string(6) "fozbar"


[2010-06-23 00:29:01] johan...@php.net

Please try using this snapshot:

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

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


[2010-06-21 13:56:07] bschussek at gmail dot com

Description:

PHP does not behave as expected when passing arguments by reference into
a 

function that are passed out again by reference.



IMO, the below test script should behave equivalently to the following
code 

(which produces the expected result):



$b = 'foobar';

$a =& $b;

$c =& $a;

$c[2] = 'z';



var_dump($c);

var_dump($b);

Test script:
---
function &ref(&$a)

{

  return $a;

}



$b = 'foobar';

$c = ref($b);

$c[2] = 'z';

Expected result:

string 'fozbar' (length=6)

string 'fozbar' (length=6)

Actual result:
--
string 'fozbar' (length=6)

string 'foobar' (length=6)






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


Bug #52138 [Com]: Constants are parsed into the ini file for section names

2010-06-23 Thread acid24 at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52138&edit=1

 ID:   52138
 Comment by:   acid24 at gmail dot com
 Reported by:  acid24 at gmail dot com
 Summary:  Constants are parsed into the ini file for section
   names
 Status:   Analyzed
 Type: Bug
 Package:  Filesystem function related
 Operating System: Red Hat Enterprise release 5.3
 PHP Version:  5.3.2

 New Comment:

I don't think section names should be replaced by constant values, but
since that's the case, the online documentation should be updated to
document this fact.


Previous Comments:

[2010-06-23 02:09:57] fel...@php.net

For 5.3+ the constant value is passed directly to ZEND_INI_PARSER_CB(),
thus not knowing its name...


[2010-06-22 09:59:06] acid24 at gmail dot com

Description:

Documentation at
http://www.php.net/manual/en/function.parse-ini-file.php says "Constants
may also be parsed in the ini file so if you define a constant as an ini
value before running parse_ini_file(), it will be integrated into the
results. Only ini values are evaluated.". 



I found this to be incomplete. Not only ini values are evaluated, but
also section names.

Test script:
---
define( 'MYCONST', 1 );

/*

test.ini file looks like this



[MYCONST]

MYCONST = MYCONST



*/

$ret = parse_ini_file( 'test.ini', true );

var_dump( $ret );

Expected result:

array(1) {

  ["MYCONST"]=>

  array(1) {

["MYCONST"]=>

string(1) "1"

  }

}

Actual result:
--
array(1) {

  [1]=>

  array(1) {

["MYCONST"]=>

string(1) "1"

  }

}






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


Req #42029 [Com]: MBSTRING: missing strpad() implementation

2010-06-23 Thread PhoneixSegovia at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=42029&edit=1

 ID:   42029
 Comment by:   PhoneixSegovia at gmail dot com
 Reported by:  fabrizio dot balliano at crealabs dot it
 Summary:  MBSTRING: missing strpad() implementation
 Status:   Open
 Type: Feature/Change Request
 Package:  Feature/Change Request
 Operating System: all
 PHP Version:  5.2.3

 New Comment:

This bug is a duplicated of #21317


Previous Comments:

[2007-07-18 12:32:28] fabrizio dot balliano at crealabs dot it

Description:

mbstring module is missing the str_pad function, thus if you pad some
text cointaining a 2 byte char, the result string length will be wrong.







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


Bug #52140 [Fbk->Csd]: mysql_connect uses wrong IP-address for error-messages of further connections

2010-06-23 Thread cscholz at gsd-web dot de
Edit report at http://bugs.php.net/bug.php?id=52140&edit=1

 ID:   52140
 User updated by:  cscholz at gsd-web dot de
 Reported by:  cscholz at gsd-web dot de
 Summary:  mysql_connect uses wrong IP-address for error-messages
   of further connections
-Status:   Feedback
+Status:   Closed
 Type: Bug
 Package:  MySQL related
 Operating System: Ubuntu 10.4
 PHP Version:  5.3.2

 New Comment:

Johannes you are completely right, this was a brainfart - sorry!


Previous Comments:

[2010-06-22 23:54:45] johan...@php.net

The error message should contain the IP address of the host running PHP
as it is used for authentication by MySQL. Is 192.168.0. The IP of the
web server?


[2010-06-22 11:34:21] cscholz at gsd-web dot de

Description:

When doing more than one mysql_connect the error message will return the
wrong ip-address in the reply if subsequent connections use a different
IP.



This bug is also true for mysqli_connect by the way.

Test script:
---


Expected result:

Warning: mysql_connect() [function.mysql-connect]: Access denied for
user 'invalid user'@'192.168.0.2' (using password: YES) in thecode.php
on line 4

Actual result:
--
Warning: mysql_connect() [function.mysql-connect]: Access denied for
user 'invalid user'@'192.168.0.1' (using password: YES) in thecode.php
on line 4






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


Req #21317 [Com]: Need mbstring version of str_pad

2010-06-23 Thread PhoneixSegovia at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=21317&edit=1

 ID:   21317
 Comment by:   PhoneixSegovia at gmail dot com
 Reported by:  jc at mega-bucks dot co dot jp
 Summary:  Need mbstring version of str_pad
 Status:   Open
 Type: Feature/Change Request
 Package:  Feature/Change Request
 Operating System: Red Hat Linux 7.2
 PHP Version:  4.3.0

 New Comment:

I vote to this. I think that we must have a multibyte str_pad as other
string function. This make support for multilanguage applications.



About the width to pad problem, I think that we need to get the same
behaviour than str_pad. The string to pad is more an "array of chars" to
pad not a fixed string to pad.


Previous Comments:

[2003-01-01 05:23:11] jc at mega-bucks dot co dot jp

Great! Please update the bug report when you have implemented a solution
so that I can download it and try it out! (as I said, my solution isn't
working in all cases).



As for your question, as I see it, the only way that this could happen
where if the user supplied a double-width character for the padding
string *and* we assume that the pad_length is a count in single-width.



But I don't think the problem your present is any different that the
problem that str_pad has when passed arguments like this:



str_pad("1", 2, "--");



In this example adding the pad string would produce a string longer than
is requested.



I just tested this code out and PHP gives "1-", which in my opinion is a
bug ...



I was going to say that the mb version should adopt the same behaviour
but since the str_pad behaviour seems to be wrong (in my poor opinion) I
am not sure what the correct behaviour should be.



I guess one way would be to add a parameter, pad_with_half_width_space,
that would let the user decide wether to pad with a half-width space or
not if the input string lentgh cannot be divided by the length of the
string to pad with.



Or, you could say that the behaviour of the function is to *always* pad
with half-width spaces by default.



But then we have the problem of what to do if the user wants to pad a
string of length 2, to be length 5 and the padding character is 2 wide
... we can pad up to length 4, but what to do with the remaining
half-width, (pad with a half space? Do nothing?)



I can't think of any answer that is "correct", so suggest putting your
foot down, defining the what the behaviour will be in those cases and if
you feel generous adding parameter to the function to change the default
behaviour.



Thanks!


[2003-01-01 04:57:14] moriyo...@php.net

Okay, let's keep this open. I'll implement it in my spare time.



Yet I have a quetion: what if the length(width) of the input string
cannot be divided by the length of the string to pad with??? Should the
remainder be padded with han-kaku spaces?



Anyway, akemashite omedetou.

Moriyoshi




[2003-01-01 04:32:02] jc at mega-bucks dot co dot jp

Sorry for unexpected greeting. Akemashite omedetou.



Yes, I am working on New Year's day .. and guess what I was coding ...
an mb version of str_pad ...



I agree that I could roll my own function, and indeed I have done so
using mb_strwidth (though it doesn't work perfectly and I can't figure
out why. Something to do with the fact that the string contains both
full-width and half-width characters I suspect; need more debugging).



But then again the same thing could be said about the str_pad function.
Why was it created? All the needed functionality for a user to create
his own version of str_pad already existed, so there really wasn't a
"need" to create the str_pad function ... But I guess str_pad was such a
useful function to have and was being used by enough people that a
standard PHP function was created.



The basic reason for asking is simply that str_pad exists but does not
work with multibyte strings. I know the developpers probably have a lot
more important things to work on, so all I ask is that it be put on a
TO-DO list, even if at the bottom :)


[2003-01-01 03:56:36] moriyo...@php.net

Rather an unexpected new year greeting for me :)

Simply I don't see much need for such feature. Why do you need it? There
are already enough materials to make an equivalent by your own.






[2003-01-01 02:05:11] jc at mega-bucks dot co dot jp

Could you add a multibyte version of the str_pad function to the
mbstring library functions?



Thanks,



Jc





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


[PHP-BUG] Bug #52154 [NEW]: mktime(0,0,0,0,0,0) returns a timestamp instead of false

2010-06-23 Thread j dot logemann at qmulus dot nl
From: 
Operating system: Windows 7 enterprise
PHP version:  5.3.2
Package:  Date/time related
Bug Type: Bug
Bug description:mktime(0,0,0,0,0,0) returns a timestamp instead of false

Description:

When you try to get the timestamp for day 0 of month 0 of the year 0, php
returns 943916400 instead of false. It should return false because the
input is clearly an invalid date and "-00-00" is not equal to
"1999-11-30"

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



[PHP-BUG] Req #52155 [NEW]: Change fatal_error to fatal_error_exception

2010-06-23 Thread olamedia at gmail dot com
From: 
Operating system: 
PHP version:  5.3.2
Package:  Scripting Engine problem
Bug Type: Feature/Change Request
Bug description:Change fatal_error to fatal_error_exception

Description:

It is almost impossible now to handle fatal errors.

Of course there are exists some ways (shutdown handler or ob_start): 

http://eirikhoem.wordpress.com/2008/03/15/dying-with-grace-phps-

register_shutdown_function/

I think, that replacing message "Fatal error" with something like  

"FatalErrorException" is possible and follows use case of exceptions.




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



Bug #15373 [Bgs]: mail() not working, no error with invalid SMTP or email address

2010-06-23 Thread mfischer
Edit report at http://bugs.php.net/bug.php?id=15373&edit=1

 ID:   15373
 Updated by:   mfisc...@php.net
 Reported by:  alonso at admintek dot net
 Summary:  mail() not working, no error with invalid SMTP or
   email address
 Status:   Bogus
 Type: Bug
 Package:  Mail related
 Operating System: win2000
 PHP Version:  4.2.1
-Assigned To:  mfischer
+Assigned To:  

 New Comment:

De-assigning


Previous Comments:

[2010-06-23 08:46:59] vengat dot zen at gmail dot com

hi 



check your send mail path (uncomment)

for ini settings...(after change restart your sever)


[2009-09-09 12:15:16] paj...@php.net

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.




[2009-09-09 12:13:19] ilmi_bunjaku at yahoo dot com

I have e problem, I can not sent email with PHP

the server is wampserver, OS windows xp 

I have one error as you can see:



Warning: mail() [function.mail]: Failed to connect to mailserver at 

"localhost" port 25, verify your "SMTP" and "smtp_port" setting in 

php.ini or use ini_set() in D:\Webroot\PHP\dergo email.php on line 16





the cod which I write is:

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

http://www.w3.org/1999/xhtml";>





Dergo email

















best regards,

ILA


[2009-08-25 01:13:40] dallas_thompson2001 at yahoo dot com

i am having a problem like this and am so lost, i cant send mail from 

the server but it wont let mail be sent from the website and they tell 

me it is a problem with the PHP can some look and tell me what i have 

dont wrong and how to make it work.



' . 

"\r\n";



$Message = "Sender Name:".$_POST['_namex']."Sender 

Email:".$_POST['_emailx']."Sender 

Phone:".$_POST['_phonex']."Message:".$_POST['_commx'];



if($_REQUEST['_emailx']!=""){

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, 

$headers);

}





echo "_root.Status=success";





?>


[2009-07-07 06:28:32] lakshmi at nace dot co dot in

OS   Windows XP home Edition, Redhat Linux 5

Server   Apache 2.2.11

PHP  5.2.9-2



\r\n"; //optional
headerfields



if(mail($recipient, $subject, $mail_body, $header)) //mail command :)

echo "mail sent";

else

echo "mail not sent";

?>



I get this:



Warning: mail(): Failed to connect to mailserver at "localhost" port
25,

verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set().



I tried by changing the php.ini and it does not work.



I hope you can help me



Request: This is the third time I am posting this query to PHP Bugs, But
Still I haven't get any Proper Solutions.



Thanks a lot




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


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


Bug #52154 [Opn->Dup]: mktime(0,0,0,0,0,0) returns a timestamp instead of false

2010-06-23 Thread salathe
Edit report at http://bugs.php.net/bug.php?id=52154&edit=1

 ID:   52154
 Updated by:   sala...@php.net
 Reported by:  j dot logemann at qmulus dot nl
 Summary:  mktime(0,0,0,0,0,0) returns a timestamp instead of
   false
-Status:   Open
+Status:   Duplicate
 Type: Bug
 Package:  Date/time related
 Operating System: Windows 7 enterprise
 PHP Version:  5.3.2

 New Comment:

This is expected behaviour. Using 0 for the year maps, as documented, to
the year 

2000; 0 for the month means December of the previous year (December
1999), 0 for 

the day-of-month means the last day of the previous month (30th November
1999). 

Therefore your date values do not map to "-00-00" as you expected,
but 

correctly as you found to "1999-11-30 00:00:00" -- the arguments are not
invalid, 

so FALSE is not returned.



Duplicate of bug #36027


Previous Comments:

[2010-06-23 10:27:35] j dot logemann at qmulus dot nl

Description:

When you try to get the timestamp for day 0 of month 0 of the year 0,
php returns 943916400 instead of false. It should return false because
the input is clearly an invalid date and "-00-00" is not equal to
"1999-11-30"

Test script:
---
http://bugs.php.net/bug.php?id=52154&edit=1


[PHP-BUG] Bug #52156 [NEW]: ./configure option --enable-discard-path is missing

2010-06-23 Thread j dot bayer at spedion dot de
From: 
Operating system: 
PHP version:  5.3.2
Package:  *Compile Issues
Bug Type: Bug
Bug description:./configure option --enable-discard-path is missing

Description:

If it has been removed, the documentation is not correct.

Does exist any similar workaround?


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



[PHP-BUG] Bug #52157 [NEW]: Unwanted call of the magic __call method

2010-06-23 Thread l dot declercq at nuxwin dot com
From: 
Operating system: Debian
PHP version:  5.2.14RC1
Package:  *General Issues
Bug Type: Bug
Bug description:Unwanted call of the magic __call method

Description:

hello everyone ;



In the documentation, it's said that the magic __call method is called when
an inaccessible member is read. But I've small issue in my current class
with a setter method. When I try to set an Alias on an inexistent member,
the magic __call method is also called.



To solve the problem, I uses a workaround like this in the setter method:



public static function &setAlias($index, &$value) {



$instance = self::getInstance();

// Small workaround to avoid call of magic __get().

$instance->$index = '';



return $instance->$index = &$value;

}



Strange behavior, no ? It's bug or not, if not, can you explain to me the
reason of this statement ? I uses php 5.2.6.



Sorry, for my poor english, I'm french.

Test script:
---
class Registry {



protected static $_instance = null;



public static function getInstance() {



if(self::$_instance == null) {

self::$_instance = new self;

}



return self::$_instance;

}



public function __get($index) {



print 'Oh my god...';

}



public static function &setAlias($index, &$value) {



$instance = self::getInstance();

return $instance->$index = &$value;

}

}



class myObject {



protected static $_instance = null;



public static function &getInstance() {



if(self::$_instance == null) {

self::$_instance = new self();

}



return  self::$_instance;

}



}



// Here, I want register a `myObject` instance by reference (not by object
identifier)

Registry::setAlias('MyData', myObject::getInstance());



echo '';

var_dump(Registry::getInstance());

echo '';



Expected result:

object(Registry)#2 (1) {

  ["MyData"]=>

  &object(myObject)#1 (0) {

  }

}



Actual result:
--
Oh my god... Notice: Indirect modification of overloaded property
Registry::$MyData has no effect in /var/www/test.php on line 67 Fatal
error: Cannot assign by reference to overloaded object in /var/www/test.php
on line 67 

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



Req #42029 [Opn->Dup]: MBSTRING: missing strpad() implementation

2010-06-23 Thread degeberg
Edit report at http://bugs.php.net/bug.php?id=42029&edit=1

 ID:   42029
 Updated by:   degeb...@php.net
 Reported by:  fabrizio dot balliano at crealabs dot it
 Summary:  MBSTRING: missing strpad() implementation
-Status:   Open
+Status:   Duplicate
 Type: Feature/Change Request
-Package:  Feature/Change Request
+Package:  *General Issues
 Operating System: all
 PHP Version:  5.2.3



Previous Comments:

[2010-06-23 09:47:12] PhoneixSegovia at gmail dot com

This bug is a duplicated of #21317


[2007-07-18 12:32:28] fabrizio dot balliano at crealabs dot it

Description:

mbstring module is missing the str_pad function, thus if you pad some
text cointaining a 2 byte char, the result string length will be wrong.







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


Bug #51571 [Fbk->Opn]: Problems with character spacing in imagettftext/imagefttext

2010-06-23 Thread leottan at imsweb dot com
Edit report at http://bugs.php.net/bug.php?id=51571&edit=1

 ID:   51571
 User updated by:  leottan at imsweb dot com
 Reported by:  leottan at imsweb dot com
 Summary:  Problems with character spacing in
   imagettftext/imagefttext
-Status:   Feedback
+Status:   Open
 Type: Bug
 Package:  GD related
 Operating System: SUSE Ent. Linux v9 SP4 64bit
 PHP Version:  5.2.13

 New Comment:

Is this patch included in 5.2.14 RC 1 and if so what is the expected
time frame for release?



Thank you!!


Previous Comments:

[2010-06-22 20:36:28] opendevel at weberhofer dot at

I have included the patch #51263 (SVN 293268) which solved the problem
on my openSUSE/PHP 5.2.13 version.


[2010-04-19 16:41:56] paj...@php.net

You can install it locally very easily as well or you don't even have to
install PHP but simply compile it with GD support and test your script
using the freshly built PHP.


[2010-04-19 16:36:22] leottan at imsweb dot com

Thank you for such a quick response!!



Unfortunately, I've been unable to convince our network staff to try a
beta version of PHP out on our dev servers.  Would you like some
snippets of code to try on yours?  I feel bad asking you to help me but
then not being able to help you.


[2010-04-16 17:14:51] paj...@php.net

Please try using this snapshot:

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

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




[2010-04-16 17:01:15] leottan at imsweb dot com

Description:

Our dev server was recently upgraded to PHP v5.2.13. With that upgrade
we have found that our png images are having kerning/tracking/spacing
problems. We've tried numerous fonts and haven't found a good solution
yet. imagettftextwithtracking -
http://www.php.net/manual/en/function.imagettfbbox.php#51373 - is
helping some but still isn't as nice as the old version of PHP was.



We are creating images using the GD library and writing text to the
images using font files and the imagettftext() or imagefttext()
functions.



I'm including examples of the new and old tahoma bold. Other fonts (bold
and non-bold) have the same problem. Some letters and numbers seem like
they're off-center or something like that.



Thanks!!



Test script:
---
ImageTTFText($imFinalImage,13,0,$x,$y,
$black,"/fonts/tahomabd.ttf",$titleText);



//I stripped that down some (taking out vars so you had the basic info)


//but that's the format along with our font size & font.





Expected result:

The usual text



old PHP v5.2.11 (the words are slightly different because this is our
dev server and the other one is the live server) 



http://yfrog.com/i3goodlp

Actual result:
--
Messy text

new PHP 



http://yfrog.com/i3badej






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


Bug #51571 [Opn->Fbk]: Problems with character spacing in imagettftext/imagefttext

2010-06-23 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51571&edit=1

 ID:   51571
 Updated by:   paj...@php.net
 Reported by:  leottan at imsweb dot com
 Summary:  Problems with character spacing in
   imagettftext/imagefttext
-Status:   Open
+Status:   Feedback
 Type: Bug
 Package:  GD related
 Operating System: SUSE Ent. Linux v9 SP4 64bit
 PHP Version:  5.2.13

 New Comment:

it should yes, pls try it.


Previous Comments:

[2010-06-23 14:52:50] leottan at imsweb dot com

Is this patch included in 5.2.14 RC 1 and if so what is the expected
time frame for release?



Thank you!!


[2010-06-22 20:36:28] opendevel at weberhofer dot at

I have included the patch #51263 (SVN 293268) which solved the problem
on my openSUSE/PHP 5.2.13 version.


[2010-04-19 16:41:56] paj...@php.net

You can install it locally very easily as well or you don't even have to
install PHP but simply compile it with GD support and test your script
using the freshly built PHP.


[2010-04-19 16:36:22] leottan at imsweb dot com

Thank you for such a quick response!!



Unfortunately, I've been unable to convince our network staff to try a
beta version of PHP out on our dev servers.  Would you like some
snippets of code to try on yours?  I feel bad asking you to help me but
then not being able to help you.


[2010-04-16 17:14:51] paj...@php.net

Please try using this 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=51571


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


[PHP-BUG] Bug #52160 [NEW]: Invalid E_STRICT redefined constructor error

2010-06-23 Thread manannon at seatiger dot org
From: 
Operating system: Linux
PHP version:  5.2.14RC1
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Invalid E_STRICT redefined constructor error

Description:

The following class generates the E_STRICT warning: Strict standards:
Redefining already defined constructor for class Log. 



However according to http://php.net/manual/en/language.oop5.decon.php, PHP5
will only assume log() is a constructor if it cannot find a __construct()
method:



"For backwards compatibility, if PHP 5 cannot find a __construct() function
for a given class, it will search for the old-style constructor function,
by the name of the class."



Since it has already found a __construct() method, it should not assume
that log() is also a constructor. 

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



Bug #52157 [Opn]: Unwanted call of the magic __get method

2010-06-23 Thread l dot declercq at nuxwin dot com
Edit report at http://bugs.php.net/bug.php?id=52157&edit=1

 ID:   52157
 User updated by:  l dot declercq at nuxwin dot com
 Reported by:  l dot declercq at nuxwin dot com
 Summary:  Unwanted call of the magic __get method
 Status:   Open
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Debian
 PHP Version:  5.2.14RC1

 New Comment:

oops, sorry, it's the magic __get() methods that is unwanted here, not
the magic __call() method ..


Previous Comments:

[2010-06-23 12:43:45] l dot declercq at nuxwin dot com

Description:

hello everyone ;



In the documentation, it's said that the magic __call method is called
when an inaccessible member is read. But I've small issue in my current
class with a setter method. When I try to set an Alias on an inexistent
member, the magic __call method is also called.



To solve the problem, I uses a workaround like this in the setter
method:



public static function &setAlias($index, &$value) {



$instance = self::getInstance();

// Small workaround to avoid call of magic __get().

$instance->$index = '';



return $instance->$index = &$value;

}



Strange behavior, no ? It's bug or not, if not, can you explain to me
the reason of this statement ? I uses php 5.2.6.



Sorry, for my poor english, I'm french.

Test script:
---
class Registry {



protected static $_instance = null;



public static function getInstance() {



if(self::$_instance == null) {

self::$_instance = new self;

}



return self::$_instance;

}



public function __get($index) {



print 'Oh my god...';

}



public static function &setAlias($index, &$value) {



$instance = self::getInstance();

return $instance->$index = &$value;

}

}



class myObject {



protected static $_instance = null;



public static function &getInstance() {



if(self::$_instance == null) {

self::$_instance = new self();

}



return  self::$_instance;

}



}



// Here, I want register a `myObject` instance by reference (not by
object identifier)

Registry::setAlias('MyData', myObject::getInstance());



echo '';

var_dump(Registry::getInstance());

echo '';



Expected result:

object(Registry)#2 (1) {

  ["MyData"]=>

  &object(myObject)#1 (0) {

  }

}



Actual result:
--
Oh my god... Notice: Indirect modification of overloaded property
Registry::$MyData has no effect in /var/www/test.php on line 67 Fatal
error: Cannot assign by reference to overloaded object in
/var/www/test.php on line 67 






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


[PHP-BUG] Bug #52161 [NEW]: json_encode encoding HTML tags within strings incorrectly

2010-06-23 Thread niazuddin dot ahmed at gmail dot com
From: 
Operating system: RedHat
PHP version:  5.3.2
Package:  JSON related
Bug Type: Bug
Bug description:json_encode encoding HTML tags within strings incorrectly

Description:

When using json_encode for strings with HTML tag, end tag gets HTML encoded
but the start tag is left alone 



Test script:
---
echo json_encode(array('test' => 'Bold'));

Expected result:

{"test":"Bold"}



This is valid JSON as per http://www.jslint.com/

Actual result:
--
{"test":"Bold<\/b>"}

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



Bug #52091 [Fbk->Opn]: ZipArchive: CRC32 errors / corrupted archives not reported

2010-06-23 Thread hardcorevenom at gmx dot de
Edit report at http://bugs.php.net/bug.php?id=52091&edit=1

 ID:   52091
 User updated by:  hardcorevenom at gmx dot de
 Reported by:  hardcorevenom at gmx dot de
 Summary:  ZipArchive: CRC32 errors / corrupted archives not
   reported
-Status:   Feedback
+Status:   Open
 Type: Bug
 Package:  Zip Related
 Operating System: Linux
 PHP Version:  5.2.13
 Assigned To:  pajoye

 New Comment:

File "_test.php" is bad in this archive

http://www-user.tu-chemnitz.de/~womar/test/zipview/test_broken.zip



Can be seen here:
http://www-user.tu-chemnitz.de/~womar/test/zipview/ziptest.php?file=test_broken.zip


Previous Comments:

[2010-06-20 17:57:17] paj...@php.net

Do you have an archive to reproduce this problem (small if possible :)?


[2010-06-16 00:35:49] hardcorevenom at gmx dot de

"Actual result" should be

CRC32 errors are reported not always.


[2010-06-15 23:29:45] hardcorevenom at gmx dot de

Summary modified.


[2010-06-15 23:26:34] hardcorevenom at gmx dot de

Description:

I corrupted a file using a hex editor.

"echo shell_exec('unzip -t file')" shows the CRC32 mismatch.



ZipArchive::extractTo() doesn't report CRC32 errors.



Reading a stream received from ZipArchive::getStream('myfile') echoes a
CRC error if the number of bytes read with one fread() is below 2157
bytes.



Test script:
---
$zip = new ZipArchive();

if ($zip->open('test.zip')) {

  zip->extractTo('mydir'); //no error printed



  $fp = $z->getStream('brokenfile');

  while (!feof($fp)) {

$buf .= fread($fp, 2048+108); //CRC error printed

  }

  $fclose($fp);



  $fp = $z->getStream('brokenfile');

  while (!feof($fp)) {

$buf .= fread($fp, 2048+109); //CRC error NOT printed

  }

  $fclose($fp);



  zip.close()

}

Expected result:

A CRC32 error report that can be handled.



The one from "fread($fp, 2048+108)" is fine: "Warning: fread()
[function.fread]: Zip stream error: CRC error in ..." (can be handled
with "ob_get_contents()");



For "ZipArchive::extractTo()" the corrupt file(s) should be printed.

Actual result:
--
CRC32 errors are reported always.






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


Bug #51772 [Fbk]: php-fpm do not support PowerPC processors

2010-06-23 Thread tony2001
Edit report at http://bugs.php.net/bug.php?id=51772&edit=1

 ID:   51772
 Updated by:   tony2...@php.net
 Reported by:  vaskes at mail dot ru
 Summary:  php-fpm do not support PowerPC processors
 Status:   Feedback
 Type: Bug
 Package:  FPM related
 Operating System: RedHat Ent. server 5.4-ppc64
 PHP Version:  5.3.2
 Assigned To:  fat

 New Comment:

Ok, let me know if you need any help.

More info on your problems would be appreciated, of course.


Previous Comments:

[2010-06-17 22:28:42] vaskes at mail dot ru

Using http://snaps.php.net/php5.3-201006161230.tar.gz this patch applied
successfully and php compiled successfully too. I did some stress
testing on this php-fpm and discover that php-fpm working unstable. I
will perform some additional test to discover the issue more thoroughly
and post results here.


[2010-06-09 15:43:28] tony2...@php.net

sapi/fpm/fpm/fpm_main.o: In function `main':

/home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1698: undefined reference to
`php_output_end_all'



No, trunk is not broken =)

You're trying to compile FPM from trunk with 5.3.2 while you should be
using FPM from PHP_5_3 branch instead.



But the easiest way to test it would be to try a snapshot from
http://snaps.php.net

This way you wouldn't need to manually add FPM to your sources, since
FPM is already available in 5.3.3 snapshots.


[2010-06-09 12:17:56] f...@php.net

trunk seems to be broken.



please try to apply the patch in PHP_5_3 branch instead.


[2010-06-09 11:29:52] vaskes at mail dot ru

I can provide ssh access to ppc server.


[2010-06-09 11:29:09] vaskes at mail dot ru

After applying this patch i got following error:



sapi/fpm/fpm/fpm_main.o: In function `main':

/home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1698: undefined reference to
`php_output_end_all'

/home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1699: undefined reference to
`php_output_deactivate'

/home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1639: undefined reference to
`php_output_end_all'

/home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1640: undefined reference to
`php_output_deactivate'

sapi/fpm/fpm/fpm_main.o: In function `zif_fastcgi_finish_request':

/home/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1496: undefined reference to
`php_output_end_all'

collect2: ld returned 1 exit status

make: *** [sapi/fpm/php-fpm] Error 1

[r...@headnode php-5.3.2]#




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


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


[PHP-BUG] Bug #52162 [NEW]: custom request header variables with numbers are removed

2010-06-23 Thread srina...@php.net
From: 
Operating system: Linux
PHP version:  5.3.2
Package:  iPlanet related
Bug Type: Bug
Bug description:custom request header variables with numbers are removed

Description:

for example, if u try to request print-header.php (which contains the
following)



 $v) {

 print "   $k = $v\n";

  }

  print "\n";

?>





by doing some thing like

$ telnet localhost 80

Trying 192.168.20.126...

Connected to s10u7x.

Escape character is '^]'.

GET /print-header.php HTTP/1.0

X-T3crawler: foobar



u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result



what do u expect is 



HTTP_X_T3_CRAWLER = foobar -> expected result

Expected result:

HTTP_X_T3_CRAWLER = foobar -> expected result

Actual result:
--
u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result



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



Bug #52162 [Opn]: custom request header variables with numbers are removed

2010-06-23 Thread srinatar
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1

 ID:   52162
 Updated by:   srina...@php.net
 Reported by:  srina...@php.net
 Summary:  custom request header variables with numbers are
   removed
 Status:   Open
 Type: Bug
 Package:  iPlanet related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

here is the suggested patch to address this issue





[sn123...@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c 

Index: sapi/nsapi/nsapi.c

===

--- sapi/nsapi/nsapi.c  (revision 300702)

+++ sapi/nsapi/nsapi.c  (working copy)

@@ -687,7 +687,7 @@

if (value) {

for(p = value + pos; *p; p++) {

*p = toupper(*p);

-   if (*p < 'A' || *p >
'Z') {

+   if (!isalnum(*p)) {

*p = '_';

}

}





if no one has any issues, i can commit this patch..


Previous Comments:

[2010-06-23 19:02:30] srina...@php.net

Description:

for example, if u try to request print-header.php (which contains the
following)



 $v) {

 print "   $k = $v\n";

  }

  print "\n";

?>





by doing some thing like

$ telnet localhost 80

Trying 192.168.20.126...

Connected to s10u7x.

Escape character is '^]'.

GET /print-header.php HTTP/1.0

X-T3crawler: foobar



u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result



what do u expect is 



HTTP_X_T3_CRAWLER = foobar -> expected result

Expected result:

HTTP_X_T3_CRAWLER = foobar -> expected result

Actual result:
--
u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result








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


Bug #52162 [Opn]: for NSAPI module, custom request header variables with numbers are removed

2010-06-23 Thread srina...@php.net
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1

 ID:   52162
 User updated by:  srina...@php.net
 Reported by:  srina...@php.net
-Summary:  custom request header variables with numbers are
   removed
+Summary:  for NSAPI module, custom request header variables with
   numbers are removed
 Status:   Open
 Type: Bug
 Package:  iPlanet related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

mark the bug as specific to a given SAPI only.


Previous Comments:

[2010-06-23 20:04:46] srina...@php.net

here is the suggested patch to address this issue





[sn123...@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c 

Index: sapi/nsapi/nsapi.c

===

--- sapi/nsapi/nsapi.c  (revision 300702)

+++ sapi/nsapi/nsapi.c  (working copy)

@@ -687,7 +687,7 @@

if (value) {

for(p = value + pos; *p; p++) {

*p = toupper(*p);

-   if (*p < 'A' || *p >
'Z') {

+   if (!isalnum(*p)) {

*p = '_';

}

}





if no one has any issues, i can commit this patch..


[2010-06-23 19:02:30] srina...@php.net

Description:

for example, if u try to request print-header.php (which contains the
following)



 $v) {

 print "   $k = $v\n";

  }

  print "\n";

?>





by doing some thing like

$ telnet localhost 80

Trying 192.168.20.126...

Connected to s10u7x.

Escape character is '^]'.

GET /print-header.php HTTP/1.0

X-T3crawler: foobar



u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result



what do u expect is 



HTTP_X_T3_CRAWLER = foobar -> expected result

Expected result:

HTTP_X_T3_CRAWLER = foobar -> expected result

Actual result:
--
u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result








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


Req #51551 [Opn]: Include custom HTTP headers in request

2010-06-23 Thread srinatar
Edit report at http://bugs.php.net/bug.php?id=51551&edit=1

 ID:   51551
 Updated by:   srina...@php.net
 Reported by:  ed at atl dot org
 Summary:  Include custom HTTP headers in request
 Status:   Open
 Type: Feature/Change Request
 Package:  SOAP related
 Operating System: ALL
 PHP Version:  5.3SVN-2010-04-13 (SVN)
-Assigned To:  
+Assigned To:  srinatar

 New Comment:

I agree, it is very useful. I will look more into this patch. thanks for
the 

suggested patch


Previous Comments:

[2010-04-13 18:46:30] ed at atl dot org

Description:

When creating a soap client, I would also like to be able to identify
custom HTTP headers.



See attached patch, please include in next release (which will also
require the documentation to be included)

Test script:
---
$client = new
SoapClient('http://london:8180/testing/headerserver.php?wsdl',

array(

"trace"=>true,

"custom_http_header"=>"New: test header"

));







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


Bug #52162 [Opn]: for NSAPI module, custom request header variables with numbers are removed

2010-06-23 Thread thetaphi
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1

 ID:   52162
 Updated by:   theta...@php.net
 Reported by:  srina...@php.net
 Summary:  for NSAPI module, custom request header variables with
   numbers are removed
 Status:   Open
 Type: Bug
 Package:  iPlanet related
 Operating System: Linux
 PHP Version:  5.3.2
-Assigned To:  
+Assigned To:  thetaphi

 New Comment:

I will fix that! Thanks for reporting. Uwe


Previous Comments:

[2010-06-23 20:06:12] srina...@php.net

mark the bug as specific to a given SAPI only.


[2010-06-23 20:04:46] srina...@php.net

here is the suggested patch to address this issue





[sn123...@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c 

Index: sapi/nsapi/nsapi.c

===

--- sapi/nsapi/nsapi.c  (revision 300702)

+++ sapi/nsapi/nsapi.c  (working copy)

@@ -687,7 +687,7 @@

if (value) {

for(p = value + pos; *p; p++) {

*p = toupper(*p);

-   if (*p < 'A' || *p >
'Z') {

+   if (!isalnum(*p)) {

*p = '_';

}

}





if no one has any issues, i can commit this patch..


[2010-06-23 19:02:30] srina...@php.net

Description:

for example, if u try to request print-header.php (which contains the
following)



 $v) {

 print "   $k = $v\n";

  }

  print "\n";

?>





by doing some thing like

$ telnet localhost 80

Trying 192.168.20.126...

Connected to s10u7x.

Escape character is '^]'.

GET /print-header.php HTTP/1.0

X-T3crawler: foobar



u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result



what do u expect is 



HTTP_X_T3_CRAWLER = foobar -> expected result

Expected result:

HTTP_X_T3_CRAWLER = foobar -> expected result

Actual result:
--
u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result








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


Bug #52162 [Asn]: for NSAPI module, custom request header variables with numbers are removed

2010-06-23 Thread thetaphi
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1

 ID:   52162
 Updated by:   theta...@php.net
 Reported by:  srina...@php.net
 Summary:  for NSAPI module, custom request header variables with
   numbers are removed
 Status:   Assigned
 Type: Bug
 Package:  iPlanet related
 Operating System: Linux
 PHP Version:  5.3.2
 Assigned To:  thetaphi

 New Comment:

I think this problem also affects other SAPIs that parse headers to
ENV-style variables? I will scan other sapis and fix their code, too, if
needed.


Previous Comments:

[2010-06-23 20:28:47] theta...@php.net

I will fix that! Thanks for reporting. Uwe


[2010-06-23 20:06:12] srina...@php.net

mark the bug as specific to a given SAPI only.


[2010-06-23 20:04:46] srina...@php.net

here is the suggested patch to address this issue





[sn123...@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c 

Index: sapi/nsapi/nsapi.c

===

--- sapi/nsapi/nsapi.c  (revision 300702)

+++ sapi/nsapi/nsapi.c  (working copy)

@@ -687,7 +687,7 @@

if (value) {

for(p = value + pos; *p; p++) {

*p = toupper(*p);

-   if (*p < 'A' || *p >
'Z') {

+   if (!isalnum(*p)) {

*p = '_';

}

}





if no one has any issues, i can commit this patch..


[2010-06-23 19:02:30] srina...@php.net

Description:

for example, if u try to request print-header.php (which contains the
following)



 $v) {

 print "   $k = $v\n";

  }

  print "\n";

?>





by doing some thing like

$ telnet localhost 80

Trying 192.168.20.126...

Connected to s10u7x.

Escape character is '^]'.

GET /print-header.php HTTP/1.0

X-T3crawler: foobar



u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result



what do u expect is 



HTTP_X_T3_CRAWLER = foobar -> expected result

Expected result:

HTTP_X_T3_CRAWLER = foobar -> expected result

Actual result:
--
u get output as 

HTTP_X_T_CRAWLER = foobar -> unexpected result








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


[PHP-BUG] Bug #52163 [NEW]: fails due to parameter that can't be set

2010-06-23 Thread v-ryanbi at microsoft dot com
From: 
Operating system: Windows 7
PHP version:  5.2.14RC1
Package:  SPL related
Bug Type: Bug
Bug description:fails due to parameter that can't be set

Description:

When calling SplFileObject::ffgetss() in 5.2.x (including the 5.2.14 RC1),
a 

warning is thrown and the cursor is *not* advanced. Since this would
typically be 

used in a while(!$fileObj->eof()) loop, it can result in an infinite loop.



The complaint thrown in the warning is that the Length parameter must be
greater 

than 0. While Length is a valid parameter in the global fgetss function,
the SPL 

version of this function only accepts one parameter, and that is for
accepted 

tags.

Test script:
---


 Welcome! Today is the  of .



Text outside of the HTML block.

EOD;



$filePath="filename.php";

file_put_contents($filePath, $str);





$fileObject = new SplFileObject($filePath);

while (!$fileObject->eof()) {

echo $fileObject->fgetss('body');

}

?>

Expected result:

 Welcome! Today is the  of .



Text outside of the HTML block.

Actual result:
--
Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



... and on to infinity.

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



Bug #52163 [Opn]: SplFileObject::fgetss() fails due to parameter that can't be set

2010-06-23 Thread v-ryanbi at microsoft dot com
Edit report at http://bugs.php.net/bug.php?id=52163&edit=1

 ID:   52163
 User updated by:  v-ryanbi at microsoft dot com
 Reported by:  v-ryanbi at microsoft dot com
-Summary:  fails due to parameter that can't be set
+Summary:  SplFileObject::fgetss() fails due to parameter that
   can't be set
 Status:   Open
 Type: Bug
 Package:  SPL related
 Operating System: Windows 7
 PHP Version:  5.2.14RC1

 New Comment:

Argh. typo. In the description it should be SplFileObject::fgetss().


Previous Comments:

[2010-06-23 21:16:20] v-ryanbi at microsoft dot com

Description:

When calling SplFileObject::ffgetss() in 5.2.x (including the 5.2.14
RC1), a 

warning is thrown and the cursor is *not* advanced. Since this would
typically be 

used in a while(!$fileObj->eof()) loop, it can result in an infinite
loop.



The complaint thrown in the warning is that the Length parameter must be
greater 

than 0. While Length is a valid parameter in the global fgetss function,
the SPL 

version of this function only accepts one parameter, and that is for
accepted 

tags.

Test script:
---


 Welcome! Today is the  of .



Text outside of the HTML block.

EOD;



$filePath="filename.php";

file_put_contents($filePath, $str);





$fileObject = new SplFileObject($filePath);

while (!$fileObject->eof()) {

echo $fileObject->fgetss('body');

}

?>

Expected result:

 Welcome! Today is the  of .



Text outside of the HTML block.

Actual result:
--
Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



Warning: fgetss(): Length parameter must be greater than 0 in 

C:\fgetssBug\fgetss_basic.php on line 13



... and on to infinity.






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


Bug #52162 [Asn]: for NSAPI module, custom request header variables with numbers are removed

2010-06-23 Thread thetaphi
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1

 ID:   52162
 Updated by:   theta...@php.net
 Reported by:  srina...@php.net
 Summary:  for NSAPI module, custom request header variables with
   numbers are removed
 Status:   Assigned
 Type: Bug
 Package:  iPlanet related
 Operating System: Linux
 PHP Version:  5.3.2
 Assigned To:  thetaphi

 New Comment:

>From the CGI/1.1 spec in RFC3875:

   Meta-variables with names beginning with "HTTP_" contain values read

   from the client request header fields, if the protocol used is HTTP.

   The HTTP header field name is converted to upper case, has all

   occurrences of "-" replaced with "_" and has "HTTP_" prepended to

   give the meta-variable name.  The header data can be presented as

   sent by the client, or can be rewritten in ways which do not change

   its semantics.  If multiple header fields with the same field-name

   are received then the server MUST rewrite them as a single value

   having the same semantics.  Similarly, a header field that spans

   multiple lines MUST be merged onto a single line.  The server MUST,

   if necessary, change the representation of the data (for example,

   the character set) to be appropriate for a CGI meta-variable.



So I tend to remove the check explicitely and only specifically handle
the "-" character as described in the specs.


Previous Comments:

[2010-06-23 21:06:35] srina...@php.net

Automatic comment from SVN on behalf of srinatar
Revision: http://svn.php.net/viewvc/?view=revision&revision=300707
Log: - Fixed bug #52162 (custom request header variables with numbers
are removed)


[2010-06-23 20:30:00] theta...@php.net

I think this problem also affects other SAPIs that parse headers to
ENV-style variables? I will scan other sapis and fix their code, too, if
needed.


[2010-06-23 20:28:47] theta...@php.net

I will fix that! Thanks for reporting. Uwe


[2010-06-23 20:06:12] srina...@php.net

mark the bug as specific to a given SAPI only.


[2010-06-23 20:04:46] srina...@php.net

here is the suggested patch to address this issue





[sn123...@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c 

Index: sapi/nsapi/nsapi.c

===

--- sapi/nsapi/nsapi.c  (revision 300702)

+++ sapi/nsapi/nsapi.c  (working copy)

@@ -687,7 +687,7 @@

if (value) {

for(p = value + pos; *p; p++) {

*p = toupper(*p);

-   if (*p < 'A' || *p >
'Z') {

+   if (!isalnum(*p)) {

*p = '_';

}

}





if no one has any issues, i can commit this patch..




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

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


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


[PHP-BUG] Bug #52165 [NEW]: a closure fails to modify a variable in the outer scope

2010-06-23 Thread TerenceHardwicke at safetymail dot info
From: 
Operating system: Debian Linux 5
PHP version:  5.3.2
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:a closure fails to modify a variable in the outer scope

Description:

my configure line was:



./configure  --prefix /usr/local/php/5.3.2 --disable-libxml --disable-dom
--disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter
--without-pear

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



Bug #52161 [Opn->Fbk]: json_encode encoding HTML tags within strings incorrectly

2010-06-23 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=52161&edit=1

 ID:   52161
 Updated by:   johan...@php.net
 Reported by:  niazuddin dot ahmed at gmail dot com
 Summary:  json_encode encoding HTML tags within strings
   incorrectly
-Status:   Open
+Status:   Feedback
 Type: Bug
 Package:  JSON related
 Operating System: RedHat
 PHP Version:  5.3.2

 New Comment:

Please try using this snapshot:

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

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

can't reproduce


Previous Comments:

[2010-06-23 18:22:33] niazuddin dot ahmed at gmail dot com

Description:

When using json_encode for strings with HTML tag, end tag gets HTML
encoded but the start tag is left alone 



Test script:
---
echo json_encode(array('test' => 'Bold'));

Expected result:

{"test":"Bold"}



This is valid JSON as per http://www.jslint.com/

Actual result:
--
{"test":"Bold<\/b>"}






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


Bug #47584 [Bgs]: WSDL error in soapClient causes Fatal Error

2010-06-23 Thread gem at rellim dot com
Edit report at http://bugs.php.net/bug.php?id=47584&edit=1

 ID:   47584
 User updated by:  gem at rellim dot com
 Reported by:  gem at rellim dot com
 Summary:  WSDL error in soapClient causes Fatal Error
 Status:   Bogus
 Type: Bug
 Package:  SOAP related
 Operating System: Linux
 PHP Version:  5.2.9

 New Comment:

This is a still a 100% show  stopper for me.  I can not make PHP pages
live

that will crash on simple network errors.


Previous Comments:

[2010-06-22 10:35:23] florent dot biville at insa-rouen dot fr

I can confirm I encounter the same problem.

Despite everything documented, problems with WSDL reading will trigger a
fatal error.


[2010-04-09 07:41:35] pwb at evanr dot com

This is a real issue, even when the SoapClient is set to throw
exceptions and not 

errors.  This fatal error cannot be defeated even with the exceptions
option set 

to true.



We're experiencing this in 5.2.13 on linux x64.



A fatal error is thrown not only when WSDL can't be loaded but as well
when an 

internal reference in the WSDL (e.g. to a namespace) cannot be
imported/resolved.


[2009-03-06 17:49:08] gem at rellim dot com

Why does it work OK for you and not for me?  Just because it

works on one host for you does not mean it does not fail for me.



This is the entire program to reproduce:

http://google.com');

?>



PHP Fatal error:  SOAP-ERROR: Parsing WSDL: 



I can reproduce on several different hosts.  I am not

running Xdebug, eaccelerator, or any other add in.


[2009-03-06 15:32:18] il...@php.net

It already works that way.


[2009-03-06 07:42:50] gem at rellim dot com

Description:

Basically bug# 34657 says it all, except the bug is not bogus.



I am NOT running Xdebug and any problem reading the remote WSDL

causes a fatal error which makes it impossible to inform the

user nicely of the problem.

Reproduce code:
---
$client = new SoapClient('http://google.com');



Expected result:

I would like to see a catchable error or an error return;

Actual result:
--
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://google.com' 






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


Bug #52138 [Ana]: Constants are parsed into the ini file for section names

2010-06-23 Thread felipe
Edit report at http://bugs.php.net/bug.php?id=52138&edit=1

 ID:   52138
 Updated by:   fel...@php.net
 Reported by:  acid24 at gmail dot com
 Summary:  Constants are parsed into the ini file for section
   names
 Status:   Analyzed
 Type: Bug
 Package:  Filesystem function related
 Operating System: Red Hat Enterprise release 5.3
 PHP Version:  5.3.2

 New Comment:

I should not... as it can cause overwrite.


Previous Comments:

[2010-06-23 09:31:50] acid24 at gmail dot com

I don't think section names should be replaced by constant values, but
since that's the case, the online documentation should be updated to
document this fact.


[2010-06-23 02:09:57] fel...@php.net

For 5.3+ the constant value is passed directly to ZEND_INI_PARSER_CB(),
thus not knowing its name...


[2010-06-22 09:59:06] acid24 at gmail dot com

Description:

Documentation at
http://www.php.net/manual/en/function.parse-ini-file.php says "Constants
may also be parsed in the ini file so if you define a constant as an ini
value before running parse_ini_file(), it will be integrated into the
results. Only ini values are evaluated.". 



I found this to be incomplete. Not only ini values are evaluated, but
also section names.

Test script:
---
define( 'MYCONST', 1 );

/*

test.ini file looks like this



[MYCONST]

MYCONST = MYCONST



*/

$ret = parse_ini_file( 'test.ini', true );

var_dump( $ret );

Expected result:

array(1) {

  ["MYCONST"]=>

  array(1) {

["MYCONST"]=>

string(1) "1"

  }

}

Actual result:
--
array(1) {

  [1]=>

  array(1) {

["MYCONST"]=>

string(1) "1"

  }

}






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


Bug #8985 [Com]: shm_put_var wont put the given var into memory

2010-06-23 Thread james at ihush dot com
Edit report at http://bugs.php.net/bug.php?id=8985&edit=1

 ID:   8985
 Comment by:   james at ihush dot com
 Reported by:  fuf at mobil dot cz
 Summary:  shm_put_var wont put the given var into memory
 Status:   No Feedback
 Type: Bug
 Package:  Semaphore related
 Operating System: linux-2.2.18
 PHP Version:  4.0.4pl1

 New Comment:

I had also experienced such problem in my multi-process program, i start
several processes which shared a shared memory segment created by shm_*
method and when i get/set them frequently, i found some value is wrong
or missing, my PHP version is 5.2.11, would you please to help me to
check this problem? thank you very much  :)


Previous Comments:

[2002-02-15 00:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".


[2002-01-14 12:25:59] gik at zap dot cl

Hi!



Forgot to explain my example :)



In the Log file, "...added successfully to SHM..." means that
shm_put_var() returned true.  But the next time I call shm_get_var(), I
get the following error: "variable key ... doesn't exist in bbb.php4 on
line ..."



Giancarlo.


[2002-01-14 12:19:45] gik at zap dot cl

I've been experiencing the same problem on a dual cpu server, even with
PHP 4.1.1.  Sometimes occurs that shm_put_var() doesn't correctly write
data to SHM but returns true, and as I manage an array of online users
in SHM, I have noticed that all users sometimes are dropped off.



I also check semaphores before writing to SHM.



16:44:41 User aaa added successfully to SHM. (8104 bytes written)

16:45:54 User bbb added successfully to SHM. (8209 bytes written)

16:47:20 User bbb deleted successfully from SHM. (8104 bytes written)

16:47:31 User ccc added successfully to SHM. (8206 bytes written)

16:49:29 User ddd added successfully to SHM. (109 bytes written)



I offer my help to debug this problem,



Giancarlo Girardi


[2002-01-14 02:24:57] lob...@php.net

Have you tried this with 4.1.1?


[2001-01-29 12:27:07] fuf at mobil dot cz

hello,



  this is the same bug as described in #7046. a call to shm_put_var()
returns true all the time, but checking whether the variable has been
_really_ stored reveals that it hasn't.

  this doesn't happen on my 1 cpu box (i can't reproduce it however much
i try), but on a loaded server with 4 cpus it happens pretty often. of
course i call sem_acquire() before writing the variable into the shared
memory, so it should be safe.

  i can supply the whole source in which this happens (445 lines) but
basically it's just list this:



$semid = sem_get($sem_key, 1);

sem_acquire($semid);

$var = shm_get_var($shmid, $var_key); // $var is an array

// some change to $var, $var is still an array

shm_put_var($shmid, $var_key, $var);

if(!is_array(shm_get_var($shmid, $var_key)))

echo "failed to write \$var :(\n";

sem_release($semid);



  could the problem be caused by the true multitasking on the 4 cpu
server?



thanks for any help with this,

Michal Vitecek





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


Bug #8985 [Com]: shm_put_var wont put the given var into memory

2010-06-23 Thread james at ihush dot com
Edit report at http://bugs.php.net/bug.php?id=8985&edit=1

 ID:   8985
 Comment by:   james at ihush dot com
 Reported by:  fuf at mobil dot cz
 Summary:  shm_put_var wont put the given var into memory
 Status:   No Feedback
 Type: Bug
 Package:  Semaphore related
 Operating System: linux-2.2.18
 PHP Version:  4.0.4pl1

 New Comment:

I can provide my code, please contact me~~


Previous Comments:

[2010-06-24 05:37:12] james at ihush dot com

I had also experienced such problem in my multi-process program, i start
several processes which shared a shared memory segment created by shm_*
method and when i get/set them frequently, i found some value is wrong
or missing, my PHP version is 5.2.11, would you please to help me to
check this problem? thank you very much  :)


[2002-02-15 00:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".


[2002-01-14 12:25:59] gik at zap dot cl

Hi!



Forgot to explain my example :)



In the Log file, "...added successfully to SHM..." means that
shm_put_var() returned true.  But the next time I call shm_get_var(), I
get the following error: "variable key ... doesn't exist in bbb.php4 on
line ..."



Giancarlo.


[2002-01-14 12:19:45] gik at zap dot cl

I've been experiencing the same problem on a dual cpu server, even with
PHP 4.1.1.  Sometimes occurs that shm_put_var() doesn't correctly write
data to SHM but returns true, and as I manage an array of online users
in SHM, I have noticed that all users sometimes are dropped off.



I also check semaphores before writing to SHM.



16:44:41 User aaa added successfully to SHM. (8104 bytes written)

16:45:54 User bbb added successfully to SHM. (8209 bytes written)

16:47:20 User bbb deleted successfully from SHM. (8104 bytes written)

16:47:31 User ccc added successfully to SHM. (8206 bytes written)

16:49:29 User ddd added successfully to SHM. (109 bytes written)



I offer my help to debug this problem,



Giancarlo Girardi


[2002-01-14 02:24:57] lob...@php.net

Have you tried this with 4.1.1?




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

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


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


Req #52155 [Com]: Change fatal_error to fatal_error_exception

2010-06-23 Thread olamedia at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52155&edit=1

 ID:  52155
 Comment by:  olamedia at gmail dot com
 Reported by: olamedia at gmail dot com
 Summary: Change fatal_error to fatal_error_exception
 Status:  Open
 Type:Feature/Change Request
 Package: Scripting Engine problem
 PHP Version: 5.3.2

 New Comment:

Which types of "fatal errors" we can replace with throw exception (and
write to 

log/mail to/show custom html):

1. out of memory - cleanup $GLOBALS and calling GC before (to free up
memory)

2. compile error - when trying to include, require or eval

3. call to undefined function - that's simpler as above, like use of
undefined 

variable


Previous Comments:

[2010-06-23 11:10:14] olamedia at gmail dot com

Description:

It is almost impossible now to handle fatal errors.

Of course there are exists some ways (shutdown handler or ob_start): 

http://eirikhoem.wordpress.com/2008/03/15/dying-with-grace-phps-

register_shutdown_function/

I think, that replacing message "Fatal error" with something like  

"FatalErrorException" is possible and follows use case of exceptions.









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