views:

147

answers:

4

Hi!

I am very new to web development and the use of Open Source. I have tried to read about the GPL, BSD, MIT, LGPL licenses, but cant seem to understand what they mean to me in real life.

I am asked to develop a web based application for a customer. My agreement with them is that they pay a fixed fee for my development of the application and I then have the rights to the code and can use the code for simillar products to other customers, as long as they are not direct competitors to the original customer. The original customer also have the right to get my code so they can hire someone else to update/change it etc if they want to.

The original customer will use the web application internally and let their retailors use it too.

My research so far has led me to conder the use of the following:

A web hotell with MySQL (GPL) and PHP (BSD-like) enabled.

Some server side PHP scripts talking to a MySQL database.

Some client side Javascript/AJAX + jQuery (MIT/GPL) + jSON (own minimal license)+ a LGPL licensed plug-in for jQuery.

Now, if I use these langauges etc, will any of this be in conflict with my agreement with the company or my future intentions to sell variations of this web application to others?

Do I have to do anything like showing copyright text in the web application or publish the code I write?

I suspect the need for that could be with jQuery + the LGPL-license plug-in since they are included/redistributed in my code?.....or are they just linked to from the code, and does that then help?.....but then anything sent to the browser is public in a way anyway.......and what about the mySQL and PHP code, that is not really a redistribution of mySQL or PHP itself, so then OK, or?.....

Hope some of you could come up with easy to understand answers to my conserns!

Rgds PM

A: 

The only open-source license to watch out for in a SaaS scenario is the affero gpl license, since it is viral. Otherwise, per my understanding, you are free to use and distribute any and all of the software you have mentioned, as long as you are not charging for 'them', but rather for the code that you have yourself written. You should of course honor the restrictions of the licenses, in that you don't claim that you wrote them and you include their respective license texts.

Unless you are using affero licensed software, you have no obligation to show the copyright text to end-users, but they should be left in the actual source where applicable. This is due to the interpretation of 'distribution' which does not (apart from in the case of affero) extend to serving websites.

This is just my understanding and the up/down votes will show how wrong I may be. :)

unomi
What uses the "affero" GPL?
Mike D.
Nothing listed in the original question uses the AGPL. But several other applications and libraries use it.
Nicolás
Of note is http://www.clipperz.com/open_source and the authors' JS crypto lib.
unomi
+4  A: 

None of the programs/libraries you mentioned has an "advertising clause" that would force you to show that you're even using the program/library as part of the generated HTML; let alone copyright.

If your application is GPL (which it has to be if it uses a GPL library), you still aren't forced to publish code. You just have to give source code and all the permissions to anyone you give the application to (eg. as compiled binaries). But since there is no such thing as a compiled binary in PHP, it comes down to: anyone who gets your code gets it under the terms of the GPL. People who access your application remotely don't get any special right.

If you write an application in PHP, the license of PHP itself is irrelevant. Your code isn't linked to PHP, it's merely input to the PHP interpreter.

If you write an application that accesses a MySQL library, the license of MySQL itself is irrelevant. You're accessing it through a network protocol, not by linking to it. However, it looks like libmysqlclient is GPL (unless you purchase a commercial license from MySQL / Sun / soon-to-be Oracle), and the MySQL extension in PHP uses it, so you may be linking to a GPL library if you use that. However#2, PHP has a "native library" (PHP-licensed) that supports the same network protocol, which can be used to talk to a MySQL server without using any MySQL library in PHP.

[answer still being edited; I have to look up lots of things to get accurate info :P]

Disclaimer: you won't get legal advice on StackOverflow. The above is not legal advice. I am not a lawyer. If I end up being wrong in all of the above, and next year Sun sues you for violating MySQL license, it's not my fault ;)

Nicolás
Hi Nicolas, great so far, please go on! Especially regarding the client side stuff too..... Regarding my code being GPL: giving source code to all who receive the binaries... what does that really mean I have to do in this case, when using PHP, Javascript, jQuery etc in a web application? Give my source to my customer, or give it to everyone using the application on the internet, or?
Petter Magnusson
There is no such thing as a "binary" in PHP or HTML code, so all it matters is: if your application is GPL, and you give the application to someone, he gets the full rights granted by the GPL.The HTML generated by a PHP script is not the application. The PHP script itself is.
Nicolás
there's a lot of innaccurate reporting here. From the original post, the product cannot be GPL (the restrictions about usage and re-distribution cannot be applied) therefore most of this response is not relevant. Sure, If the customer is happy to pay for development of a GPL product then it does solve a lot of problems. Nicolas seems confused about the different versions of the GPL: LGPL <> GPL v1 <> GPL v2.All versions of the GPL allow for exclusions - MySQL has long incorporated such. Discussions of this are well documented on the internet.C.
symcbean
Thanks symcbean! I have come to understand that mySQL is the problem here. Having read some on the net now I am still not sure if it is OK to develop a PHP web app like mine using a mySQL database. Having read some discussions on the mysql forums it seems not even mysql AB knows for sure....those discussions were quite old however....has this since cleared? The FOSS licence etc.... /P
Petter Magnusson
And what about Nicolas idea to use PHP licensed library for the mqsql database? (However, I am not sure I can do this since the web hotel we are renting the space from includes PHP and mySQL in the terms and I guess they would then have to change the lib used in their PHP interpreter, could be hard to convince them)
Petter Magnusson
I would appreciate some more comments and hopefully relevant links regarding if all PHP applications using mySQL really has to be GPL, or at least cant be used in my case where I want to sell the app to several companies.
Petter Magnusson
Regarding the solution "paying for a license" is that not what I do when I use a web hotel and pay for mySQL and PHP to be activated?
Petter Magnusson
+1  A: 

