Bug #63426 [Ver]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

2013-05-30 Thread rick dot hjpbarcelos at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63426&edit=1

 ID: 63426
 User updated by:rick dot hjpbarcelos at gmail dot com
 Reported by:rick dot hjpbarcelos at gmail dot com
 Summary:Can't throw exceptions with accentued chars coded in
 latin1/ISO-8859-1
 Status: Verified
 Type:   Bug
 Package:*Unicode Issues
 Operating System:   Linux/Ubuntu 12.10
 PHP Version:5.4Git-2012-11-03 (snap)
 Block user comment: N
 Private report: N

 New Comment:

Tried with lighttpd/1.4.28 and same results achieved.


Previous Comments:

[2012-11-05 08:11:33] rick dot hjpbarcelos at gmail dot com

I'll try this in another computer with the same OS... But in mine, still the 
same, even after I installed from source...


[2012-11-05 04:11:29] larue...@php.net

Hey, still can not with apache-2.2.22 :< 

Connection:Keep-Alive
Content-Length:235
Content-Type:text/html;charset=iso-8859-1
Date:Mon, 05 Nov 2012 04:08:36 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 PHP/5.4.9-
dev
X-Powered-By:PHP/5.4.9-dev

Fatal error: Uncaught exception 'Exception' with message 'é' in


[2012-11-05 03:45:15] ahar...@php.net

Fixing package (sorry, should have been in the last comment). Guessing this is 
SAPI related for now, given CLI is fine, but I don't really have time to 
investigate further at present.


[2012-11-05 03:44:41] ahar...@php.net

