KITAZAKI Shigeru | 1 Feb 2010 02:35
Picon
Favicon

Re: [PHP-DEV] adding GB18030 support for mbstring

Thank you for your suggestion.
Let me introduce some patches which we published. They might be useful on
specific environments although they are not bugs.
If I had better to report below issues as bugs, please tell me.

* php_syslog.patch
  syslog() function cannot properly send UTF-8 strings to event log on
  Windows. This patch changes the internal API. We, however, must set
  UTF-8 on 'mbstring.internal_incoding'. 
  In addition, this changes the severity of 'LOG_ERR' from eventlog's
  warning to eventlog's error.

* php_ldap.patch
  This changes the internal API to use Windows native LDAP API instead of
  OpenLDAP one. This is because OpenLDAP has dropped Windows support.

* libmbfl_gb18030.patch
  This adds GB18030 support to 'mbstring' extension. The reason is that
  every software in China needs to support the character encoding.

And we also published some patches for 'spidermonkey' extension.

The list is available on:
http://developer.cybozu.co.jp/oss/php/index.html

Regards,
KITAZAKI Shigeru

Christopher Jones wrote:
> To highlight and record those patches, can you create a bug report for
(Continue reading)

Moriyoshi Koizumi | 1 Feb 2010 08:29
Picon

[PHP-DEV] Re: [PHP-I18N] adding GB18030 support for mbstring

Kitazaki-san,

First thank you for your effort. But, I am under the impression that
the conversion table looks too huge to include in a distribution
(>30MB).  Is there any way to get this more compressed?

BTW, I created an extension that is near-compatible with mbstring and
based on ICU that of course supports GB18030. See
http://github.com/moriyoshi/mbstring-ng for detail.

Regards,
Moriyoshi

2010/1/28 KITAZAKI Shigeru <shigeru_kitazaki <at> cybozu.co.jp>:
> We made a patch to add a mbfilter for GB18030 encoding for PHP-5.3.1.
> Please take a look at our blog:
>  http://developer.cybozu.co.jp/oss/2010/01/php-mbstring-pa.html
>
> We would appreciate if you take this patch into the mainline.
>
> BTW, our blog has various other patches for PHP in addition to this one.
> Feel free to mail me if you are interested in some of them.
>
> Regards,
> KITAZAKI Shigeru <shigeru_kitazaki <at> cybozu.co.jp>
>
> --
> PHP Unicode & I18N Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
(Continue reading)

Pierre Joye | 1 Feb 2010 09:52
Picon
Gravatar

Re: [PHP-DEV] adding GB18030 support for mbstring

hi,

Thanks for the patches :)

2010/2/1 KITAZAKI Shigeru <shigeru_kitazaki <at> cybozu.co.jp>:
> Thank you for your suggestion.
> Let me introduce some patches which we published. They might be useful on
> specific environments although they are not bugs.
> If I had better to report below issues as bugs, please tell me.
>
> * php_syslog.patch
>  syslog() function cannot properly send UTF-8 strings to event log on
>  Windows. This patch changes the internal API. We, however, must set
>  UTF-8 on 'mbstring.internal_incoding'.
>  In addition, this changes the severity of 'LOG_ERR' from eventlog's
>  warning to eventlog's error.

It has to be optional. Maybe a mbstring.syslog* option to set a given
encoding for the syslog functions.

> * php_ldap.patch
>  This changes the internal API to use Windows native LDAP API instead of
>  OpenLDAP one. This is because OpenLDAP has dropped Windows support.

That's something I have done too but I don't think we can do it in a
minor version as it introduces some BC breaks. For example with SSL,
as far as I know it is not possible to use custom cerficates in custom
places (via openssl).

Where did you read that openldap stops to support windows? Last time I
(Continue reading)

Bharat Nagwani | 1 Feb 2010 10:05
Favicon

[PHP-DEV] Too many levels of symbolic links error

Hello,

We use php in cgi mode. PHP version is 5.2.3.

I am using popen to execute grep on a file

popen($cmd, "r");

where $cmd = "/usr/bin/grep xyz /var/tmp/log/session"

and log is a symbolic  link pointing to /var/log

ls -l /var/tmp/
lrwxr-xr-x  1 root    wheel    8 Jan 31 23:17 log -> /var/log

