473,785 Members | 3,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are PHP libraries linked dynamically or statically?

Hi,

When a PHP program links to a library using include or require (or their
_once variations), is the library then linked dynamically or statically?

While it might seem irrelevant from a technical point of view, the
linking method is important when it comes to licencing issues as some
licences, like GPL, differ between those kinds of linking when it comes
to viewing the library as a derivative work of the main program.

Therefore it is quite important to know what kind of linking is in
effect when including libraries, and I hope someone in this group can
shed some light on this matter.

Thank you very much in advance,
Martin
Jul 19 '07
36 3201
Jerry Stuckle wrote:
If it interfaces to Joomla, it uses their code.
No, it doesn't. It just calls a function which is unavaliable. If the
function is unavaliable my program does not run. That's it. If Joomla
happens to have functions that have the same name and make sense in the
context so that my program actually does something useful, that's great.
But that does not make my program a part of Joomla or Joomla a part of
my program.

Which means your program requires Joomla to run. Your attempt to
So what? That means a user either has to have a license to both (my
program and Joomla) or he can't run my program.
However, if I choose to provide my program in a nonfunctional single
package which only contains my code I can choose to use any license I
like. And users who want to use my program and put Joomla and my program
together will have to abide by both li

Yes. But if you want to call Joomla functions you have to abide by
their requirements to use those functions.
No, I don't. Not as long as I don't supply the functions together with
my program. As Toby already correctly put it: Who says I am using Joomla
functions? I (or someone else) could also program a compatible API to
work with my program which would eliminate the need for Joomla.

As long as I don't deliver Joomla together with my program, it has
nothing to do with Joomla at all.
And you come here looking for free legal advice, then throw out anything
which you don't agree with.
I do? I was answering questions, not asking them. Check the thread. I am
very well aware of the current legalities concerning computers and
software.
Jul 24 '07 #31
Anonymous wrote:
Jerry Stuckle wrote:
>>>If it interfaces to Joomla, it uses their code.
No, it doesn't. It just calls a function which is unavaliable. If the
function is unavaliable my program does not run. That's it. If Joomla
happens to have functions that have the same name and make sense in the
context so that my program actually does something useful, that's great.
But that does not make my program a part of Joomla or Joomla a part of
my program.
Which means your program requires Joomla to run. Your attempt to

So what? That means a user either has to have a license to both (my
program and Joomla) or he can't run my program.
>>However, if I choose to provide my program in a nonfunctional single
package which only contains my code I can choose to use any license I
like. And users who want to use my program and put Joomla and my program
together will have to abide by both li
Yes. But if you want to call Joomla functions you have to abide by
their requirements to use those functions.

No, I don't. Not as long as I don't supply the functions together with
my program. As Toby already correctly put it: Who says I am using Joomla
functions? I (or someone else) could also program a compatible API to
work with my program which would eliminate the need for Joomla.

As long as I don't deliver Joomla together with my program, it has
nothing to do with Joomla at all.
>And you come here looking for free legal advice, then throw out anything
which you don't agree with.

I do? I was answering questions, not asking them. Check the thread. I am
very well aware of the current legalities concerning computers and
software.
You really need to see an attorney. You could find yourself out of
thousands (or tens of thousands) of dollars, should Joomla choose to
enforce their license agreement.

And you obviously are NOT familiar with the current legalities
concerning computers and software!

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 24 '07 #32
Toby A Inkster wrote:
Jerry Stuckle wrote:
>Linux itself is GPL - but its license does not require programs calling
its APIs to be GPL. Joomla is taking that one step further and
requiring programs using its API to be GPL.

Perfectly within their rights.

But what they seem to be claiming is that the GPL itself demands that all
plugins must be GPL'd, and I disagree with that interpretation.

Yes, it is well within their rights to demand that plugins are GPL -- but
then they are enforcing conditions over and above what the GPL requires.
They may interpret it as that way - I haven't seen their reasoning, and
quite frankly haven't checked their license in detail. But they are
completely within their rights to enforce conditions above and beyond
what GPL requires. They just can't require LESS than what GPL requires.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 24 '07 #33
Jerry Stuckle wrote:

They may interpret it as that way - I haven't seen their reasoning, and
quite frankly haven't checked their license in detail. But they are
completely within their rights to enforce conditions above and beyond
what GPL requires. They just can't require LESS than what GPL requires.
I can't say whether or not this is true (only the court can).

However, I started this thread because I don't buy their arguments *why*
plugins has to be GPL.

To recap, they say:

1. Plugins has to be GPL because they are derivative work of Joomla
2. They are derivative work of Joomla because they are statically linked
to it.

That is the reason for me asking the question in the subject. And as you
have pointed out, it really doesn't make much sense to talk about linking.

The conclusion is that their arguments are entirely wrong.

You asked in another post in this thread if there is another CMS that
the plugin can be used with. There is: Mambo.

Joomla is a fork of Mambo, and while Mambo is also GPL, the Mambo
Foundation welcomes non-GPL plugins for the CMS. At this stage of the
fork, the common code base is still large enough for a great many
plugins to run under both systems without modications.

There are also other forks, btw.

So it is actually possible to sit in this white room without access to
Joomla's code and write plugins for it, without using a single line of
its code, and on top of it, have it running under Mambo too.

Many plugins (at least the ones I wrote) can in a short time be modified
to run standalone. Actually, one of my plugins is also published in a
standalone version. The code it the same, except the interfact part to
Joomla's API.

Martin
Jul 25 '07 #34
Martin Larsen wrote:
Jerry Stuckle wrote:

>They may interpret it as that way - I haven't seen their reasoning,
and quite frankly haven't checked their license in detail. But they
are completely within their rights to enforce conditions above and
beyond what GPL requires. They just can't require LESS than what GPL
requires.

I can't say whether or not this is true (only the court can).

However, I started this thread because I don't buy their arguments *why*
plugins has to be GPL.

To recap, they say:

1. Plugins has to be GPL because they are derivative work of Joomla
2. They are derivative work of Joomla because they are statically linked
to it.

That is the reason for me asking the question in the subject. And as you
have pointed out, it really doesn't make much sense to talk about linking.

The conclusion is that their arguments are entirely wrong.

You asked in another post in this thread if there is another CMS that
the plugin can be used with. There is: Mambo.

Joomla is a fork of Mambo, and while Mambo is also GPL, the Mambo
Foundation welcomes non-GPL plugins for the CMS. At this stage of the
fork, the common code base is still large enough for a great many
plugins to run under both systems without modications.

There are also other forks, btw.

So it is actually possible to sit in this white room without access to
Joomla's code and write plugins for it, without using a single line of
its code, and on top of it, have it running under Mambo too.

Many plugins (at least the ones I wrote) can in a short time be modified
to run standalone. Actually, one of my plugins is also published in a
standalone version. The code it the same, except the interfact part to
Joomla's API.

Martin
This is a legal issue.l See your attorney.

Free legal advice (especially in this newsgroup) is worth exactly what
you paid for it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 26 '07 #35
Jerry Stuckle wrote:
Henk verhoeven wrote:
>NC wrote:
>>On Jul 20, 5:30 am, Martin Larsen <martin+spamfre e+lar...@bigfoo t.com>
wrote:
(..)
Actually, it does. Unless you have implemented a PHP optimizer, every
PHP file is interpreted every time you load the file.
That may be true, but i was talking about function calls.
There is no intermediate code.
IMHO either you are mistaken or the developers of php are, even the
primitivce Commodore 64 BASIC interpreter converted commands and
function calls to opcodes so that repeated execution of a subroutine
would not require reparsing of the source code. Loops often run hundreds
of times, I doubt if the current level of performance on OOP code (which
tends to make lots of function calls intersecting many files) would be
possible if all functions that are called from loops where reparsed for
every call.
>"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." See
http://www.gnu.org/licenses/gpl-faq....terpreterIsGPL