I can verify this (CLI seems fine; Apache 2 handler isn't):

HTTP/1.1 200 OK
Date: Mon, 05 Nov 2012 03:44:20 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.9-dev
Vary: Accept-Encoding
Content-Length: 101
Content-Type: text/html;charset=iso-8859-1


Fatal error:   in /home/adamh/public_html/bugs/63426.php on line 
5

hexdump output shows that the entire "Uncaught exception" message is missing:

  48 54 54 50 2f 31 2e 31  20 32 30 30 20 4f 4b 0d  |HTTP/1.1 200 OK.|
0010  0a 44 61 74 65 3a 20 4d  6f 6e 2c 20 30 35 20 4e  |.Date: Mon, 05 N|
0020  6f 76 20 32 30 31 32 20  30 33 3a 33 39 3a 30 31  |ov 2012 03:39:01|
0030  20 47 4d 54 0d 0a 53 65  72 76 65 72 3a 20 41 70  | GMT..Server: Ap|
0040  61 63 68 65 2f 32 2e 32  2e 32 32 20 28 55 62 75  |ache/2.2.22 (Ubu|
0050  6e 74 75 29 0d 0a 58 2d  50 6f 77 65 72 65 64 2d  |ntu)..X-Powered-|
0060  42 79 3a 20 50 48 50 2f  35 2e 34 2e 39 2d 64 65  |By: PHP/5.4.9-de|
0070  76 0d 0a 56 61 72 79 3a  20 41 63 63 65 70 74 2d  |v..Vary: Accept-|
0080  45 6e 63 6f 64 69 6e 67  0d 0a 43 6f 6e 74 65 6e  |Encoding..Conten|
0090  74 2d 4c 65 6e 67 74 68  3a 20 31 30 31 0d 0a 43  |t-Length: 101..C|
00a0  6f 6e 74 65 6e 74 2d 54  79 70 65 3a 20 74 65 78  |ontent-Type: tex|
00b0  74 2f 68 74 6d 6c 3b 63  68 61 72 73 65 74 3d 69  |t/html;charset=i|
00c0  73 6f 2d 38 38 35 39 2d  31 0d 0a 0d 0a 3c 62 72  |so-8859-1.Fatal err|
00e0  6f 72 3c 2f 62 3e 3a 20  20 20 69 6e 20 3c 62 3e  |or:   in |
00f0  2f 68 6f 6d 65 2f 61 64  61 6d 68 2f 70 75 62 6c  |/home/adamh/publ|
0100  69 63 5f 68 74 6d 6c 2f  62 75 67 73 2f 36 33 34  |ic_html/bugs/634|
0110  32 36 2e 70 68 70 3c 2f  62 3e 20 6f 6e 20 6c 69  |26.php on li|
0120  6e 65 20 3c 62 3e 35 3c  2f 62 3e 3c 62 72 20 2f  |ne 5.|

--------------------
[2012-11-03 22:07:50] rick dot hjpbarcelos at gmail dot com

Well, I don't know what could be... I installed PHP via apt-get, I'll try make 
a clean install from another source...




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

https://bugs.php.net/bug.php?id=63426


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


Bug #63426 [Com]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

2013-06-05 Thread rick dot hjpbarcelos at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63426&edit=1

 ID: 63426
 Comment by: rick dot hjpbarcelos at gmail dot com
 Reported by:rick dot hjpbarcelos at gmail dot com
 Summary:Can't throw exceptions with accentued chars coded in
 latin1/ISO-8859-1
 Status: Verified
 Type:   Bug
 Package:*Unicode Issues
 Operating System:   Linux/Ubuntu 12.10
 PHP Version:5.4Git-2012-11-03 (snap)
 Block user comment: N
 Private report: N

 New Comment:

Tried with PHP 5.4 built-in server and got this on my terminal:

[code]
[Wed Jun  5 21:32:08 2013] PHP Fatal error:  Uncaught exception 'Exception' 
with message '�' in /var/www/test2.php:9
Stack trace:
#0 {main}
  thrown in /var/www/test2.php on line 9
[Wed Jun  5 21:32:08 2013] 127.0.0.1:55116 [200]: /test2.php - Uncaught 
exception 'Exception' with message '�' in /var/www/test2.php:9
Stack trace:
#0 {main}
  thrown in /var/www/test2.php on line 9
[/code]

But in the browser, still the same problem.


Previous Comments:
----------------
[2013-05-30 13:30:15] rick dot hjpbarcelos at gmail dot com

Tried with lighttpd/1.4.28 and same results achieved.

----------------
[2012-11-05 08:11:33] rick dot hjpbarcelos at gmail dot com

I'll try this in another computer with the same OS... But in mine, still the 
same, even after I installed from source...


[2012-11-05 04:11:29] larue...@php.net

Hey, still can not with apache-2.2.22 :< 

Connection:Keep-Alive
Content-Length:235
Content-Type:text/html;charset=iso-8859-1
Date:Mon, 05 Nov 2012 04:08:36 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 PHP/5.4.9-
dev
X-Powered-By:PHP/5.4.9-dev

Fatal error: Uncaught exception 'Exception' with message 'é' in


[2012-11-05 03:45:15] ahar...@php.net

Fixing package (sorry, should have been in the last comment). Guessing this is 
SAPI related for now, given CLI is fine, but I don't really have time to 
investigate further at present.


[2012-11-05 03:44:41] ahar...@php.net

I can verify this (CLI seems fine; Apache 2 handler isn't):

HTTP/1.1 200 OK
Date: Mon, 05 Nov 2012 03:44:20 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.9-dev
Vary: Accept-Encoding
Content-Length: 101
Content-Type: text/html;charset=iso-8859-1


Fatal error:   in /home/adamh/public_html/bugs/63426.php on line 
5

hexdump output shows that the entire "Uncaught exception" message is missing:

  48 54 54 50 2f 31 2e 31  20 32 30 30 20 4f 4b 0d  |HTTP/1.1 200 OK.|
0010  0a 44 61 74 65 3a 20 4d  6f 6e 2c 20 30 35 20 4e  |.Date: Mon, 05 N|
0020  6f 76 20 32 30 31 32 20  30 33 3a 33 39 3a 30 31  |ov 2012 03:39:01|
0030  20 47 4d 54 0d 0a 53 65  72 76 65 72 3a 20 41 70  | GMT..Server: Ap|
0040  61 63 68 65 2f 32 2e 32  2e 32 32 20 28 55 62 75  |ache/2.2.22 (Ubu|
0050  6e 74 75 29 0d 0a 58 2d  50 6f 77 65 72 65 64 2d  |ntu)..X-Powered-|
0060  42 79 3a 20 50 48 50 2f  35 2e 34 2e 39 2d 64 65  |By: PHP/5.4.9-de|
0070  76 0d 0a 56 61 72 79 3a  20 41 63 63 65 70 74 2d  |v..Vary: Accept-|
0080  45 6e 63 6f 64 69 6e 67  0d 0a 43 6f 6e 74 65 6e  |Encoding..Conten|
0090  74 2d 4c 65 6e 67 74 68  3a 20 31 30 31 0d 0a 43  |t-Length: 101..C|
00a0  6f 6e 74 65 6e 74 2d 54  79 70 65 3a 20 74 65 78  |ontent-Type: tex|
00b0  74 2f 68 74 6d 6c 3b 63  68 61 72 73 65 74 3d 69  |t/html;charset=i|
00c0  73 6f 2d 38 38 35 39 2d  31 0d 0a 0d 0a 3c 62 72  |so-8859-1.Fatal err|
00e0  6f 72 3c 2f 62 3e 3a 20  20 20 69 6e 20 3c 62 3e  |or:   in |
00f0  2f 68 6f 6d 65 2f 61 64  61 6d 68 2f 70 75 62 6c  |/home/adamh/publ|
0100  69 63 5f 68 74 6d 6c 2f  62 75 67 73 2f 36 33 34  |ic_html/bugs/634|
0110  32 36 2e 70 68 70 3c 2f  62 3e 20 6f 6e 20 6c 69  |26.php on li|
0120  6e 65 20 3c 62 3e 35 3c  2f 62 3e 3c 62 72 20 2f  |ne 5.|




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

https://bugs.php.net/bug.php?id=63426


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


[PHP-BUG] Bug #63426 [NEW]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

2012-11-03 Thread rick dot hjpbarcelos at gmail dot com
From: rick dot hjpbarcelos at gmail dot com
Operating system: Linux/Ubuntu 12.10
PHP version:  5.4Git-2012-11-03 (snap)
Package:  *Unicode Issues
Bug Type: Bug
Bug description:Can't throw exceptions with accentued chars coded in 
latin1/ISO-8859-1

Description:

Package 5.4.6-1ubuntu1

I don't really know why it's happening, started after I upgraded from
version 5.3.4.

I tried to set the coding on browser (tested with Firefox and Chrome) and
the problem didn't go away.

Test script:
---
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);
header('Content-Type: text/html;charset=iso-8859-1');
throw new Exception("é");


Expected result:

Fatal error: Uncaught exception 'Exception' with message 'é' in
/home/henrique/public/teste.php:4 Stack trace: #0 {main} thrown in
/home/henrique/public/teste.php on line 4

Actual result:
--
On browser:

With xdegub:

( ! ) Fatal error: in /home/henrique/public/teste.php on line 4
( ! ) Exception: in /home/henrique/public/teste.php on line 4
Call Stack
#   TimeMemory  FunctionLocation
1   0.0002  124436  {main}( )   ../teste.php:0

Withou it:
Fatal error: in /home/henrique/public/teste.php on line 4
__

On bash:

Stack trace:
#0 {main}
  thrown in /home/henrique/public/teste.php on line 4

Fatal error: Uncaught exception 'Exception' with message '�' in
/home/henrique/public/teste.php on line 4

Exception: � in /home/henrique/public/teste.php on line 4

Call Stack:
0.0002 121256   1. {main}() /home/henrique/public/teste.php:0


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



Bug #63426 [Opn]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

2012-11-03 Thread rick dot hjpbarcelos at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63426&edit=1

 ID: 63426
 User updated by:rick dot hjpbarcelos at gmail dot com
 Reported by:rick dot hjpbarcelos at gmail dot com
 Summary:Can't throw exceptions with accentued chars coded in
 latin1/ISO-8859-1
 Status: Open
 Type:   Bug
 Package:*Unicode Issues
 Operating System:   Linux/Ubuntu 12.10
 PHP Version:5.4Git-2012-11-03 (snap)
 Block user comment: N
 Private report: N

 New Comment:

function exceptionHandler($e) {
echo $e;
}
set_exception_handler('exceptionHandler');
throw new Exception('é');

This way, it works, the message is shown.


Previous Comments:
----
[2012-11-03 11:48:20] rick dot hjpbarcelos at gmail dot com

Description:

Package 5.4.6-1ubuntu1

I don't really know why it's happening, started after I upgraded from version 
5.3.4.

I tried to set the coding on browser (tested with Firefox and Chrome) and the 
problem didn't go away.

Test script:
---
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);
header('Content-Type: text/html;charset=iso-8859-1');
throw new Exception("é");


