Re: [PHP] A Licensing Question

2003-01-22 Thread Peter Hutnick

John Wells said:
> Peter Hutnick said:
>>> Yeah...that's really what I'm wondering.  If I have my own code, but
>>> make function calls and the like to script libraries licensed under
>>> the GPL, does it mean my code will have to be GPL'd as well?
>>
>> In a word, yes.
>
> Even if the script libraries are themselves just PHP scripts...not any
> binary code being linked into the interpreter?  I'm still unclear here.

Makes no difference.  If you think about it, the GPL applies equally to
binary programs and the source code that produces them . . . so an
interpreted language is like the first part without the second.

>>> Say, for instance, that I use a GPL'd library that provides a class
>>> called myGPLClass.  If I create instances of myGPLClass in my own
>>> scripts, does that make my code in violation of the GPL?
>>
>> No.  Use is not restricted in any way by the GPL.  In fact, you
>> needn't even /agree/ to the GPL in order to use GPLed software in any
>> way you'd like, only to (re)distribute it.
>
> Hmmmnow I think I understand what you mean, but if I consider it in
> the context of my question and with your above statement, it seems
> contradictory.  I don't think it's that you're misunderstanding me...I
> think it's me misunderstanding you ;-).

Perhaps I read "use" more literally than you meant it.  You can USE a
GPLed lib any way you want.  If you want to DISTRIBUTE a program (to
include a script) that uses a GPLed library you must do so under the terms
of the GPL.

If that isn't completely clear, read on.

> Let me lay it out:
>
> Say you create a set of class libraries, called PeterLib, and release it
> under the GPL.  I download these libraries...like what you've done...and
> decide to use them in my development.  Your library makes available a
> class called FooBar that I really like, and I decide to make use of it
> in a number of my own files.
>
> So, one of the core files in my application contains:
>
>  require_once("/PeterLib/FooBar.inc");
>
> $myObj = new FooBar();
>
> $myObj->getFoo();
>
> $myObj->printBar();
>
> ?>

You may do that.

> Now, futher assume that I want to sell my application under my own
> company's license and I label all my files as such, but still retain
> your GPL license it the PeterLib files.  I rush to market and have an
> overwhelming amount of customers in the first month.
>
> Four issues:
> 1. Have I violated the GPL by distributing your code with my
> "propietary", non-open source app?  I'm still distributing source, but
> my specific files (including a few that call PeterLib classes) are not
> GPL'd.

Maybe.  It depends on what "my own company's" license says.  Specifically,
if it is a "GPL compatible" license, then no.  For a list of
known-compatible licenses see
http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses.

In practice when you say "my own company's license" you probably mean a
proprietary license.  That would be a violation.

> 2. If I decided to only distribute my own source for money under my own
> propietary license, but told my customers that in order for my
> application to function correctly, they'd need to download PeterLib.  Is
> this a violation?

I don't think that there is any way to be absolutely sure about that
without being sued.  If you win, no.  If you lose, yes ;-)

It /sounds/ like a loophole, since 1. you don't agree to the GPL to write
your program and 2. you don't distribute the GPLed code.

I think in all likelihood you would lose.  Your program would be seen as a
derivative work.

> 3.  If the above are considered violations, I assume only using
> libraries licensed under licenses like the LGPL or PHP would make it
> safe for me to redistribute with my proprietary app?

Right.  This (should be)/is a conscious decision that is made by the
library's developer.  If they want to let you link at will they use the
LGPL, if they want to extend the copyleft to linking programs they use the
GPL.

> 4.  How do the above change if/when I decide to encode my self-written
> files with Zend Encoder?

This is an obfuscation utility?  If so, the GPL excludes obfuscated source
code as "qualifying" as source code for the purpose of license compliance.

"Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange"

I.e. you can't give someone a printout of source code or an image of the
source code, you can't provide it on 1/4 inch tape or a stack of punch
cards, and you can't run the code through an "optimizer" or obfuscater
first.

> Thanks very much for all your input.  Very helpful.  I really appreciate
> it.

Glad to help.

-Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread John Wells
Chris,

Sheesh.  I'd read it about 5 times but revisited just now.  Somehow I
missed the key phrase "which are themselves interpreted.".