In the shell I am able to run this command fine.
When I execute from php using popen I get this error
[chrome://firebug/content/blank.gif]grep: /var/tmp/log/session: Too many levels of symbolic links

If I don't use symbolic link it works fine. But I need to use symbolic link
due to some limitations.

Any idea what could be wrong?

Thanks

internals | 1 Feb 2010 10:30
Picon

[PHP-DEV] PHP 5 Bug Summary Report

 PHP 5 Bug Database summary - http://bugs.php.net/

 Num Status     Summary (1612 total -- which includes 1040 feature requests)
===============================================[*Directory/Filesystem functions]
49620 Suspended  is_writeable does not work using netshare and normal user rights
50542 Open       scandir() cannot open UNC paths since PHP 5.3.1
===============================================[*General Issues]==============
44093 Feedback   ignore_user_abort() sometimes do not work !
48597 Open       Unclosed array keys break space escaping in $_GET/POST/REQUEST
50314 Verified   File upload problem with typo in form
50512 Open       Yuml is missing in HTML translation table
===============================================[*Unicode Issues]==============
49687 Assigned   utf8_decode xml_utf8_decode vuln
===============================================[Apache related]===============
48894 Open       Occasional crashes with Apache 1.3.41
===============================================[Apache2 related]==============
32220 Assigned   [PATCH] thread_resources for thread not getting freed when apache kills thread
45945 Open       Apache byterange output filter nullified if mod_php5 output > 8000 bytes
47681 Open       System TMP dir ignored in file uploads
48260 Open       Size of PHP file affects behaviour of virtual() or #include virtual
49106 Analyzed   PHP incorrectly sets no_local_copy=1 on response as Apache 2 module
49816 Assigned   output corruption using flush
50203 Open       Apache +mod_php can't load script with non-ASCII name
===============================================[Arrays related]===============
50688 Assigned   Using exceptions inside usort() callback function causes a warning
===============================================[BC math related]==============
44995 Analyzed   bcpowmod() should not have scale parameter (only 0 is supported)
46564 Verified   bcmod( '1071', '357.5' ) returns '0'
===============================================[Bzip2 Related]================
29521 Assigned   compress.bzip2 wrapper
(Continue reading)

internals | 1 Feb 2010 11:00
Picon

[PHP-DEV] PHP 6 Bug Summary Report

 PHP 6 Bug Database summary - http://bugs.php.net/

 Num Status     Summary (109 total -- which includes 47 feature requests)
===============================================[Apache related]===============
47061 Open       User not logged under Apache
===============================================[Apache2 related]==============
44083 Open       virtual() not outputting results if zlib.output_compression = On
===============================================[Arrays related]===============
35277 Suspended  incorrect recursion detection
41758 Assigned   SORT_LOCALE_STRING broken for sort() in PHP6
43109 Open       array_intersect() emits unexpected no of notices when 2d array is passed as arg
48478 Open       Super-globals cannot be accessed with literal keys
===============================================[COM related]==================
45836 Open       cannot use com 
===============================================[Compile Failure]==============
42606 Open       unicode/constants.c relies on ICU draft api
44502 Suspended  Compiling ok with MySQL 5.0
49421 Open       Make failure with MySQL 6 and PHP 6.0-dev
50101 Open       [PATCH] - Avoid name clash between global and local variable
50237 Open       [PATCH] - Enable correct behaviour when building PHP6 with Sun's compilers 
===============================================[Date/time related]============
46948 Assigned   ext/date/lib/parse_tz.c:99: Memory leak: buffer
===============================================[Filesystem function related]==
42110 Open       fgetcsv doesn't handle ""\n correctly in multiline csv record
44034 Open       FILE_IGNORE_NEW_LINES in FILE does not work as expected when lines end in \r\n
46688 Open       Return values differ from 5.3 and are also inconsistent
46689 Open       Downcoded notices suggest unfinished code in file system?
46990 Assigned   Passing UTF8 strings to filesystem functions produce wrong filenames
49479 Open       move_uploaded_file is dead
===============================================[GD related]===================
(Continue reading)

Moriyoshi Koizumi | 1 Feb 2010 11:32
Picon

Re: [PHP-DEV] adding GB18030 support for mbstring

2010/2/1 KITAZAKI Shigeru <shigeru_kitazaki <at> cybozu.co.jp>:
> * php_syslog.patch
>  syslog() function cannot properly send UTF-8 strings to event log on
>  Windows. This patch changes the internal API. We, however, must set
>  UTF-8 on 'mbstring.internal_incoding'.
>  In addition, this changes the severity of 'LOG_ERR' from eventlog's
>  warning to eventlog's error.

It seems this doesn't relies on any mbstring settings, but just
changed syslog() to take strings encoded in UTF-8 instead of the
system's default encoding.  It'd look good to me if it had a new flag
causing syslog() to switch to the new behaviour.

Regards,
Moriyoshi

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Dominik Gehl | 1 Feb 2010 16:06
Favicon
Gravatar

Re: [PHP-DEV] imap4 search criteria

Thanks a lot for your reply. I also found a second bug report related to this: http://bugs.php.net/bug.php?id=21168

Now, how about adding an imap_newsearchpgm function to the PHP imap extension which would do a call to
mail_nsewsearchpgm inside c-client and return a structure allowing to contruct IMAP4 search programs
(SEARCHPGM inside c-client) ?

Anyone interested in this ?

Dominik

On 2010-01-30, at 6:22 PM, Joey Smith wrote:

> There's an open bug on this, #15238 (http://bugs.php.net/bug.php?id=15238&). I'm
> sure patches would be welcomed.
> 
> On Fri, Jan 29, 2010 at 03:49:18PM -0500, Dominik Gehl wrote:
>> Hi,
>> 
>> I noticed that the imap extension seems to support only IMAP2 search criteria.
>> 
>> This is caused by the fact that in ext/imap/php_imap.c, the imap_search function uses a call to
mail_criteria. And
>> the University of Washington IMAP toolkit mentions in docs/internal.txt:
>> 
>> SEARCHPGM *mail_criteria (char *criteria);
>>       criteria IMAP2-format search criteria string
>> 
>>    This function accepts an IMAP2-format search criteria string and
>> parses it.  If the parse is successful, it returns a search program
>> suitable for use in mail_search_full().
(Continue reading)

KITAZAKI Shigeru | 2 Feb 2010 13:05
Picon
Favicon

Re: [PHP-DEV] adding GB18030 support for mbstring

hi,

Pierre Joye wrote:
> > * php_syslog.patch
> It has to be optional. Maybe a mbstring.syslog* option to set a given
> encoding for the syslog functions.
> 
Thank you for your advise. It sounds good to be optional.
Let me consider about it again.

> > * php_ldap.patch
> That's something I have done too but I don't think we can do it in a
> minor version as it introduces some BC breaks. For example with SSL,
> as far as I know it is not possible to use custom cerficates in custom
> places (via openssl).
> 
I see. If you remember your work, please give me the points such as
summary of URL or patches and the test suites.

> Where did you read that openldap stops to support windows? Last time I
> checked I saw that they stoped (they never really did) to stupport
> VC++ but they did support windows. Some openldap contributors even
> provide windows builds as commercial packages.
>
Ah, sorry to misguide you. You are right.
My concern is why we cannot build it with VC++ with official documents.
I want to use the same compiler and to keep distributing PHP binary as
small as possible. And, OpenLDAP had supported VC++ in several years ago
as much as I know.
But, this is not a issue of PHP but OpenLDAP, I guess.
(Continue reading)

Pierre Joye | 2 Feb 2010 14:54
Picon
Gravatar

Re: [PHP-DEV] adding GB18030 support for mbstring

2010/2/2 KITAZAKI Shigeru <shigeru_kitazaki <at> cybozu.co.jp>:
> hi,
>
> Pierre Joye wrote:
>> > * php_syslog.patch
>> It has to be optional. Maybe a mbstring.syslog* option to set a given
>> encoding for the syslog functions.
>>
> Thank you for your advise. It sounds good to be optional.
> Let me consider about it again.
>
>> > * php_ldap.patch
>> That's something I have done too but I don't think we can do it in a
>> minor version as it introduces some BC breaks. For example with SSL,
>> as far as I know it is not possible to use custom cerficates in custom
>> places (via openssl).
>>
> I see. If you remember your work, please give me the points such as
> summary of URL or patches and the test suites.
>
>> Where did you read that openldap stops to support windows? Last time I
>> checked I saw that they stoped (they never really did) to stupport
>> VC++ but they did support windows. Some openldap contributors even
>> provide windows builds as commercial packages.
>>
> Ah, sorry to misguide you. You are right.
> My concern is why we cannot build it with VC++ with official documents.
> I want to use the same compiler and to keep distributing PHP binary as
> small as possible. And, OpenLDAP had supported VC++ in several years ago
> as much as I know.
(Continue reading)


Gmane