Expected result:

Fatal error: Uncaught exception 'Exception' with message 'é' in 
/home/henrique/public/teste.php:4 Stack trace: #0 {main} thrown in 
/home/henrique/public/teste.php on line 4

Actual result:
--
On browser:

With xdegub:

( ! ) Fatal error: in /home/henrique/public/teste.php on line 4
( ! ) Exception: in /home/henrique/public/teste.php on line 4
Call Stack
#   TimeMemory  FunctionLocation
1   0.0002  124436  {main}( )   ../teste.php:0

Withou it:
Fatal error: in /home/henrique/public/teste.php on line 4
__

On bash:

Stack trace:
#0 {main}
  thrown in /home/henrique/public/teste.php on line 4

Fatal error: Uncaught exception 'Exception' with message '�' in 
/home/henrique/public/teste.php on line 4

Exception: � in /home/henrique/public/teste.php on line 4

Call Stack:
0.0002 121256   1. {main}() /home/henrique/public/teste.php:0







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


Bug #63426 [Com]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

2012-11-03 Thread rick dot hjpbarcelos at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63426&edit=1

 ID: 63426
 Comment by: rick dot hjpbarcelos at gmail dot com
 Reported by:rick dot hjpbarcelos at gmail dot com
 Summary:Can't throw exceptions with accentued chars coded in
 latin1/ISO-8859-1
 Status: Open
 Type:   Bug
 Package:*Unicode Issues
 Operating System:   Linux/Ubuntu 12.10
 PHP Version:5.4Git-2012-11-03 (snap)
 Block user comment: N
 Private report: N

 New Comment:

