tags:

views:

82

answers:

4

I know it's a very common question, but I don't see a previous one to be asked, since I'm interested in the basic steps, nothing in particular.

It's the first time I want to license one of my projects, and it turns out, I don't know much about it. Let's say I want to use the MIT License. Do I just take the definition and paste it into my files? Does it need to be in ALL the files, or just one? or?

I don't want any fancy rights so MIT has been recommended to me, do you suggest something else? I'm looking for impartial opinions. Thanks.

What other aspects must I take into account? It's PHP, btw.

+1  A: 

Why not GPL and have dual licensing (like Qt once did for example) if anyone wishes to use your code in proprietary project? This way anyone wishing to develop something open source is free to do it and if someone wants to make money, has to split it with you.

Oh, any it's a good practice to put shortened license information in every file. This way if someone uses a single file, he already gets the license info inside.

This example on how it is handled in Qt:

16  ** GNU Lesser General Public License Usage
17  ** Alternatively, this file may be used under the terms of the GNU Lesser
18  ** General Public License version 2.1 as published by the Free Software
19  ** Foundation and appearing in the file LICENSE.LGPL included in the
20  ** packaging of this file.  Please review the following information to
21  ** ensure the GNU Lesser General Public License version 2.1 requirements
22  ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
gruszczy
shortened license? from what I understood editing the licence is a sensitive thing to do, what do you mean by shortened?
treznik
I mean files usually don't hold the whole GPL license, but only information, that you should get it with the source code and where can you get it otherwise.
gruszczy
+2  A: 

I commonly see people having a file in the root of the project directory called LICENSE that contains the license text. Then, in each source file, just mention which license you are using.

As far as I know, it is all up to you how to do it. You are the copyright owner as long as you're the author of the code.

mojbro
"You are the copyright owner as long as you're the author of the code" - well yeah, but sometimes you have to prove that you're the author :). "Then, in each source file, just mention which license you are using" - I know it sounds stupid, but can you give me an example of that statement. Thanks!
treznik
@skidding: "mention". As in "mention". You put a comment which mentions the license. Mention is hard to define more clearly. Mention means mention. Name it. Link to it. Mention it.
S.Lott
@skidding: You don't "prove" you're the author; you merely assert it. Someone has to disprove that by proving that they have a prior edition which you copied. You can register the code with the US Copyright Office if you're worried about someone asserting that they wrote it before you.
S.Lott
+1  A: 

You can find lots of information about these topics in a book Producing Open Source Software (free). Your question is covered in chapter Choosing a License and Applying It and in Chapter 9. Licenses, Copyrights, and Patents

liori