(The terms "use" and "release" may also not be what you think. Here it
becomes really tricky, i rather avoid making comments on that)

Which has absolutely nothing to do with whether something is statically
or dynamically linked.

>BTW, running a program that is using a GPL-ed library on your own
public website might have consequences with the new version of GPL
(gpl3), see http://www.gnu.org/licenses/gpl-faq.html#UnreleasedMods

Again, nothing to do with the current discussion.
Again? Maybe the discussion has been narrowed to the technical meaning
of static versus dynamic linking, but Martin Larsen did mention GPL in
his original post, so i think the juridical meaning of linking *is*
subject of the original discussion and that i can help him by bringing
it back into the current discussion. The FSF FAQ are probably meant to
help non-lawyers to understand the juridical meaning of their GPL
license, they *may* have to do with the juridical meaning of linking.
Jul 26 '07 #36
Jerry Stuckle wrote:
This is a legal issue.l See your attorney.
God the allmighty has spoken.
Jul 26 '07 #37

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1844
by: Kwan | last post by:
Hi All, In a Unix system (I am using Solaris, but not limited to it), who will dynamically linked libraries been linked to a multithreaded process? Will it have a different instance for every single thread, or just one copy and shared amough all threads? I have some static member variables in the class suggested that every single threads is having their own instance. Is that true?
3
10320
by: daniel_shaw01 | last post by:
I want to link the C++ standard libraries statically for my application because I don't space for the .so files on my target platform. After quite a bit of searching, I found very little information that was helpful. The best information I found was at this link http://fresco.org/~njs/c++-without-stdc++ I followed the approach here and used -nostdlib to disable the default linking. Instead I use the options:
4
2270
by: RobG | last post by:
I have a function whose parameter is a reference the element that called it: function someFunction(el) { ... } The function is assigned to the onclick event of some elements in the HTML source:
13
1561
by: tsoukase | last post by:
Hello, two questions: 1) Why is a library a collection of compiled source-files while each header-file is a single source? Would it be more efficient if they were both either compiled or not? Could a "header-library" exist? 2) Why do libraries have extensions .a and .so and modules .o, which should be reserved for cc -c output? Would it be better: module.m, lib.sl, lib.dl or something
7
5213
by: Steve | last post by:
Hi, We have an application framework library that gets statically linked to any applications we produce. (Windows apps, but I don't think that matters here). The framework is based heavily on the STL and the API uses many STL constructs. Because of the static linking, and the fact that both app and framework are built by the same compiler, we don't have any problems.
8
2080
by: bonk | last post by:
Is it generally OK for an EXE that has MFC linked statically to load an use another DLL wich has MFC linked as shared DLL ? To be more specific: I have an EXE that links a lib. Let's call it mylib.lib. That Lib as well as the EXE have MFC linked statically. Then in a completely different project I have a regular DLL, wich is compiled with the /CLR switch and therefore needs the special CRT libs as
4
1635
by: utab | last post by:
Dear all, I want to be able to use C++ libraries(maybe this is too abstract). Is there a source or tutorial giving the general details on the use of C++ libraries. (Sth like, to use all C++ libraries you have to complete these common steps and make the following configurations according to your OS.) I am looking for a step-by-step introduction to library usage. I also checked out the boost web page which seemed to me a bit confusing.
5
1962
by: Chris | last post by:
I have a page with mixture of static and dynamically added controls is there any way of controlling the order which they are added to the page. My submit button (statically added) appears before some textboxes (dynamically added). I know I could move it around with CSS but I want to move towards an accessible site that will display forms in the right order without CSS. Regards, Chris.
20
2144
by: pratap | last post by:
Could someone clarify how could one reduce the size of an executable code during compile time. Could one use specific compile time flag with makefile or is it advisable to go for dynamic linking. The idea here is that smaller the code size the faster is the code. Is Dynamically linked executable really faster than a single executable file which is not linked dynamically.? Is there any performance measuring metrics on gcc version 3.2.2
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.