Search code examples
open-sourcelicensing

Which license to choose for PHP library for chargeable, patented work?


I have developed a PHP library which is a wrapper to our API.

Patents: The services rendered through the API are covered by patents and anyone using the library may be charged subject to usage crossing certain limits. The license must not grant anyone using the library any patent license.

How Free? Although the library is free, can be copied and distributed unmodified under the same name as much as it can be, usage will be charged depending on limits. In the event of non-payment, the services facilitated by the library will be disrupted.

Modifications & Redistribution: Although anyone is free to review, debug & modify the library, it is desired that modifications to the library are not released under the same name or seek to represent the original and intended library released by us.

Included libraries: The library we are providing uses PHPSecLib & SSS(Shamir's Secret Sharing) library by Kenny Millington. PHPSecLib is released under the MIT license & SSS is under GPLv3 or later.

In view of all this, which license should I choose?


Solution

  • Patents:

    How Free?

    A lot of API libraries are like that. The library is free but the service the API is utilizing isn't. See, for example, Google AdWords API PHP Client. It's Apache licensed which, in turn, is GPL compatible.

    Modifications & Redistribution:

    That's a problem. The PHP License has a similar restriction and as such it isn't GPL compatible. Of course if you don't care about GPL compatibility...

    Included libraries:

    The MIT license is pretty liberal and let's you do pretty much anything. GPLv3, however, is not. If you use GPLv3 code your license is going to need to be GPL compatible and with the restrictions you're wanting to impose it sounds like it's not going to be. My recommendation: maybe rewrite SSS? Compared to phpseclib it looks like an extremely small codebase.