Bug #37672 [Com]: Cannot start script from directory containing international characters.

2013-08-20 Thread ku at digitaldolphins dot jp
Edit report at https://bugs.php.net/bug.php?id=37672edit=1

 ID: 37672
 Comment by: ku at digitaldolphins dot jp
 Reported by:php-bugs at shad dot pp dot ru
 Summary:Cannot start script from directory containing
 international characters.
 Status: Re-Opened
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Server 2003 SP2
 PHP Version:5.2.14
 Block user comment: N
 Private report: N

 New Comment:

Hi.

I have same problem too!

It seems that php5apache2_2.dll assumes request_rec::filename as ANSI charset. 
However it will be UTF-8.

It'll need charset conversion: from UTF-8 to local ANSI codepage.

Check C:\php-sdk\php54dev\vc9\x86\php-5.4.18\sapi\apache2handler\sapi_apache2.c
---
static int php_handler(request_rec *r)
{
...
  zend_file_handle zfd;

  zfd.type = ZEND_HANDLE_FILENAME;
  zfd.filename = (char *) r-filename;
  zfd.free_filename = 0;
  zfd.opened_path = NULL;
...
---

What do you think about it?

Thanks.


Previous Comments:

[2010-09-08 14:23:48] php-bugs at shad dot pp dot ru

Test


[2010-09-08 14:23:21] php-bugs at shad dot pp dot ru

For some reason I cannot reopen this bug. I hope someone can do that.


[2010-09-08 14:22:25] php-bugs at shad dot pp dot ru

Nothing changed since my first bug report. I updated details and reopened issue.

[Wed Sep 08 16:10:27 2010] [error] [client 193.105.104.4] PHP Fatal error:  
Unknown: Failed opening required 
'D:/www/default/test/\xd0\xba\xd0\xb8\xd1\x80\xd0\xb8\xd0\xbb\xd0\xbb\xd0\xb8\xd1\x86\xd0\xb0/test.php'
 (include_path='.;C:\\php5\\pear') in Unknown on line 0

I believe, this is a problem with apache2 handler. Looks like it doesn't 
understand/decode the path that Apache is providing to it.


[2010-09-08 14:10:15] php-bugs at shad dot pp dot ru

Still not fixed in PHP 5.2.14.


[2007-01-15 01:00:01] php-bugs at lists dot php dot net

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




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

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


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


Bug #37672 [Com]: Cannot start script from directory containing international characters.

2013-08-20 Thread ku at digitaldolphins dot jp
Edit report at https://bugs.php.net/bug.php?id=37672edit=1

 ID: 37672
 Comment by: ku at digitaldolphins dot jp
 Reported by:php-bugs at shad dot pp dot ru
 Summary:Cannot start script from directory containing
 international characters.
 Status: Re-Opened
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Windows Server 2003 SP2
 PHP Version:5.2.14
 Block user comment: N
 Private report: N

 New Comment:

I have posted my patch. It works fine for me!

Thanks


Previous Comments:

[2013-08-21 02:25:56] ku at digitaldolphins dot jp

Hi.

I have same problem too!

It seems that php5apache2_2.dll assumes request_rec::filename as ANSI charset. 
However it will be UTF-8.

It'll need charset conversion: from UTF-8 to local ANSI codepage.

Check C:\php-sdk\php54dev\vc9\x86\php-5.4.18\sapi\apache2handler\sapi_apache2.c
---
static int php_handler(request_rec *r)
{
...
  zend_file_handle zfd;

  zfd.type = ZEND_HANDLE_FILENAME;
  zfd.filename = (char *) r-filename;
  zfd.free_filename = 0;
  zfd.opened_path = NULL;
...
---

What do you think about it?

Thanks.


[2010-09-08 14:23:48] php-bugs at shad dot pp dot ru

Test


[2010-09-08 14:23:21] php-bugs at shad dot pp dot ru

For some reason I cannot reopen this bug. I hope someone can do that.


[2010-09-08 14:22:25] php-bugs at shad dot pp dot ru

Nothing changed since my first bug report. I updated details and reopened issue.

[Wed Sep 08 16:10:27 2010] [error] [client 193.105.104.4] PHP Fatal error:  
Unknown: Failed opening required 
'D:/www/default/test/\xd0\xba\xd0\xb8\xd1\x80\xd0\xb8\xd0\xbb\xd0\xbb\xd0\xb8\xd1\x86\xd0\xb0/test.php'
 (include_path='.;C:\\php5\\pear') in Unknown on line 0

I believe, this is a problem with apache2 handler. Looks like it doesn't 
understand/decode the path that Apache is providing to it.


[2010-09-08 14:10:15] php-bugs at shad dot pp dot ru

Still not fixed in PHP 5.2.14.




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


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


Bug #37672 [Com]: Cannot start script from directory containing international characters.

2010-09-08 Thread php-bugs at shad dot pp dot ru
Edit report at http://bugs.php.net/bug.php?id=37672edit=1

 ID: 37672
 Comment by: php-bugs at shad dot pp dot ru
 Reported by:php-bugs at shad dot pp dot ru
 Summary:Cannot start script from directory containing
 international characters.
 Status: No Feedback
 Type:   Bug
 Package:Unknown/Other Function
 Operating System:   Windows 2000 SP4 + hotfixes
 PHP Version:5.1.4
 Block user comment: N

 New Comment:

Still not fixed in PHP 5.2.14.


Previous Comments:

[2007-01-15 01:00:01] php-bugs at lists dot php dot net

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


[2007-01-07 18:55:54] il...@php.net

Please try using this CVS snapshot:

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




[2006-06-19 10:50:51] php-bugs at shad dot pp dot ru

Ok, here is an example.



http://home.shad.pp.ru/test/



In this test directory you will find another directory containing
cyrillic characters. Directory listing is provided via PHP script
index.php, which is the same in both directories. If you try to access
this cyrillic named directory, you will get blank screen. But you can
access any file within this directory by direct links:



http://home.shad.pp.ru/test/%D0%BA%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D1%86%D0%B0/text.txt

http://home.shad.pp.ru/test/%D0%BA%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D1%86%D0%B0/test.rar



I also made simple script containing only one command:



?php

  echo 'Hello world!';

?



Put it in the same directory as test.php. You will also get blank
screen, trying to access it by url:

http://home.shad.pp.ru/test/%D0%BA%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D1%86%D0%B0/test.php


[2006-06-19 09:28:48] tony2...@php.net

Every other PHP user (including me) is able to open file directory
containing non-ASCII characters.

You didn't provide a piece of information (except for the error message)
required to identify your problem.

Please provide at least something useful.

Until then - bogus.


[2006-06-19 08:29:46] php-bugs at shad dot pp dot ru

You don't need unicode support to access directory with normal non-latin
characters. Every other non-unicode program can access, correctly
display name, rename or delete them using ANSI file api, which is used
by PHP.




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


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