Bug #70892 [Opn->Nab]: does not show error text
| From: | ab@php.net | Date: | Wed, 11 Nov 2015 17:01:08 +0000 |
| Subject: | Bug #70892 [Opn->Nab]: does not show error text | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197175@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70892&edit=1
ID: 70892
Updated by: ab@php.net
Reported by: y dot korotia at hotmail dot com
Summary: does not show error text
-Status: Open
+Status: Not a bug
Type: Bug
Package: Filesystem function related
Operating System: Win 8.1 x64
PHP Version: 5.6.15
Block user comment: N
Private report: N
New Comment:
Thanks for the report. You should use ASCII filenames anyway. But then - the charset you configured
for the PHP output and the charset of the actual content you output is different. Same for server or
console. Then - if your browser sends the request URL in cp1251 or utf8 makes another difference.
If you're just starting to play with PHP, you definitely should use ASCII for filenames, etc.
When you learn more about how charset handling works at various places, you'll be able to
configure it a correct way. Fe in this case i'd be rather doing filenames in ascii in any case,
and then using some URL rewrite module to produce URLs like http://моÑ-ÑÑÑаниÑа/ÑÑаÑÑ
and to route them to a corresponding controller.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2015-11-11 16:43:54] y dot korotia at hotmail dot com
also to get URL path i have to do next
urldecode(iconv('cp1251','utf-8', $_SERVER['REQUEST_URI']))
anyway, i'm stopping to comment on this, looks like a bug house
regards
------------------------------------------------------------------------
[2015-11-11 16:24:30] y dot korotia at hotmail dot com
same with PHP-7rc6
it looks like the nature of this issue is the same as in require() which cannot find file until i
use iconv() on filename in utf8 encoded code file like
require iconv('utf-8', 'Windows-1251',
'ÑÑаÑÑова.php');
p.s.
this is not a critical bug for me, i just play with php, but i find it as a bug
------------------------------------------------------------------------
[2015-11-11 15:36:02] y dot korotia at hotmail dot com
Description:
------------
if i use Cyrillic filename PHP does not show error message when thrown
also filename is not possible to read
i use Win 8.1/IIS x64, php is NTS x86
Test script:
---------------
(1)
file: index.php
code: throw new \Exception('msg');
produces: Fatal error: Uncaught exception 'Exception' with message 'msg' in
C:\..\index.php on line 2
(2) file: ÑÑаÑÑова.php
code: throw new \Exception('msg');
produces: Fatal error: in C:\..\��������.php on line 2
Expected result:
----------------
i expect to see error message and readable file name
Actual result:
--------------
no error message and unreadable filename
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70892&edit=1