Jump to content

why do you have to compile php (shared object) extensions?


Recommended Posts

Why do you compile php shared object extensions? 

 

Let's say I want to add "extname":  the normal process is:

 

cd extname

$ phpize

$ ./configure && make

 

which creates a .so file (extname.so)

 

Why don't I just download a .so file, put it in place and enable it in php.ini ?

Link to comment
Share on other sites

Good question, I'm no expert but have compiled a few shared objects in my time. I believe the reason these need to be compiled on the actual machine is to enable them to link into the underlying libraries that they use as well as php itself.

Link to comment
Share on other sites

to my knowledge it's because every version of linux is different in one form or another. so, it needs the original source code to compile a version for itself. you could distribute the so, but it would only be good for that particular version of linux. since there are so many linux variations out there, it's easier to just supply the source, and have the user compile it.

Link to comment
Share on other sites

could be right:  but you (in my experience) never seem to have tell the configure command anything (such as the location of local libraries).

 

Default locations are searched and the libraries usually found. Most libs have a .configure option enabling you to point php to a specific location if need be.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.