Here's the full relevant excerpt:

"Another similar and very common case is to provide libraries with the
interpreter which are themselves interpreted. For instance, Perl comes
with many Perl modules, and a Java implementation comes with many Java
classes. These libraries and the programs that call them are always
dynamically linked together.

A consequence is that if you choose to use GPL'd Perl modules or Java
classes in your program, you must release the program in a GPL-compatible
way, regardless of the license used in the Perl or Java interpreter that
the combined Perl or Java program will run on. "

That answers my question.  If following the scenario I described
previously, my code would have to be GPL'd as well.

Thanks!
John





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread Chris Shiflett
John,

I am not an expert of copyright law and licenses, but this
URL might help you answer some of your questions:

http://www.gnu.org/licenses/gpl-faq.html

Specifically, look at the questions under the heading,
"Combining work with code released under the GPL", as they
seem to be exactly what you are asking.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread John Wells
Peter Hutnick said:
>> Yeah...that's really what I'm wondering.  If I have my own code, but
>> make function calls and the like to script libraries licensed under
>> the GPL, does it mean my code will have to be GPL'd as well?
>
> In a word, yes.

Even if the script libraries are themselves just PHP scripts...not any
binary code being linked into the interpreter?  I'm still unclear here.

>> Say, for instance, that I use a GPL'd library that provides a class
>> called myGPLClass.  If I create instances of myGPLClass in my own
>> scripts, does that make my code in violation of the GPL?
>
> No.  Use is not restricted in any way by the GPL.  In fact, you needn't
> even /agree/ to the GPL in order to use GPLed software in any way you'd
> like, only to (re)distribute it.

Hmmmnow I think I understand what you mean, but if I consider it in
the context of my question and with your above statement, it seems
contradictory.  I don't think it's that you're misunderstanding me...I
think it's me misunderstanding you ;-).

Let me lay it out:

Say you create a set of class libraries, called PeterLib, and release it
under the GPL.  I download these libraries...like what you've done...and
decide to use them in my development.  Your library makes available a
class called FooBar that I really like, and I decide to make use of it in
a number of my own files.

So, one of the core files in my application contains:

getFoo();

$myObj->printBar();

?>

Now, futher assume that I want to sell my application under my own
company's license and I label all my files as such, but still retain your
GPL license it the PeterLib files.  I rush to market and have an
overwhelming amount of customers in the first month.

Four issues:
1. Have I violated the GPL by distributing your code with my "propietary",
non-open source app?  I'm still distributing source, but my specific files
(including a few that call PeterLib classes) are not GPL'd.

2. If I decided to only distribute my own source for money under my own
propietary license, but told my customers that in order for my application
to function correctly, they'd need to download PeterLib.  Is this a
violation?

3.  If the above are considered violations, I assume only using libraries
licensed under licenses like the LGPL or PHP would make it safe for me to
redistribute with my proprietary app?

4.  How do the above change if/when I decide to encode my self-written
files with Zend Encoder?

Thanks very much for all your input.  Very helpful.  I really appreciate it.

John








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread Peter Hutnick

John Wells said:
>> However - if you want to sell software under a closed licence you will
>> need to be carefull to avoid 'linking' with gpl'd code.
>> The problem is that 'linking' as used in the gpl seems to refer to C
>> programming - and is an unclear term when refering to php.

I know I read this somewhere, but now I can't find a reference.  The deal
is that if you are accessing the capabilities of a GPLed program via a
programmatic interface you are linking.  If you are doing it by a system
call, then you are not.

> Yeah...that's really what I'm wondering.  If I have my own code, but
> make function calls and the like to script libraries licensed under the
> GPL, does it mean my code will have to be GPL'd as well?

In a word, yes.

> It's not
> dynamically linking binary code in.  I've read the GPL faq and it's very
> vague here.  It considers interpreted programs "data", but doesn't
> consider cases the that "data" is licensed under the GPL.

That FAQ applies the interpreters, not interpreted programs.  Which is to
say that the fact that an interpreter is GPLed doesn't mean users can only
interpret GPLed scripts with it.  IOW, interpretation != linking.

