php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23944 mbstring *uses* LGPL sources making the entire PHP released under LGPL.
Submitted: 2003-06-01 18:52 UTC Modified: 2003-06-04 12:59 UTC
From: hyamamoto at cybozu dot co dot jp Assigned:
Status: Not a bug Package: mbstring related
PHP Version: 4.3.2 OS: Any
Private report: No CVE-ID: None
 [2003-06-01 18:52 UTC] hyamamoto at cybozu dot co dot jp
The current implementation of mbstring uses two Lesser GNU
General Public License (LGPL) sources.

As LGPL does *not* allow derived softwares to be released
under license terms other than LGPL, the entire PHP sources
must be released under LGPL rather than PHP license.
Alternatively, we may separate mbstring from the main PHP
archive until it becomes LGPL-free.

# As you may know, LGPL *does* allow their sources as
# just (dynamic link) libraries.  But mbstring itself
# makes use of LGPL sources as its internal utilities.

The sources are:
1) ext/mbstring/mbfilter*.{c,h}
for multibyte character conversion.

2) ext/mbstring/mbregex.{c,h}
for multibyte regular expression.

Thank you.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-01 19:30 UTC] rasmus@php.net
Ugh.  I had no idea it was under the LGPL.  Wasn't this thing written specifically for PHP?  And as such, is our version a modified version of the original?  If it has not been modified then we are allowed to distribute a verbatim copy of it even if it is under the LGPL.  It is only if we modify it and/or distribute something less than the entire library that we become a derivative work.
 [2003-06-01 19:46 UTC] hyamamoto at cybozu dot co dot jp
According to the header lines of the LGPL source files:

1) mbfilter*.{c,h}
may be written specifically for mbstring by a Japanese.

/* 
 * "streamable kanji code filter and converter" 
 * 
 * Copyright (c) 1998,1999,2000,2001 HappySize, Inc. All rights reserved. 
 * 
 * This software is released under the GNU Lesser General Public License. 
 * (Version 2.1, February 1999) 
 * Please read the following detail of the licence (in japanese). 
...

2) mbregex.{h,c}

This is released from Free Software Foundation (FSF), and
modified by Japanese people originally for Ruby programming
language.  Comments describe its origin.

/* Definitions for data structures and routines for the regular
   expression library, version 0.12.
   Copyright (C) 1985,89,90,91,92,93,95,96,97,98 Free Software Foundation, Inc.

   This file is part of the GNU C Library.  Its master source is NOT part of
   the C library, however.  The master source lives in /gd/gnu/lib.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */
/* Multi-byte extension added May, 1993 by t^2 (Takahiro Tanimoto)
   Last change: May 21, 1993 by t^2  */
/* modified for Ruby by matz@netlab.co.jp */
 [2003-06-01 20:00 UTC] wez@php.net
AFAIK, the original author(s) have given permission to distribute under the terms of the PHP license (for the actual mbstring/jstring part at least).

It does seem that mbregexp is a derivative work. (it used to be a separate extension from mbstring before it was introduced into the php core).

Rui, Moriyoshi and Yasuo might be able to help clear things up here.
 [2003-06-01 20:35 UTC] sniper@php.net
Please keep this kind of discussion on the mailing lists,
this is not really a _bug_..

 [2003-06-04 12:59 UTC] moriyoshi@php.net
Just for clarification.

1. The original authors haven't allowed those libraries to be distributed under the PHP license.

2. In contrast to GPL, LGPL doesn't force the PHP group to distribute the package that contains a LGPL licensed library under the same terms as LGPL's. Read those terms more carefully.

3. We can redistribute them in any form (binary or source) under any license unless no additional works are added to the library itself.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 22:01:29 2024 UTC