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 ?

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.