Now, if I use these langauges etc, will any of this be in conflict with my agreement with the company or my future intentions to sell variations of this web application to others?

The key thing to remember with open source libraries like the GPL is that they require you to provide the source to anyone whom you provide a binary. Some people misinterpret this to say that you have to put your code on the Internet so anyone can have it; while nobody outside your customer would mind, that isn't a requirement.

That's just in general. For specifics, you have to read the licenses and make sure you comply. Do this first and be prepared to walk away from any project/library/whatever that doesn't fit your needs legally. While it might seem straightforward to ask the project owners to make an exception for you, this is rare and sometimes impossible since it may not be feasible to contact all the (potentially hundreds or thousands) of developers who contributed in order to get them to sign off on the license change.

One gray area is when you need to make a change internal to one of these packages. First off, you should try to avoid this if at all possible. If you think you need to customize, say, jQuery's internals, you're probably doing something wrong. (Feel free to ask here on SO if you find yourself in such a spot. ^_^) If you absolutely have to do this, the license in question may require you to make your changes (not the rest of your application) available to the library owners. (The stock GPL does not have this requirement.) In any case, providing these changes is the courteous thing to do (nothing says they have to accept them), but if it's something that your customer doesn't want made public, you may not have a choice (another reason to avoid changing library internals).

As always, when in doubt, consult a lawyer.

Do I have to do anything like showing copyright text in the web application or publish the code I write?

For the stock GPL, you don't have to do anything special. Just make sure you preserve the GPL headers on the files and don't do anything discourteous like removing credits or claiming others' work for yourself.

I suspect the need for that could be with jQuery + the LGPL-license plug-in since they are included/redistributed in my code?

Which means that you need to provide a copy of jQuery's source to your customer... which it sounds like you're already doing.

but then anything sent to the browser is public in a way anyway.

And it's being provided in source form, so you're automatically okay.

Unless you've got some optimization thing going that strips out the comments. That case might be tricky, but it means your customer would just need to provide a link to let users get a copy of jQuery.

and what about the mySQL and PHP code white, that is not really a redistribution of mySQL or PHP itself, so then OK, or?

You're providing it to your customer, so you need to make these packages available to your customer in source form. Again, it sounds like you're already doing this per the customer's contract. Since you're not uploading PHP, for example, onto people's browsers, you don't need to make it available to them (though you could stuff one of those "Made with PHP" badges in a corner of the site just to be nice).

I don't think you'll run into trouble, but then again, ask a lawyer if in doubt.

Mike D.
Thanks! So basically, I keep all comments in the code,dont change any libraries, my customer needs to get the PHP code I write for them, the source to the MySQL-server and PHP-server and the source to jQuery+jSon+plug-in and the end users of the web application will need to get the jQuery etc source (but get it in their browsers, so its already OK)?
Petter Magnusson
+2  A: 

IANAL, however IMHO:

PHP - no issues, it has its own license which specifically allows you to sell code written in PHP

jQuery - no issues. It is offfered under both the MIT and GPLv2 licence. If it was GPLv2 only, then you would be in breach of copyright by selling the code you write while retaining copyright but I believe that the MIT licence permits this.

LGPL plugin - no issues, the LGPL licence is specifically designed to accomodate this business model. Your concerns are totally unfounded.

Its worth noting that in all the above cases (AFAIK) the products are only offered as open-source (OK, so you can buy packaged versions of PHP from Zend). However although technically free from licensing constraint for your purposes, I would recommend you consider the moral aspect of how you have benefited from these and consider a donation to one or more of the projects or one of the umbrella organisations which fund open-source software.

IMHO, the use of MySQL however, in the context you describe would clearly undermine the terms of their licensing. There are a number of solutions to resolve this including

  • paying for a license

  • releasing your code as GPL

  • writing your code to be DBMS independent then requiring the client to perform installation / integration

I think there are some very serious issues around the terms covering your client's and your responsibilities - while I think its a good thing all round that the client owns a non-exclusive copyright on the delivered code, the part about "direct competitors" might be rather difficult to define - and would certainly need to be constrained in terms of them being competitors between the time of approach and contract.

C.

symcbean
Thanks for a very comprehensive answer! Regarding the mySQL, I had come to understand that it should be no problem as the web hotel we are using has a commercial license (I hope!) for it? But then Nicolas has conserns for the ibmysqlclient library, see above....
Petter Magnusson