> Say, for instance, that I use a GPL'd library that provides a class
> called myGPLClass.  If I create instances of myGPLClass in my own
> scripts, does that make my code in violation of the GPL?

No.  Use is not restricted in any way by the GPL.  In fact, you needn't
even /agree/ to the GPL in order to use GPLed software in any way you'd
like, only to (re)distribute it.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread Sean Burlington
Chris Hayes wrote:

At 17:17 22-1-03, you wrote:


I was wondering what the licensing issues for app frameworks (or any
included PHP classes/libs) are.  I'm creating a rather large PHP
application for a company, and they'd like to potentially resell it to
some of their customers.

Can I safely use GPL'd libraries, classes, etc. (i.e. PearDB) and
resources that fall under other open source licenses when developing the
app and let them redistribute accordingly, or would that be a violation?
Also, thinking ahead here a bit, if they wanted to use something like 
Zend
Encoder on the project, what sort of added gotchas could that bring up?

Thanks guys!

John


The GPL can be a headache to figure out when it gets to complicated 
situations.
My uneducated working conclusion is that the GPL prevents you from 
selling GPL-ed code as is, or improved GPL-ed code. Selling GPL-ed code, 
even if you improved it, is dead wrong. Even if you eventually totally 
rewrote the code.

you absolutely *may* sell gpl'd code - that's why you see boxed sets of 
Linux distributions on the shelves.

It's just that if you take gpl'd code and modify it - then when you 
release it to a third party (whether you charge money or not) you must 
release this new version also under the gpl.

The GPL is incompatible with per-seat licenses and the third party is 
free to copy and if they wish, resell your code.

So traditional models of selling computer software don't all work with 
gpl'd code.

However - if you want to sell software under a closed licence you will 
need to be carefull to avoid 'linking' with gpl'd code.

The problem is that 'linking' as used in the gpl seems to refer to C 
programming - and is an unclear term when refering to php.

I'm sorry if that fails to give a clear cut answer - this sort of thing 
does not seem to have been testing in the courts yet ...

--

Sean






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A Licensing Question

2003-01-22 Thread John Wells
> However - if you want to sell software under a closed licence you will
> need to be carefull to avoid 'linking' with gpl'd code.
> The problem is that 'linking' as used in the gpl seems to refer to C
> programming - and is an unclear term when refering to php.


Yeah...that's really what I'm wondering.  If I have my own code, but make
function calls and the like to script libraries licensed under the GPL,
does it mean my code will have to be GPL'd as well?  It's not dynamically
linking binary code in.  I've read the GPL faq and it's very vague here. 
It considers interpreted programs "data", but doesn't consider cases the
that "data" is licensed under the GPL.

Say, for instance, that I use a GPL'd library that provides a class called
myGPLClass.  If I create instances of myGPLClass in my own scripts, does
that make my code in violation of the GPL?

Damn, I need a law degree ;-).

John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread Peter Hutnick
Chris Hayes said:

> The GPL can be a headache to figure out when it gets to complicated
> situations.
> My uneducated working conclusion is that the GPL prevents you from
> selling  GPL-ed code as is, or improved GPL-ed code. Selling GPL-ed
> code, even if  you improved it, is dead wrong. Even if you eventually
> totally rewrote the  code.

This a ABSOLUTELY FALSE.  See http://www.gnu.org/philosophy/selling.html. 
In fact a major part of the FSF's (the authors of the GPL) budget comes
from selling GNU, their Free, GPLed software.

> The hazy bit comes when you use a free base and write your own code that
>  sits on top of the base. It cannot work without the base but it is a
> package of files you wrote. The Nuke communities are still having the
> odd  discussion whether one can charge for a module when the system it
> fits in  is GPL-ed.

Not at all.  You can sell anything you write.  (In fact anyone can sell
any GPLed code!)  /But/ you can only sell (or otherwise distribute) code
that links to GPLed code under the terms of the GPL.

The hazy bit comes when you want to distribute proprietary software that
depends on copyleft (GPLed) software.  This is where you should have a
lawyer.

> I think the most polite thing to do is to write the makers of PearDB and
>  ask their opinion. The nicest thing to do is to get negotiating, and
> offer  them a part of your sales.