Well, I don't know what could be... I installed PHP via apt-get, I'll try make 
a clean install from another source...


Previous Comments:

[2012-11-03 13:23:07] larue...@php.net

I can not reproduce this, both uncaught exception here(browser/bash).

thanks


[2012-11-03 12:08:33] rick dot hjpbarcelos at gmail dot com

function exceptionHandler($e) {
echo $e;
}
set_exception_handler('exceptionHandler');
throw new Exception('é');

This way, it works, the message is shown.

--------
[2012-11-03 11:48:20] rick dot hjpbarcelos at gmail dot com

Description:

Package 5.4.6-1ubuntu1

I don't really know why it's happening, started after I upgraded from version 
5.3.4.

I tried to set the coding on browser (tested with Firefox and Chrome) and the 
problem didn't go away.

Test script:
---
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);
header('Content-Type: text/html;charset=iso-8859-1');
throw new Exception("é");


Expected result:

Fatal error: Uncaught exception 'Exception' with message 'é' in 
/home/henrique/public/teste.php:4 Stack trace: #0 {main} thrown in 
/home/henrique/public/teste.php on line 4

Actual result:
--
On browser:

With xdegub:

( ! ) Fatal error: in /home/henrique/public/teste.php on line 4
( ! ) Exception: in /home/henrique/public/teste.php on line 4
Call Stack
#   TimeMemory  FunctionLocation
1   0.0002  124436  {main}( )   ../teste.php:0

Withou it:
Fatal error: in /home/henrique/public/teste.php on line 4
__

On bash:

Stack trace:
#0 {main}
  thrown in /home/henrique/public/teste.php on line 4

Fatal error: Uncaught exception 'Exception' with message '�' in 
/home/henrique/public/teste.php on line 4

Exception: � in /home/henrique/public/teste.php on line 4

Call Stack:
0.0002 121256   1. {main}() /home/henrique/public/teste.php:0







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


Bug #63426 [Ver]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

2012-11-05 Thread rick dot hjpbarcelos at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63426&edit=1

 ID: 63426
 User updated by:rick dot hjpbarcelos at gmail dot com
 Reported by:rick dot hjpbarcelos at gmail dot com
 Summary:Can't throw exceptions with accentued chars coded in
 latin1/ISO-8859-1
 Status: Verified
 Type:   Bug
