6

According to the GPL FAQ

Where's the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication (exec, pipes, rpc, function calls within a shared address space, etc.) and the semantics of the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

Overall this definition seems to focus a lot on compiled code, but does not really consider interpreted code.

What I read from the above is, if it's a single executable/library, it's one program. If it's many executables/libraries communicating (but not directly linked together) it's not. Now my question is regarding PHP. PHP itself is an interpreted language which means code written in PHP is not compiled and executed, but rather is interpreted. In addition, all PHP code is typically ran under a webserver meaning all PHP code is ran under a shared resource pool.

My question is where is the line between a PHP website which incorporates GPL libraries and therefore needs to be released under the GPL and a PHP website which merely calls upon another PHP service to do the same. As a more concrete example, assume PHP library:

Now as a practical example consider Steve Clay's minify and assume that the authors had made the decision of relesing it under the GPL (they did not but for the sake of argument assume they did). This library in particular is not generally directly included in any other PHP script, bit is added in a PHP project's list of "dependencies". The functionality of this library is accessed via e.g. http://example.com/min/?f=script.js and this URL is added as an "external script source" in a website. My question is, in this case would using this library require the project which includes it to be licenced under the GPL?

  • 3
    Stuff like this is why I dislike the GPL; it doesn't draw a clear boundary for its copyleft. The CeCILL draws it at address spaces, the MPL draws it at source files, even the Apache License 2.0 draws it at "an original work of authorship". – EMBLEM Jul 28 '16 at 14:44
  • 1
    That's not entirely fair; the GPL is clear about the boundary, which is as far as the law of copyright permits (that is, all derivative works are entailed). What's not clear is how far that is, but that's an ambiguity caused by poor drafting of treaty and statute, and the paucity of case law (as they say, "this is a legal question, which ultimately judges will decide") - not by the GPL. – MadHatter Aug 1 '16 at 15:29
  • 1
    @MadHatter If the GPL just defers to the law, and the law is ambiguous, then the GPL is ambiguous. Why should we gamble on a judge's decision (which could be different in different countries) when the case could be an open-and-shut "they execute in the same address space; you have to release the source code"? – EMBLEM Aug 1 '16 at 16:00
  • 1
    If you take that position, then the other licenses may also be ambiguous: if the law eventually decides, for example, that shared address spaces don't indicate derivative works, then the CeCILL will not apply despite what it says, and that is also an ambiguity. No licence can exert influence in territory where the law does not allow it, and it is not yet precisely known where that is. I would agree that that is very annoying. – MadHatter Aug 1 '16 at 16:06
2

From what I understand, Minify takes in other JavaScript on your website and modifies it to be smaller. This seems like data generation, and GPL-covered programs cannot force the data they generate to be under the GPL unless they copy part of themselves into the output.

It would also appear that Minify does not share any data structures or even communicate very much with one's other code. Yes, it shares a memory pool in the PHP runtime, but every one of the GPL programs we run shares a memory pool (that of our entire system) with the non-GPL programs. This seems like a case of an interpreter running two different programs on the same computer. The syntax to call them is unusual, and you are calling one program on the source code of another, but I think it's just that case in disguise.

In both cases, I do not think using a GPLd Minify would force your entire website to be under the GPL. However, as the FAQ notes, if you were linking to Minify, using its functionality in running code on your site, etcetera, that would require at least the parts of your site that depend on it to be under the GPL, and possibly the whole site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.