I think this depends very much on the developers.  The GPL is
non-exclusive, so the copyright holders can license their code to you
under any terms they want.  People who hold the philosophy the GPL stands
for dear will likely be un-impressed by offers to take a cut of your sales
to re-license to you.

Additionally, "what they think about it" is rather less relevant than what
the license(s) in question actually say. 
http://pear.php.net/manual/en/faq.licenses.php indicates to me that "Pear
DB" is made up of a bunch of contributed modules, so you will have to make
decisions based on the license of the modules in question.

That page states that they recommend the PHP, BSD, or LGPL licenses.  PHP
and BSD are both permissive Free Software licenses.  For our purposes that
means that you can link proprietary programs to them.  The LGPL is a
strong copyleft Free Software license THAT ALLOWS LINKING of any software.
 (As an aside LGPL used to mean "Library GPL" for that reason, but has
been changed to "Lesser GPL" because the GPL is perfectly appropriate for
library use, but can't be used for libraries for use with proprietary (or
GPL-incompatible Free) software.)

That is to say that you can use any Pear DB modules that are under the
PHP, BSD or LGPL licenses with a proprietary program; you're in the clear.

> There are some pages on this subject to be found on the GPL site.

Perhaps you mean the GNU site?

> If all else fails you could sell your hours to get the code working, and
>  give the code for free, if needed under a distribution limitation or
> encoded.

Now you're talking ;-)

-Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A Licensing Question

2003-01-22 Thread Chris Hayes
At 17:17 22-1-03, you wrote:

I was wondering what the licensing issues for app frameworks (or any
included PHP classes/libs) are.  I'm creating a rather large PHP
application for a company, and they'd like to potentially resell it to
some of their customers.

Can I safely use GPL'd libraries, classes, etc. (i.e. PearDB) and
resources that fall under other open source licenses when developing the
app and let them redistribute accordingly, or would that be a violation?
Also, thinking ahead here a bit, if they wanted to use something like Zend
Encoder on the project, what sort of added gotchas could that bring up?

Thanks guys!

John


The GPL can be a headache to figure out when it gets to complicated 
situations.
My uneducated working conclusion is that the GPL prevents you from selling 
GPL-ed code as is, or improved GPL-ed code. Selling GPL-ed code, even if 
you improved it, is dead wrong. Even if you eventually totally rewrote the 
code.

The hazy bit comes when you use a free base and write your own code that 
sits on top of the base. It cannot work without the base but it is a 
package of files you wrote. The Nuke communities are still having the odd 
discussion whether one can charge for a module when the system it fits in 
is GPL-ed.

I think the most polite thing to do is to write the makers of PearDB and 
ask their opinion. The nicest thing to do is to get negotiating, and offer 
them a part of your sales.

There are some pages on this subject to be found on the GPL site.

If all else fails you could sell your hours to get the code working, and 
give the code for free, if needed under a distribution limitation or encoded.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A Licensing Question

2003-01-22 Thread Peter Hutnick
John Wells said:

> Can I safely use GPL'd libraries, classes, etc. (i.e. PearDB) and
> resources that fall under other open source licenses when developing the
> app and let them redistribute accordingly, or would that be a violation?

I don't know anything about the licensing terms of PearDB.

Read the GPL at http://www.gnu.org/licenses/gpl.html .  A program that
uses GPL libraries must be distributed under the terms of the GPL.  The
LGPL is primarily for the case when a person writes a library and wants
GPL-like protection for the library itself, but wants to allow linking of
non-Free programs.

It might get a little hazy around what is "linking" in the case of a
scripting language.  I think the guideline is whether you call the lib
through a language construct or a system call.  I.e. include() vs exec().

>  Also, thinking ahead here a bit, if they wanted to use something like
> Zend Encoder on the project, what sort of added gotchas could that bring
> up?

Consider printing out the licenses in question and have the company's
lawyer look at it.

Again, I don't know the specifics of Pear or PHP, but in general core libs
of a language are licensed in such a way that you can put any terms you
want on code that relies on them.

Good Luck!  And seriously, talk to a lawyer.

-Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php