-Package:Apache2 related
+Package:*Unicode Issues
 Operating System:   Linux/Ubuntu 12.10
 PHP Version:5.4Git-2012-11-03 (snap)
 Block user comment: N
 Private report: N

 New Comment:

I'll try this in another computer with the same OS... But in mine, still the 
same, even after I installed from source...


Previous Comments:

[2012-11-05 04:11:29] larue...@php.net

Hey, still can not with apache-2.2.22 :< 

Connection:Keep-Alive
Content-Length:235
Content-Type:text/html;charset=iso-8859-1
Date:Mon, 05 Nov 2012 04:08:36 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 PHP/5.4.9-
dev
X-Powered-By:PHP/5.4.9-dev

Fatal error: Uncaught exception 'Exception' with message 'é' in


[2012-11-05 03:45:15] ahar...@php.net

Fixing package (sorry, should have been in the last comment). Guessing this is 
SAPI related for now, given CLI is fine, but I don't really have time to 
investigate further at present.


[2012-11-05 03:44:41] ahar...@php.net

I can verify this (CLI seems fine; Apache 2 handler isn't):

HTTP/1.1 200 OK
Date: Mon, 05 Nov 2012 03:44:20 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.9-dev
Vary: Accept-Encoding
Content-Length: 101
Content-Type: text/html;charset=iso-8859-1


Fatal error:   in /home/adamh/public_html/bugs/63426.php on line 
5

hexdump output shows that the entire "Uncaught exception" message is missing:

  48 54 54 50 2f 31 2e 31  20 32 30 30 20 4f 4b 0d  |HTTP/1.1 200 OK.|
0010  0a 44 61 74 65 3a 20 4d  6f 6e 2c 20 30 35 20 4e  |.Date: Mon, 05 N|
0020  6f 76 20 32 30 31 32 20  30 33 3a 33 39 3a 30 31  |ov 2012 03:39:01|
0030  20 47 4d 54 0d 0a 53 65  72 76 65 72 3a 20 41 70  | GMT..Server: Ap|
0040  61 63 68 65 2f 32 2e 32  2e 32 32 20 28 55 62 75  |ache/2.2.22 (Ubu|
0050  6e 74 75 29 0d 0a 58 2d  50 6f 77 65 72 65 64 2d  |ntu)..X-Powered-|
0060  42 79 3a 20 50 48 50 2f  35 2e 34 2e 39 2d 64 65  |By: PHP/5.4.9-de|
0070  76 0d 0a 56 61 72 79 3a  20 41 63 63 65 70 74 2d  |v..Vary: Accept-|
0080  45 6e 63 6f 64 69 6e 67  0d 0a 43 6f 6e 74 65 6e  |Encoding..Conten|
0090  74 2d 4c 65 6e 67 74 68  3a 20 31 30 31 0d 0a 43  |t-Length: 101..C|
00a0  6f 6e 74 65 6e 74 2d 54  79 70 65 3a 20 74 65 78  |ontent-Type: tex|
00b0  74 2f 68 74 6d 6c 3b 63  68 61 72 73 65 74 3d 69  |t/html;charset=i|
00c0  73 6f 2d 38 38 35 39 2d  31 0d 0a 0d 0a 3c 62 72  |so-8859-1.Fatal err|
00e0  6f 72 3c 2f 62 3e 3a 20  20 20 69 6e 20 3c 62 3e  |or:   in |
00f0  2f 68 6f 6d 65 2f 61 64  61 6d 68 2f 70 75 62 6c  |/home/adamh/publ|
0100  69 63 5f 68 74 6d 6c 2f  62 75 67 73 2f 36 33 34  |ic_html/bugs/634|
0110  32 36 2e 70 68 70 3c 2f  62 3e 20 6f 6e 20 6c 69  |26.php on li|
0120  6e 65 20 3c 62 3e 35 3c  2f 62 3e 3c 62 72 20 2f  |ne 5.|

--------------------
[2012-11-03 22:07:50] rick dot hjpbarcelos at gmail dot com

Well, I don't know what could be... I installed PHP via apt-get, I'll try make 
a clean install from another source...


[2012-11-03 13:23:07] larue...@php.net

I can not reproduce this, both uncaught exception here(browser/bash).

thanks




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

https://bugs.php.net/bug.php?id=63426


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